/* ═══════════════════════════════════════════════════════════════
   landingpage.css — SYSTEMOSAS Landing Page
   Design: Glass/Water Effect · Dark Blue · Flipbook Navigation
   Modes: Dark (default) · Light
   ═══════════════════════════════════════════════════════════════ */

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
    /* Core palette — Dark Mode (default) */
    --bg-base:          #03081a;
    --bg-mid:           #060d24;
    --bg-surface:       #0a1330;

    /* Glass surfaces */
    --glass-bg:         rgba(255, 255, 255, 0.045);
    --glass-bg-hover:   rgba(255, 255, 255, 0.08);
    --glass-border:     rgba(255, 255, 255, 0.10);
    --glass-border-hover: rgba(255, 255, 255, 0.20);
    --glass-shadow:     0 8px 32px rgba(0, 0, 0, 0.45);
    --glass-blur:       blur(20px);
    --glass-blur-heavy: blur(32px);

    /* Brand colors */
    --blue-deep:        #0a1a3e;
    --blue-primary:     #1e40af;
    --blue-mid:         #2563eb;
    --blue-bright:      #3b82f6;
    --blue-glow:        #60a5fa;
    --blue-muted:       #1d3461;
    --accent:           #38bdf8;     /* sky/water accent */
    --accent-2:         #818cf8;     /* indigo secondary accent */
    --accent-glow:      rgba(56, 189, 248, 0.35);

    /* Text */
    --text-primary:     #f0f4ff;
    --text-secondary:   #94a3b8;
    --text-muted:       #475569;
    --text-accent:      #38bdf8;

    /* Orbs (background animated blobs) */
    --orb-1:            rgba(37, 99, 235, 0.25);
    --orb-2:            rgba(56, 189, 248, 0.15);
    --orb-3:            rgba(99, 102, 241, 0.15);
    --orb-4:            rgba(14, 165, 233, 0.10);

    /* UI */
    --radius-sm:        8px;
    --radius-md:        14px;
    --radius-lg:        20px;
    --radius-xl:        28px;
    --radius-pill:      999px;
    --transition-fast:  0.2s ease;
    --transition-mid:   0.35s ease;
    --transition-flip:  0.38s cubic-bezier(0.4, 0, 0.2, 1);

    /* Navbar */
    --navbar-height:    60px;
    --page-bottom-space: 5rem;
}

/* ── Light Mode Overrides ──────────────────────────────────── */
[data-theme="light"],
html:not([data-theme="dark"]).light,
html.light {
    --bg-base:          #dbeafe;
    --bg-mid:           #bfdbfe;
    --bg-surface:       #eff6ff;
    --glass-bg:         rgba(255, 255, 255, 0.55);
    --glass-bg-hover:   rgba(255, 255, 255, 0.75);
    --glass-border:     rgba(37, 99, 235, 0.15);
    --glass-border-hover: rgba(37, 99, 235, 0.35);
    --glass-shadow:     0 8px 32px rgba(30, 64, 175, 0.12);
    --orb-1:            rgba(37, 99, 235, 0.12);
    --orb-2:            rgba(56, 189, 248, 0.12);
    --orb-3:            rgba(99, 102, 241, 0.10);
    --orb-4:            rgba(14, 165, 233, 0.08);
    --text-primary:     #0f172a;
    --text-secondary:   #334155;
    --text-muted:       #64748b;
    --text-accent:      #1d4ed8;
    --accent:           #1d4ed8;
    --accent-2:         #4f46e5;
    --accent-glow:      rgba(29, 78, 216, 0.20);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: var(--bg-base);
    color: var(--text-primary);
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
    width: 100%;
    position: relative;
    transition: background 0.4s ease, color 0.4s ease;
}

/* ══════════════════════════════════════════════════════════════
   ANIMATED BACKGROUND CANVAS
══════════════════════════════════════════════════════════════ */
.bg-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
    background: linear-gradient(135deg, var(--bg-base) 0%, var(--bg-mid) 50%, var(--bg-surface) 100%);
    transition: background 0.4s ease;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    animation: orbFloat 20s ease-in-out infinite;
    will-change: transform;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: var(--orb-1);
    top: -15%;
    left: -10%;
    animation-duration: 22s;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: var(--orb-2);
    top: 30%;
    right: -10%;
    animation-duration: 28s;
    animation-delay: -8s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: var(--orb-3);
    bottom: -10%;
    left: 20%;
    animation-duration: 24s;
    animation-delay: -4s;
}

