/* =========================================================
   Genesis Biology - Main Stylesheet
   Dark aesthetic, modern biology-themed design
   ========================================================= */

/* -----------------------------------------------------------
   CSS Custom Properties (Design Tokens)
   ----------------------------------------------------------- */
:root {
    /* Color Palette — deep near-black inspired by stochastic.ai */
    --color-bg-primary: #06060f;
    --color-bg-secondary: #0a0a1a;
    --color-bg-card: #0e0e20;
    --color-bg-card-hover: #14142e;
    --color-border: rgba(139, 92, 246, 0.18);
    --color-border-hover: rgba(139, 92, 246, 0.45);

    /* Brand Colors */
    --color-primary: #6366f1;
    /* Indigo */
    --color-primary-light: #818cf8;
    --color-primary-dark: #4f46e5;
    --color-secondary: #22d3ee;
    /* Cyan */
    --color-accent: #10b981;
    /* Emerald */
    --color-accent-warm: #f59e0b;

    /* Text Colors */
    --color-text-primary: #f8f8ff;
    --color-text-secondary: #a5b4fc;
    --color-text-muted: #6d6d94;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #22d3ee 100%);
    --gradient-hero: linear-gradient(180deg, rgba(6, 6, 15, 0.0) 0%, rgba(6, 6, 15, 0.6) 100%);
    --gradient-card: linear-gradient(180deg, rgba(14, 14, 32, 0.9) 0%, rgba(6, 6, 15, 0.98) 100%);
    --gradient-accent: linear-gradient(135deg, #10b981 0%, #22d3ee 100%);
    --gradient-warm: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Space Grotesk', 'Inter', sans-serif;

    /* Sizes */
    --nav-height: 70px;
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --border-radius-sm: 8px;

    /* Shadows */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.2);
    --shadow-hover: 0 8px 40px rgba(124, 58, 237, 0.35);

    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* -----------------------------------------------------------
   Light Theme Overrides
   ----------------------------------------------------------- */
body.light-theme {
    --color-bg-primary: #f0f4ff;
    --color-bg-secondary: #f0f4ff;
    --color-bg-card: #ffffff;
    --color-bg-card-hover: #eef2ff;
    --color-border: rgba(99, 102, 241, 0.2);
    --color-border-hover: rgba(99, 102, 241, 0.4);

    --color-text-primary: #0f172a;
    --color-text-secondary: #334155;
    --color-text-muted: #64748b;

    --shadow-card: 0 4px 24px rgba(99, 102, 241, 0.1);
    --shadow-glow: 0 0 30px rgba(99, 102, 241, 0.12);
    --shadow-hover: 0 8px 40px rgba(99, 102, 241, 0.2);
    --gradient-hero: linear-gradient(135deg, rgba(238, 242, 255, 0.95) 0%, rgba(248, 250, 255, 0.9) 100%);
    --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(238, 242, 255, 0.95) 100%);
}



body.light-theme .dropdown-menu {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

body.light-theme .dropdown-item {
    color: #334155 !important;
}

body.light-theme .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1) !important;
    color: #0f172a !important;
}

/* Light mode sections — all same as hero (#f0f4ff lavender) */
body.light-theme .section-dark,
body.light-theme .section-darker,
body.light-theme .section-card {
    background: #f0f4ff;
}

/* Light mode cards */
body.light-theme .form-card,
body.light-theme .material-card,
body.light-theme .feature-card,
body.light-theme .dashboard-stat-card,
body.light-theme .stats-bar {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 2px 12px rgba(99, 102, 241, 0.08);
}

/* Light mode form inputs */
body.light-theme .form-control,
body.light-theme .search-input {
    background: #f8faff;
    border-color: rgba(99, 102, 241, 0.25);
    color: #0f172a;
}

