/* ========================================
   EdTech Design System - Simantap Kelud Mandiri
   Version: alpha
   ======================================== */

/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
  --color-primary: #FF6B00;
  --color-secondary: #7C3AED;
  --color-tertiary: #2563EB;
  --color-neutral: #FFFFFF;
  --color-surface: #F8FAFC;
  --color-accent: #FFC107;
  
  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.1);
  
  --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  --spacing-base: 8px;
  --spacing-section: clamp(2.5rem, 4vw, 5rem);
  
  --radius-sm: 12px;
  --radius-md: 24px;
  --radius-lg: 36px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: #F5F7FA;
  color: #1F2937;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  color: #111827;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: 2.25rem; margin-bottom: 2rem; }
h3 { font-size: 1.5rem; margin-bottom: 1rem; }

p { font-size: 1rem; color: #4B5563; margin-bottom: 1.5rem; }

a { color: var(--color-tertiary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-primary); text-decoration: underline; }

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-padding { padding: var(--spacing-section) 0; }

.text-center { text-align: center !important; }
.text-left { text-align: left !important; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: all 0.25s ease;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-neutral);
  border: none;
  box-shadow: 0 4px 12px rgba(255, 107, 0, 0.3);
}
.btn-primary:hover { background-color: #E65C00; transform: translateY(-2px); box-shadow: 0 6px 16px rgba(255, 107, 0, 0.4); }

.btn-secondary {
  background-color: var(--color-neutral);
  color: var(--color-primary);
  border: 2px solid #E5E7EB;
}
.btn-secondary:hover { background-color: #F3F4F6; border-color: var(--color-primary); }

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  padding: 1rem 0;
}

/* Ensure navbar container uses flexbox for proper alignment */
.navbar .container {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
}
/* Mobile toggle should be hidden on desktop by default */
.mobile-toggle {
    display: none !important;
}

/* Ensure all navbar elements are middle-aligned */
.navbar .container > * {
    display: flex;
    align-items: center;
}
.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar-nav {
      display: flex;
      list-style: none;
      gap: 24px;
    }
    .navbar-nav .nav-link { font-weight: 500; color: #374151; padding: 8px 16px; border-radius: var(--radius-sm); transition: all 0.2s ease; }
    .navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { background-color: #F9FAFB; color: var(--color-primary); }

/* ========================================
   Mobile Toggle Styles - Visible on All Screens ≤768px
   ======================================== */
@media (max-width: 768px) {
    .mobile-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        padding: 8px 4px;
        z-index: 103;
        gap: 5px;
        height: 40px;
    }
    
    .mobile-toggle .bar {
        width: 26px;
        height: 3px;
        background-color: #374151;
        transition: all 0.3s ease;
        display: block;
        border-radius: 2px;
    }

    /* Hide desktop navbar on mobile - use dropdown */
    .navbar-nav {
        position: fixed;
        top: 64px; /* Height of navbar ~ 64px */
        left: 0;
        right: 0;
        background-color: #ffffff;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
        border-bottom: 2px solid #E5E7EB;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        gap: 0; /* Remove the desktop 24px gap so items sit compactly */
        padding: 0;
        margin: 0;
    }
    
    .navbar-nav.show {
        max-height: 500px; /* Expanded state */
        overflow-y: auto;
    }
    
    .navbar-nav li {
        width: 100%;
        border-bottom: 1px solid #F3F4F6;
        padding: 0;
        margin: 0;
    }
    
    .navbar-nav a.nav-link {
        display: block;
        width: 100%;
        padding: 10px 20px;
        box-sizing: border-box;
        white-space: nowrap;
    }
    
    /* Fix layout issues - ensure container fits within viewport on mobile */
    .navbar .container {
        flex-wrap: nowrap;
        gap: 12px;
        max-width: 100vw !important;
    }
    
    /* Ensure brand image is visible and properly sized on mobile */
    .navbar-brand img {
        height: 32px !important;
        width: auto !important;
    }
}

/* ========================================
   Mobile Hero Section - Stack Vertically
   ======================================== */
@media (min-width: 993px) {
    .hero-content {
        display: grid !important;
        flex-direction: row !important;
        grid-template-columns: 1fr 1fr;
        gap: 48px !important;
        align-items: center !important;

        /* Middle-align hero text and hero image on desktop */
    }

    .hero-content .hero-text,
    .hero-content .hero-image {
        align-self: center;
    }

    .hero-content .hero-image {
        display: flex;
        justify-content: center;
    }
}

/* ======================================== 
   Mobile Hero Section Fix - Stack Vertically 
   ======================================== */
@media (max-width: 992px) {
    /* Combined class selector beats framework overrides */
    .container.hero-content {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
        text-align: center !important;
    }
    
    /* Ensure child blocks expand to the full width of the mobile viewport */
    .container.hero-content .hero-image {
        order: 1 !important;
        max-width: 100% !important; 
        width: 100%;
        margin: 0 auto;
    }
    
    .container.hero-content .hero-text {
        order: 2 !important;
        width: 100%;
    }
}

/* Clear mobile typography fixes */
@media (max-width: 480px) {
    .container.hero-content h1.hero-title {
        font-size: 2.5rem !important;
    }
    .container.hero-content .hero-subtitle {
        font-size: 1.1rem !important;
    }
}


/* ========================================
   Mobile Image Responsiveness Fixes
   ======================================== */
@media (max-width: 768px) {
    /* Fix images in About and Vision-Mission sections */
    .feature-image img,
    .feature-content img,
    .card img,
    .section-padding img {
        max-width: 100%;
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* Fix feature image in About/Vision sections */
    .feature-image {
        width: 100%;
    }
    
    .feature-section {
        grid-template-columns: 1fr !important;
    }
    
    .feature-content {
        margin-bottom: 24px;
    }
}

/* ========================================
   Mobile Contact Section Fixes - Stack cards vertically
   ======================================== */
@media (max-width: 768px) {
    /* Make contact Info and Form stack vertically on mobile */
    section#contact .container > div[style*="grid-template-columns"] {
        display: block !important;
    }
    
    section#contact > .card, 
    section#contact .container > div > .card {
        width: 100% !important;
        margin-bottom: 24px;
    }
}

/* Ensure contact section doesn't overflow on all screen sizes */
section#contact .container {
    max-width: 100%;
}

