:root {
    /* Brand Colors - Enterprise "Pantanal" */
    --brand-dark: #051F20;
    /* Strong primary for headers (Dark Teal) */
    --brand-primary: #0B3D35;
    /* Main Brand Color (Forest) */
    --brand-accent: #D4A373;
    /* Gold Accent */

    /* Functional Colors - LIGHT VERSION */
    --bg-body: #F4F7F6;
    /* Very light cool gray */
    --bg-surface: #FFFFFF;
    /* Pure white for cards */
    --text-primary: #1A1A1A;
    /* Near black for readability */
    --text-secondary: #5A6B65;
    /* Muted teal-gray */
    --border-light: #E0E5E4;

    /* UI States */
    --success: #1B8C58;
    --danger: #D93025;

    /* Spacing & Layout */
    --container-width: 1140px;
    --header-height: 70px;
    --radius-sm: 6px;
    --radius-md: 12px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 12px 32px rgba(11, 61, 53, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-weight: 700;
    color: var(--brand-dark);
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.page-content {
    flex: 1;
    padding: 40px 0;
}

/* --- Components: Header --- */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    height: var(--header-height);
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--brand-primary);
    text-transform: uppercase;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo::before {
    content: '';
    display: block;
    width: 24px;
    height: 24px;
    background: var(--brand-accent);
    border-radius: 4px;
}

.main-header nav {
    display: flex;
    gap: 24px;
}

.main-header nav a {
    font-weight: 500;
    color: var(--text-secondary);
}

.main-header nav a:hover {
    color: var(--brand-primary);
}

/* --- Hero Section (Glassmorphism + Image) --- */
.hero-section {
    background: url('hero_bg_corporate.png') no-repeat center center;
    background-size: cover;
    position: relative;
    padding: 160px 0 120px;
    margin-top: -71px;
    /* Overlap header */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Light Overlay for readability on bright images */
.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(5, 31, 32, 0.4) 0%, rgba(11, 61, 53, 0.2) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    /* Glass Effect */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    padding: 60px;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-content h1 {
    color: var(--brand-dark);
    /* Dark text for contrast against light glass */
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-content p {
    color: var(--text-secondary);
    font-size: 1.25rem;
    margin-bottom: 40px;
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #0F5132 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(11, 61, 53, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 61, 53, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--brand-primary);
    color: var(--brand-primary);
}

.btn-outline:hover {
    background: var(--brand-primary);
    color: white;
}

/* Auth Logic */
.auth-container {
    background: var(--bg-surface);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    max-width: 440px;
    margin: 60px auto;
    border: 1px solid var(--border-light);
}

.auth-container h2 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #D1D5DB;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    background: #F9FAFB;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(11, 61, 53, 0.1);
    background: white;
}

/* Dashboard/Course Styles */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.course-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

/* --- Unified Home Page Design --- */

/* 1. Body becomes the canvas (Full Background) */
/* 1. Body becomes the canvas (Full Background) */
body.home-page {
    /* Background handled by ::before for independent blur/animation */
    overflow: hidden;
    /* Prevent scrolling */
    position: relative;
    /* Anchor for absolute pseudo-elements */
    background: #000;
    /* Fallback */
}

/* Background Animation & Blur Wrapper */
body.home-page::before {
    content: '';
    position: absolute;
    top: -5%;
    left: -5%;
    width: 110%;
    height: 110%;
    /* Oversize for zoom/blur edge handling */
    background: url('hero_bg_corporate.png') no-repeat center center fixed;
    background-size: cover;

    /* THE MAGIC: Blur + Subtle Animation */
    filter: blur(8px);
    /* Adjust blur intensity here for the BACKGROUND IMAGE */
    animation: subtleZoom 20s infinite alternate ease-in-out;
    z-index: -2;
}

/* Optional Overlay for Polish */
/* Optional Overlay: Static Vignette + Moving White Sheen */
body.home-page::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;

    /* Layer 1 (Top): Moving Diagonal Sheen (White, Glassy) */
    /* Layer 2 (Bottom): Static Radial Vignette (for text contrast) */
    background:
        linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.15) 50%, transparent 60%),
        radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, rgba(5, 31, 32, 0.4) 80%);

    background-size: 250% 100%, 100% 100%;
    background-position: 200% 0, center center;
    background-repeat: no-repeat;

    animation: sheenPass 10s infinite linear;
    mix-blend-mode: overlay;
    /* Blends nicely with the blurred underlying image */
}

@keyframes sheenPass {
    0% {
        background-position: 300% 0, center center;
    }

    100% {
        background-position: -200% 0, center center;
    }
}

@keyframes subtleZoom {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.08);
    }
}

/* 2. Transparent Header on Home */
body.home-page .main-header {
    background: transparent;
    border-bottom: none;
    backdrop-filter: none;
    box-shadow: none;
    position: fixed;
    /* Pin to top */
    top: 0;
    width: 100%;
    z-index: 20;
    /* Above footer/hero */
}

/* Adjust logo/links text for contrast if bg is dark, but user liked "Glassmorphism" content. 
   Assuming corporate image is mixed. We'll add text-shadow just in case. */
body.home-page .logo,
body.home-page .main-header nav a {
    color: #FFFFFF;
    /* Force white text for visibility on typical hero images */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

body.home-page .logo::before {
    background: #D4A373;
    /* Keep accent */
}

/* 3. Full Screen Hero Centering */
body.home-page .hero-section {
    background: none;
    /* Body handles bg now */
    min-height: 100vh;
    /* Fill screen */
    margin: 0;
    /* Remove offsets */
    padding: 0;
    padding-bottom: 30vh;
    /* Push content WAY up */
    display: flex;
    align-items: center;
    justify-content: center;
}

body.home-page .hero-section::before {
    display: none;
}

/* Remove old overlay */

/* 4. Glass Card */
body.home-page .hero-content {
    background: rgba(255, 255, 255, 0.1);
    /* Stronger glass needs less opacity */
    backdrop-filter: blur(80px);
    /* MAX BLUR */
    -webkit-backdrop-filter: blur(80px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.25);
    /* Ensure it doesn't touch edges on mobile */
    margin: 20px;
    max-width: 900px;
}

body.home-page .hero-content h1,
body.home-page .hero-content p {
    color: #FFFFFF;
    /* White Text */
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* 5. Seamless Footer */
body.home-page .main-footer {
    background: transparent;
    border-top: none;
    color: rgba(255, 255, 255, 0.8);
    position: fixed;
    /* FIXED pins it to the viewport, ignoring body height/flow */
    bottom: 0;
    left: 0;
    /* Ensure left alignment */
    width: 100%;
    padding: 20px 0;
    z-index: 10;
    pointer-events: none;
}

/* --- Standard Pages (Keep Readable) --- */
.course-thumb {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9CA3AF;
}

.course-info {
    padding: 24px;
}

.course-info h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.course-info p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

/* Lesson List */
.module-item {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.module-title {
    background: #F9FAFB;
    padding: 16px 20px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    color: var(--brand-primary);
}

.lesson-link {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid #F3F4F6;
    color: var(--text-primary);
}

.lesson-link:hover {
    background: #F0FDF4;
    color: var(--brand-primary);
}

.status-icon {
    margin-right: 12px;
    color: #D1D5DB;
}

.lesson-link.completed .status-icon {
    color: var(--success);
}

/* Footer */
.main-footer {
    border-top: 1px solid var(--border-light);
    padding: 40px 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    background: white;
    margin-top: auto;
}