body.light-theme .search-form {
    background: #ffffff;
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-theme .filter-chip {
    background: #ffffff;
    color: #334155;
}

/* Light mode footer */
body.light-theme .site-footer {
    background: #1e293b;
    border-top-color: rgba(99, 102, 241, 0.15);
}

body.light-theme .footer-brand-link {
    color: #f1f5f9;
}

body.light-theme .footer-heading {
    color: #94a3b8;
}

body.light-theme .footer-desc {
    color: #64748b;
}

body.light-theme .footer-links a {
    color: #64748b;
}

body.light-theme .footer-links a:hover {
    color: #818cf8;
}

body.light-theme .footer-contact li {
    color: #64748b;
}

body.light-theme .footer-contact li i {
    color: #818cf8;
}

body.light-theme .footer-contact a {
    color: #64748b;
}

body.light-theme .footer-contact a:hover {
    color: #818cf8;
}

body.light-theme .footer-bottom {
    border-top-color: rgba(255, 255, 255, 0.08);
    color: #475569;
}

body.light-theme .footer-legal-link {
    color: #475569;
}

body.light-theme .footer-legal-link:hover {
    color: #818cf8;
}

body.light-theme .footer-social a {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}

/* Light mode page hero — same lavender as hero */
body.light-theme .page-hero {
    background: #f0f4ff;
    border-bottom-color: rgba(99, 102, 241, 0.15);
}

body.light-theme .page-hero-subtitle {
    color: #334155;
}

/* Light mode hero section — bright cool gradient */
body.light-theme .hero {
    background: #f0f4ff;
}

body.light-theme .hero-video-container>div {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(99, 102, 241, 0.18) 0%, transparent 55%),
        radial-gradient(ellipse at 75% 25%, rgba(34, 211, 238, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 55% 85%, rgba(139, 92, 246, 0.12) 0%, transparent 45%),
        radial-gradient(ellipse at 90% 70%, rgba(16, 185, 129, 0.10) 0%, transparent 40%),
        linear-gradient(135deg, #eef2ff 0%, #f5f3ff 50%, #ecfeff 100%) !important;
}

body.light-theme .hero-overlay {
    background: linear-gradient(135deg,
            rgba(238, 242, 255, 0.3) 0%,
            rgba(245, 243, 255, 0.2) 100%);
}

/* Hero text — dark in light mode */
body.light-theme .hero h1 {
    color: #0f172a;
    text-shadow: 0 1px 4px rgba(99, 102, 241, 0.15);
}

body.light-theme .hero-badge {
    background: rgba(99, 102, 241, 0.12);
    border-color: rgba(99, 102, 241, 0.25);
    color: #4f46e5;
    text-shadow: none;
}

body.light-theme .hero-subtitle {
    color: rgba(30, 41, 59, 0.80);
    text-shadow: none;
}

body.light-theme .hero-stat-label {
    color: rgba(51, 65, 85, 0.75);
    text-shadow: none;
}

body.light-theme .scroll-indicator {
    color: rgba(15, 23, 42, 0.4);
}

/* Light mode navbar */
body.light-theme .navbar-nav .nav-link {
    color: rgba(15, 23, 42, 0.85) !important;
}

body.light-theme .navbar-nav .nav-link:hover,
body.light-theme .navbar-nav .nav-link.active {
    color: #4f46e5 !important;
    background: rgba(99, 102, 241, 0.08);
}

body.light-theme #mainNav.scrolled {
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

/* Invert mobile burger menu icon to dark */
body.light-theme .navbar-toggler-icon {
    filter: invert(1);
}

/* Light mode gallery */
body.light-theme .gallery-item {
    border-color: rgba(99, 102, 241, 0.15);
}

/* Light mode announcement bar stays the same (gradient) */

/* Light mode button outline */
body.light-theme .btn-genesis-outline {
    border-color: rgba(99, 102, 241, 0.4);
    color: #0f172a;
}

body.light-theme .btn-genesis-outline:hover {
    color: #0f172a;
}

/* Light mode genesis-table */
body.light-theme .genesis-table th {
    color: #0f172a;
    background: #f0f4ff;
}

body.light-theme .genesis-table td {
    color: #334155;
    border-bottom-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .genesis-table tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* Theme toggle button */
.theme-toggle {
    background: none;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
    line-height: 1;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--color-primary);
    color: var(--color-primary-light);
    background: rgba(99, 102, 241, 0.1);
    transform: rotate(20deg);
}

/* Smooth color transitions across the whole page */
body,
body * {
    transition: background-color 0.3s ease, color 0.2s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* But keep transform/opacity transitions unaffected */
.btn-genesis,
.material-card,
.feature-card,
.gallery-item,
.theme-toggle {
    transition: var(--transition) !important;
}

/* -----------------------------------------------------------
   Global Reset & Base
   ----------------------------------------------------------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--nav-height) + 20px);
}

body {
    background-color: var(--color-bg-primary);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text-primary);
}

a {
    color: var(--color-primary-light);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--color-secondary);
}

img {
    max-width: 100%;
    height: auto;
}

::selection {
    background: var(--color-primary);
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary-dark);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary);
}

/* -----------------------------------------------------------
   Announcement Bar
   ----------------------------------------------------------- */
.announcement-bar {
    background: var(--gradient-primary);
    color: #fff;
    text-align: center;
    padding: 8px 48px 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    z-index: 1100;
}

.announcement-link {
    color: #fff;
    text-decoration: underline;
    font-weight: 600;
}

.announcement-close {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.8;
    padding: 4px;
    line-height: 1;
}

.announcement-close:hover {
    opacity: 1;
}

/* -----------------------------------------------------------
   Navigation
   ----------------------------------------------------------- */
#mainNav {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    height: var(--nav-height);
    transition: var(--transition);
    z-index: 1050;
}

#mainNav.scrolled {
    background: rgba(6, 6, 15, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid rgba(124, 58, 237, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    color: #fff !important;
}

/* Force logo size, overriding global img { height: auto } */
.navbar-brand img {
    height: 60px !important;
    width: auto !important;
    max-width: 250px;
    display: block;
}

.brand-icon {
    font-size: 1.6rem;
}

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 14px !important;
    border-radius: var(--border-radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
}

.nav-btn {
    background: var(--gradient-primary) !important;
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 50px !important;
    font-weight: 600 !important;
}

.nav-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

/* Dropdown */
.dropdown-menu {
    background: #1a1a3a;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-card);
    padding: 8px;
    min-width: 220px;
}

.dropdown-item {
    color: var(--color-text-secondary) !important;
    border-radius: var(--border-radius-sm);
    padding: 8px 14px;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    color: #fff !important;
}

.dropdown-divider {
    border-color: var(--color-border);
}

/* -----------------------------------------------------------
   Flash Messages
   ----------------------------------------------------------- */
.messages-container {
    position: fixed;
    top: calc(var(--nav-height) + 10px);
    right: 20px;
    z-index: 1060;
    max-width: 400px;
    width: 90%;
}

/* -----------------------------------------------------------
   Page Main
   ----------------------------------------------------------- */
.page-main {
    min-height: 100vh;
}

/* -----------------------------------------------------------
   Hero Section
   ----------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-video-container {
    position: absolute;
    inset: 0;
    z-index: 0;
}

/* Hero background image */
.hero-bg-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(10, 10, 26, 0.55) 0%,
            rgba(15, 15, 45, 0.45) 100%);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    border-radius: 50%;
    background: var(--gradient-primary);
    opacity: 0.08;
    animation: float 8s ease-in-out infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.05;
    margin-bottom: 24px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6), 0 4px 32px rgba(0, 0, 0, 0.4);
}