.orb-4 {
    width: 300px;
    height: 300px;
    background: var(--orb-4);
    top: 55%;
    left: 55%;
    animation-duration: 32s;
    animation-delay: -12s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25%       { transform: translate(40px, -60px) scale(1.08); }
    50%       { transform: translate(-30px, 40px) scale(0.95); }
    75%       { transform: translate(60px, 30px) scale(1.04); }
}

/* Noise texture overlay for depth */
.noise-overlay {
    position: absolute;
    inset: 0;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ══════════════════════════════════════════════════════════════
   GLASS CARD UTILITY
══════════════════════════════════════════════════════════════ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: background var(--transition-fast),
                border-color var(--transition-fast),
                box-shadow var(--transition-fast);
}

.glass-card:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
}

/* ══════════════════════════════════════════════════════════════
   TERMS MODAL
══════════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(3, 8, 26, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    max-width: 520px;
    width: 100%;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    text-align: center;
    position: relative;
    animation: modalIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-mid), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 0 40px var(--accent-glow);
}

.modal-content h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

.modal-content p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.modal-highlight {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.25);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    font-size: 0.8rem !important;
    color: #fbbf24 !important;
    margin: 1rem 0 !important;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    margin: 1.25rem 0;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent);
    cursor: pointer;
    flex-shrink: 0;
}

.checkbox-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
}

.error-msg {
    color: #f87171;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

/* ══════════════════════════════════════════════════════════════
   BUTTON SYSTEM
══════════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-pill);
    font-size: 0.85rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-mid) 0%, var(--accent) 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(56, 189, 248, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(56, 189, 248, 0.45);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-glass {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
}

.btn-glass:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.8rem;
}

.btn-download {
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.25);
    color: var(--accent);
}

.btn-download:hover {
    background: rgba(56, 189, 248, 0.22);
    border-color: rgba(56, 189, 248, 0.5);
}

.btn-login {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-mid) 100%);
    color: #fff;
    box-shadow: 0 4px 14px rgba(30, 64, 175, 0.4);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 64, 175, 0.55);
}

/* ══════════════════════════════════════════════════════════════
   FLOATING CAPSULE NAVBAR
══════════════════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 1.25rem;
    left: 0;
    right: 0;
    z-index: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    pointer-events: none;
}

.nav-capsule {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-pill);
    pointer-events: all;
    position: relative;
    max-width: 780px;
    width: calc(100% - 2rem);
    /* Heavier blur for the capsule navbar — very glassy */
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-primary);
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.logo-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-mid), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 0 16px var(--accent-glow);
}

.logo-text {
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1;
}

.logo-accent {
    color: var(--accent);
}

/* Desktop nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.125rem;
    flex: 1;
    justify-content: center;
}

.nav-item {
    background: none;
    border: none;
    padding: 0.45rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 0.78rem;
    font-weight: 600;
    font-family: inherit;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--glass-bg-hover);
}

.nav-item.active {
    color: var(--accent);
    background: rgba(56, 189, 248, 0.12);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

/* Right side controls */
.nav-right {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.nav-icon-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.nav-icon-btn:hover {
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.1);
}

/* Mobile hamburger */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    margin-left: auto;
}

.mobile-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-secondary);
    border-radius: 2px;
    transition: all var(--transition-fast);
    transform-origin: center;
}

.mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile dropdown */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem;
    border-radius: var(--radius-xl);
    margin-top: 0.5rem;
    pointer-events: none;
    width: calc(100% - 2rem);
    max-width: 780px;
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.97);
    transition: opacity var(--transition-fast), transform var(--transition-fast), visibility var(--transition-fast);
}

.mobile-menu.open {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateY(0) scale(1);
}

.mobile-menu .nav-item {
    justify-content: flex-start;
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
}

.mobile-menu-divider {
    height: 1px;
    background: var(--glass-border);
    margin: 0.5rem 0;
}

.mobile-btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem;
}

/* ══════════════════════════════════════════════════════════════
   MAIN CONTENT + FLIPBOOK ENGINE
══════════════════════════════════════════════════════════════ */
.main-content {
    position: fixed;
    inset: 0;
    z-index: 10;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.flipbook-viewport {
    position: absolute;
    inset: 0;
    min-height: 0;
    overflow: hidden;
}

.flipbook-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
}

