/* ==========================================================================
   Hubexus SaaS Ed-Tech Design System
   ========================================================================== */
   
:root {
    /* Brand Colors - Hubexus Purple/Indigo focus */
    --primary: #4F46E5;
    --primary-light: #EEECFF;
    --primary-hover: #4336D0;
    --primary-gradient: linear-gradient(135deg, #4F46E5, #7C3AED);
    
    /* UI Colors */
    --surface-white: #FFFFFF;
    --surface-light: #F8FAFC;
    --surface-alt: #F1F5F9;
    --border-light: #E2E8F0;
    --border-medium: #CBD5E1;
    
    /* Text Colors */
    --text-heading: #0F172A; /* Dark Navy/Charcoal */
    --text-body: #334155;
    --text-muted: #64748B;
    
    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing & Layout */
    --container-max: 1280px;
    --section-pad: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --transition-normal: 0.3s ease;
}

/* ==========================================================================
   Reset & Typography Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    color: var(--text-body);
    background-color: var(--surface-white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }

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

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

ul { list-style: none; }

/* ==========================================================================
   Layout & Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-padding { padding: var(--section-pad) 0; }
.bg-light { background-color: var(--surface-light); }
.bg-white { background-color: var(--surface-white); }
.text-center { text-align: center; }
.eyebrow {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

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

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-family: var(--font-sans);
    cursor: pointer;
    transition: var(--transition-normal);
    border: 2px solid transparent;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--surface-alt);
    color: var(--text-heading);
}

.btn-secondary:hover {
    background-color: var(--border-light);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--border-medium);
    color: var(--text-heading);
}

.btn-outline:hover {
    border-color: var(--text-heading);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   Announcement Bar & Header
   ========================================================================== */
.announcement-bar {
    background-color: var(--text-heading);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.announcement-bar a {
    color: white;
    text-decoration: underline;
    margin-left: 0.5rem;
}

.header {
    background-color: rgba(255, 255, 255, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 1rem 0;
    transition: var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-img { height: 32px; object-fit: contain; }

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

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-heading);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-heading);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: 6rem 0 4rem;
    overflow: hidden;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}

.trust-row {
    display: flex;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.trust-stat {
    display: flex;
    flex-direction: column;
}

.trust-stat .stat-num {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-heading);
}

.trust-stat .stat-label {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
}

/* ==========================================================================
   Partner Logos Section
   ========================================================================== */
.partners {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-light);
}

.partners-title {
    text-align: center;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.partners-grid {
    display: flex;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
    opacity: 0.6;
    filter: grayscale(100%);
}

.partner-logo { height: 30px; }

/* ==========================================================================
   Editorial Layouts (Mission, Process, Features)
   ========================================================================== */
.editorial-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.section-desc-large {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* What You Can Achieve */
.achieve-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.achieve-card {
    padding: 2rem;
    background: var(--surface-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    transition: var(--transition-normal);
}

.achieve-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-5px);
}

.achieve-icon {
    width: 48px;
    height: 48px;
    background: var(--surface-light);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

/* Process Timeline */
.process-timeline {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin: 4rem 0;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-light);
    z-index: 1;
}

.process-node {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
    padding: 0 1rem;
}

.process-number {
    width: 50px;
    height: 50px;
    background: var(--surface-white);
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
    margin: 0 auto 1.5rem;
    color: var(--text-muted);
    transition: var(--transition-normal);
}

.process-node:hover .process-number {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-light);
}

/* ==========================================================================
   Learning Paths
   ========================================================================== */
.paths-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.path-card {
    display: flex;
    flex-direction: column;
    padding: 3rem;
    background: var(--surface-white);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
}

.path-card:hover {
    box-shadow: var(--shadow-xl);
}

.path-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

/* ==========================================================================
   Course Discovery & Filters
   ========================================================================== */
.course-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.course-filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-light);
    background: var(--surface-white);
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    white-space: nowrap;
}

.filter-btn.active, .filter-btn:hover {
    background: var(--text-heading);
    color: white;
    border-color: var(--text-heading);
}

