/* 
   AutopilotCleaner.com - Main Stylesheet
   Modern, Clean, Trustworthy, Mobile-First
*/

:root {
    /* Color Palette - Dark Mode */
    --primary: #2563EB;
    /* Darker Blue for better contrast (4.5:1 on white/light bg) */
    --primary-dark: #1E40AF;
    --secondary: #F8FAFC;
    /* Slate 50 - Light Text for Headings */
    --accent: #38BDF8;
    /* Light Blue */
    --bg-light: #0F172A;
    /* Slate 900 - Dark Background */
    --card-bg: #1E293B;
    /* Slate 800 - Cards Background */
    --text-body: #CBD5E1;
    /* Slate 300 - Body Text */
    --white: #ffffff;
    /* Pure White */
    --success: #10B981;
    --error: #EF4444;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;

    /* Shadows - Adjusted for Dark Mode (subtler) */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);

    /* Transitions */
    --transition: 0.3s ease;
}

/* Global Reset */
* {
    box-sizing: border-box;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 1rem 2rem;
    z-index: 99999;
    transition: top 0.3s ease;
    border-radius: 0 0 8px 8px;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}

/* Enhanced Focus States */
:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    /* Base for mobile */
}

/* Progressive downscaling for desktop to achieve the "80% zoom" look */
@media (min-width: 1024px) {
    html {
        font-size: 14.5px;
        /* ~90% scale */
    }
}

@media (min-width: 1440px) {
    html {
        font-size: 13.5px;
        /* ~84% scale (Closer to user's 80% preference) */
    }
}

@media (min-width: 1900px) {
    html {
        font-size: 13px;
        /* ~81% scale (Perfect 80% feel for ultra-wide) */
    }
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-body);
    background-color: var(--bg-light);
    line-height: 1.5;
    /* Slightly tighter line height */
    margin: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

ul {
    list-style: none;
    padding: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Container */
.container {
    width: 92%;
    max-width: 1100px;
    /* Tighter container for better focus */
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Header */
header {
    background-color: rgba(15, 23, 42, 0.8);
    /* Semi-transparent dark bg */
    backdrop-filter: blur(12px);
    position: fixed;
    /* Keep fixed to be always visible */
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--spacing-sm) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 2rem;
    padding-right: 2rem;
    max-width: 100%;
    /* Override to allow full width */
}

.logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: #fff;
    /* Force white for visibility on dark/image */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
}

.logo-img {
    display: none;
}

.logo .dot {
    color: var(--primary);
}

/* Navigation */
.nav-links {
    display: none;
    /* Hidden on mobile by default */
}

.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(15, 23, 42, 0.7);
    /* Dark semi-transparent tint */
    backdrop-filter: blur(10px);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    gap: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links li a {
    color: var(--secondary);
    font-weight: 500;
}

.mobile-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: block;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: var(--transition);
}

/* Hero Section */
#hero {
    position: relative;
    padding-top: 160px;
    /* More space for header */
    padding-bottom: var(--spacing-lg);
    background-image: url('images/hero-bg.png');
    background-size: cover;
    background-position: center bottom;
    /* Anchor to bottom to ensure wheel placement */
    background-repeat: no-repeat;
    overflow: hidden;
    min-height: 100vh;
    /* Full screen impact */
    display: flex;
    align-items: flex-start;
    /* Allow top margin to work */
    justify-content: flex-end;
    /* Align content to the right */
}