.hero h1 .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.5));
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: rgba(255, 255, 255, 0.70);
    max-width: 550px;
    margin-bottom: 40px;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-stat-label {
    color: rgba(255, 255, 255, 0.75);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

/* Dark text variant — toggle from admin */
.hero-dark-text .hero-badge {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.15);
    color: #1a1a2e;
    text-shadow: none;
}

.hero-dark-text h1 {
    color: #0f172a;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.3);
}

.hero-dark-text .hero-subtitle {
    color: #1e293b;
    text-shadow: none;
}

.hero-dark-text .hero-stat-label {
    color: #334155;
    text-shadow: none;
}

.hero-stats {
    display: flex;
    gap: 32px;
    margin-top: 48px;
    flex-wrap: wrap;
}

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

.hero-stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.70);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: bounce 2s infinite;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.5rem;
}

/* -----------------------------------------------------------
   Buttons
   ----------------------------------------------------------- */
.btn-genesis {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-genesis-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
}

.btn-genesis-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.5);
    color: #fff;
}

.btn-genesis-outline {
    background: transparent;
    border: 2px solid rgba(99, 102, 241, 0.5);
    color: var(--color-text-primary);
}

.btn-genesis-outline:hover {
    border-color: var(--color-primary);
    background: rgba(99, 102, 241, 0.1);
    color: #fff;
    transform: translateY(-1px);
}

