/* Horizon Hues Learning - Premium EdTech Design */
@import url('https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&family=Space+Mono:wght@400;700&display=swap');

:root[data-theme="light"],
:root:not([data-theme]) {
  --hhl-primary: #1a3a52;
  --hhl-primary-light: #2a5073;
  --hhl-secondary: #4a9fd8;
  --hhl-secondary-light: #6ab3e8;
  --hhl-accent: #ff6b35;
  --hhl-accent-light: #ff8560;
  --hhl-success: #2ecc71;
  --hhl-warning: #f39c12;
  --hhl-danger: #e74c3c;

  --hhl-bg-primary: #f8fafc;
  --hhl-bg-secondary: #ffffff;
  --hhl-bg-tertiary: #e8f0f7;

  --hhl-text-primary: #1a1a1a;
  --hhl-text-secondary: #666666;
  --hhl-text-tertiary: #999999;

  --hhl-border: #e0e0e0;
  --hhl-shadow: rgba(0, 0, 0, 0.08);
  --hhl-shadow-md: rgba(0, 0, 0, 0.12);
  --hhl-shadow-lg: rgba(0, 0, 0, 0.16);

  --hhl-gradient-primary: linear-gradient(135deg, #1a3a52 0%, #4a9fd8 100%);
  --hhl-gradient-accent: linear-gradient(135deg, #ff6b35 0%, #ff8560 100%);
  --hhl-gradient-soft: linear-gradient(135deg, #e8f0f7 0%, #ffffff 100%);
}

:root[data-theme="dark"] {
  --hhl-primary: #e8f0f7;
  --hhl-primary-light: #d0e0f0;
  --hhl-secondary: #a8d4f5;
  --hhl-secondary-light: #b8e0fa;
  --hhl-accent: #ff6b35;
  --hhl-accent-light: #ff8560;
  --hhl-success: #27ae60;
  --hhl-warning: #e67e22;
  --hhl-danger: #c0392b;

  --hhl-bg-primary: #0a1428;
  --hhl-bg-secondary: #1a2332;
  --hhl-bg-tertiary: #2a3a52;

  --hhl-text-primary: #e8f0f7;
  --hhl-text-secondary: #b0b8c0;
  --hhl-text-tertiary: #808890;

  --hhl-border: #3a4a62;
  --hhl-shadow: rgba(0, 0, 0, 0.3);
  --hhl-shadow-md: rgba(0, 0, 0, 0.4);
  --hhl-shadow-lg: rgba(0, 0, 0, 0.5);

  --hhl-gradient-primary: linear-gradient(135deg, #2a3a52 0%, #4a6a92 100%);
  --hhl-gradient-accent: linear-gradient(135deg, #ff6b35 0%, #ff8560 100%);
  --hhl-gradient-soft: linear-gradient(135deg, #1a2332 0%, #2a3a52 100%);
}

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--hhl-bg-primary);
  color: var(--hhl-text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  color: var(--hhl-primary);
  margin-bottom: 1rem;
  line-height: 1.2;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.95rem; }

p {
  color: var(--hhl-text-secondary);
  margin-bottom: 1rem;
}

a {
  color: var(--hhl-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--hhl-accent);
}

/* Typography */
.lead {
  font-size: 1.25rem;
  color: var(--hhl-text-secondary);
  font-weight: 500;
}

.text-muted {
  color: var(--hhl-text-tertiary) !important;
}

.text-primary {
  color: var(--hhl-primary) !important;
}

.text-secondary {
  color: var(--hhl-secondary) !important;
}

.text-accent {
  color: var(--hhl-accent) !important;
}

/* Header & Navigation */
header {
  background-color: var(--hhl-bg-secondary);
  border-bottom: 1px solid var(--hhl-border);
  box-shadow: 0 2px 8px var(--hhl-shadow);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  padding: 1rem 0;
}

.navbar-brand {
  font-family: 'Merriweather', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--hhl-primary) !important;
  margin-right: 2rem;
}

.nav-link {
  color: var(--hhl-text-primary) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--hhl-accent) !important;
}

.navbar-nav {
  gap: 0.5rem;
}

/* Buttons */
.btn {
  font-weight: 600;
  transition: all 0.3s ease;
  border: none;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
}

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

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px var(--hhl-shadow-lg);
}

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

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

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

.btn-accent:hover {
  background: var(--hhl-accent-light);
  transform: translateY(-2px);
}

.btn-outline-light {
  border: 2px solid white;
  color: white;
}

.btn-outline-light:hover {
  background: white;
  color: var(--hhl-primary);
}

/* Theme & Language Toggles */
.theme-lang-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
}

#themeToggle,
#langToggle {
  background: transparent;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease;
  color: var(--hhl-text-primary);
}

#themeToggle:hover,
#langToggle:hover {
  transform: scale(1.15);
}

/* Cards & Containers */
.card {
  background: var(--hhl-bg-secondary);
  border: 1px solid var(--hhl-border);
  border-radius: 14px;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px var(--hhl-shadow);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--hhl-shadow-md);
  border-color: var(--hhl-secondary);
}

