/* ============================================
   ESTEB AND CO - TECH-DRIVEN LOAN BROKERAGE
   Design: Professional, trustworthy, modern
   Focus: Technology advantages, honest positioning
   ============================================ */

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Primary Colors - Trust & Technology */
    --color-primary: #2563eb;      /* Blue - trust, professionalism */
    --color-primary-dark: #1e40af;
    --color-primary-light: #3b82f6;

    /* Accent Colors */
    --color-accent: #10b981;       /* Green - success, approval */
    --color-accent-dark: #059669;

    /* Neutrals */
    --color-dark: #1f2937;
    --color-gray: #6b7280;
    --color-gray-light: #f3f4f6;
    --color-white: #ffffff;

    /* Warning/Info */
    --color-warning: #f59e0b;
    --color-info: #3b82f6;

    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', sans-serif;
    --font-mono: 'SF Mono', 'Monaco', 'Inconsolata', 'Courier New', monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-primary);
    color: var(--color-dark);
    line-height: 1.6;
    background: var(--color-white);
}

/* === CONTAINER === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* === HEADER & NAVIGATION === */
.header {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-gray-light);
    position: sticky;
    top: 0;
    z-index: 1002;
    box-shadow: var(--shadow-sm);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    gap: 1rem;
}

.nav-brand h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.nav-brand .tagline {
    font-size: 0.875rem;
    color: var(--color-gray);
    font-weight: 500;
}

.nav-brand .logo {
    height: 60px;
    width: auto;
    display: block;
}

.nav-brand a {
    display: block;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}