.btn-genesis-accent {
    background: var(--gradient-accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}

.btn-genesis-accent:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.5);
    color: #fff;
}

/* -----------------------------------------------------------
   Section Headers
   ----------------------------------------------------------- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-primary-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    margin: 0 auto 16px;
}

.section-subtitle {
    color: var(--color-text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* -----------------------------------------------------------
   Section Wrappers — all use the same base bg for consistency
   ----------------------------------------------------------- */
.section-darker {
    background: var(--color-bg-primary);
    padding: 80px 0;
}

.section-dark {
    background: var(--color-bg-primary);
    padding: 80px 0;
}

.section-card {
    background: var(--color-bg-primary);
    padding: 80px 0;
}

/* -----------------------------------------------------------
   Cards
   ----------------------------------------------------------- */
.material-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.material-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.material-card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.material-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.material-card:hover .material-card-img img {
    transform: scale(1.05);
}

.material-card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a3a, #0f0f2d);
    font-size: 3.5rem;
}

.material-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-primary);
    color: #fff;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.material-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.material-card-category {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.material-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--color-text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.material-card-desc {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.material-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.material-card-meta {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* -----------------------------------------------------------
   Gallery
   ----------------------------------------------------------- */
.gallery-grid {
    columns: 3;
    column-gap: 16px;
}

.gallery-item {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--color-border);
    break-inside: avoid;
    margin-bottom: 16px;
    display: block;
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(10, 10, 26, 0.95) 0%, transparent 60%);
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item:hover {
    border-color: var(--color-primary);
}

.gallery-item-info {
    color: #fff;
}

.gallery-item-title {
    font-weight: 600;
    font-size: 0.9rem;
}

/* -----------------------------------------------------------
   Slideshow (Hero Slider)
   ----------------------------------------------------------- */
.hero-slideshow {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.slideshow-track {
    display: flex;
    transition: transform 0.5s ease;
}

@keyframes kenBurns {
    0% {
        transform: scale(1.15) translateY(6%);
    }

    /* start: top of image */
    100% {
        transform: scale(1.2) translateY(-6%);
    }

    /* end:   bottom of image */
}

.slide {
    min-width: 100%;
    overflow: hidden;
}

.slide.active img {
    animation: kenBurns 5s ease-in-out forwards;
}

.slide:not(.active) img {
    animation: none;
    /* Reset animation for non-active slides */
    transform: scale(1) translateY(0);
    /* Ensure it's reset to initial state */
}

.slideshow-controls {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.slide-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.slide-dot.active {
    background: #fff;
    transform: scale(1.3);
}

.slideshow-prev,
.slideshow-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: var(--transition);
    font-size: 1.1rem;
}

.slideshow-prev {
    left: 12px;
}

.slideshow-next {
    right: 12px;
}

.slideshow-prev:hover,
.slideshow-next:hover {
    background: var(--color-primary);
}

/* -----------------------------------------------------------
   Stats Bar
   ----------------------------------------------------------- */
.stats-bar {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
}

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

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    margin-top: 6px;
}

