/* ============================================
   Pak Guru Amri - Enhanced Main Stylesheet
   Premium Design System for Educational Branding
   ============================================ */

/* ==================== CSS Variables ==================== */
:root {
  /* Primary Colors - Refined for Comfort */
  --primary-blue: #3b82f6;
  /* Softened from #2563eb */
  --primary-blue-light: #60a5fa;
  --primary-blue-dark: #2563eb;
  --primary-green: #10b981;
  /* Kept vibrant but balanced */
  --primary-green-light: #34d399;
  --primary-green-dark: #059669;

  /* Accent Colors */
  --accent-yellow: #f59e0b;
  --accent-purple: #8b5cf6;

  /* Neutral Colors - Warmer Grays for Readability */
  --white: #ffffff;
  --gray-25: #fcfcfd;
  /* Very subtle background */
  --gray-50: #f8fafc;
  /* Cool gray for sections */
  --gray-100: #f1f5f9;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-500: #64748b;
  --gray-600: #475569;
  /* Main text color - softer than black */
  --gray-700: #334155;
  /* Headings - softer than pure black */
  --gray-800: #1e293b;
  --gray-900: #0f172a;

  /* Gradients - Smoother Transitions */
  --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
  --gradient-hero: linear-gradient(120deg, #2563eb 0%, #059669 100%);
  --gradient-card: linear-gradient(180deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.4) 100%);
  --gradient-text: linear-gradient(135deg, #1e40af 0%, #047857 100%);

  /* Typography */
  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Poppins', system-ui, sans-serif;

  /* Spacing - Increased for Breathing Room */
  --spacing-xs: 0.5rem;
  /* 8px */
  --spacing-sm: 1rem;
  /* 16px - Increased from 0.75rem */
  --spacing-md: 1.5rem;
  /* 24px - Increased from 1rem */
  --spacing-lg: 2rem;
  /* 32px */
  --spacing-xl: 3rem;
  /* 48px */
  --spacing-2xl: 4rem;
  /* 64px */
  --spacing-3xl: 6rem;
  /* 96px */

  /* Border Radius - Softer Curves */
  --radius-sm: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-2xl: 2rem;
  --radius-full: 9999px;

  /* Shadows - Layered & Ambient */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.05);
  /* Special soft shadow for cards */
  --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.3);

  /* Transitions */
  --transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.5);
  --glass-blur: blur(12px);
}

/* ==================== Reset & Base ==================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  color: var(--gray-600);
  line-height: 1.7;
  /* Increased for better readability */
  background-color: var(--gray-25);
  overflow-x: hidden;
}

/* ==================== Typography ==================== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--spacing-sm);
  color: var(--gray-800);
  letter-spacing: -0.02em;
  /* Modern tight tracking */
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  margin-bottom: var(--spacing-md);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  /* color: transparent; Removed for accessibility fallback usually, but keeping solid fallback implicitly via color property if clip fails, though css var sets it. Let's keep it clean. */
}

h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  letter-spacing: -0.03em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

h4 {
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
}

p {
  margin-bottom: var(--spacing-md);
  font-size: 1.125rem;
  /* 18px text for better reading comfort */
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: all var(--transition-fast);
  font-weight: 500;
}

a:hover {
  color: var(--primary-blue-dark);
}

/* ==================== Layout Utilities ==================== */
.container {
  width: 100%;
  max-width: 1280px;
  /* Wider container for modern screens */
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.container-wide {
  max-width: 1536px;
}

.section {
  padding: var(--spacing-3xl) 0;
  position: relative;
}

.section-sm {
  padding: var(--spacing-xl) 0;
}

/* Background Patterns */
.bg-pattern-dots {
  background-image: radial-gradient(var(--gray-200) 1px, transparent 1px);
  background-size: 24px 24px;
}

/* ==================== Navigation ==================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.85);
  /* More transparent */
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: all var(--transition-normal);
  padding: var(--spacing-xs) 0;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  padding: 0;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--spacing-sm);
  padding-bottom: var(--spacing-sm);
}

.navbar-brand {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary-blue);
  display: flex;
  align-items: center;
  gap: var(--spacing-xs);
  letter-spacing: -0.02em;
}

.navbar-brand i {
  color: var(--primary-green);
}

.navbar-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-lg);
  /* More space between items */
  align-items: center;
  background: transparent;
}

.navbar-menu li a {
  font-weight: 500;
  color: var(--gray-600);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-full);
  /* Capsule shape hover */
  transition: all var(--transition-fast);
  font-size: 0.95rem;
}

.navbar-menu li a:hover {
  color: var(--primary-blue);
  background: rgba(59, 130, 246, 0.08);
}

.navbar-menu li a.active {
  color: var(--primary-blue);
  background: rgba(59, 130, 246, 0.1);
  font-weight: 600;
}

.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--spacing-xs);
  z-index: 1001;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  border-radius: var(--radius-full);
  transition: all var(--transition-fast);
}

/* ==================== Hero Section ==================== */
.hero {
  position: relative;
  min-height: 90vh;
  /* Slightly reduced to show content below fold */
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  color: var(--white);
  overflow: hidden;
  padding-top: 80px;
  /* Complex shape divider at bottom could be added here */
}

