/* ===============================
   ADZERA MAHASHIVRATRI THEME - OPTIMIZED 2026
   =============================== */

@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css');

:root {
    --bg-main: #020617;
    --bg-alt: #050821;
    --bg-card: rgba(10, 16, 40, 0.95);
    --bg-glass: rgba(15, 23, 42, 0.72);

    /* BRAND COLORS */
    --accent: #097CC8;        
    --accent-strong: #0A88E0; 
    --accent-alt: #6BB3E8;    
    --neon-orange: #ff5e00;
    --neon-cyan: #00f0ff; 
    --neon-blue: #2563eb; 

    --text-main: #f9fafb;
    --text-muted: #9ca3af;
    --border-subtle: rgba(148, 163, 184, 0.2);

    --radius-lg: 22px;
    --radius-xl: 30px;
    --shadow-soft: 0 25px 60px rgba(15, 23, 42, 0.9);

    /* ANIMATIONS */
    --transition-fast: 0.2s ease-out;
    --transition-med: 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.6s cubic-bezier(0.16, 1, 0.3, 1);

    --nav-height: 80px; 
}

/* RESET */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

body {
    min-height: 100vh;
    font-family: 'Helvetica', 'Arial', sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at 0% 0%, rgba(148, 163, 253, 0.22), transparent 55%),
        radial-gradient(circle at 100% 100%, rgba(56, 189, 248, 0.26), transparent 60%),
        linear-gradient(150deg, #020617 0%, #020617 40%, #02051a 100%);
    background-attachment: fixed;
    line-height: 1.6;
    overflow-x: hidden;
    letter-spacing: -0.02em;
    /* Font Optimization */
    font-display: swap;
}

/* PERFORMANCE: Content Visibility for heavy sections */
section, footer, .stats-bar {
    content-visibility: auto;
    contain-intrinsic-size: 1px 500px;
}

/* PAGE ENTRY ANIMATION */
nav, .page-header, .stats-bar, section, footer {
    opacity: 0; 
    animation: pageEntry 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes pageEntry { 
    from { opacity: 0; transform: translateY(20px); } 
    to { opacity: 1; transform: translateY(0); } 
}

img { max-width: 100%; display: block; transition: transform var(--transition-smooth), opacity var(--transition-med); }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
ul { list-style: none; }

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica', 'Arial', sans-serif;
    font-weight: 700;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

/* LAYOUT HELPERS */
.container { width: min(1180px, 92%); margin: 0 auto; }
.section-padding { padding: 100px 0; }
@media (max-width: 768px) { .section-padding { padding: 70px 0; } }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; }

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) { .grid-3 { grid-template-columns: 1fr; } }

/* NAVIGATION */
nav {
    position: fixed; inset: 0 0 auto; height: var(--nav-height);
    display: flex; align-items: center; justify-content: space-between; padding: 0 5%;
    background: linear-gradient(to bottom, rgba(2, 6, 23, 0.95), rgba(2, 6, 23, 0.8), transparent);
    backdrop-filter: blur(20px); border-bottom: 1px solid rgba(148, 163, 184, 0.1);
    z-index: 40; transition: background var(--transition-med), height var(--transition-med);
}

.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { height: 55px; width: auto; margin-top: 2px; border-radius: 6px; transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
.logo:hover .logo-img { transform: scale(1.08) rotate(-2deg); }
.footer-logo { justify-content: center; margin-bottom: 8px; }

.nav-links { display: flex; align-items: center; gap: 24px; font-size: 0.95rem; }
.nav-links a { position: relative; padding: 4px 0; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-size: 0.78rem; font-weight: 600; }
.nav-links a::after {
    content: ""; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent-strong), var(--accent-alt));
    border-radius: 999px; transition: width var(--transition-smooth);
}
.nav-links a:hover, .nav-links a.active { color: var(--text-main); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

/* SOCIAL ICONS (Used in Header & Footer) */
.social-icon i { font-size: 1.1rem; transition: transform var(--transition-med), color var(--transition-med); }
.social-icon:hover i { transform: translateY(-3px); color: var(--accent-alt); }

.menu-btn { display: none; font-size: 1.4rem; cursor: pointer; transition: transform 0.3s ease; }
.menu-btn:active { transform: scale(0.9); }

@media (max-width: 840px) {
    .menu-btn { display: block; }
    .nav-links {
        position: fixed; inset: var(--nav-height) 0 auto 0; flex-direction: column; align-items: flex-start;
        background: rgba(2, 6, 23, 0.98); backdrop-filter: blur(20px); padding: 18px 5% 24px;
        border-bottom: 1px solid rgba(148, 163, 184, 0.2); max-height: 0; overflow: hidden; opacity: 0;
        pointer-events: none; transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    }
    .nav-links.active { max-height: 400px; opacity: 1; pointer-events: auto; }
}

/* SNOW/PARTICLE OVERLAY */
.snow {
    pointer-events: none; position: fixed; inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.9) 1px, transparent 1px), radial-gradient(circle, rgba(255, 255, 255, 0.6) 1px, transparent 1px);
    background-size: 180px 180px, 260px 260px; background-position: 0 0, 80px 60px;
    opacity: 0.28; mix-blend-mode: screen; animation: snowShift 24s linear infinite; z-index: 1;
}
@keyframes snowShift {
    0% { transform: translateY(0); background-position: 0 0, 80px 60px; }
    100% { transform: translateY(40px); background-position: 0 80px, 80px 140px; }
}

