/* --- GLOBAL ETHOS BRAND PALETTE --- */
:root {
    --brand-teal: #1e4552;
    --brand-teal-light: #2d6574;
    --brand-teal-muted: #4a6b72;
    --brand-gold: #c9a227;
    --brand-gold-hover: #b3861f;
    --brand-gold-light: #f5ecd4;
    --brand-green: #ffffff;
    --brand-green-soft: #ffffff;

    --primary: var(--brand-teal);
    --primary-hover: var(--brand-teal-light);
    --secondary: #3d7a6a;
    --warning: var(--brand-gold);
    --warning-hover: var(--brand-gold-hover);
    --danger: #c45c4a;
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-tint: #ffffff;
    --text: #1e4552;
    --text-light: #4a6b72;
    --border: #c5ddd0;
    --font: 'Poppins', sans-serif;
}

body {
    font-family: var(--font);
    background-color: #ffffff;
    background-image: none;
    color: var(--text);
    margin: 0; 
    padding-top: 72px; /* Space for fixed nav */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* --- GLASSMORPHISM NAVIGATION --- */
.glass-nav {
    position: fixed; top: 0; left: 0; width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(30, 69, 82, 0.06);
    padding: 0.5rem 1.25rem; display: flex; justify-content: space-between; align-items: center;
    gap: 1rem;
    z-index: 1000; box-sizing: border-box;
}
.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 1;
    min-width: 0;
    color: var(--brand-teal);
}
.nav-logo-link { text-decoration: none; color: inherit; cursor: pointer; }
.nav-logo-link:hover { opacity: 0.92; }
.logo:hover .logo-brand { color: var(--brand-gold); transition: color 0.3s ease; }
.logo-img {
    height: 34px;
    width: auto;
    max-height: 34px;
    max-width: 40px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}
/* Legacy markup on server: hide extra nav lines if old index was not re-uploaded */
.glass-nav .logo-tagline,
.glass-nav .logo-areas,
.glass-nav .logo-divider { display: none; }
.glass-nav .logo-title { font-size: 0.72rem; line-height: 1.15; margin: 0; }
.glass-nav .logo-subtitle { font-size: 0.68rem; line-height: 1.15; margin: 0; }
.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    text-align: left;
    min-width: 0;
}
.logo-brand {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
}
.logo-tagline {
    font-size: 0.58rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    margin-top: 2px;
    line-height: 1.3;
}
.logo-areas {
    font-size: 0.55rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.01em;
    margin-top: 2px;
}
.logo--nav .logo-brand { font-size: 0.78rem; }
.logo--footer .logo-img { height: 30px; max-height: 30px; max-width: 36px; }
.logo--footer .logo-brand { font-size: 0.72rem; }
.logo--footer .logo-tagline { font-size: 0.55rem; }
.logo--footer .logo-areas {
    font-size: 0.52rem;
    max-width: 280px;
}

/* Mobile Navigation Toggle */
.mobile-toggle { display: none; background: transparent; border: none; font-size: 1.8rem; color: var(--brand-teal); cursor: pointer; padding: 0; transition: color 0.3s ease; }
.mobile-toggle:hover { color: var(--brand-gold); }
.nav-wrapper { display: flex; flex: 1; justify-content: flex-end; align-items: center; min-width: 0; flex-shrink: 0; }
.nav-links { display: flex; align-items: center; }

/* --- MODERN BUTTONS --- */
button { font-family: var(--font); font-weight: 600; padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer; transition: all 0.3s ease; }
.btn-primary {
    background: var(--brand-teal);
    color: white;
    box-shadow: 0 4px 12px rgba(30, 69, 82, 0.22);
}
.btn-primary:hover {
    background: var(--brand-gold);
    color: var(--brand-teal);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(201, 162, 39, 0.35);
}
.btn-primary:active { background: var(--brand-gold-hover); }
.btn-warning {
    background: var(--brand-gold);
    color: var(--brand-teal);
    box-shadow: 0 4px 12px rgba(201, 162, 39, 0.25);
}
.btn-warning:hover {
    background: var(--brand-gold-hover);
    color: white;
    transform: translateY(-2px);
}
.btn-logout { background: var(--danger); color: white; }
.btn-logout:hover { filter: brightness(1.05); transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    color: var(--brand-teal);
    border: 2px solid var(--brand-teal);
}
.btn-outline:hover {
    border-color: var(--brand-gold);
    color: var(--brand-gold);
    background: var(--brand-gold-light);
}
.full-width { width: 100%; }

