/**
 * Landing Page Styles
 * Enterprise-ready, modular landing page design
 * Brand colors: Primary #1B365D (Navy), Accent #93CB41 (Lime Green)
 */

/* ===== LANDING PAGE GLOBAL STYLES ===== */
.landing-page {
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-header {
    margin-bottom: 3rem;
}

.section-header.center {
    text-align: center;
}

.section-title {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: var(--line-height-tight);
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

/* ===== NAVIGATION ===== */
.landing-nav {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.nav-logo img {
    height: 42px;
    width: auto;
}

/* Theme-aware logo display */
.logo-dark {
    display: none;
}

[data-theme="dark"] .logo-light {
    display: none;
}

[data-theme="dark"] .logo-dark {
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    padding: 6rem 0 8rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--accent-accessible) 100%);
    color: white;
    overflow: hidden;
}

.hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(147, 203, 65, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(27, 54, 93, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: white;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
    color: white;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-trust {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: var(--font-size-sm);
    opacity: 0.9;
}

.trust-icon {
    flex-shrink: 0;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: var(--font-size-base);
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--border-radius);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: var(--font-size-lg);
}

.btn-primary {
    background: var(--accent-accessible);
    color: #181818;
    border-color: var(--accent-accessible);
}

.btn-primary:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: #181818;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(131, 198, 24, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

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

.btn-outline-white {
    background: transparent;
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-outline-white:visited {
    color: white;
}

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

/* ===== RECALLS SECTION ===== */
.recalls-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
}

/* Search Container */
.recall-search-container {
    max-width: 800px;
    margin: 0 auto 4rem;
}

.recall-search-form {
    margin-bottom: 1rem;
}

.search-input-group {
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 2px solid var(--border);
    border-radius: calc(var(--border-radius) * 2);
    padding: 0.5rem 0.5rem 0.5rem 1.25rem;
    gap: 0.75rem;
    transition: all 0.2s ease;
}

.search-input-group:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(27, 54, 93, 0.1);
}

.search-icon {
    color: var(--text-tertiary);
    flex-shrink: 0;
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: var(--font-size-base);
    color: var(--text-primary);
    outline: none;
    padding: 0.5rem 0;
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

.search-button {
    flex-shrink: 0;
    background: var(--accent-accessible);
    color: #181818;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-button:hover {
    background: var(--accent-dark);
    color: #181818;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(131, 198, 24, 0.3);
}

.search-hint {
    text-align: center;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.category-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.category-card:hover::before {
    opacity: 1;
}

.card-content {
    flex: 1;
}

.card-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.card-count {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.badge {
    display: inline-block;
    background: var(--accent-accessible);
    color: #181818;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.category-card:hover .badge {
    background: var(--accent-dark);
    color: #181818;
}

.card-icon {
    flex-shrink: 0;
    color: var(--primary);
    opacity: 0.2;
    transition: all 0.3s ease;
}

.category-card:hover .card-icon {
    opacity: 0.4;
    transform: scale(1.1);
}

/* Safety Quote (Legacy - kept for fallback) */
.safety-quote {
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
}

.safety-quote blockquote {
    position: relative;
    padding: 2rem;
    background: var(--bg-primary);
    border-left: 4px solid var(--accent);
    border-radius: var(--border-radius);
    font-style: italic;
    color: var(--text-secondary);
}

.quote-icon {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: var(--accent);
    opacity: 0.2;
}

.safety-quote p {
    margin: 0 0 1rem 0;
    padding-left: 2rem;
}

.safety-quote cite {
    display: block;
    text-align: right;
    font-style: normal;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}

/* ===== STATS CAROUSEL ===== */
.safety-stats-carousel {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.carousel-container {
    position: relative;
    overflow: hidden;
}

/* Loading State */
.carousel-loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-secondary);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 1rem;
    border: 4px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.carousel-track {
    position: relative;
    height: 280px; /* Fixed height to prevent jumping */
    display: flex;
    align-items: center;
}

.stat-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    padding: 3rem 2rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 600ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s 600ms;
}

.stat-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
    transition: opacity 600ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 600ms cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0s 0s;
}

/* Transition Styles */
/* Fade */
.carousel-transition-fade .stat-slide {
    transform: none;
}

.carousel-transition-fade .stat-slide.active {
    transform: none;
}

/* Slide - 3-state positioning (prev/active/next) */
.carousel-transition-slide .stat-slide.prev {
    transform: translateX(-100%);
    opacity: 0;
}

.carousel-transition-slide .stat-slide.active {
    transform: translateX(0);
    opacity: 1;
}

.carousel-transition-slide .stat-slide.next {
    transform: translateX(100%);
    opacity: 0;
}

/* Fade + Slide (default) */
.carousel-transition-fade-slide .stat-slide {
    transform: translateX(20px);
}

.carousel-transition-fade-slide .stat-slide.active {
    transform: translateX(0);
}

/* Scale */
.carousel-transition-scale .stat-slide {
    transform: scale(0.95);
}

.carousel-transition-scale .stat-slide.active {
    transform: scale(1);
}

/* Slide Up */
.carousel-transition-slide-up .stat-slide {
    transform: translateY(20px);
}

.carousel-transition-slide-up .stat-slide.active {
    transform: translateY(0);
}

.stat-slide .stat-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-accessible) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-text {
    font-size: var(--font-size-lg);
    line-height: var(--line-height-relaxed);
    color: var(--text-secondary);
    margin: 0 0 1.5rem 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.stat-text strong {
    color: var(--primary);
    font-weight: 700;
}

.stat-source {
    display: block;
    text-align: center;
    font-style: normal;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

/* Carousel Controls */
.carousel-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    padding: 0.5rem;
}

.carousel-btn {
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all 0.2s ease;
    padding: 0;
}

.carousel-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    transform: scale(1.05);
}

.carousel-btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.carousel-btn:active {
    transform: scale(0.95);
}

.carousel-dots {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--border);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.dot:hover {
    border-color: var(--accent);
    background: var(--accent);
    opacity: 0.6;
}

.dot.active {
    border-color: var(--accent);
    background: var(--accent);
    width: 24px;
    border-radius: 5px;
}

.dot:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Screen reader only content */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.carousel-status {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* ===== STEPS SECTION ===== */
.steps-section {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.step-card {
    position: relative;
    padding: 2.5rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border: 2px solid var(--border);
    transition: all 0.3s ease;
}

.step-card:hover {
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.step-number {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.step-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.step-title {
    font-size: var(--font-size-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.step-description {
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
    margin-bottom: 1.5rem;
}

.step-features {
    list-style: none;
    padding: 0;
}

.step-features li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.step-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--accent);
    font-weight: 700;
}

/* Steps CTA */
.steps-cta {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.cta-buttons .btn {
    margin: 0;
}

.cta-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    margin-top: 1rem;
}

.cta-note svg {
    color: var(--accent);
}

/* ===== STATS SECTION ===== */
.stats-section {
    padding: 5rem 0;
    background: var(--bg-primary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.stat-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent-accessible) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--accent-accessible);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.stat-description {
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}

/* Hazard Types */
.hazard-types {
    text-align: center;
    margin-bottom: 4rem;
}

.hazard-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hazard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.hazard-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--bg-secondary);
    border: 2px solid var(--border);
    border-radius: 2rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.hazard-tag:hover {
    border-color: var(--accent);
    background: var(--bg-primary);
}

.hazard-tag svg {
    flex-shrink: 0;
}

.hazard-fire { border-color: var(--error-border); }
.hazard-fire:hover { border-color: var(--error); color: var(--error); }

.hazard-choking { border-color: var(--warning-border); }
.hazard-choking:hover { border-color: var(--warning); color: var(--warning); }

.hazard-chemical { border-color: var(--primary-100); }
.hazard-chemical:hover { border-color: var(--primary); color: var(--primary); }

/* Agency Section */
.agency-section {
    text-align: center;
}

.agency-title {
    font-size: var(--font-size-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.agency-logos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

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

.agency-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border-radius: 50%;
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin: 0 auto 1rem;
}

.agency-item p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ===== FOOTER ===== */
.landing-footer {
    padding: 2rem 0;
    background: var(--primary);
    color: rgba(255, 255, 255, 0.8);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }

    .nav-link {
        display: none;
    }

    .hero {
        padding: 4rem 0 5rem;
    }

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

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

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .search-input-group {
        flex-wrap: wrap;
    }

    .search-button {
        width: 100%;
    }

    .category-cards {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }

    .stat-slide {
        padding: 2rem 1.5rem;
    }

    .stat-text {
        font-size: var(--font-size-base);
    }

    .carousel-controls {
        gap: 0.75rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-buttons .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hazard-tags {
        flex-direction: column;
        align-items: stretch;
    }

    .hazard-tag {
        justify-content: center;
    }
}

/* ===== DARK THEME SUPPORT ===== */
[data-theme="dark"] .landing-nav {
    background: var(--bg-primary);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .category-card,
[data-theme="dark"] .step-card,
[data-theme="dark"] .stat-card {
    background: var(--bg-secondary);
    border-color: var(--border);
}

[data-theme="dark"] .safety-quote blockquote {
    background: var(--bg-secondary);
}

[data-theme="dark"] .search-input-group {
    background: var(--bg-secondary);
    border-color: var(--border);
}

[data-theme="dark"] .stat-slide {
    background: var(--bg-secondary);
    border-left-color: var(--accent);
}

[data-theme="dark"] .carousel-btn {
    background: var(--bg-primary);
    border-color: var(--border);
}

[data-theme="dark"] .carousel-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}