/* -----------------------------------------------------------
   Feature Cards
   ----------------------------------------------------------- */
.feature-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 32px 24px;
    text-align: center;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(34, 211, 238, 0.2));
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    transition: var(--transition);
    color: var(--color-primary-light);
}

.feature-card:hover .feature-icon {
    background: var(--gradient-primary);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

/* -----------------------------------------------------------
   Search Bar
   ----------------------------------------------------------- */
.search-form {
    display: flex;
    gap: 0;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: 50px;
    overflow: hidden;
    transition: var(--transition);
}

.search-form:focus-within {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    padding: 14px 20px;
    color: var(--color-text-primary);
    font-size: 0.95rem;
}

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

.search-btn {
    background: var(--gradient-primary);
    border: none;
    padding: 14px 24px;
    color: #fff;
    cursor: pointer;
    font-weight: 600;
    border-radius: 0 50px 50px 0;
    transition: var(--transition);
}

.search-btn:hover {
    opacity: 0.9;
}

/* Filter Chips */
.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    background: var(--color-bg-card);
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
}

.filter-chip:hover,
.filter-chip.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: var(--color-primary);
    color: var(--color-primary-light);
}

/* -----------------------------------------------------------
   Page Hero (Inner Pages)
   ----------------------------------------------------------- */
.page-hero {
    background: linear-gradient(135deg, var(--color-bg-secondary) 0%, var(--color-bg-card) 100%);
    padding: 120px 0 60px;
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.page-hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 12px;
}

.page-hero-subtitle {
    color: var(--color-text-secondary);
    font-size: 1.1rem;
}

/* -----------------------------------------------------------
   Dashboard
   ----------------------------------------------------------- */
.dashboard-stat-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition);
}

.dashboard-stat-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon-blue {
    background: rgba(99, 102, 241, 0.2);
    color: var(--color-primary-light);
}

.stat-icon-cyan {
    background: rgba(34, 211, 238, 0.2);
    color: var(--color-secondary);
}

.stat-icon-green {
    background: rgba(16, 185, 129, 0.2);
    color: var(--color-accent);
}

.stat-icon-amber {
    background: rgba(245, 158, 11, 0.2);
    color: var(--color-accent-warm);
}

.stat-info-value {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    font-family: var(--font-heading);
}

.stat-info-label {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

/* Table */
.genesis-table {
    width: 100%;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.genesis-table thead {
    background: rgba(99, 102, 241, 0.1);
}

.genesis-table th,
.genesis-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9rem;
}

.genesis-table th {
    color: var(--color-text-secondary);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.genesis-table tbody tr {
    transition: var(--transition-fast);
}

.genesis-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

.genesis-table tbody tr:last-child td {
    border-bottom: none;
}

/* -----------------------------------------------------------
   Forms (Auth & Contact)
   ----------------------------------------------------------- */
.form-card {
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius-lg);
    padding: 40px;
}

.form-control,
.form-select {
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--border-radius-sm) !important;
    color: var(--color-text-primary) !important;
    padding: 12px 16px !important;
    font-size: 0.95rem !important;
    transition: var(--transition-fast) !important;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15) !important;
    background: rgba(255, 255, 255, 0.08) !important;
}

.form-control::placeholder {
    color: var(--color-text-muted) !important;
}

.form-label {
    color: var(--color-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

/* -----------------------------------------------------------
   Footer
   ----------------------------------------------------------- */
.site-footer {
    background: #06060f;
    border-top: 1px solid var(--color-border);
    margin-top: auto;
}

.footer-top {
    padding: 60px 0 40px;
}

.footer-brand-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 16px;
    text-decoration: none;
}

.footer-brand-link .brand-icon {
    font-size: 1.6rem;
}

.footer-desc {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-top: 12px;
    max-width: 280px;
}

.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.footer-social a {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-muted);
    font-size: 1.1rem;
    transition: var(--transition);
}

.footer-social a:hover {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
}

.footer-heading {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--color-text-secondary);
    margin-bottom: 20px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-primary-light);
    padding-left: 4px;
}