.nav-btn { background: transparent; color: var(--brand-teal-muted); padding: 8px 15px; }
.nav-btn:hover { color: var(--brand-gold); background: var(--brand-gold-light); }
a.nav-btn {
    display: inline-block;
    text-decoration: none;
    border: none;
    background: transparent;
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 8px;
    font-family: var(--font);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
    text-align: center;
}
a.nav-btn:hover { color: var(--brand-gold); background: var(--brand-gold-light); }
a.btn-primary {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
    color: white;
}
a.btn-primary:hover { color: var(--brand-teal); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(201, 162, 39, 0.35); }
a.btn-outline {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}
a.btn-outline:hover { border-color: var(--brand-gold); color: var(--brand-gold); background: var(--brand-gold-light); }
.public-link { font-size: 1.05rem; }

/* --- LAYOUT & CARDS --- */
.container { max-width: 1100px; margin: 2rem auto; padding: 0 1.5rem; flex: 1; }
.hidden { display: none !important; }
.text-center { text-align: center; }

.glass-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px -5px rgba(30, 69, 82, 0.06), 0 8px 10px -6px rgba(30, 69, 82, 0.03);
    border: 1px solid var(--border);
    box-sizing: border-box;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.shadow-hover { transition: all 0.3s ease; }
.shadow-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 28px -5px rgba(30, 69, 82, 0.1), 0 10px 14px -5px rgba(201, 162, 39, 0.12);
    border-color: rgba(201, 162, 39, 0.35);
}

/* --- TYPOGRAPHY & HERO --- */
.hero-section { padding: 40px 0 30px; }
.hero-title { font-size: 3.5rem; font-weight: 700; color: var(--brand-teal); margin-bottom: 15px; line-height: 1.2; }
.gradient-text {
    color: var(--brand-teal);
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    -webkit-text-fill-color: currentColor;
    transition: color 0.3s ease;
    cursor: default;
}
.gradient-text:hover { color: var(--brand-gold); }
#view-public-home .hero-title {
    color: var(--brand-teal);
    text-transform: uppercase;
}
#view-public-home .hero-brand-name {
    color: var(--brand-teal);
    white-space: nowrap;
    transition: color 0.3s ease;
    cursor: default;
}
#view-public-home .hero-brand-name:hover {
    color: var(--brand-gold);
}
.hero-subtitle { font-size: 1.2rem; color: var(--text-light); max-width: 700px; margin: 0 auto; line-height: 1.6; }
#view-public-home .hero-subtitle {
    color: var(--brand-teal);
}
#view-public-home .hero-tagline {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 10px;
}
#view-public-home .hero-areas {
    font-size: 0.95rem;
    font-weight: 400;
    letter-spacing: 0.02em;
    margin: 0;
    line-height: 1.5;
}

/* --- FORMS & INPUTS --- */
.modern-input {
    width: 100%; padding: 12px 15px; margin-bottom: 15px;
    border: 1px solid var(--border); border-radius: 8px; box-sizing: border-box;
    font-family: var(--font); font-size: 1rem;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: var(--surface-tint); color: var(--text);
}
.modern-input:focus {
    outline: none;
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.2);
    background: white;
}

