/*
Theme Name: LendMeNow
Description: A modern WordPress theme for loan tracking and peer-to-peer lending platform. Features responsive design, clean UI, and professional styling.
Version: 1.0
Author: LendMeNow Team
Text Domain: lendmenow
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Hide Google Translate elements if they exist */
#google_translate_element,
.goog-te-banner,
.goog-te-gadget,
.goog-te-combo,
.goog-te-menu-value,
.goog-te-menu2,
.goog-te-menu2-item,
.goog-te-menu2-item div,
.goog-te-menu2-item span {
    display: none !important;
    visibility: hidden !important;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

html {
    height: 100%;
}

/* Main content wrapper */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Navigation */
nav {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s;
}

.logo:hover {
    color: #0056b3;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links li {
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #007bff;
}

/* Submenu Styles */
.nav-links .has-submenu {
    position: relative;
}

.nav-links .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 0.5rem 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.nav-links .has-submenu:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-links .sub-menu li {
    margin: 0;
    list-style: none;
}

.nav-links .sub-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    border-radius: 4px;
    margin: 0 0.5rem;
}

.nav-links .sub-menu a:hover {
    background: #f8f9fa;
    color: #007bff;
}

.submenu-toggle {
    font-size: 0.75rem;
    margin-left: 0.5rem;
    transition: transform 0.3s;
}

.nav-links .has-submenu:hover .submenu-toggle {
    transform: rotate(180deg);
}

.cta-btn {
    background: #007bff;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: background 0.3s;
}

.cta-btn:hover {
    background: #0056b3;
}

.logout-btn {
    background: #dc3545;
    color: white !important;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #dc3545;
}

.logout-btn:hover {
    background: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220,53,69,0.3);
}

/* Hero Section */
.hero {
    width: 100%;
    min-height: 60vh;
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    background-image: url('https://images.pexels.com/photos/4386431/pexels-photo-4386431.jpeg?auto=compress&cs=tinysrgb&w=1920&h=1080&dpr=1');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero h1,
.hero p,
.hero-buttons {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.btn-primary {
    background: #007bff;
    color: white;
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #007bff;
}

.btn-primary:hover {
    background: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
}

.btn-secondary {
    background: white;
    color: #007bff;
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #007bff;
}

.btn-secondary:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-green {
    background: #28a745;
    color: white;
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: 2px solid #28a745;
}

.btn-green:hover {
    background: #218838;
    border-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
}

/* Features Section */
.features {
    background: #f8f9fa;
    padding: 4rem 2rem;
}

.features-container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1a1a1a;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    text-decoration: none !important;
    border-bottom: none !important;
}

.feature-card p {
    color: #666;
    line-height: 1.6;
}

/* How It Works */
.how-it-works {
    padding: 4rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
}

.step-number {
    width: 60px;
    height: 60px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    margin-bottom: 0.5rem;
    color: #1a1a1a;
    text-decoration: none !important;
    border-bottom: none !important;
}

.step p {
    color: #666;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.btn-light {
    background: white;
    color: #007bff;
    padding: 1rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
}

.btn-light:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255,255,255,0.3);
}

/* Footer */
footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: auto;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #007bff;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #007bff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0,123,255,0.3);
    transition: all 0.3s ease;
    z-index: 1000;
}

.back-to-top:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,123,255,0.4);
}

.back-to-top.show {
    display: flex;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    /* Ensure body can scroll */
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .hero {
        min-height: 70vh;
        padding: 2rem 1rem;
        box-sizing: border-box;
    }

    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.3;
        margin-bottom: 1rem;
    }

    .hero p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.5rem;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        transition: left 0.3s ease;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding-top: 2rem;
        overflow-y: auto;
    }

    .nav-links.active {
        left: 0;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-links li {
        margin: 1rem 0;
    }

    .nav-links a {
        font-size: 1.2rem;
        padding: 0.5rem 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }

    .hero-buttons a {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
        box-sizing: border-box;
        display: block;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .nav-container {
        padding: 1rem;
    }

    .features {
        padding: 2rem 1rem;
    }

    .how-it-works {
        padding: 2rem 1rem;
    }

    .cta-section {
        padding: 2rem 1rem;
    }

    footer {
        padding: 2rem 1rem 1rem;
    }
}

@media (max-width: 480px) {
    .hero {
        min-height: 60vh;
        padding: 1.5rem 0.75rem;
        box-sizing: border-box;
    }

    .hero h1 {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 0.75rem;
    }

    .hero p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 1.25rem;
    }

    .hero-buttons {
        max-width: 280px;
        gap: 0.5rem;
    }

    .hero-buttons a {
        max-width: 260px;
        padding: 0.65rem 0.85rem;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 1.5rem;
    }
}

/* Extra small devices (320px and below) */
@media (max-width: 320px) {
    .hero {
        padding: 1rem 0.5rem;
    }

    .hero h1 {
        font-size: 1.3rem;
        line-height: 1.1;
    }

    .hero p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .hero-buttons {
        max-width: 250px;
        gap: 0.4rem;
    }

    .hero-buttons a {
        max-width: 240px;
        padding: 0.6rem 0.7rem;
        font-size: 0.8rem;
    }
}

    /* Override WordPress default heading styles */
    h1, h2, h3, h4, h5, h6 {
        text-decoration: none !important;
        border-bottom: none !important;
    }

    /* Specific overrides for theme headings */
    .section-title,
    .feature-card h3,
    .step h3,
    .entry-title,
    .page-title {
        text-decoration: none !important;
        border-bottom: none !important;
    }
}