.footer-links a i {
    font-size: 0.65rem;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    color: var(--color-text-muted);
    font-size: 0.9rem;
    word-break: break-word;
}

.footer-contact li i {
    color: var(--color-primary-light);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.footer-contact a {
    color: var(--color-text-muted);
}

.footer-contact a:hover {
    color: var(--color-primary-light);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding: 20px 0;
    font-size: 0.875rem;
    color: var(--color-text-muted);
}

.footer-legal-link {
    color: var(--color-text-muted);
}

.footer-legal-link:hover {
    color: var(--color-primary-light);
}

/* -----------------------------------------------------------
   WhatsApp Float Button
   ----------------------------------------------------------- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: #25d366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: var(--transition);
}

.whatsapp-float:hover {
    background: #128c7e;
    color: #fff;
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}

/* -----------------------------------------------------------
   Animations
   ----------------------------------------------------------- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateX(-50%) translateY(0);
    }

    40% {
        transform: translateX(-50%) translateY(-10px);
    }

    60% {
        transform: translateX(-50%) translateY(-5px);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }

    50% {
        box-shadow: 0 0 0 12px rgba(99, 102, 241, 0);
    }
}

.animate-fade-up {
    animation: fadeInUp 0.6s ease forwards;
}

.animate-delay-1 {
    animation-delay: 0.1s;
}

.animate-delay-2 {
    animation-delay: 0.2s;
}

.animate-delay-3 {
    animation-delay: 0.3s;
}

/* Gradient text utility */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Badge utilities */
.badge-genesis {
    background: rgba(99, 102, 241, 0.15);
    color: var(--color-primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-accent {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-warm {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

/* -----------------------------------------------------------
   Lightbox
   ----------------------------------------------------------- */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.lightbox.active {
    display: flex;
}

.lightbox-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--border-radius);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: var(--color-primary);
}

.lightbox-caption {
    color: var(--color-text-secondary);
    margin-top: 16px;
    font-size: 0.9rem;
    text-align: center;
}

/* -----------------------------------------------------------
   Accessibility & Misc
   ----------------------------------------------------------- */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* -----------------------------------------------------------
   Responsive
   ----------------------------------------------------------- */
@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        padding-top: var(--nav-height);
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-stats {
        gap: 20px;
    }

    .section-dark,
    .section-darker,
    .section-card {
        padding: 60px 0;
    }

    .stats-bar {
        padding: 30px;
    }

    .form-card {
        padding: 24px 20px;
    }

    .footer-top {
        padding: 40px 0 30px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 16px;
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .messages-container {
        right: 10px;
    }

    .gallery-grid {
        columns: 2;
    }
}

@media (max-width: 991.98px) {
    #mainNav .navbar-collapse {
        margin-top: 10px;
        padding: 10px;
        border-radius: 12px;
        border: 1px solid var(--color-border);
        background: #0e0e20;
        opacity: 1;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
    }

    #mainNav .navbar-nav {
        align-items: stretch !important;
    }

    #mainNav .navbar-nav .nav-link {
        width: 100%;
    }

    body.light-theme #mainNav .navbar-collapse {
        background: #ffffff;
        border-color: rgba(99, 102, 241, 0.2);
        box-shadow: 0 10px 28px rgba(15, 23, 42, 0.12);
    }
}

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

    .btn-genesis {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .hero-stats {
        justify-content: center;
    }

    .filter-chips {
        gap: 6px;
    }

    .filter-chip {
        font-size: 0.8rem;
        padding: 5px 12px;
    }
}

/* Hero image — mobile first */
@media (max-width: 991.98px) {
    .hero-image-col {
        min-height: 40vh;
        display: flex;
        align-items: center;
        justify-content: center;
        padding-top: 2rem;
        overflow: hidden;
        width: 100%;
    }

    .hero-image-mobile {
        max-height: 40vh;
        max-width: 100%;
        width: auto;
        height: auto;
        display: block;
        object-fit: contain;
    }
}