/* ── Individual Pages ─────────────────────────────────────── */
.flipbook-page {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 0;
    padding-top: calc(var(--navbar-height) + 2.5rem);
    padding-bottom: 5rem; /* space for flip-nav */
    overflow: hidden;
    will-change: transform, opacity;
    transform-style: preserve-3d;
    perspective: 1200px;
}

/* Scrollable page variant */
.page-scrollable {
    overflow: hidden;
}

.page-inner {
    width: 100%;
    max-width: 1100px;
    min-height: 0;
    padding: 0 1.5rem;
    pointer-events: all;
}

.page-inner:not(.page-inner-scroll) {
    height: 100%;
    max-height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.page-inner:not(.page-inner-scroll)::-webkit-scrollbar { width: 4px; }
.page-inner:not(.page-inner-scroll)::-webkit-scrollbar-track { background: transparent; }
.page-inner:not(.page-inner-scroll)::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

.page-inner-scroll {
    height: 100%;
    max-height: 100%;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.page-inner-scroll::-webkit-scrollbar { width: 4px; }
.page-inner-scroll::-webkit-scrollbar-track { background: transparent; }
.page-inner-scroll::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

/* ── Page Transitions — Clean Smooth Slide ────────────────── */

.page-active {
    display: flex !important;
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.page-exit-left {
    animation: slideOutLeft 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

.page-exit-right {
    animation: slideOutRight 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

.page-enter-right {
    animation: slideInRight 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

.page-enter-left {
    animation: slideInLeft 0.38s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    pointer-events: none;
}

@keyframes slideOutLeft {
    from { transform: translateX(0);    opacity: 1; }
    to   { transform: translateX(-60px); opacity: 0; }
}

@keyframes slideOutRight {
    from { transform: translateX(0);   opacity: 1; }
    to   { transform: translateX(60px); opacity: 0; }
}

@keyframes slideInRight {
    from { transform: translateX(60px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-60px); opacity: 0; }
    to   { transform: translateX(0);     opacity: 1; }
}

/* ══════════════════════════════════════════════════════════════
   FLIP NAVIGATION BAR (bottom)
══════════════════════════════════════════════════════════════ */
.flip-nav {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.flip-arrow {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: all var(--transition-fast);
    font-family: inherit;
}

.flip-arrow:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.4) !important;
    color: var(--accent);
    transform: scale(1.08);
}

.flip-arrow:disabled {
    opacity: 0.25;
    cursor: not-allowed;
}

.flip-dots {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-pill);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
}

.flip-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.flip-dot.active {
    width: 22px;
    border-radius: var(--radius-pill);
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent-glow);
}

.flip-dot:hover:not(.active) {
    background: var(--text-secondary);
    transform: scale(1.2);
}

.flip-label {
    padding: 0.4rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--accent);
    text-transform: uppercase;
    min-width: 72px;
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════
   PAGE HEADERS (shared)
══════════════════════════════════════════════════════════════ */
.page-header {
    margin-bottom: 2rem;
}

.page-label {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.3rem 0.75rem;
    border-radius: var(--radius-pill);
    margin-bottom: 0.75rem;
}

.page-title {
    font-size: clamp(1.6rem, 3.5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-primary);
    line-height: 1.1;
}

.page-desc {
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ══════════════════════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════════════════════ */
.page-home {
    align-items: center;
    justify-content: center;
    padding: 0 0 var(--page-bottom-space);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.3) transparent;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.page-home::-webkit-scrollbar { width: 4px; }
.page-home::-webkit-scrollbar-track { background: transparent; }
.page-home::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.3);
    border-radius: 4px;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 620px;
    min-height: 100%;
    padding: 0 1.5rem;
    padding-top: calc(var(--navbar-height) + 2rem);
    padding-bottom: 5rem;
    display: flex;
    flex-direction: column;
    justify-content: safe center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.04em;
    margin-bottom: 1.5rem;
    animation: fadeSlideUp 0.6s ease 0.1s both;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.75rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    animation: fadeSlideUp 0.6s ease 0.2s both;
}

.gradient-text {
    background: linear-gradient(135deg, var(--blue-glow), var(--accent), var(--accent-2));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    animation: fadeSlideUp 0.6s ease 0.3s both;
}

.hero-desc {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 520px;
    margin-bottom: 2rem;
    animation: fadeSlideUp 0.6s ease 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    animation: fadeSlideUp 0.6s ease 0.5s both;
}

.hero-stats {
    display: flex;
    gap: 0.625rem;
    flex-wrap: wrap;
    animation: fadeSlideUp 0.6s ease 0.6s both;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.375rem 0.875rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.stat-pill i {
    color: var(--accent);
    font-size: 0.7rem;
}

/* Decorative visual — floating shield rings */
.hero-visual {
    position: absolute;
    right: clamp(0px, 4vw, 80px);
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.shield-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    animation: ringPulse 3s ease-in-out infinite;
}

.ring-1 {
    width: 200px;
    height: 200px;
    border-color: rgba(56, 189, 248, 0.25);
    animation-delay: 0s;
}

.ring-2 {
    width: 300px;
    height: 300px;
    border-color: rgba(56, 189, 248, 0.12);
    animation-delay: 0.5s;
}

.ring-3 {
    width: 380px;
    height: 380px;
    border-color: rgba(56, 189, 248, 0.06);
    animation-delay: 1s;
}

@keyframes ringPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%       { transform: scale(1.04); opacity: 0.6; }
}

.shield-icon {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.75rem;
    color: var(--accent);
    box-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(56, 189, 248, 0.1);
    animation: shieldFloat 4s ease-in-out infinite;
}

@keyframes shieldFloat {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-12px); }
}