/* HEADER / HERO */
.page-header {
    position: relative; 
    min-height: calc(100vh - var(--nav-height)); 
    padding-top: calc(var(--nav-height) + 40px); 
    padding-bottom: 60px;
    display: flex; align-items: center; justify-content: center; text-align: left;
    background-size: cover; 
    background-position: center; 
    background-repeat: no-repeat; 
    overflow: hidden;
    transition: background-position 0.1s linear;
}

.page-header.contact-header { min-height: 60vh; }

/* MOBILE FIX FOR BACKGROUNDS */
@media (max-width: 768px) {
    .page-header { 
        text-align: center; 
        background-attachment: scroll; /* Fix for mobile jitter */
        background-position: center top; /* Center image better */
    }
    .page-header.contact-header { 
        min-height: 50vh; 
        padding-top: var(--nav-height); 
    }
}

/* OVERLAY OPACITY ADJUSTMENT */
.page-header::before {
    content: ""; position: absolute; inset: 0;
    background: 
        radial-gradient(circle at top left, rgba(148, 163, 253, 0.3), transparent 55%), 
        radial-gradient(circle at bottom right, rgba(56, 189, 248, 0.35), transparent 60%), 
        linear-gradient(135deg, rgba(15, 23, 42, 0.75) 0%, rgba(15, 23, 42, 0.85) 40%, rgba(15, 23, 42, 0.95) 100%);
    mix-blend-mode: normal;
}

.page-header .header-content { position: relative; z-index: 3; width: min(1120px, 92%); margin: 0 auto; text-align: center; }

.subtitle {
    text-transform: uppercase; letter-spacing: 0.25em; font-size: 0.82rem; color: var(--accent-strong);
    font-weight: 600; margin-bottom: 10px; display: inline-block; animation: fadeInDown 0.8s ease-out;
}
.page-header h1 {
    font-size: clamp(2.8rem, 5vw, 4rem); line-height: 1.1; letter-spacing: -0.04em; text-transform: uppercase;
    font-weight: 800; margin-bottom: 20px; animation: fadeInUp 1s ease-out 0.2s backwards;
}
.page-header p { color: var(--text-muted); margin-top: 18px; max-width: 650px; margin-inline: auto; animation: fadeInUp 1s ease-out 0.4s backwards; }

/* SCROLL INDICATOR STYLE */
.scroll-indicator {
    position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
    color: var(--text-muted); font-size: 1.5rem; animation: bounce 2s infinite ease-in-out; z-index: 5; opacity: 0.7; cursor: pointer;
    transition: opacity 0.3s, color 0.3s;
}
.scroll-indicator:hover { opacity: 1; color: var(--accent); }

@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(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }

