/* ============================================
   AmyTrain Office V3 — Corporate Blue Design
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Color Palette - Modern Office Blue */
    --h: 221;
    --s: 83%;
    
    --navy: #0f172a;
    --primary: #2563eb; /* Corporate Blue */
    --primary-hover: #1d4ed8;
    --accent: #38bdf8; /* Light Blue Sky */
    
    --bg-main: #f1f5f9; /* Slate 100 - Soft Office Gray-Blue */
    --bg-surface: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.85);
    
    --text-deep: #0f172a;
    --text-main: #334155;
    --text-muted: #64748b;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --border-focus: #94a3b8;
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-panel: 0 10px 15px -3px rgba(15, 23, 42, 0.08); /* Navy tinted shadow */
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    
    --transition: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Core & Reset --- */
* { margin:0; padding:0; box-sizing:border-box; }
a { text-decoration: none; color: inherit; }

body {
    font-family: var(--font-body);
    background: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, hsla(221, 83%, 93%, 1) 0, transparent 50%), 
        radial-gradient(at 50% 0%, hsla(221, 83%, 96%, 1) 0, transparent 50%);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; min-height: 60vh; }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--text-deep);
    font-weight: 700;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navigation - Deep Office Style --- */
.nav-bar {
    position: sticky;
    top: 0;
    height: 72px;
    z-index: 1000;
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.nav-logo span { color: var(--accent); }

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-item {
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition);
}
.nav-item:hover { color: #fff; }
.nav-item.active { color: var(--accent); }

.nav-auth { display: flex; align-items: center; gap: 1.5rem; }
.logout-btn { background: rgba(255,255,255,0.1); border:none; color:#fff; padding:0.4rem 1rem; border-radius:var(--radius-sm); cursor:pointer; font-size:0.8rem; }

/* --- Hero Section - Blue Professional Gradient --- */
.hero {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 4rem;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0; right: 0; width: 40%; height: 100%;
    background: radial-gradient(circle at 100% 0%, rgba(37, 99, 235, 0.2), transparent 70%);
}

.hero-content { position: relative; z-index: 2; }
.hero-badge {
    background: rgba(56, 189, 248, 0.15);
    color: var(--accent);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8125rem;
    font-weight: 700;
    margin-bottom: 2rem;
    display: inline-block;
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.hero-title {
    font-size: 4rem;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255,255,255,0.6);
    max-width: 600px;
    margin-bottom: 3rem;
}

/* --- Section Design --- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3.5rem;
}
.section { padding: 8rem 0; }
.section-title { font-size: 2rem; }
.section-subtitle { color: var(--text-muted); font-size: 1rem; }

/* --- Cards - Structured Office Look --- */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.card {
    background: #fff;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}

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

.card-img-wrap {
    position: relative;
    aspect-ratio: 16/9;
    background: #f8fafc;
}
.card-img { width: 100%; height: 100%; object-fit: cover; }

.card-content { padding: 1.75rem; flex: 1; display: flex; flex-direction: column; }
.card-tag { font-size: 0.75rem; font-weight: 800; color: var(--primary); margin-bottom: 1rem; display: block; }
.card-title { font-size: 1.125rem; margin-bottom: 0.75rem; color: var(--text-deep); }
.card-desc { font-size: 0.875rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1.5rem; }

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 2rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-size: 0.9375rem;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover { background: var(--primary-hover); }

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-main);
}
.btn-outline:hover { background: #f8fafc; border-color: var(--border-focus); }

/* --- View Toggle (Office Dashboard Style) --- */
.view-switch {
    background: #fff;
    display: inline-flex;
    padding: 4px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.switch-btn {
    padding: 0.6rem 2rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-muted);
    transition: var(--transition);
    border: none;
    background: transparent;
    cursor: pointer;
}

.switch-btn.active {
    background: var(--primary);
    color: #fff;
}

/* --- Video Immersive Layer --- */
.video-stage {
    background: #000;
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.4);
}

.video-watermark {
    position: absolute;
    inset: 0;
    z-index: 10;
    pointer-events: none;
    opacity: 0.8;
}

.watermark-item {
    position: absolute;
    color: rgba(255,255,255,0.08);
    font-size: 1.125rem;
    font-weight: 900;
    animation: pan 20s infinite alternate linear;
}

@keyframes pan {
    from { transform: translate(-10%, -10%); }
    to { transform: translate(10%, 10%); }
}

/* --- Dashboard / Sidebar --- */
.dash-layout { display: grid; grid-template-columns: 280px 1fr; gap: 3rem; padding: 4rem 0; }
.dash-sidebar { background: #fff; border-radius: var(--radius-md); border: 1px solid var(--border); padding: 1.5rem; height: fit-content; position: sticky; top: 112px; }
.dash-nav-item { display: block; padding: 0.8rem 1.25rem; border-radius: var(--radius-sm); font-weight: 600; color: var(--text-main); text-decoration: none; margin-bottom: 0.5rem; transition: var(--transition); }
.dash-nav-item:hover { background: #f1f5f9; color: var(--primary); }
.dash-nav-item.active { background: var(--bg-main); color: var(--primary); border-left: 3px solid var(--primary); }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-bottom: 4rem; }
.stat-card { background: #fff; padding: 2rem; border-radius: var(--radius-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-label { font-size: 0.75rem; color: var(--text-muted); font-weight: 800; text-transform: uppercase; margin-bottom: 0.5rem; }
.stat-value { font-size: 2.5rem; font-weight: 700; color: var(--navy); }


/* --- App Layout (Fixed Header/Footer, Scrollable Center) --- */
body.app-layout {
    height: 100vh;
    height: 100dvh;
    overflow: hidden !important;
    display: flex;
    flex-direction: column;
}

body.app-layout .nav-bar { flex: 0 0 auto; }
body.app-layout main { flex: 1 1 auto; overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.footer {
    flex: 0 0 auto;
    padding: 0.75rem 0;
    background: var(--navy);
    color: #fff;
    border-top: 1px solid var(--border);
}
.footer .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.footer-logo {
    display: inline-block;
    font-size: 0.9rem;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    margin-right: 1.5rem;
}
.footer p { display: none; } /* Hide the bulky description site-wide */
.footer-logo span { color: var(--accent); }

.scrollable-area {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
}

.nav-full {
    width: 100% !important;
    max-width: none !important;
    padding-left: 4rem !important;
    padding-right: 4rem !important;
}

@media (max-width: 768px) {
    .nav-full { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }
}

/* --- Floating Contact Widget --- */
.float-contact {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 2000;
}

.float-contact-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    transition: var(--transition);
}
.float-contact-btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.5);
    background: var(--primary-hover);
}

.float-contact-menu {
    position: absolute;
    bottom: 75px;
    right: 0;
    background: #fff;
    border-radius: var(--radius-md);
    padding: 0.5rem;
    box-shadow: var(--shadow-panel);
    border: 1px solid var(--border);
    min-width: 200px;
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}
.float-contact-menu.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}
.float-contact-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: var(--text-main);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    transition: var(--transition);
}
.float-contact-menu a:hover {
    background: var(--bg-main);
    color: var(--primary);
}