.course-search {
    position: relative;
    width: 300px;
}

.course-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-family: inherit;
    outline: none;
}

.course-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.course-card {
    background: var(--surface-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
}

.course-card:hover {
    box-shadow: var(--shadow-xl);
    transform: translateY(-5px);
}

.course-img-wrapper {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.course-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.course-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--surface-white);
    color: var(--text-heading);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}

.course-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.course-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.course-instructor {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.instructor-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.course-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.course-footer {
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ==========================================================================
   Featured Course
   ========================================================================== */
.featured-course {
    background: var(--text-heading);
    border-radius: var(--radius-2xl);
    color: white;
    padding: 4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 4rem;
}

.featured-course h2 { color: white; }
.featured-course p { color: var(--border-medium); }

/* ==========================================================================
   Instructors & Testimonials
   ========================================================================== */
.instructors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.instructor-card {
    text-align: center;
}

.instructor-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    object-fit: cover;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.testimonial-card {
    background: var(--surface-white);
    padding: 2.5rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 4rem;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--surface-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.5rem;
    background: none;
    border: none;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-heading);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 1.5rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
    color: var(--text-muted);
}

.faq-item.active .faq-answer {
    padding: 0 1.5rem 1.5rem;
    max-height: 500px; /* Arbitrary large max-height for transition */
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-icon {
    transition: transform 0.3s ease;
}

/* ==========================================================================
   Final CTA
   ========================================================================== */
.final-cta {
    background: var(--primary-gradient);
    border-radius: var(--radius-2xl);
    padding: 6rem 4rem;
    text-align: center;
    color: white;
    margin-bottom: 4rem;
}

.final-cta h2 { color: white; margin-bottom: 1.5rem; }
.final-cta p { color: rgba(255,255,255,0.9); font-size: 1.25rem; max-width: 600px; margin: 0 auto 3rem; }

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--text-heading);
    color: white;
    padding-top: 5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-logo { height: 32px; margin-bottom: 1.5rem; }
.footer-desc { color: var(--border-medium); margin-bottom: 2rem; }

.footer-title { color: white; margin-bottom: 1.5rem; font-size: 1.125rem; }
.footer-links { display: flex; flex-direction: column; gap: 1rem; }
.footer-links a { color: var(--border-medium); }
.footer-links a:hover { color: white; }

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}
.newsletter-form input {
    padding: 0.75rem;
    border-radius: var(--radius-md);
    border: none;
    outline: none;
    flex-grow: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    color: var(--border-medium);
    font-size: 0.875rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .editorial-grid, .paths-grid, .featured-course, .faq-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .achieve-grid, .instructors-grid { grid-template-columns: repeat(2, 1fr); }
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .nav-list, .header-actions .btn { display: none; }
    .mobile-menu-btn { display: block; }
    
    .hero-container { grid-template-columns: 1fr; text-align: center; }
    .hero-subtitle { margin: 0 auto 2rem; }
    .hero-buttons { justify-content: center; }
    .trust-row { justify-content: center; flex-wrap: wrap; }
    
    .process-timeline { flex-direction: column; gap: 2rem; }
    .process-timeline::before {
        top: 0; left: 24px; bottom: 0; width: 2px; height: auto;
    }
    .process-node { display: flex; text-align: left; gap: 1.5rem; }
    .process-number { margin: 0; }
    
    .achieve-grid, .instructors-grid, .testimonials-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .final-cta { padding: 4rem 2rem; }
}

/* ==========================================================================
   Modal (Enrollment Popup)
   ========================================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(4px);
    overflow: auto;
}

.modal-content {
    background-color: var(--surface-white);
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease-out;
    overflow: hidden;
}

@keyframes modalSlideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    background-color: var(--surface-light);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-size: 1.25rem;
    color: var(--text-heading);
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition-fast);
}

.close-btn:hover {
    color: var(--text-heading);
}

.modal-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-heading);
    font-size: 0.875rem;
}

.form-group .required {
    color: #ef4444;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: var(--transition-fast);
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-block {
    width: 100%;
}