/* Abstract shapes background */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.hero::before {
  top: -100px;
  right: -100px;
  width: 500px;
  height: 500px;
  background: rgba(255, 255, 255, 0.2);
}

.hero::after {
  bottom: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: rgba(16, 185, 129, 0.4);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 900px;
  padding: var(--spacing-xl);
}

.hero-title {
  color: var(--white);
  margin-bottom: var(--spacing-md);
  background: none;
  /* Override clip for hero */
  -webkit-text-fill-color: initial;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  margin-bottom: var(--spacing-xl);
  opacity: 0.95;
  font-weight: 300;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.hero-cta {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ==================== Buttons - Modern Pill Shapes ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  /* Pill shape */
  border: 1px solid transparent;
  /* Subtle border */
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--white);
  color: var(--primary-blue);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  background: var(--white);
  color: var(--primary-blue-light);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(4px);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--white);
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--primary-blue);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.btn-secondary:hover {
  background: var(--primary-blue-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}

.btn-outline-primary {
  background: transparent;
  color: var(--primary-blue);
  border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
  background: var(--primary-blue);
  color: var(--white);
  transform: translateY(-2px);
}

/* ==================== Cards - Clean & Floating ==================== */
.card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  box-shadow: var(--shadow-card);
  transition: all var(--transition-normal);
  height: 100%;
  border: 1px solid rgba(0, 0, 0, 0.02);
  /* Very subtle border */
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(59, 130, 246, 0.1);
  /* Blue tint on hover */
}

.card-header {
  margin-bottom: var(--spacing-md);
}

.card-title {
  font-size: 1.35rem;
  color: var(--gray-800);
  margin-bottom: var(--spacing-xs);
  font-weight: 700;
}

.card-text {
  color: var(--gray-600);
  flex-grow: 1;
  /* Pushes footer down */
}

.card-footer {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-md);
  border-top: 1px solid var(--gray-100);
}

.card-img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  margin-bottom: var(--spacing-md);
  box-shadow: var(--shadow-sm);
}

/* ==================== Stats Section ==================== */
.stats {
  background: var(--white);
  padding: var(--spacing-2xl) 0;
  margin-top: -80px;
  /* Overlap hero */
  position: relative;
  z-index: 10;
  border-radius: 0;
  box-shadow: none;
}

.stats .container {
  background: var(--white);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
  padding: var(--spacing-xl);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-lg);
  text-align: center;
  align-items: center;
}

.stat-item {
  padding: var(--spacing-md);
  position: relative;
}

/* Separator lines between stats on desktop */
@media (min-width: 768px) {
  .stat-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: var(--gray-200);
  }
}

.stat-number {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: var(--spacing-xs);
  color: var(--primary-blue);
  background: var(--gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  color: var(--gray-500);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ==================== WhatsApp Button - Enhanced ==================== */
.whatsapp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
}

.whatsapp-button {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
  color: var(--white);
  font-size: 2rem;
  transition: all var(--transition-normal);
  text-decoration: none;
  border: 4px solid rgba(255, 255, 255, 0.2);
}

.whatsapp-button:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 15px 35px rgba(37, 211, 102, 0.5);
}

.whatsapp-tooltip {
  position: absolute;
  right: 80px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--white);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.whatsapp-float:hover .whatsapp-tooltip {
  opacity: 1;
  visibility: visible;
  right: 75px;
}

/* ==================== Footer - Clean ==================== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--spacing-3xl) 0 var(--spacing-xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-2xl);
  margin-bottom: var(--spacing-2xl);
}

.footer-section h3 {
  color: var(--white);
  margin-bottom: var(--spacing-lg);
  font-size: 1.25rem;
  position: relative;
  display: inline-block;
}

/* Underline decoration for footer headings */
.footer-section h3::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 30px;
  height: 2px;
  background: var(--primary-green);
  border-radius: var(--radius-full);
}

.footer-section p {
  color: var(--gray-400);
  line-height: 1.8;
}

.footer-section a {
  color: var(--gray-400);
  font-weight: 400;
  display: block;
  margin-bottom: 0.5rem;
}

.footer-section a:hover {
  color: var(--primary-green);
  padding-left: 5px;
  /* Slide effect */
}

/* ==================== Form Elements ==================== */
.form-control {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.form-control:focus {
  background: var(--white);
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .stats .container {
    padding: var(--spacing-md);
  }

  .stats-grid {
    gap: var(--spacing-xl);
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .navbar-menu {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--white);
    padding: var(--spacing-xl);
    border-bottom: 1px solid var(--gray-200);
    transform: translateY(-150%);
    transition: transform var(--transition-normal);
    box-shadow: var(--shadow-lg);
    z-index: 999;
  }

  .navbar-menu.active {
    transform: translateY(0);
  }
}

/* ==================== Utility Classes ==================== */
.text-center {
  text-align: center;
}

.mb-4 {
  margin-bottom: var(--spacing-xl);
}

.grid {
  display: grid;
  gap: var(--spacing-xl);
}

.grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}