/* Floating particles on home page */
.page-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--accent);
    opacity: 0;
    animation: particleDrift 8s ease-in-out infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s;   animation-duration: 10s; }
.particle:nth-child(2) { left: 25%; animation-delay: 2s;   animation-duration: 14s; }
.particle:nth-child(3) { left: 60%; animation-delay: 4s;   animation-duration: 9s;  }
.particle:nth-child(4) { left: 75%; animation-delay: 1s;   animation-duration: 12s; }
.particle:nth-child(5) { left: 90%; animation-delay: 3.5s; animation-duration: 11s; }

@keyframes particleDrift {
    0%   { transform: translateY(100vh) scale(0); opacity: 0; }
    10%  { opacity: 0.6; }
    90%  { opacity: 0.3; }
    100% { transform: translateY(-20px) scale(1.5); opacity: 0; }
}

/* ══════════════════════════════════════════════════════════════
   NEWS PAGE
══════════════════════════════════════════════════════════════ */
.page-news {
    align-items: flex-start;
}

.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.news-column {
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    height: calc(100dvh - var(--navbar-height) - 2.5rem - 5rem - 9rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.news-col-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--glass-border);
}

.news-col-header i {
    color: var(--accent);
    font-size: 0.9rem;
}

.news-col-header h3 {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.news-list {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.2) transparent;
}

.news-list::-webkit-scrollbar { width: 3px; }
.news-list::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.2); border-radius: 3px; }

.news-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    padding: 1rem 0;
}

/* ══════════════════════════════════════════════════════════════
   WEATHER PAGE
══════════════════════════════════════════════════════════════ */
.page-weather {
    align-items: flex-start;
}

.weather-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.875rem 1.25rem;
    border-radius: var(--radius-xl);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.location-search-wrapper {
    flex: 1;
    min-width: 200px;
    position: relative;
    z-index: 9998;
}

.location-search {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-pill);
    padding: 0.45rem 0.5rem 0.45rem 1rem;
    gap: 0.5rem;
    transition: border-color var(--transition-fast);
}

.location-search:focus-within {
    border-color: rgba(56, 189, 248, 0.5);
    background: rgba(56, 189, 248, 0.05);
}

.search-icon {
    color: var(--text-muted);
    font-size: 0.8rem;
    flex-shrink: 0;
}

.location-search input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.85rem;
    color: var(--text-primary);
    min-width: 0;
}

.location-search input::placeholder { color: var(--text-muted); }

.btn-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-mid), var(--accent));
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.btn-icon:hover {
    transform: scale(1.08);
    box-shadow: 0 4px 12px var(--accent-glow);
}

/* search-results-dropdown styles are defined further below */