/* Dark overlay: clear on left (wheel), subtle on right (text) */
#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Very subtle gradient, mostly transparent on left */
    background: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0) 30%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 950px;
    /* Widened to allow heading to stay on one line */
    margin-right: 5%;
    margin-left: auto;
    margin-top: 34vh;
    /* Slightly lower position */
    padding: var(--spacing-lg) var(--spacing-md);
    background: rgba(15, 23, 42, 0.75);
    /* Darker backdrop */
    backdrop-filter: blur(12px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.hero-content h1 {
    font-size: 3rem;
    line-height: 1.1;
    margin-top: 0;
    /* Remove browser default top margin */
    margin-bottom: var(--spacing-md);
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    /* Removed background clip for solid white/impact */
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    color: #e2e8f0;
    /* Lighter slate */
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    margin-left: auto;
    /* Push into alignment */
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    border: 1px solid transparent;
    /* Prepare for border */
}

.btn-primary {
    background-color: var(--primary);
    color: #ffffff !important;
    /* Force white text */
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    /* Blue shadow match */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(59, 130, 246, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-lg {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    animation: fadeInUp 1s ease-out 0.4s backwards;
}

.btn-sm {
    padding: 0.5rem 1.25rem;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section Common */
.section-title {
    text-align: center;
    font-size: 1.75rem;
    /* Smaller for desktop */
    margin-bottom: var(--spacing-lg);
}

section {
    padding: var(--spacing-md) 0;
    /* Tighter vertical rhythm */
}

/* How It Works */
#how-it-works {
    background-color: var(--bg-light);
    /* Keep consistent dark background */
}

#how-it-works h2 {
    color: #ffffff;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

.step-card {
    background: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: 12px;
    text-align: center;
    transition: transform var(--transition);
}

.step-card h3 {
    color: #ffffff;
    margin-bottom: var(--spacing-xs);
}

.step-card p {
    color: #e2e8f0;
    /* Light slate for description */
}

.step-card:hover {
    transform: translateY(-5px);
}

.step-img {
    width: 100%;
    max-width: 160px;
    /* Smaller, more aligned with text width */
    height: auto;
    margin-bottom: var(--spacing-md);
    margin-left: auto;
    margin-right: auto;
    border-radius: 12px;
    transition: transform var(--transition);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.step-card:hover .step-img {
    transform: scale(1.05);
    /* Subtle zoom on hover */
}

/* Earnings */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
}

#earnings {
    background-image: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.6)), url('images/driver-view.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: var(--spacing-lg) 0;
    position: relative;
    /* overflow: visible to allow bloom to spill out */
}

/* Sun-Trail Moving Border Effect */
#earnings::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: conic-gradient(from var(--sun-angle, 0deg),
            transparent 0deg,
            transparent 150deg,
            rgba(255, 204, 51, 0.8) 180deg,
            /* Bright sunlight yellow */
            transparent 210deg,
            transparent 360deg);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    pointer-events: none;
    z-index: 1;
    filter: blur(1px);
    opacity: 0.8;
}

/* Atmospheric Bloom (Outer Glow) */
#earnings::after {
    content: '';
    position: absolute;
    inset: -30px;
    padding: 30px;
    background: conic-gradient(from var(--sun-angle, 0deg),
            transparent 160deg,
            rgba(255, 204, 51, 0.15) 175deg,
            rgba(255, 204, 51, 0.4) 180deg,
            rgba(255, 204, 51, 0.15) 185deg,
            transparent 200deg);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    pointer-events: none;
    z-index: 0;
    filter: blur(15px);
    opacity: 0.7;
}

#earnings h2 {
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.feature {
    background: rgba(30, 41, 59, 0.65);
    /* 65% opacity requested */
    backdrop-filter: blur(8px);
    padding: 1.5rem;
    /* Tighter padding */
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary);
    transition: transform var(--transition);
    position: relative;
    /* overflow: visible to allow bloom */
}

/* Feature Card Sun-Trail */
.feature::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: conic-gradient(from var(--sun-angle, 0deg),
            transparent 0deg,
            transparent 150deg,
            rgba(255, 204, 51, 0.6) 180deg,
            transparent 210deg,
            transparent 360deg);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    pointer-events: none;
    z-index: 1;
    filter: blur(1px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Feature Card Bloom (Outer Spillage) */
.feature::after {
    content: '';
    position: absolute;
    inset: -20px;
    padding: 20px;
    background: conic-gradient(from var(--sun-angle, 0deg),
            transparent 165deg,
            rgba(255, 204, 51, 0.2) 180deg,
            transparent 195deg);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask-composite: destination-out;
    pointer-events: none;
    z-index: 0;
    filter: blur(10px);
    opacity: 0;
    transition: opacity 0.5s ease;
}

#earnings:hover .feature::before,
.feature.visible::before,
#earnings:hover .feature::after,
.feature.visible::after {
    opacity: 1;
}

/* The bloom is a bit more subtle than the border */
#earnings:hover .feature::after,
.feature.visible::after {
    opacity: 0.6;
}

.feature:hover {
    transform: translateY(-5px);
    background: rgba(30, 41, 59, 0.8);
}

.feature h3 {
    color: #ffffff;
    margin-bottom: var(--spacing-xs);
}

.feature p {
    color: #ffffff;
    /* White text requested */
    opacity: 0.9;
}


/* Requirements */
#requirements {
    background-color: var(--bg-light);
    /* Dark background */
    color: var(--white);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    /* Separator */
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.req-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.req-box h2 {
    color: var(--white);
}

.req-list {
    text-align: left;
    margin-top: var(--spacing-md);
    display: inline-block;
}

.req-list li {
    margin-bottom: var(--spacing-sm);
    padding-left: 1.5rem;
    position: relative;
}

.req-list li::before {
    content: '✓';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Signup Form */
#signup {
    background-color: var(--bg-light);
}

.form-wrapper {
    background: var(--card-bg);
    padding: var(--spacing-md);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    margin: 0 auto;
}

.form-wrapper h2 {
    text-align: center;
    color: #ffffff;
    /* White text */
}

.form-wrapper p {
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: #e2e8f0;
    /* Light slate for description */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
}

.form-group {
    margin-bottom: var(--spacing-sm);
}

.form-group label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: #ffffff;
    /* White text */
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #334155;
    background-color: #0f172a;
    /* Dark bg */
    color: #fff;
    /* White text */
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    color: #ffffff;
    /* White text */
}