/* ========================================
   Form Control Styles - Ensure consistency across pages
   ======================================== */
.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    line-height: 1.5;
    color: #1F2937;
    background-color: #FFFFFF;
    background-clip: padding-box;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 2px rgba(255, 107, 0, 0.1);
}

.form-control::placeholder {
    color: #9CA3AF;
}

textarea.form-control {
    min-height: 80px;
    resize: vertical;
}

/* ========================================
   Mobile Form Responsiveness
   ======================================== */
@media (max-width: 480px) {
    /* Adjust form labels and inputs for small screens */
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-control {
        padding: 12px 16px;
        font-size: 1rem;
    }
}

.hero-section {
  position: relative;
  padding-top: 160px;
  padding-bottom: 100px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
}
.hero-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at top left, rgba(255, 193, 7, 0.2) 0%, transparent 40%), radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
  pointer-events: none;
}
/* Hero text styling - mobile-first flexbox layout is in mobile Media Queries section above */
.hero-title { font-size: clamp(3rem, 6vw, 5rem); font-weight: 800; line-height: 1.1; margin-bottom: 24px; letter-spacing: -0.03em; }
.hero-subtitle { font-size: 1.25rem; color: #FFFFFF; font-weight: 400; margin-bottom: 40px; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 32px;
  padding-top: 60px;
}
.stat-card { background: var(--color-neutral); border-radius: var(--radius-md); padding: 40px 32px; box-shadow: var(--shadow-md); text-align: center; transition: all 0.3s ease; }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); }
.stat-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.stat-icon { font-size: 3rem; margin-bottom: 20px; }
.stat-number { font-family: var(--font-heading); font-size: clamp(2.5rem, 4vw, 4rem); font-weight: 800; line-height: 1.1; }
.stat-label { font-size: 0.9375rem; color: #6B7280; font-weight: 500; text-transform: uppercase; letter-spacing: 0.5px; }

.section-header { text-align: center; margin-bottom: 64px; }
.section-title { font-size: clamp(2rem, 4vw, 3.5rem); font-weight: 800; color: #111827; letter-spacing: -0.02em; margin-bottom: 16px; }

.cards-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: center;
}
.card { background: var(--color-neutral); border-radius: var(--radius-md); padding: 40px; box-shadow: var(--shadow-sm); transition: all 0.3s ease; width: calc(33.333% - 32px); min-width: 280px; max-width: 350px; flex-grow: 0; }
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--color-primary), var(--color-secondary)); }
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.card-title { font-size: 1.5rem; margin-bottom: 16px; }