.weather-action-btns {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.status-msg {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    padding: 1rem 0;
}

.weather-dashboard {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

.current-weather {
    border-radius: var(--radius-xl);
    padding: 1.75rem;
}

.location-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.current-weather h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.current-country {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.weather-main {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.weather-icon-large {
    font-size: 3rem;
    color: var(--accent);
    filter: drop-shadow(0 0 16px var(--accent-glow));
}

.temp-display {
    display: flex;
    flex-direction: column;
}

#currentTemp {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.04em;
    line-height: 1;
}

#currentCondition {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    font-weight: 500;
}

.weather-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.625rem;
    margin-bottom: 1rem;
}

.detail-box {
    border-radius: var(--radius-md);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.detail-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.weather-update-time {
    text-align: right;
}

.weather-update-time small {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.forecast-container {
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.forecast-container h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.875rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.forecast-scroll {
    display: flex;
    gap: 0.625rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(56, 189, 248, 0.2) transparent;
}

.forecast-scroll::-webkit-scrollbar { height: 3px; }
.forecast-scroll::-webkit-scrollbar-thumb { background: rgba(56, 189, 248, 0.2); border-radius: 3px; }

.hourly-card {
    flex: 0 0 104px;
    min-width: 104px;
    min-height: 126px;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    border: 1px solid rgba(56, 189, 248, 0.14);
    border-radius: var(--radius-lg);
    background: rgba(56, 189, 248, 0.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
    text-align: center;
    white-space: nowrap;
}

.hourly-card > div:first-child {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.2;
}

.hourly-card > i {
    font-size: 1.45rem;
    color: var(--accent);
    line-height: 1;
}

.hourly-card > div:last-child {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.875rem;
}

.daily-card {
    min-height: 150px;
    padding: 1rem 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.055);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.daily-day {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-secondary);
    line-height: 1.2;
}

.daily-icon {
    font-size: 1.35rem;
    color: var(--accent);
    line-height: 1;
}

.daily-desc {
    max-width: 100%;
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    line-height: 1.25;
    text-align: center;
}

.daily-temp {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.daily-temp .text-muted {
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── Hazards (inside weather page) ───────────────────────── */
.hazards-section {
    margin-bottom: 2rem;
}

.hazards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.alerts-container,
.earthquake-container {
    border-radius: var(--radius-xl);
    padding: 1.5rem;
}

/* ══════════════════════════════════════════════════════════════
   ABOUT PAGE
══════════════════════════════════════════════════════════════ */
.page-about {
    align-items: flex-start;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.about-card {
    border-radius: var(--radius-xl);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.about-card::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: rgba(56, 189, 248, 0.05);
    pointer-events: none;
}

.about-card.card-accent::before {
    background: rgba(129, 140, 248, 0.08);
}

.about-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: rgba(56, 189, 248, 0.12);
    border: 1px solid rgba(56, 189, 248, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--accent);
    margin-bottom: 1.25rem;
}

.about-card-icon.accent {
    background: rgba(129, 140, 248, 0.12);
    border-color: rgba(129, 140, 248, 0.2);
    color: var(--accent-2);
}

.about-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.875rem;
    letter-spacing: -0.02em;
}

.about-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.about-card p:last-child { margin-bottom: 0; }

.about-card strong { color: var(--text-primary); }

.ai-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 1rem;
}

.tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-pill);
    background: rgba(129, 140, 248, 0.12);
    border: 1px solid rgba(129, 140, 248, 0.2);
    color: var(--accent-2);
    letter-spacing: 0.03em;
}

/* Team section */
.team-section {
    margin-bottom: 2rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.875rem;
}

.team-card {
    border-radius: var(--radius-xl);
    padding: 1.25rem 1rem;
    text-align: center;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.team-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

.team-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-mid), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.875rem;
    font-size: 1rem;
    color: #fff;
    box-shadow: 0 4px 16px var(--accent-glow);
}

.team-card h4 {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.team-card .role {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* About footer */
.about-footer {
    border-radius: var(--radius-xl);
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 200px;
}

.footer-brand i {
    font-size: 1.5rem;
    color: var(--accent);
}

.footer-brand strong {
    display: block;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

.footer-brand span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.footer-links {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
    border-color: rgba(56, 189, 248, 0.4);
    background: rgba(56, 189, 248, 0.08);
}

.footer-copy {
    width: 100%;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid var(--glass-border);
    margin-top: 0.25rem;
}

/* ══════════════════════════════════════════════════════════════
   SHARED UTILITY
══════════════════════════════════════════════════════════════ */
.text-muted  { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.italic      { font-style: italic; }

.card {
    border-radius: var(--radius-xl);
}

@keyframes fadeSlideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE — FLUID SCALING FOR ALL DEVICES
   Strategy: clamp() for fluid sizing, breakpoints for layout shifts
══════════════════════════════════════════════════════════════ */

/* ── Large Desktop (1400px+) ─────────────────────────────── */
@media (min-width: 1400px) {
    .page-inner     { max-width: 1280px; }
    .hero-title     { font-size: 4.25rem; }
    .news-column    { height: calc(100dvh - var(--navbar-height) - 2.5rem - 5rem - 10rem); }
    .team-grid      { grid-template-columns: repeat(5, 1fr); }
}

/* ── Standard Desktop (1024px–1399px) ───────────────────── */
@media (max-width: 1399px) and (min-width: 1025px) {
    .hero-visual    { right: -40px; width: 320px; height: 320px; }
    .ring-1         { width: 160px; height: 160px; }
    .ring-2         { width: 250px; height: 250px; }
    .ring-3         { width: 320px; height: 320px; }
    .shield-icon    { width: 90px; height: 90px; font-size: 2.2rem; }
}

/* ── Small Laptop / Large Tablet (900px–1024px) ─────────── */
@media (max-width: 1024px) {
    :root { --navbar-height: 56px; }

    .hero-visual    { display: none; }
    .hero-content   { max-width: 100%; text-align: center; }
    .hero-buttons   { justify-content: center; }
    .hero-stats     { justify-content: center; }
    .hero-badge     { margin: 0 auto 1.25rem; }

    .weather-dashboard  { grid-template-columns: 1fr; }
    .team-grid          { grid-template-columns: repeat(3, 1fr); }

    .news-column {
        height: auto;
        max-height: calc((100dvh - var(--navbar-height) - 2.5rem - 5rem - 11rem) / 2);
    }

    /* Compact navbar on smaller screens */
    .logo-text      { font-size: 0.82rem; }
    .nav-item       { padding: 0.4rem 0.7rem; font-size: 0.74rem; }
}

/* ── Tablet (768px–900px) ────────────────────────────────── */
@media (max-width: 900px) {
    :root { --navbar-height: 54px; }

    .nav-links      { display: none; }
    .nav-right .btn-download { display: none; }
    .mobile-toggle  { display: flex; }
    .mobile-menu    { display: none; }
    .mobile-menu.open { display: flex; }

    .nav-capsule    { padding: 0.45rem 0.875rem; }

    .flipbook-page  {
        padding-top: calc(var(--navbar-height) + 1.25rem);
        padding-bottom: 4.5rem;
    }

    .page-inner         { padding: 0 1.25rem; }
    .page-inner-scroll  {
        height: 100%;
        max-height: 100%;
    }

    .news-grid,
    .hazards-grid,
    .about-grid     { grid-template-columns: 1fr; }

    .news-column    {
        height: auto;
        max-height: 280px;
    }

    .team-grid      { grid-template-columns: repeat(3, 1fr); }

    .weather-controls   { flex-direction: column; align-items: stretch; }
    .weather-action-btns { justify-content: flex-end; }

    .hero-title     { font-size: clamp(1.75rem, 6vw, 2.75rem); }
    .hero-desc      { font-size: 0.84rem; }

    .flip-nav       { gap: 0.625rem; bottom: 1rem; }
    .flip-arrow     { width: 38px; height: 38px; font-size: 0.78rem; }
    .flip-label     { display: none; }
}

/* ── Mobile (max 768px) ──────────────────────────────────── */
@media (max-width: 768px) {
    :root { --navbar-height: 52px; }

    .nav-capsule    { padding: 0.4rem 0.75rem; }
    .logo-text      { font-size: 0.8rem; }
    .logo-icon      { width: 28px; height: 28px; font-size: 0.75rem; }

    .flipbook-page  {
        padding-top: calc(var(--navbar-height) + 1rem);
        padding-bottom: 4rem;
    }

    .page-inner         { padding: 0 1rem; }
    .page-inner-scroll  {
        height: 100%;
        max-height: 100%;
    }

    .page-title     { font-size: clamp(1.4rem, 6vw, 2rem); }

    .hero-content   { padding-top: calc(var(--navbar-height) + 1rem); }
    .hero-title     { font-size: clamp(1.5rem, 7.5vw, 2.25rem); }
    .hero-subtitle  { font-size: 0.95rem; }
    .hero-desc      { font-size: 0.82rem; }
    .hero-buttons   { flex-direction: column; }
    .hero-buttons .btn { justify-content: center; width: 100%; }
    .hero-stats     { gap: 0.4rem; }

    .team-grid      { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }

    .about-footer   {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .weather-dashboard  { gap: 0.875rem; }
    .current-weather    { padding: 1.25rem; }
    .forecast-container { padding: 1.25rem; }

    .flip-nav       { gap: 0.5rem; bottom: 0.875rem; }
    .flip-arrow     { width: 36px; height: 36px; }
    .flip-dots      { padding: 0.45rem 0.75rem; }

    /* Modal */
    .modal-content  { padding: 1.75rem 1.25rem; }
}

/* ── Small Mobile (max 480px) ────────────────────────────── */
@media (max-width: 480px) {
    :root { --navbar-height: 50px; }

    .nav-capsule    { width: calc(100% - 1.5rem); }

    .flipbook-page  {
        padding-top: calc(var(--navbar-height) + 0.875rem);
        padding-bottom: 3.75rem;
    }

    .page-inner         { padding: 0 0.875rem; }
    .page-inner-scroll  {
        height: calc(100dvh - var(--navbar-height) - 0.875rem - 3.75rem);
    }

    .hero-title     { font-size: clamp(1.35rem, 8vw, 1.9rem); }
    .hero-badge     { font-size: 0.65rem; padding: 0.3rem 0.75rem; }
    .stat-pill      { font-size: 0.7rem; padding: 0.3rem 0.7rem; }

    .team-grid      { grid-template-columns: repeat(2, 1fr); }
    .team-card      { padding: 1rem 0.75rem; }
    .team-icon      { width: 38px; height: 38px; font-size: 0.875rem; }
    .team-card h4   { font-size: 0.65rem; }

    .flip-nav       { gap: 0.375rem; }
    .flip-arrow     { width: 34px; height: 34px; font-size: 0.72rem; }
    .flip-dot       { width: 6px; height: 6px; }
    .flip-dot.active { width: 18px; }

    .about-grid     { grid-template-columns: 1fr; }
    .about-card     { padding: 1.25rem; }
    .weather-controls { padding: 0.75rem; }
}

/* ── Very Small / Foldable (max 360px) ──────────────────── */
@media (max-width: 360px) {
    .hero-title     { font-size: 1.3rem; }
    .btn            { font-size: 0.8rem; padding: 0.55rem 1rem; }
    .nav-right .btn-login span { display: none; }
    .btn-login      { padding: 0.5rem 0.75rem; }
}

/* ══════════════════════════════════════════════════════════════
   REDUCED MOTION
══════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .orb { animation: none; }
    .particle { animation: none; }
    .shield-icon { animation: none; }
    .shield-ring { animation: none; }
}


/* ══════════════════════════════════════════════════════════════
   NEWS CARD STYLES (generated by news.js)
══════════════════════════════════════════════════════════════ */
.news-item {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    margin-bottom: 0.875rem;
    transition: border-color var(--transition-fast), background var(--transition-fast);
}

.news-item:last-child { margin-bottom: 0; }

.news-item:hover {
    background: rgba(255,255,255,0.06);
    border-color: var(--glass-border-hover);
}

/* Thumbnail image */
.news-image-wrapper {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
    background: rgba(255,255,255,0.04);
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.news-item:hover .news-image { transform: scale(1.04); }

/* Fallback icon when image fails */
.news-image-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2rem;
    opacity: 0;
    pointer-events: none;
}

.news-image-wrapper.image-error .news-image   { display: none; }
.news-image-wrapper.image-error .news-image-fallback { opacity: 1; }

/* Card header (source badge area) */
.news-card-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

/* Card body */
.news-body {
    padding: 0.875rem 1rem;
}

.news-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0.625rem;
}

.news-link {
    display: inline-flex;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
    text-decoration: none;
    transition: opacity var(--transition-fast);
}

.news-link:hover { opacity: 0.75; }

/* Tailwind-like utility classes used by news.js */
.flex            { display: flex; }
.items-center    { align-items: center; }
.gap-3           { gap: 0.75rem; }
.gap-2           { gap: 0.5rem; }
.mt-0\.5         { margin-top: 0.125rem; }
.min-w-0         { min-width: 0; }
.truncate        { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex-shrink-0   { flex-shrink: 0; }
.rounded-xl      { border-radius: 0.75rem; }
.border          { border-width: 1px; border-style: solid; }
.w-10            { width: 2.5rem; }
.h-10            { height: 2.5rem; }
.text-lg         { font-size: 1.125rem; }
.text-sm         { font-size: 0.875rem; }
.font-black      { font-weight: 900; }
.font-bold       { font-weight: 700; }
.leading-tight   { line-height: 1.25; }
.uppercase       { text-transform: uppercase; }
.tracking-wider  { letter-spacing: 0.05em; }
.ml-1            { margin-left: 0.25rem; }

/* Tailwind color classes used in source badges */
/* Emerald — school */
.bg-emerald-50                          { background: rgba(16, 185, 129, 0.08); }
.dark .bg-emerald-50,
.bg-emerald-500\/10                     { background: rgba(16, 185, 129, 0.10); }
.border-emerald-200,
.dark .border-emerald-500\/30           { border-color: rgba(16, 185, 129, 0.25); }
.text-emerald-700,
.dark .text-emerald-400,
.text-emerald-700.dark\:text-emerald-400 { color: #34d399; }
.bg-emerald-500                          { background: #10b981; }

/* Red — ndrrmc */
.bg-red-50                              { background: rgba(239, 68, 68, 0.08); }
.bg-red-500\/10                         { background: rgba(239, 68, 68, 0.10); }
.border-red-200,
.border-red-500\/30                     { border-color: rgba(239, 68, 68, 0.25); }
.text-red-700,
.text-red-400,
.dark\:text-red-400                     { color: #f87171; }
.bg-red-500                             { background: #ef4444; }

/* Blue — pagasa */
.bg-blue-50                             { background: rgba(59, 130, 246, 0.08); }
.bg-blue-500\/10                        { background: rgba(59, 130, 246, 0.10); }
.border-blue-200,
.border-blue-500\/30                    { border-color: rgba(59, 130, 246, 0.25); }
.text-blue-700,
.text-blue-400,
.dark\:text-blue-400                    { color: #60a5fa; }
.bg-blue-500                            { background: #3b82f6; }

/* Cyan — jma */
.bg-cyan-50                             { background: rgba(6, 182, 212, 0.08); }
.bg-cyan-500\/10                        { background: rgba(6, 182, 212, 0.10); }
.border-cyan-200,
.border-cyan-500\/30                    { border-color: rgba(6, 182, 212, 0.25); }
.text-cyan-700,
.text-cyan-400,
.dark\:text-cyan-400                    { color: #22d3ee; }
.bg-cyan-500                            { background: #06b6d4; }

/* Amber — global */
.bg-amber-50                            { background: rgba(245, 158, 11, 0.08); }
.bg-amber-500\/10                       { background: rgba(245, 158, 11, 0.10); }
.border-amber-200,
.border-amber-500\/30                   { border-color: rgba(245, 158, 11, 0.25); }
.text-amber-700,
.text-amber-400,
.dark\:text-amber-400                   { color: #fbbf24; }
.bg-amber-500                           { background: #f59e0b; }

/* White/Slate text used in news cards */
.text-slate-800,
.dark\:text-white                       { color: var(--text-primary); }
.text-slate-400,
.dark\:text-slate-500                   { color: var(--text-muted); }
.text-\[10px\]                          { font-size: 10px; }

/* ══════════════════════════════════════════════════════════════
   SEARCH RESULTS DROPDOWN — FIXED STYLES
══════════════════════════════════════════════════════════════ */
.search-results-dropdown {
    display: none; /* hidden by default, weather.js sets display:block */
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 9999;
    background: #0d1b3e;
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: 0 16px 40px rgba(0,0,0,0.6);
    overflow: hidden;
    backdrop-filter: var(--glass-blur-heavy);
    -webkit-backdrop-filter: var(--glass-blur-heavy);
    max-height: 260px;
    overflow-y: auto;
}

[data-theme="light"] .search-results-dropdown {
    background: #eff6ff;
    border-color: rgba(29, 78, 216, 0.2);
    box-shadow: 0 16px 40px rgba(30, 64, 175, 0.15);
}

.search-result-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background var(--transition-fast);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.search-result-item:last-child { border-bottom: none; }

.search-result-item:hover {
    background: rgba(56, 189, 248, 0.12);
}

[data-theme="light"] .search-result-item:hover {
    background: rgba(29, 78, 216, 0.08);
}

.search-item-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.search-item-details {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* "Selected Location" badge variant */
.location-badge.search-badge {
    color: #a78bfa;
    background: rgba(167, 139, 250, 0.1);
    border-color: rgba(167, 139, 250, 0.2);
}