.nav-menu a {
    text-decoration: none;
    color: var(--color-dark);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.nav-menu a:hover {
    color: var(--color-primary);
}

.mobile-apply-btn,
.mobile-call-btn {
    display: none;
}

/* Mobile header buttons - shown in header on mobile */
.mobile-header-buttons {
    display: none;
}

/* === BUTTONS === */
.btn-primary,
.btn-secondary,
.btn-large,
.btn-xl {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
    background: var(--color-gray-light);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.25rem;
}

.btn-call {
    background: var(--color-accent);
    color: var(--color-white);
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}

.btn-call:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Desktop header buttons */
.btn-call-desktop,
.btn-apply {
    display: none;
}

@media (min-width: 769px) {
    .btn-call-desktop,
    .btn-apply {
        display: inline-block;
    }

    .btn-call-desktop {
        margin-right: 0;
    }

    .btn-apply {
        margin-left: 0;
    }

    /* Hide mobile menu toggle and mobile header buttons on desktop */
    .mobile-menu-toggle {
        display: none;
    }

    .mobile-header-buttons {
        display: none;
    }
}

/* === HERO SECTION === */
.hero {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.badge {
    display: inline-block;
    background: var(--color-primary-dark); /* Darker blue for better contrast */
    color: var(--color-white);
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
    color: var(--color-dark);
}

.hero-title .highlight {
    color: #1e3a8a; /* Dark blue for high contrast on light backgrounds */
    font-weight: 900;
    position: relative;
    background: linear-gradient(to right, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.08) 100%);
    padding: 0 0.25em;
    border-radius: 0.2em;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #374151; /* Darker gray for better readability */
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
}

/* Hero Stats */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.stat {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.95rem;
    color: #4b5563; /* Darker gray for better readability */
    font-weight: 500;
}

/* Stats Bar Section */
.stats-bar {
    background: var(--color-white);
    border-top: 1px solid var(--color-gray-light);
    border-bottom: 1px solid var(--color-gray-light);
    padding: var(--spacing-md) 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
}

.stat-item {
    text-align: center;
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.stat-item .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.stat-item .stat-label {
    font-size: 0.95rem;
    color: var(--color-dark);
    font-weight: 500;
}

/* Hero CTA */
.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    align-items: center;
    margin: var(--spacing-lg) 0;
}

/* Ensure all buttons in hero sections are centered */
.hero .btn-large,
.hero .btn-xl,
.hero-content .btn-large,
.hero-content .btn-xl,
.hero-content-center .btn-large,
.hero-content-center .btn-xl {
    margin-left: auto;
    margin-right: auto;
}

.hero-trust {
    color: #374151; /* Darker gray for better readability */
    font-size: 0.95rem;
    margin-top: var(--spacing-md);
}

/* Hero variants for colored backgrounds */
.hero-content-center {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

/* When hero has colored background (via inline style with color: white) */
.hero[style*="color: white"] .hero-title,
.hero[style*="color:white"] .hero-title,
.hero[style*="color: white"] h1,
.hero[style*="color:white"] h1 {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 4px 8px rgba(0, 0, 0, 0.15);
}

.hero[style*="color: white"] .hero-subtitle,
.hero[style*="color:white"] .hero-subtitle,
.hero[style*="color: white"] > .container > div > p,
.hero[style*="color:white"] > .container > div > p {
    color: rgba(255, 255, 255, 1) !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    opacity: 1 !important;
}

.hero[style*="color: white"] .hero-title .highlight,
.hero[style*="color:white"] .hero-title .highlight {
    color: white !important;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
    background: linear-gradient(to right, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0.1) 100%);
    padding: 0 0.3em;
    border-radius: 0.2em;
}

/* Spans with white background and colored text inside white hero sections */
.hero[style*="color: white"] span[style*="background: white"],
.hero[style*="color:white"] span[style*="background: white"] {
    text-shadow: none !important;
    /* Keep the inline color (var(--color-primary)) */
}

/* Buttons and links in white hero sections */
.hero[style*="color: white"] a.btn-large,
.hero[style*="color:white"] a.btn-large,
.hero[style*="color: white"] .btn-large,
.hero[style*="color:white"] .btn-large {
    text-shadow: none !important;
}

.hero[style*="color: white"] a[style*="border: 2px solid white"],
.hero[style*="color:white"] a[style*="border: 2px solid white"] {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.hero[style*="color: white"] .hero-trust,
.hero[style*="color:white"] .hero-trust {
    color: rgba(255, 255, 255, 1) !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
    opacity: 1 !important;
}

.hero[style*="color: white"] .badge,
.hero[style*="color:white"] .badge,
.hero[style*="color: white"] div[style*="background: rgba(255,255,255,0.2)"],
.hero[style*="color:white"] div[style*="background: rgba(255,255,255,0.2)"] {
    background: rgba(255, 255, 255, 0.25) !important;
    color: white !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Additional hero variants with light backgrounds - need high contrast text */
.hero-secondary,
.hero-compare,
.hero-reviews,
.hero-securities,
.hero-faq,
.hero-rates {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

/* High contrast highlight text for light background heroes */
.hero-secondary .highlight,
.hero-compare .highlight,
.hero-reviews .highlight,
.hero-securities .highlight,
.hero-faq .highlight,
.hero-rates .highlight {
    color: #1e3a8a !important; /* Very dark blue for high contrast */
    font-weight: 900;
    position: relative;
}

/* Optional: Add background highlight for even more emphasis */
.hero-secondary .hero-title .highlight,
.hero-compare .hero-title .highlight,
.hero-reviews .hero-title .highlight,
.hero-securities .hero-title .highlight,
.hero-faq .hero-title .highlight,
.hero-rates .hero-title .highlight {
    background: linear-gradient(to right, rgba(37, 99, 235, 0.15) 0%, rgba(37, 99, 235, 0.08) 100%);
    padding: 0 0.25em;
    border-radius: 0.2em;
}

/* Ensure badge and other elements have good contrast */
.hero-secondary .badge,
.hero-compare .badge,
.hero-reviews .badge,
.hero-securities .badge,
.hero-faq .badge,
.hero-rates .badge {
    background: var(--color-primary-dark);
    color: white;
}

/* Ensure subtitle text is dark and readable on light backgrounds */
.hero-secondary .hero-subtitle,
.hero-compare .hero-subtitle,
.hero-reviews .hero-subtitle,
.hero-securities .hero-subtitle,
.hero-faq .hero-subtitle,
.hero-rates .hero-subtitle {
    color: var(--color-dark) !important;
}

/* Ensure all text in these light hero sections is consistently dark */
.hero-secondary .hero-title,
.hero-compare .hero-title,
.hero-reviews .hero-title,
.hero-securities .hero-title,
.hero-faq .hero-title,
.hero-rates .hero-title {
    color: var(--color-dark) !important;
}

/* Dark text on bright backgrounds (like yellow/orange) */
.hero[style*="color: #1a1a1a"] h1,
.hero[style*="color:#1a1a1a"] h1 {
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

.hero[style*="color: #1a1a1a"] p,
.hero[style*="color:#1a1a1a"] p {
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.3);
}

/* === SECTIONS === */
section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}

.section-subtitle {
    text-align: center;
    font-size: 1.25rem;
    color: #4b5563; /* Darker gray for better readability */
    margin-bottom: var(--spacing-lg);
}

/* === LOAN TYPES GRID === */
.loan-types {
    background: var(--color-gray-light);
}

.loan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.loan-card {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-dark);
    transition: all 0.3s;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.loan-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
    border: 2px solid var(--color-primary);
}

.loan-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.loan-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
    color: var(--color-dark);
}

.loan-card p {
    color: #4b5563; /* Darker gray for better readability */
    margin-bottom: var(--spacing-sm);
}

.loan-lenders {
    display: inline-block;
    background: var(--color-primary-light);
    color: var(--color-white);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.loan-card .arrow {
    position: absolute;
    bottom: var(--spacing-md);
    right: var(--spacing-md);
    font-size: 1.5rem;
    color: var(--color-primary);
}

/* === HOW IT WORKS === */
.how-it-works {
    background: var(--color-white);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.step {
    position: relative;
}

.step-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 50%;
    text-align: center;
    line-height: 50px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.step h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-dark);
}

.step p {
    color: #4b5563; /* Darker gray for better readability */
    margin-bottom: var(--spacing-sm);
}

.tech-list {
    list-style: none;
    margin: var(--spacing-sm) 0;
}

.tech-list li {
    padding: 0.5rem 0;
    color: #4b5563; /* Darker gray for better readability */
}

.tech-badge {
    display: inline-block;
    background: var(--color-accent);
    color: var(--color-white);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: var(--spacing-sm);
}

.cta-box {
    text-align: center;
    margin-top: var(--spacing-lg);
}

/* === TECHNOLOGY ADVANTAGE === */
.tech-advantage {
    background: var(--color-gray-light);
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.comparison-column {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.comparison-column h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
}

.highlight-column {
    border: 3px solid var(--color-primary);
    position: relative;
}

.comparison-list {
    list-style: none;
}

.comparison-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-gray-light);
    color: #4b5563; /* Darker gray for better readability */
}