/* --- TABS --- */
.admin-nav-tabs { display: flex; gap: 15px; margin-bottom: 30px; border-bottom: 2px solid var(--border); padding-bottom: 15px; overflow-x: auto; white-space: nowrap; }
.tab-btn { background: transparent; color: var(--brand-teal-muted); padding: 12px 25px; font-size: 1.1rem; border-radius: 8px; flex-shrink: 0; }
.tab-btn:hover { color: var(--brand-gold); background: var(--brand-gold-light); }
.tab-btn.active { background: var(--brand-teal); color: white; box-shadow: 0 4px 12px rgba(30, 69, 82, 0.25); }
.tab-btn.active:hover { background: var(--brand-gold); color: var(--brand-teal); }
/* Hide scrollbar for tabs */
.admin-nav-tabs::-webkit-scrollbar { display: none; }
.admin-nav-tabs { -ms-overflow-style: none; scrollbar-width: none; }

/* --- HOME SLIDER --- */
.slider-container { position: relative; max-width: 100%; height: 450px; margin: 0 auto 3rem; border-radius: 20px; overflow: hidden; background: var(--brand-green); border: 1px solid var(--border); }
.slider-content {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.52s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: opacity;
}
.slider-img { width: 100%; height: 100%; object-fit: cover; position: absolute; top:0; left:0; z-index: 1;}
.slider-placeholder {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1;
    background: linear-gradient(135deg, var(--brand-teal), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}
.slider-caption { position: absolute; bottom: 0; left: 0; width: 100%; background: linear-gradient(transparent, rgba(0,0,0,0.9)); color: white; padding: 60px 30px 25px; z-index: 2; box-sizing:border-box;}
.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.2); backdrop-filter: blur(4px); color: white; border: none; z-index: 3; font-size: 1.5rem; border-radius: 50%; width: 50px; height: 50px; display:flex; align-items:center; justify-content:center; transition:0.3s;}
.slider-btn:hover { background: var(--brand-gold); color: var(--brand-teal); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

@media (prefers-reduced-motion: reduce) {
    .slider-content { transition-duration: 0.12s; }
}

/* --- PUBLIC FEATURES GRID --- */
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-bottom: 40px; }
.feature-card { text-align: center; padding: 30px; border-top: 4px solid var(--brand-teal); transition: border-color 0.3s ease; }
.feature-card:hover { border-top-color: var(--brand-gold); }
.feature-icon { font-size: 3rem; margin-bottom: 15px; }
.feature-card h3 { margin-top: 0; color: var(--brand-teal); font-size: 1.3rem; transition: color 0.3s ease; }
.feature-card:hover h3 { color: var(--brand-gold); }
.feature-card p { color: var(--text-light); line-height: 1.6; margin-bottom: 0; }

.anchor-section { scroll-margin-top: 72px; }

/* --- CONTACT (LANDING) --- */
.contact-section { margin-bottom: 40px; border-top: 4px solid var(--brand-teal); transition: border-color 0.3s ease; }
.contact-section:hover { border-top-color: var(--brand-gold); }
.contact-heading { margin-top: 0; color: var(--brand-teal); font-size: 1.75rem; text-align: center; }
.contact-lead { color: var(--text); line-height: 1.75; max-width: 820px; margin: 0 auto 1.75rem; text-align: center; font-size: 1.05rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 2rem; }
.cta-row .btn-primary,
.cta-row .btn-outline { padding: 12px 22px; font-size: 1rem; }
.contact-details { border-top: 1px solid var(--border); padding-top: 1.5rem; text-align: center; }
.contact-line { margin: 0 0 12px; color: var(--text-light); font-size: 0.95rem; }
.contact-line:last-child { margin-bottom: 0; }
.contact-label { display: block; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-light); margin-bottom: 4px; }
.contact-link { color: var(--brand-teal); font-weight: 600; text-decoration: none; font-size: 1.05rem; word-break: break-word; transition: color 0.3s ease; }
.contact-link:hover { text-decoration: underline; color: var(--brand-gold); }

