/* Landing-specific: hide normal header search, show expanded hero instead */
.header[data-mode="expanded"] .header-search-wrap { display: none !important; }
.header[data-mode="expanded"] { position: relative; box-shadow: none; border-bottom: none; }

.landing-hero {
    background: var(--header-bg);
    padding: 50px 28px 44px;
    text-align: center;
    border-bottom: 1px solid var(--header-border);
    box-shadow: var(--header-shadow);
    position: relative;
    overflow: visible;
}
/* Phase 6.5 — particle network canvas (sits behind hero content) */
.hero-particles {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    opacity: 0.58;
}
.landing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, rgba(7,55,99,0.42) 0%, rgba(7,55,99,0.22) 38%, rgba(7,55,99,0.03) 74%),
        linear-gradient(180deg, rgba(7,55,99,0.08), rgba(7,55,99,0.16));
}
.landing-hero > *:not(.hero-particles) { position: relative; z-index: 1; }

.landing-heading { font-size: 38px; font-weight: 800; color: #fff; margin: 0 0 8px; text-shadow: 0 2px 16px rgba(3,31,56,0.72); }
.landing-examples { font-size: 14px; color: rgba(214,232,255,0.72); margin: 0 0 28px; line-height: 1.5; text-shadow: 0 1px 12px rgba(3,31,56,0.62); }
.landing-examples span { color: rgba(255,255,255,0.9); font-weight: 600; }

/* Search bar in hero */
.landing-search-bar {
    display: flex; align-items: stretch; max-width: 680px; margin: 0 auto;
    background: var(--search-bg); border: 1px solid var(--search-border);
    border-radius: 12px; overflow: visible; position: relative;
}
.landing-search-bar:focus-within { border-color: var(--brand-primary); box-shadow: 0 0 0 3px rgba(11,83,148,0.15); }
[data-theme="dark"] .landing-search-bar:focus-within { box-shadow: 0 0 0 3px rgba(124,133,224,0.15); }

.landing-type-btn { background: var(--search-type-bg); border: none; padding: 0 16px; font-size: 13.5px;
    cursor: pointer; height: 48px; display: flex; align-items: center; gap: 6px;
    color: var(--search-type-text); font-weight: 600; white-space: nowrap; border-radius: 11px 0 0 11px; }
.landing-type-btn:hover { background: var(--brand-surface-hover); }

.landing-type-dropdown { position: absolute; top: calc(100% + 4px); left: 0;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 8px;
    width: 200px; display: none; z-index: 3000; box-shadow: var(--shadow-lg); overflow: hidden; }
.landing-type-dropdown div { padding: 10px 14px; cursor: pointer; font-size: 14px;
    color: var(--text-primary); transition: background 0.15s; }
.landing-type-dropdown div:hover { background: var(--bg-accent); color: var(--brand-primary); }

.landing-search-input-wrap { position: relative; flex: 1; min-width: 0; }
.landing-search-input { border: none; outline: none; flex: 1; padding: 0 16px; font-size: 15px;
    background: transparent; color: var(--search-text); height: 48px; min-width: 0; }
.landing-search-input::placeholder { color: var(--search-placeholder); }

.landing-search-submit { background: var(--brand-primary); border: none; width: 54px; color: #fff;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    border-radius: 0 11px 11px 0; font-size: 16px; transition: background 0.2s; }
.landing-search-submit:hover { background: var(--brand-dark); }

.landing-suggestions { position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 10px;
    box-shadow: var(--shadow-lg); max-height: 240px; overflow-y: auto; z-index: 2000; display: none;
    text-align: left; }

/* Body */
.landing-body { max-width: 1200px; margin: 0 auto; padding: 24px 20px; }

.section-label { font-size: 20px; font-weight: 700; color: var(--brand-primary); margin: 28px 0 14px;
    display: flex; align-items: center; gap: 10px; }
.section-label i { font-size: 18px; opacity: 0.7; }

@media (max-width: 640px) {
    .landing-heading { font-size: 22px; }
    .landing-hero { padding: 30px 12px 24px; }
    .hero-particles { opacity: 0.40; }
    .landing-hero::after {
        background:
            radial-gradient(ellipse at center, rgba(7,55,99,0.56) 0%, rgba(7,55,99,0.34) 46%, rgba(7,55,99,0.10) 80%),
            linear-gradient(180deg, rgba(7,55,99,0.14), rgba(7,55,99,0.24));
    }
    .landing-search-bar { width: 100%; max-width: 100%; }
    .landing-type-btn { font-size: 12px; padding: 0 10px; height: 48px; }
    .landing-search-input { font-size: 16px; padding: 0 12px; height: 48px; }
    .landing-search-submit { width: 48px; height: 48px; }
}

/* Landing carousel card overrides - increased readability */
.landing-body .carousel-card {
    flex: 0 0 calc(20% - 13px);
    min-width: 220px;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.landing-body .carousel-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-3px) !important;
}
.landing-body .carousel-card-link {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}
.landing-body .carousel-card-img {
    height: 150px;
    flex: 0 0 150px;
    background: linear-gradient(135deg, #0B5394, #1565C0);
}
[data-theme="dark"] .landing-body .carousel-card-img {
    background: linear-gradient(135deg, #1e2235, #2a2f45);
}
.landing-body .carousel-card-img i {
    color: rgba(255,255,255,0.7);
    opacity: 1;
}
.landing-body .carousel-card-img .card-name-image-fallback i {
    color: rgba(255,255,255,0.92);
}
.landing-body .carousel-card-body {
    padding: 14px 16px;
    background: var(--bg-card);
    flex: 1 1 auto;
    min-height: 88px;
}
.landing-body .carousel-card-body h4 {
    font-size: 15px;
    color: var(--text-primary);
}
.landing-body .carousel-card-body p {
    font-size: 13px;
    color: var(--text-secondary);
}
.landing-body .carousel-card-footer {
    background: var(--brand-primary);
    color: #fff;
    font-size: 13px;
    border-top: none;
    padding: 10px 16px;
    min-height: 46px;
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    line-height: 1.25;
    overflow: hidden;
}
.landing-body .carousel-card-footer a {
    color: #fff;
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
}
.landing-body .carousel-card-footer a:hover {
    color: #fff;
    text-decoration: underline;
}
[data-theme="dark"] .landing-body .carousel-card-footer {
    background: #1a2d42;
    color: #90caf9;
}
[data-theme="dark"] .landing-body .carousel-card-footer a {
    color: #90caf9;
}
/* Article and news carousels: taller cards, 3-line clamp */
.landing-body #articleTrack .carousel-card-body,
.landing-body #newsTrack .carousel-card-body {
    padding: 18px 16px;
}
.landing-body #articleTrack .carousel-card-body p,
.landing-body #newsTrack .carousel-card-body p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
@media (max-width: 1024px) {
    .landing-body .carousel-card { flex: 0 0 calc(33.333% - 11px); min-width: 0; }
}
@media (max-width: 768px) {
    .landing-body .carousel-card { flex: 0 0 calc(50% - 8px); min-width: 0; }
}
@media (max-width: 640px) {
    .landing-body .carousel-card { flex: 0 0 calc(100% - 4px); min-width: 0; }
    .landing-body .carousel-card-img { height: 140px; }
    .landing-body .carousel-section {
        padding: 0 34px;
    }
    .landing-body .carousel-btn {
        display: flex;
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
        font-size: 14px;
        background: color-mix(in srgb, var(--bg-card) 92%, transparent);
        box-shadow: 0 4px 14px rgba(15,23,42,0.16);
    }
    .landing-body .carousel-btn.left { left: -30px; }
    .landing-body .carousel-btn.right { right: -30px; }
}