/* Bento Grid System */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.bento-item {
  background: var(--hhl-bg-secondary);
  border-radius: 14px;
  padding: 2rem;
  border: 1px solid var(--hhl-border);
  transition: all 0.3s ease;
  animation: slideUp 0.6s ease forwards;
  opacity: 0;
}

.bento-item:nth-child(1) { animation-delay: 0s; }
.bento-item:nth-child(2) { animation-delay: 0.1s; }
.bento-item:nth-child(3) { animation-delay: 0.2s; }
.bento-item:nth-child(4) { animation-delay: 0.3s; }
.bento-item:nth-child(5) { animation-delay: 0.4s; }
.bento-item:nth-child(6) { animation-delay: 0.5s; }

.bento-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 32px var(--hhl-shadow-lg);
  border-color: var(--hhl-accent);
}

.bento-item.wide {
  grid-column: span 2;
}

.bento-item.tall {
  grid-row: span 2;
}

.bento-item img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1rem 0;
}

/* Hero Section */
.hero-section {
  background: var(--hhl-gradient-primary);
  color: white;
  padding: 6rem 2rem;
  text-align: center;
  animation: fadeInDown 0.8s ease;
}

.hero-section h1 {
  color: white;
  font-size: clamp(2rem, 8vw, 3.5rem);
  margin-bottom: 1.5rem;
}

.hero-section p {
  color: rgba(255, 255, 255, 0.95);
  font-size: clamp(1rem, 2vw, 1.25rem);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-section .hero-image {
  max-width: 600px;
  margin: 2rem auto 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.hero-section .hero-image img {
  width: 100%;
  height: auto;
  display: block;
}

/* Section Spacing */
section {
  padding: 4rem 2rem;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Forms */
.form-control,
.form-select {
  border: 1px solid var(--hhl-border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  background: var(--hhl-bg-secondary);
  color: var(--hhl-text-primary);
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--hhl-accent);
  box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.1);
  outline: none;
}

.form-control::placeholder {
  color: var(--hhl-text-tertiary);
}

/* Footer */
footer {
  background: var(--hhl-primary);
  color: white;
  padding: 3rem 2rem 1rem;
  margin-top: 4rem;
}

footer h6 {
  color: white;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

footer p {
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.75rem;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.3s ease;
}

footer a:hover {
  color: white;
}

footer hr {
  border-color: var(--hhl-accent);
}

footer .copyright {
  background: rgba(0, 0, 0, 0.2);
  padding: 1.5rem 0;
  text-align: center;
  margin-top: 2rem;
}

/* Testimonials */
.testimonial-card {
  background: var(--hhl-bg-secondary);
  border: 1px solid var(--hhl-border);
  border-radius: 14px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 12px var(--hhl-shadow);
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px var(--hhl-shadow-md);
}

.testimonial-card p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--hhl-text-primary);
  margin-bottom: 1.5rem;
}

.testimonial-card .author {
  color: var(--hhl-accent);
  font-weight: 600;
}

/* Animations */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.6s ease;
}

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.35rem; }

  section {
    padding: 2.5rem 1rem;
  }

  .hero-section {
    padding: 4rem 1rem;
  }

  .bento-item.wide {
    grid-column: span 1;
  }

  .bento-item.tall {
    grid-row: span 1;
  }

  .bento-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .navbar-nav {
    flex-direction: column;
  }

  .theme-lang-controls {
    flex-direction: row;
    gap: 0.5rem;
    margin-top: 1rem;
  }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-start { text-align: start; }
.text-end { text-align: end; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem !important; }
.mb-2 { margin-bottom: 1rem !important; }
.mb-3 { margin-bottom: 1.5rem !important; }
.mb-4 { margin-bottom: 2rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem !important; }
.mt-2 { margin-top: 1rem !important; }
.mt-3 { margin-top: 1.5rem !important; }
.mt-4 { margin-top: 2rem !important; }
.mt-5 { margin-top: 3rem !important; }

.py-5 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
.px-4 { padding-left: 2rem !important; padding-right: 2rem !important; }

.d-flex { display: flex; }
.justify-content-center { justify-content: center; }
.justify-content-between { justify-content: space-between; }
.align-items-center { align-items: center; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.col-lg-2 { grid-column: span 1; }
.col-lg-3 { grid-column: span 1; }
.col-md-2 { grid-column: span 1; }

.img-fluid { width: 100%; height: auto; }
.rounded { border-radius: 8px; }
.shadow-sm { box-shadow: 0 2px 8px var(--hhl-shadow); }
.shadow { box-shadow: 0 4px 12px var(--hhl-shadow-md); }
.shadow-lg { box-shadow: 0 12px 24px var(--hhl-shadow-lg); }

/* Fade transitions */
html {
  opacity: 1;
  transition: opacity 0.2s ease;
}

html.lang-switching {
  opacity: 0.9;
}