/* --- FOUNDERS BIO --- */
.founders-intro { margin-bottom: 1.5rem; border-left: 4px solid var(--brand-teal); }
.founders-lead { margin: 0; color: var(--text); line-height: 1.75; font-size: 1.05rem; max-width: 900px; }
.founders-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 0;
}
.founder-photo-card {
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-top: 4px solid var(--brand-teal);
    transition: border-top-color 0.3s ease;
}
.founder-photo-card:hover { border-top-color: var(--brand-gold); }
.founder-photo-frame {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--brand-green-soft);
    overflow: hidden;
}
.founder-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}
.founder-caption {
    padding: 12px 16px 16px;
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}
.founders-award {
    border-top: 4px solid var(--brand-teal);
    margin-bottom: 2.5rem;
}
.founders-award-title {
    margin-top: 0;
    color: var(--brand-teal);
    font-size: 1.35rem;
}
.founders-award-desc {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.founders-award-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

/* --- TRAINERS BIO --- */
.trainers-grid { display: grid; grid-template-columns: 1fr; gap: 30px; }
.trainer-card { display: flex; flex-direction: row; padding: 30px; gap: 30px; align-items: center; border-left: 5px solid var(--brand-teal); box-sizing: border-box; transition: border-left-color 0.3s ease; }
.trainer-card:hover { border-left-color: var(--brand-gold); }
.trainer-img { width: 150px; height: 150px; border-radius: 50%; object-fit: cover; box-shadow: 0 10px 15px rgba(0,0,0,0.1); flex-shrink: 0;}
.trainer-info { flex: 1; }
.trainer-info h3 { margin: 0 0 5px 0; color: var(--brand-teal); font-size: 1.8rem; transition: color 0.3s ease; }
.trainer-card:hover .trainer-info h3 { color: var(--brand-gold); }
.trainer-badge { display: inline-block; background: var(--brand-gold-light); color: var(--brand-teal); padding: 4px 12px; border-radius: 20px; font-size: 0.85rem; font-weight: 600; margin-bottom: 15px; }
.trainer-info p { color: var(--text); line-height: 1.6; margin-bottom: 8px;}
.trainer-desc { color: var(--text-light) !important; font-size: 0.95rem; }

/* --- DASHBOARD GRIDS --- */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 25px; }
.course-card {
    background: white; padding: 20px; border-radius: 16px;
    border: 1px solid var(--border); cursor: pointer; text-align: center;
    display: flex; flex-direction: column;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}
.course-card:hover {
    border-color: var(--brand-gold);
    box-shadow: 0 8px 20px rgba(201, 162, 39, 0.15);
    transform: translateY(-3px);
}
.course-card:hover h3 { color: var(--brand-gold); }
.course-icon { font-size: 4rem; display: block; margin-bottom: 15px; }
.course-image-preview { width: 100%; height: 160px; object-fit: cover; border-radius: 10px; margin-bottom: 15px; }
.course-card h3 { margin: 0 0 15px 0; color: var(--brand-teal); font-size: 1.2rem; flex: 1; transition: color 0.3s ease; }

.admin-bar { display: flex; gap: 10px; align-items: center;}
.management-section { margin-bottom: 25px; padding-bottom: 25px; border-bottom: 1px dashed var(--border); }
.section-label { color: var(--brand-teal); margin-top: 0; margin-bottom: 15px; font-size: 1.1rem; }
.enrolled-row { display: flex; justify-content: space-between; align-items: center; background: var(--surface-tint); padding: 12px 15px; margin-bottom: 8px; border-radius: 8px; border: 1px solid var(--border); flex-wrap: wrap; gap: 10px; }

.item-card { background: white; border-left: 5px solid var(--border); padding: 20px; margin-bottom: 20px; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.02); }
.item-card.published { border-left-color: var(--secondary); } 
.item-card.announcement { border-left-color: var(--brand-gold); } 
.type-tag { font-size: 0.8rem; text-transform: uppercase; font-weight: 700; color: var(--text-light); margin-bottom: 8px; display: block; letter-spacing: 0.5px; }
.admin-controls { margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); display: flex; gap: 10px; flex-wrap: wrap;}

/* --- RESPONSIVE UTILITIES --- */
.responsive-flex { display: flex; gap: 15px; }
.responsive-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.responsive-pad { padding: 25px; }