.comparison-list li:last-child {
    border-bottom: none;
}

.highlight-column .comparison-list li {
    color: var(--color-dark);
}

.highlight-column .comparison-list li strong {
    color: var(--color-primary);
}

/* Tech Explainer */
.tech-explainer {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
    color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-top: var(--spacing-lg);
}

.tech-explainer h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.75rem;
}

.tech-explainer p {
    margin-bottom: var(--spacing-md);
    font-size: 1.1rem;
}

.algorithm-factors {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-md);
    margin: var(--spacing-md) 0;
}

.factor {
    background: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.factor strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    word-wrap: break-word;
    hyphens: auto;
}

.factor .points {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.total-score {
    text-align: center;
    font-size: 1.25rem;
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.total-score strong {
    color: var(--color-accent);
    font-size: 1.5rem;
}

/* === TRANSPARENCY === */
.transparency {
    background: var(--color-white);
}

.transparency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.transparency-card {
    background: var(--color-gray-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.transparency-card h3 {
    margin-bottom: var(--spacing-md);
    font-size: 1.5rem;
    color: var(--color-dark);
}

.transparency-card ul {
    list-style: none;
    margin-bottom: var(--spacing-md);
}

.transparency-card li {
    padding: 0.5rem 0;
    color: #4b5563; /* Darker gray for better readability */
}

.transparency-note {
    background: var(--color-white);
    padding: var(--spacing-sm);
    border-radius: var(--radius-sm);
    border-left: 4px solid var(--color-primary);
    margin-top: var(--spacing-md);
}

.guarantee-box {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    text-align: center;
}

.guarantee-box h3 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.guarantee-box p {
    font-size: 1.25rem;
}

/* === LENDER NETWORK === */
.lender-network {
    background: var(--color-gray-light);
}

.lender-categories {
    display: grid;
    gap: var(--spacing-md);
}

.lender-category {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.lender-category h3 {
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
    font-size: 1.25rem;
}

.lender-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.lender-tag {
    background: var(--color-gray-light);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-dark);
}

.lender-note {
    text-align: center;
    color: var(--color-gray);
    margin-top: var(--spacing-md);
    font-style: italic;
}

/* === CTA SECTION === */
.cta-section {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: var(--color-white);
    text-align: center;
    padding: var(--spacing-xl) 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
}

.cta-section .btn-primary {
    background: var(--color-white);
    color: var(--color-primary);
}

.cta-section .btn-primary:hover {
    background: var(--color-gray-light);
}

.cta-subtext {
    margin-top: var(--spacing-sm);
    font-size: 0.95rem;
    opacity: 0.9;
}

/* === FOOTER === */
.footer {
    background: var(--color-dark);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-column h4 {
    margin-bottom: var(--spacing-sm);
    font-size: 1.1rem;
}

.footer-column p {
    color: var(--color-gray);
    font-size: 0.95rem;
    margin-bottom: var(--spacing-xs);
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: var(--color-gray);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-column a:hover {
    color: var(--color-white);
}

.footer-license {
    font-size: 0.875rem;
    margin-top: var(--spacing-sm);
    font-style: italic;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
}

.footer-bottom p {
    color: var(--color-gray);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-xs);
}

.disclaimer {
    font-size: 0.8rem;
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto;
}

/* === CONTACT PAGE === */
.contact-method {
    background: var(--color-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--color-dark);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all 0.3s;
}

.contact-method:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-lg);
}

.contact-form {
    background: var(--color-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--color-gray-light);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color 0.2s;
}

.form-group input[type="checkbox"] {
    width: auto;
    padding: 0;
    margin: 0;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    color: var(--color-gray);
    font-size: 0.875rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 150px;
}

.feature-list {
    list-style: none;
    margin-top: var(--spacing-sm);
}

.feature-list li {
    padding: 0.5rem 0;
    color: #4b5563; /* Darker gray for better readability */
    font-size: 0.95rem;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.faq-item {
    background: var(--color-gray-light);
    padding: var(--spacing-md);
    border-radius: var(--radius-lg);
}

.faq-item h3 {
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    font-size: 1.1rem;
}

.faq-item p {
    color: #4b5563; /* Darker gray for better readability */
}

/* === MOBILE MENU === */
.mobile-menu-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    /* Mobile header layout: logo takes space, buttons and hamburger clustered right */
    .nav {
        display: grid;
        grid-template-columns: 1fr auto auto;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .nav-brand {
        order: 1;
    }

    .nav-brand .logo {
        height: 45px;
    }

    .mobile-menu-toggle {
        order: 3;
    }

    /* Mobile header buttons container */
    .mobile-header-buttons {
        display: flex;
        gap: 0.5rem;
        order: 2;
    }

    .mobile-header-buttons .btn-call,
    .mobile-header-buttons .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    /* Center standalone buttons in hero on mobile */
    .hero .btn-large,
    .hero .btn-xl {
        display: block;
        text-align: center;
    }

    /* Enhanced text readability on mobile for colored hero backgrounds */
    .hero[style*="color: white"] .hero-title,
    .hero[style*="color:white"] .hero-title,
    .hero[style*="color: white"] h1,
    .hero[style*="color:white"] h1 {
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.2) !important;
        font-size: 2.25rem !important;
        opacity: 1 !important;
    }

    .hero[style*="color: white"] .hero-subtitle,
    .hero[style*="color:white"] .hero-subtitle,
    .hero[style*="color: white"] > .container > div > p,
    .hero[style*="color:white"] > .container > div > p {
        text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
        font-size: 1.15rem !important;
        opacity: 1 !important;
    }

    .hero[style*="color: white"] .hero-title .highlight,
    .hero[style*="color:white"] .hero-title .highlight {
        text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.25) !important;
        background: linear-gradient(to right, rgba(255, 255, 255, 0.35) 0%, rgba(255, 255, 255, 0.15) 100%);
        opacity: 1 !important;
    }

    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
    }

    /* Mobile navigation */
    .nav-menu {
        display: flex !important;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: var(--color-white);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        padding: 0;
        gap: 0;
        transition: right 0.3s ease;
        overflow: hidden;
        z-index: 1001;
        pointer-events: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Scrollable wrapper created by JavaScript */
    .nav-menu-scroll {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        padding-top: 2rem;
        padding-bottom: 1rem;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid var(--color-gray-light);
        padding: 0 2rem;
    }

    .nav-menu li a {
        display: block;
        padding: 1rem 0;
        width: 100%;
        pointer-events: auto;
        cursor: pointer;
    }

    .nav-item-dropdown > a {
        padding: 1rem 0;
    }

    /* Portrait orientation - more spacing */
    @media (max-width: 768px) and (orientation: portrait) {
        .nav-menu-scroll {
            padding-top: 2rem;
        }
    }

    /* Landscape orientation - more compact */
    @media (max-width: 768px) and (orientation: landscape) {
        .nav-menu-scroll {
            padding-top: 1.5rem;
        }

        .nav-menu li a {
            padding: 0.75rem 0;
        }
    }

    /* Mobile dropdown */
    .nav-item-dropdown .dropdown-menu {
        position: static;
        display: none;
        min-width: 100%;
        box-shadow: none;
        padding: 0 0 0 1rem;
        margin: 0;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
        grid-template-columns: 1fr;
        gap: 0;
        background: var(--color-gray-light);
        border-radius: 0;
    }

    /* Mobile dropdown - simple version */
    .nav-item-dropdown .dropdown-menu-simple {
        padding: 0;
        grid-template-columns: 1fr;
    }

    .dropdown-menu-simple a {
        padding: 0.75rem 1rem;
    }

    .nav-item-dropdown.active .dropdown-menu {
        display: grid;
    }

    .dropdown-section {
        padding: 1rem 0;
    }

    .dropdown-section h4 {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    .dropdown-section a {
        padding: 0.5rem 0.5rem;
        font-size: 0.9rem;
    }

    /* Mobile menu buttons - hide the ones in the menu */
    .mobile-call-btn,
    .mobile-apply-btn {
        display: none !important;
    }

    .section-title {
        font-size: 2rem;
    }

    .loan-grid,
    .process-steps,
    .comparison-grid,
    .transparency-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .algorithm-factors {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .factor {
        padding: var(--spacing-sm) var(--spacing-xs);
    }

    .factor strong {
        font-size: 0.95rem;
    }

    .factor .points {
        font-size: 1.25rem;
    }

    .tech-explainer h3 {
        font-size: 1.4rem;
    }

    .tech-explainer p {
        font-size: 1rem;
    }

    .total-score {
        font-size: 1rem;
    }

    .total-score strong {
        font-size: 1.2rem;
    }

    /* Contact page mobile fixes */
    .contact-method {
        padding: 1.5rem 1rem;
        margin-bottom: 1rem;
    }

    .contact-method h3 {
        font-size: 1.25rem;
    }

    .contact-method p {
        font-size: 0.95rem;
    }

    .contact-form {
        padding: 1.5rem 1rem;
        margin: 0 0.5rem;
    }

    .contact-form-container {
        padding: 0;
        max-width: 100% !important;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent iOS zoom on focus */
    }

    .form-group label {
        font-size: 0.95rem;
    }

    .form-group input[type="checkbox"] {
        flex-shrink: 0;
    }

    .loan-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    /* Smaller buttons on very small screens */
    .mobile-header-buttons .btn-call,
    .mobile-header-buttons .btn-primary {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .nav {
        padding: 0.75rem 0.5rem;
        gap: 0.25rem;
    }

    .nav-brand .logo {
        height: 40px;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    /* Enhanced readability for inline-styled hero titles on smallest screens */
    .hero[style*="color: white"] h1,
    .hero[style*="color:white"] h1 {
        font-size: 1.85rem !important;
        text-shadow: 0 3px 8px rgba(0, 0, 0, 0.35), 0 5px 15px rgba(0, 0, 0, 0.25) !important;
        opacity: 1 !important;
    }

    .hero[style*="color: white"] > .container > div > p,
    .hero[style*="color:white"] > .container > div > p {
        font-size: 1.05rem !important;
        opacity: 1 !important;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .contact-method {
        padding: 1.25rem 0.75rem;
    }

    .contact-form {
        padding: 1.25rem 0.75rem;
        margin: 0 0.25rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .form-group label span {
        line-height: 1.4;
    }

    /* Algorithm section - single column on small phones */
    .algorithm-factors {
        grid-template-columns: 1fr;
        gap: var(--spacing-xs);
    }

    .factor {
        padding: var(--spacing-sm);
    }

    .factor strong {
        font-size: 1rem;
    }

    .factor .points {
        font-size: 1.4rem;
    }

    .tech-explainer {
        padding: var(--spacing-md);
    }

    .tech-explainer h3 {
        font-size: 1.25rem;
    }

    .tech-explainer p {
        font-size: 0.95rem;
    }

    .total-score {
        font-size: 0.95rem;
    }

    .total-score strong {
        font-size: 1.1rem;
    }
}

/* === DROPDOWN NAVIGATION (Desktop Only) === */
@media (min-width: 769px) {
    .nav-item-dropdown {
        position: relative;
    }

    .nav-item-dropdown > a {
        cursor: pointer;
        padding: 1rem 0;
        display: inline-block;
    }

    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        min-width: 700px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        border-radius: 0.5rem;
        padding: 2rem;
        margin-top: 0;
        z-index: 1000;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
        transform: translateY(-10px);
    }

    .nav-item-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }

    .dropdown-section h4 {
        color: var(--color-primary);
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 1rem;
        font-weight: 700;
    }

    .dropdown-section a {
        display: block;
        padding: 0.5rem 0.75rem;
        color: var(--color-dark);
        text-decoration: none;
        border-radius: 0.375rem;
        transition: all 0.2s;
        font-size: 0.9rem;
    }

    .dropdown-section a:hover {
        background: var(--color-gray-light);
        color: var(--color-primary);
        padding-left: 1rem;
    }

    /* Simple dropdown (single column) */
    .dropdown-menu-simple {
        min-width: 250px;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 1rem 0;
    }

    .dropdown-menu-simple a {
        display: block;
        padding: 0.75rem 1.5rem;
        color: var(--color-dark);
        text-decoration: none;
        transition: all 0.2s;
        font-size: 0.95rem;
    }

    .dropdown-menu-simple a:hover {
        background: var(--color-gray-light);
        color: var(--color-primary);
    }
}