/* ANNOUNCEMENT BAR */
.announcement-bar {
    margin: -18px auto 0; width: min(620px, 90%); position: relative; z-index: 3;
    display: flex; justify-content: center; align-items: center; gap: 12px; padding: 8px 16px;
    border-radius: 999px; background: linear-gradient(90deg, rgba(56,189,248,0.12), rgba(129,140,248,0.16));
    border: 1px solid rgba(148, 163, 184, 0.5); font-size: 0.8rem; color: var(--text-main);
    animation: fadeIn 1.2s ease-out 0.6s backwards; transition: transform 0.3s ease, border-color 0.3s ease;
}
.announcement-bar:hover { transform: translateY(-2px); border-color: var(--accent-strong); }
.announcement-pill {
    padding: 4px 10px; border-radius: 999px; background: linear-gradient(135deg, var(--accent-strong), var(--accent-alt));
    color: #020617; font-weight: 700; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
    animation: pulse-orange 2s infinite;
}
@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(10, 136, 224, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(10, 136, 224, 0); }
    100% { box-shadow: 0 0 0 0 rgba(10, 136, 224, 0); }
}

/* BUTTONS */
.btn {
    display: inline-flex; align-items: center; justify-content: center; padding: 12px 26px; border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.6); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.16em;
    font-weight: 600; background: transparent; color: var(--text-main); cursor: pointer;
    transition: all var(--transition-med); position: relative; overflow: hidden;
}
.btn:hover { border-color: var(--accent-strong); box-shadow: 0 0 25px rgba(56, 189, 248, 0.3); transform: translateY(-2px); }
.btn.filled { border-color: transparent; background-image: linear-gradient(135deg, var(--accent-strong), var(--accent-alt)); box-shadow: 0 10px 30px rgba(9, 124, 200, 0.3); color: #020617; }
.btn.filled:hover { box-shadow: 0 15px 45px rgba(9, 124, 200, 0.5); transform: translateY(-3px) scale(1.02); }
.btn:active { transform: translateY(-1px); }
.btn.social-btn { margin-right: 10px; }

/* STATS BAR */
.stats-bar {
    display: flex; justify-content: center; align-items: stretch; gap: 24px; padding: 30px 6%;
    background: radial-gradient(circle at top, rgba(148,163,253,0.1), transparent 55%), linear-gradient(to right, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.95));
    border-top: 1px solid rgba(148, 163, 184, 0.15); border-bottom: 1px solid rgba(148, 163, 184, 0.15);
}
.stat-item { text-align: center; flex: 1; transition: transform var(--transition-med); }
.stat-item:hover { transform: translateY(-5px); }
.stat-item h2 { font-size: 2.2rem; letter-spacing: -0.02em; font-weight: 700; background: linear-gradient(to bottom, #fff, #9ca3af); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.stat-item p { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.2em; color: var(--text-muted); }
@media (max-width: 768px) { .stats-bar { flex-direction: column; gap: 20px; text-align: center; } }

/* CARDS / GLASS PANELS & 3D EFFECT */
.card, .arsenal-card {
    position: relative; background: var(--bg-glass); border-radius: var(--radius-lg);
    border: 1px solid rgba(148, 163, 184, 0.15); padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4); overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease, border-color 0.4s ease;
    perspective: 1000px;
}

/* 3D Tilt Effect on Hover */
.card:hover, .arsenal-card:hover {
    transform: translateY(-8px) rotateX(2deg);
    box-shadow: 0 25px 60px rgba(9, 124, 200, 0.15);
    border-color: rgba(9, 124, 200, 0.4);
    z-index: 2;
}

/* SPECIAL PRICE CARD STYLING */
.price-card {
    background: linear-gradient(180deg, rgba(20, 25, 45, 0.8) 0%, rgba(10, 16, 40, 0.95) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.price-card:hover {
    box-shadow: 0 0 30px rgba(9, 124, 200, 0.25), inset 0 0 20px rgba(9, 124, 200, 0.05);
    border-color: var(--accent);
}
.price-card h3 {
    background: linear-gradient(90deg, #fff, #ccc); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 15px; margin-bottom: 15px;
}

.card::before, .arsenal-card::before {
    content: ""; position: absolute; inset: -50%;
    background: radial-gradient(circle at 50% 50%, rgba(148, 163, 253, 0.15), transparent 60%);
    opacity: 0; transition: opacity 0.5s ease; pointer-events: none;
}
.card:hover::before, .arsenal-card:hover::before { opacity: 1; }

.card h3, .arsenal-card h3 { letter-spacing: 0.05em; font-size: 1.1rem; text-transform: uppercase; font-weight: 700; margin-bottom: 10px; }
.card p, .arsenal-card p { color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }

/* LISTS */
.feature-list { margin-top: 18px; }
.feature-list li {
    display: flex; align-items: flex-start; font-size: 0.92rem; color: var(--text-muted);
    margin-bottom: 12px; gap: 10px; line-height: 1.5; transition: transform 0.2s ease, color 0.2s ease;
}
.feature-list li:hover { transform: translateX(5px); color: var(--text-main); }
.feature-list li i, .feature-list li strong { flex-shrink: 0; margin-top: 3px; color: var(--accent-strong); }

/* COUPON CHIPS */
.coupon-grid { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 15px; }
.coupon-chip {
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--border-subtle);
    padding: 12px 18px; border-radius: 12px; cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: flex; flex-direction: column; align-items: center; min-width: 100px; text-align: center;
}
.coupon-chip:hover {
    background: rgba(10, 136, 224, 0.15); border-color: var(--accent-strong);
    transform: translateY(-4px) scale(1.05); box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.coupon-chip.active {
    background: var(--accent-strong); border-color: var(--accent-strong);
    color: #000; transform: scale(1.05); box-shadow: 0 0 15px rgba(10, 136, 224, 0.5);
}
.coupon-chip .code { font-weight: 700; font-size: 0.95rem; letter-spacing: 0.05em; text-transform: uppercase; display: block; }
.coupon-chip .desc { font-size: 0.75rem; opacity: 0.8; margin-top: 4px; display: block; }
.coupon-chip.active .desc { opacity: 1; font-weight: 600; }

/* ARSENAL GRID */
.arsenal-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; margin-bottom: 40px; }
.arsenal-grid .arsenal-card:nth-child(1) { transition-delay: 0.1s; }
.arsenal-grid .arsenal-card:nth-child(2) { transition-delay: 0.2s; }
.arsenal-grid .arsenal-card:nth-child(3) { transition-delay: 0.3s; }
@media (max-width: 1024px) { .arsenal-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .arsenal-grid { grid-template-columns: 1fr; } }
.arsenal-icon { font-size: 1.8rem; margin-bottom: 12px; color: var(--accent-strong); transition: transform 0.3s ease; }
.arsenal-card:hover .arsenal-icon { transform: scale(1.1) rotate(5deg); }

/* SECTION LABEL */
.section-label {
    font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.25em; color: var(--accent-strong);
    margin: 40px 0 16px; font-weight: 700; display: inline-block; border-bottom: 1px solid var(--accent-strong); padding-bottom: 4px;
}

/* CONTACT INPUTS */
input, select, textarea {
    width: 100%; padding: 16px; margin-bottom: 20px; border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3); background: rgba(2, 6, 23, 0.6);
    color: var(--text-main); font-family: inherit; font-size: 1rem; transition: all 0.3s ease;
}
input::placeholder, textarea::placeholder { color: rgba(148, 163, 184, 0.6); }
input:focus, select:focus, textarea:focus {
    outline: none; border-color: var(--accent-strong); box-shadow: 0 0 0 3px rgba(10, 136, 224, 0.2);
    background: rgba(2, 6, 23, 0.9); transform: scale(1.01);
}
textarea { resize: vertical; min-height: 140px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* FOOTER */
footer {
    padding: 40px 5% 50px; border-top: 1px solid rgba(148, 163, 184, 0.15);
    background: linear-gradient(to top, rgba(2, 6, 23, 1), rgba(2, 6, 23, 0.9), transparent);
    text-align: center; margin-top: 60px; position: relative; z-index: 3;
}
.footer-social { margin-top: 20px; display: flex; gap: 20px; justify-content: center; }
footer p { margin-top: 10px; font-size: 0.8rem; color: var(--text-muted); }

/* SCROLL / ANIMATION CLASSES */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* PORTFOLIO ITEMS */
.portfolio-item {
    position: relative; height: 480px; overflow: hidden; background: #000;
    border: 1px solid #1a1a1a; border-radius: 16px; cursor: pointer;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}
.portfolio-item:hover { transform: translateY(-5px); box-shadow: 0 20px 50px rgba(0,0,0,0.7); }
.portfolio-item video {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); opacity: 0.9;
}
.portfolio-item:hover video { transform: scale(1.08); opacity: 1; }
.portfolio-overlay {
    position: absolute; bottom: 0; left: 0; width: 100%; padding: 30px;
    background: linear-gradient(to top, rgba(0,0,0,0.95), transparent);
    opacity: 0; transform: translateY(20px); transition: 0.4s ease; z-index: 2;
}
.portfolio-item:hover .portfolio-overlay { opacity: 1; transform: translateY(0); }
.audio-toggle {
    position: absolute; top: 20px; right: 20px; z-index: 10;
    background: rgba(255, 255, 255, 0.15); backdrop-filter: blur(5px);
    color: white; border: 1px solid rgba(255,255,255,0.2); border-radius: 50%;
    width: 44px; height: 44px; cursor: pointer; display: flex; align-items: center; justify-content: center;
    transition: 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.audio-toggle:hover { background: var(--neon-orange); border-color: var(--neon-orange); transform: rotate(90deg); }

/* UTILITIES */
.text-center { text-align: center; }

/* ===============================
   NEW ADDITIONS: ORG CHART & FOUNDERS
   =============================== */
.founder-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px;
}
.founder-card { text-align: center; border-top: 3px solid transparent; transition: all 0.4s ease; padding: 30px 20px; }
.founder-card:hover { transform: translateY(-8px); }

/* UNIFIED NEON BLUE HEXAGON STYLE FOR ALL FOUNDERS */
.founder-card {
    border-color: var(--neon-blue);
    background: linear-gradient(180deg, rgba(20, 25, 45, 0.6) 0%, rgba(37, 99, 235, 0.05) 100%);
}

.founder-img-container {
    width: 140px; height: 140px; margin: 0 auto 25px; position: relative;
    display: flex; justify-content: center; align-items: center;
    /* Hexagon Clip Path */
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: var(--neon-blue); 
    padding: 3px; /* Functions as border width */
    filter: drop-shadow(0 0 15px rgba(37, 99, 235, 0.6));
    transition: transform 0.4s ease;
}

.founder-card:hover .founder-img-container { transform: scale(1.05); }

.founder-img-container img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    background: #020617; /* Background behind image inside hex */
}

@media(max-width:768px) { .founder-grid { grid-template-columns: 1fr; } }

/* TREE CHART CSS */
.tree-container { overflow-x: auto; padding-bottom: 20px; text-align: center; }
.tree { display: inline-block; padding: 20px; }
.tree ul { display: flex; justify-content: center; padding-top: 20px; position: relative; }
.tree li { float: left; text-align: center; list-style-type: none; position: relative; padding: 20px 10px 0 10px; }
/* Connectors */
.tree li::before, .tree li::after { content: ''; position: absolute; top: 0; right: 50%; border-top: 1px solid var(--accent-strong); width: 50%; height: 20px; }
.tree li::after { right: auto; left: 50%; border-left: 1px solid var(--accent-strong); }
.tree li:only-child::after, .tree li:only-child::before { display: none; }
.tree li:only-child { padding-top: 0; }
.tree li:first-child::before, .tree li:last-child::after { border: 0 none; }
.tree li:last-child::before { border-right: 1px solid var(--accent-strong); border-radius: 0 5px 0 0; }
.tree li:first-child::after { border-radius: 5px 0 0 0; }
.tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1px solid var(--accent-strong); width: 0; height: 20px; }
.tree-card { background: rgba(15,23,42,0.9); border: 1px solid var(--border-subtle); padding: 10px 15px; border-radius: 10px; min-width: 120px; }
.tree-card img { width: 50px; height: 50px; border-radius: 50%; margin: 0 auto 5px; border: 2px solid rgba(255,255,255,0.2); }

/* MOBILE FIX FOR TREE CHART (STACKS VERTICALLY, NO SCROLL) */
@media (max-width: 768px) {
    .grid-2, .grid-3, .stats-bar, .founder-grid { grid-template-columns: 1fr; flex-direction: column; }
    
    /* Force Tree to stack vertically like founders */
    .tree-container { overflow-x: visible; text-align: center; width: 100%; }
    .tree { padding: 0; width: 100%; }
    .tree ul { flex-direction: column; padding-top: 0; align-items: center; }
    .tree li { float: none; width: 100%; padding: 10px 0; }
    /* Hide all connecting lines on mobile */
    .tree li::before, .tree li::after, .tree ul ul::before { display: none; }
    /* Expand cards for mobile view */
    .tree-card { width: 100%; max-width: 320px; display: flex; align-items: center; gap: 15px; padding: 15px; text-align: left; margin: 0 auto; border-left: 4px solid var(--accent-strong); }
    .tree-card img { margin: 0; width: 45px; height: 45px; }
    .tree-card div { display: flex; flex-direction: column; }
}