.form-check input {
    margin-top: 0.3rem;
}

.btn-block {
    width: 100%;
}

/* Button States */
.inactive-state {
    opacity: 0.9;
}

/* Loader */
.loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .loader {
    display: block;
}

.form-message {
    margin-top: var(--spacing-sm);
    text-align: center;
    font-size: 0.9rem;
    min-height: 1.5rem;
}

.error-msg {
    color: var(--error);
}

.success-msg {
    color: var(--success);
}

/* FAQ */
#faq {
    position: relative;
    /* Split background: Overlay + Left Image + Right Image */
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)),
        url('images/step-notify.png'),
        url('images/step-clean.png');
    background-position: center, left center, right center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    background-size: cover, 50% 100%, 50% 100%;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    max-width: 800px;
    margin: 0 auto;
}

.faq-item h4 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.faq-item p {
    color: #ffffff;
    /* White text for answers */
    opacity: 0.9;
}

/* Footer */
footer {
    background-color: #020617;
    /* Very dark slate, darker than bg-light */
    color: #94a3b8;
    padding-top: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.footer-col h3,
.footer-col h4 {
    color: var(--white);
}

.footer-col a {
    color: #94a3b8;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #334155;
    padding-top: var(--spacing-sm);
    font-size: 0.9rem;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 10% auto;
    padding: var(--spacing-md);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    position: relative;
    box-shadow: var(--shadow-lg);
}

.modal-content h2,
.modal-content h3 {
    color: #0F172A;
    /* Dark slate for headings */
}

.modal-content p {
    color: #334155;
    /* Dark gray for body text */
}

/* Specific override for contact form in modal to ensure white background and black text */
.modal-content .form-group .modal-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Also ensure textarea is covered specifically if needed */
.modal-content .form-group textarea.modal-input {
    min-height: 100px;
    color: #000000 !important;
    background-color: #ffffff !important;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

textarea.modal-input {
    resize: vertical;
    min-height: 100px;
}

.modal-content .form-group label {
    color: #475569;
    /* Slightly darker slate for modal labels */
}

.close-modal,
.close-tos-modal,
.close-contact-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover,
.close-tos-modal:hover,
.close-contact-modal:hover {
    color: var(--primary);
}

/* Desktop Media Queries */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
        gap: 3rem;
        align-items: center;
        width: 100%;
        justify-content: flex-end;
    }

    .mobile-menu-btn {
        display: none;
    }

    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }
}


@media (min-width: 1024px) {
    .steps-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Form Validation Styles */
.form-group {
    position: relative;
}

.form-group input.valid,
.form-group select.valid,
.form-group textarea.valid,
.modal-input.valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2310b981' viewBox='0 0 16 16'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.form-group input.invalid,
.form-group select.invalid,
.form-group textarea.invalid,
.modal-input.invalid {
    border-color: #ef4444;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23ef4444' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
    padding-right: 2.5rem;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    margin-top: 0.25rem;
    display: block;
}

.char-counter {
    display: block;
    text-align: right;
    font-size: 0.85rem;
    color: #64748b;
    margin-top: 0.25rem;
}

.char-counter.warning {
    color: #f59e0b;
    font-weight: 500;
}

.char-counter.danger {
    color: #ef4444;
    font-weight: 600;
}

/* Phone number formatting helper */
.phone-hint {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 0.25rem;
    display: block;
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-top: 2px solid var(--primary);
    padding: 1.5rem;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.cookie-content p {
    color: #e2e8f0;
    margin: 0;
    flex: 1;
    min-width: 250px;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-content a {
    color: var(--primary);
    text-decoration: underline;
    transition: color var(--transition);
}

.cookie-content a:hover {
    color: #60a5fa;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    min-width: 100px;
}

.cookie-buttons .btn-secondary {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #e2e8f0;
}

.cookie-buttons .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile responsive */
@media (max-width: 768px) {

    .logo-text {
        display: none !important;
    }

    .logo-img {
        display: block !important;
        height: 38px;
        /* Balanced height for mobile header */
        width: auto;
        filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    }

    /* Hero Section Mobile Fixes */
    #hero {
        background-position: left top;
        /* Aligns steering wheel focus with top-left */
        padding-top: 60px;
        /* Aligns content area with header bottom */
        padding-bottom: 17vh;
        /* Elevated by an additional 10% (Total 17%) */
        min-height: 70vh;
        justify-content: center;
        align-items: flex-end;
        background-size: 187%;
        /* Increased to 187% */
    }

    #how-it-works {
        margin-top: -17vh;
        /* Matches #hero padding-bottom to ensure connection */
        padding-top: var(--spacing-md);
        position: relative;
        z-index: 2;
        /* Ensure it stays above overlap if needed */
    }

    .hero-content {
        margin: 0 1rem;
        /* Remove the large margins */
        margin-top: 0;
        margin-bottom: 0;
        /* Let section offsets handle spacing */
        padding: var(--spacing-sm);
        /* Balanced low padding on all sides */
        max-width: 100%;
    }

    .hero-content h1 {
        font-size: calc(2.2rem - 3px) !important;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    /* Earnings & Sun-Trail Mobile Fixes */
    #earnings {
        background-attachment: scroll;
        /* Fixed is buggy on mobile */
        background-position: center;
        padding: var(--spacing-md) 0;
    }

    #earnings::before {
        padding: 4px;
        /* Thicker light trail for visibility */
        filter: blur(2px);
    }

    #earnings::after {
        inset: -15px;
        padding: 15px;
        filter: blur(10px);
    }

    /* General Centering */
    .step-img {
        margin-left: auto;
        margin-right: auto;
    }

    .section-title {
        font-size: 1.75rem;
        padding: 0 var(--spacing-sm);
    }

    /* FAQ Section Mobile - Stacked Images */
    #faq {
        background-image:
            linear-gradient(rgba(15, 23, 42, 0.92), rgba(15, 23, 42, 0.92)),
            url('images/step-notify.png'),
            url('images/step-clean.png');
        background-position: center, top center, bottom center;
        background-repeat: no-repeat;
        background-size: cover, 100% 50%, 100% 50%;
    }

    /* Footer Mobile */
    .footer-content {
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Cookie Banner Mobile */
    .cookie-banner {
        padding: 1rem;
    }

    .cookie-content {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }

    .cookie-content p {
        text-align: center;
        min-width: auto;
    }

    .cookie-buttons {
        justify-content: center;
        width: 100%;
    }

    .cookie-buttons .btn {
        flex: 1;
        min-width: auto;
    }
}