/* ========================================
   Feature Section Layout - Desktop Side-by-Side, Mobile Stacked
   ======================================== */
.feature-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.feature-content {
  padding-right: 20px;
}

.feature-image img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

/* Re-order mobile layout - image first on mobile */
@media (max-width: 768px) {
  .feature-section {
    grid-template-columns: 1fr !important;
  }
  
  .feature-image {
    order: 1;
  }
  
  .feature-content {
    order: 2;
    margin-bottom: 24px;
    padding-right: 0 !important;
  }
}

.learning-path { position: relative; padding-top: var(--spacing-section); padding-bottom: var(--spacing-section); background-color: #F9FAFB; }
.steps-container {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  overflow-x: auto;
  padding-bottom: 48px;
}
.step-card { min-width: 280px; width: 100%; background: var(--color-neutral); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-md); transition: all 0.3s ease; }
.step-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.step-number { font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 800; color: var(--color-primary); line-height: 1; margin-bottom: 16px; }

.testimonials-section { padding: var(--spacing-section) 0; background-color: #F9FAFB; }
.testimonial-card { background: var(--color-neutral); border-radius: var(--radius-lg); padding: 48px; box-shadow: var(--shadow-md); }
.testimonial-content { font-style: italic; font-size: 1.125rem; color: #4B5563; line-height: 1.8; margin-bottom: 32px; }

.main-sidebar {
  background-color: #FFFFFF;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 275px;
  overflow-y: auto;
  box-shadow: var(--shadow-md);
  z-index: 1020;
}
.content-wrapper { margin-left: 275px; transition: margin-left 0.3s ease; }
.nav-sidebar .nav-link { border-radius: var(--radius-sm); margin: 4px 8px; }
.nav-sidebar .nav-link:hover, .nav-sidebar > .nav-item:not(.menu-open) > .nav-link.active { background-color: #F3F4F6; color: var(--color-primary); }

.info-box { background-color: var(--color-neutral); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-sm); display: flex; align-items: center; }
.info-box-number { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; color: #111827; }

.card { border-radius: var(--radius-md); box-shadow: var(--shadow-sm); margin-bottom: 32px; }
.card-header { background-color: #F9FAFB; font-weight: 600; }

.main-footer {
  margin-left: 275px;
  padding: 40px 24px;
  background-color: #1F2937;
  color: white;
}

.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow-md { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }

.rounded-sm { border-radius: var(--radius-sm) !important; }
.rounded-md { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }

.text-primary { color: var(--color-primary) !important; }
.text-secondary { color: var(--color-secondary) !important; }
.text-tertiary { color: var(--color-tertiary) !important; }

.bg-surface { background-color: #F9FAFB !important; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-on-scroll { animation: fadeInUp 0.6s ease-out forwards; opacity: 0; }
    