/* --- Mobile Menu Toggle --- */
.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    transition: var(--transition);
}

.desktop-only { display: flex; }

/* --- Mobile Drawer (Sidebar) --- */
.mobile-drawer-backdrop {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 2500;
    display: none;
    opacity: 0;
    transition: var(--transition);
}
.mobile-drawer-backdrop.active { display: block; opacity: 1; }

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background: #fff;
    z-index: 2600;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}
.mobile-drawer.active { right: 0; }

.drawer-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: var(--bg-main);
}
.drawer-title { font-weight: 800; font-size: 1.1rem; color: var(--navy); }
.drawer-close { background: none; border: none; font-size: 2rem; color: var(--text-muted); cursor: pointer; line-height: 1; }

.drawer-content { padding: 1.25rem; flex: 1; overflow-y: auto; }
.drawer-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    color: var(--text-main);
    font-weight: 600;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s;
    margin-bottom: 0.25rem;
}
.drawer-link:hover { background: var(--bg-main); color: var(--primary); }
.drawer-link i { width: 20px; text-align: center; font-size: 1.1rem; opacity: 0.7; }

.drawer-user-card {
    padding: 1.25rem;
    background: var(--bg-main);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    border: 1px solid var(--border);
}

/* --- Responsive Media Queries --- */
@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-toggle { display: block; }

    .nav-full { padding-left: 1rem !important; padding-right: 1rem !important; }
    
    .hero-top-row { flex-direction: column; align-items: flex-start !important; gap: 1rem !important; }
    .hero-top-row form { max-width: none !important; width: 100%; }

    .resources-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 1rem;
    }

    .float-contact { bottom: 1.5rem; right: 1.5rem; }
    .float-contact-btn { width: 50px; height: 50px; font-size: 1.25rem; }
}

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