/* --- MODALS & FOOTER --- */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(30, 69, 82, 0.45); backdrop-filter: blur(5px); display: flex; justify-content: center; align-items: center; z-index: 2000; padding: 20px; box-sizing: border-box;}
.modal-content { width: 100%; max-width: 400px; position: relative; padding: 2.5rem !important; max-height: 90vh; overflow-y: auto;}
.close { position: absolute; right: 20px; top: 15px; cursor: pointer; font-size: 1.8rem; color: var(--text-light); transition: 0.2s;}
.close:hover { color: var(--brand-gold); }
.error-msg { color: var(--danger); text-align: center; font-size: 0.9rem; margin-top: 10px; font-weight: 600; }

footer { background: #ffffff; border-top: 1px solid var(--border); padding: 1.25rem 0; margin-top: auto; }
.footer-content {
    max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem; flex-wrap: wrap;
    color: var(--text-light); font-size: 0.85rem;
}
.footer-content > p { margin: 0; flex-shrink: 0; }

/* --- ANIMATIONS --- */
.fade-in { animation: fadeIn 0.4s ease-out forwards; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.scale-in { animation: scaleIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; }
@keyframes scaleIn { from { opacity: 0; transform: scale(0.9); } to { opacity: 1; transform: scale(1); } }

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brand-gold);
    outline-offset: 2px;
}

/* =========================================
   MOBILE RESPONSIVENESS (< 768px)
   ========================================= */
@media (max-width: 768px) {
    body { padding-top: 64px; }
    .logo-img { height: 28px; max-height: 28px; }
    .logo--nav .logo-brand { font-size: 0.65rem; letter-spacing: 0.03em; }
    .logo--footer .logo-tagline,
    .logo--footer .logo-areas { display: none; }

    /* Navigation */
    .mobile-toggle { display: block; }
    .nav-wrapper { 
        display: none; /* Hidden by default on mobile */
        position: absolute; top: 100%; left: 0; width: 100%; 
        background: #ffffff; 
        flex-direction: column; padding: 20px; 
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); 
        border-top: 1px solid var(--border);
    }
    .nav-wrapper.active { display: flex; }
    .nav-links { flex-direction: column; width: 100%; gap: 15px; }
    .user-nav-flex { flex-direction: column; align-items: stretch !important;}
    .nav-btn { width: 100%; margin: 0 !important; text-align: center; }
    .login-btn { margin: 0 !important; width: 100%;}
    
    /* Layout Adjustments */
    .hero-title { font-size: 2.2rem; }
    .hero-subtitle { font-size: 1rem; }
    .slider-container { height: 250px; border-radius: 12px; }
    .slider-caption h3 { font-size: 1.3rem; }
    .slider-btn { width: 35px; height: 35px; font-size: 1rem; }
    
    /* Trainers & Cards */
    .trainer-card { flex-direction: column; text-align: center; padding: 20px; }
    .trainer-img { width: 120px; height: 120px; margin: 0 auto;}
    .responsive-pad { padding: 15px; }
    
    /* Grids & Flex to Column */
    .responsive-flex, .responsive-grid { display: flex; flex-direction: column; gap: 10px; }
    .admin-bar { flex-direction: column; align-items: stretch; }
    .admin-bar input, .admin-bar button { width: 100%; margin-bottom: 10px; }
    .full-mobile { width: 100%; margin-bottom: 10px; }
    
    /* Footer */
    .footer-content { flex-direction: column; gap: 12px; text-align: center; }
    .footer-content .logo { justify-content: center; }
    .footer-content .logo-text { text-align: center; align-items: center; }

    .cta-row { flex-direction: column; align-items: stretch; }
    .cta-row .btn-primary,
    .cta-row .btn-outline { width: 100%; }

    .founders-award-actions { flex-direction: column; align-items: stretch; }
    .founders-award-actions .btn-primary,
    .founders-award-actions .btn-outline { width: 100%; text-align: center; }
}