/* Chat Interface Styles */
.chat-modal-wrapper .chat-interface {
    background-color: var(--card-bg);
    /* Use site card background */
    width: 100%;
    max-width: 450px;
    height: 80vh;
    max-height: 700px;
    margin: 5vh auto;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chat-header {
    padding: 1rem;
    background-color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.chat-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-identity .avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.chat-identity .info h3 {
    margin: 0;
    color: white;
    font-size: 1rem;
}

.chat-identity .info span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background-color: #0f172a;
}

.message-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 0.95rem;
    line-height: 1.5;
    position: relative;
    animation: fadeIn 0.3s ease;
    white-space: pre-line;
}

.message-bubble.kim {
    align-self: flex-start;
    background-color: #1e293b;
    /* Slate 800 */
    color: #e2e8f0;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.message-bubble.user {
    align-self: flex-end;
    background-color: var(--primary);
    color: white;
    border-bottom-right-radius: 4px;
}

.chat-input-area {
    padding: 1rem;
    background-color: #1e293b;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#chat-form {
    display: flex;
    gap: 10px;
}

#chat-input {
    flex: 1;
    background-color: #0f172a;
    border: 1px solid #334155;
    border-radius: 20px;
    padding: 10px 16px;
    color: white;
}

#chat-input:focus {
    outline: none;
    border-color: var(--primary);
}

.chat-send-btn {
    background: var(--primary);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.chat-send-btn:hover {
    transform: scale(1.1);
}

/* In-Chat Form Styles */
.chat-form-card {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1rem;
    border-radius: 12px;
    margin-top: 5px;
}

.chat-form-card input,
.chat-form-card select,
.chat-form-card textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    color: white;
}

.chat-form-card button {
    width: 100%;
    padding: 8px;
    background-color: var(--success);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.typing-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: #ccc;
    border-radius: 50%;
    margin-right: 3px;
    animation: typing 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typing {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1);
    }
}

/* Rating Form Styles */
.rating-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.rating-item:last-child {
    border-bottom: none;
    margin-bottom: 1rem;
}

.rating-item h4 {
    margin: 0 0 0.5rem 0;
    color: var(--accent);
    font-size: 0.95rem;
}

.rating-item p {
    font-size: 0.85rem;
    color: #cbd5e1;
    font-style: italic;
    margin: 0 0 0.8rem 0;
    line-height: 1.4;
}

.rating-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 5px;
}

.rating-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    color: white;
}

.rating-label input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-bottom: 4px;
    cursor: pointer;
    background-color: transparent;
    opacity: 0.5;
    /* Customized radio if browser allows, otherwise default */
}

/* Custom Radio Logic */
.rating-label input[type="radio"]:checked {
    opacity: 1;
    transform: scale(1.2);
    accent-color: var(--success);
}

.rating-scale-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    color: #94a3b8;
    margin-top: 5px;
}