/*
==================================================
  Bright Language School CSS
  Design System: Brutalism + Skewed Grids
  Color Scheme:  Split-Complementary
  Animation:     Hand-drawn Style
==================================================
*/

/* ---------------------------------- */
/* 1. CSS Variables & Root Setup
/* ---------------------------------- */
:root {
  /* Color Palette (Split-Complementary) */
  --color-primary: #073B4C; /* Midnight Blue */
  --color-secondary: #FFD166; /* Sunglow Yellow */
  --color-accent: #118AB2; /* Pacific Blue */
  --color-highlight: #EF476F; /* Paradise Pink */

  /* Neutral Tones */
  --color-background-light: #FDFDFD;
  --color-background-dark: #212529;
  --color-text-light: #F8F9FA;
  --color-text-dark: #222222;
  --color-border: #1a1a1a;

  /* Typography */
  --font-heading: 'Manrope', sans-serif;
  --font-body: 'Rubik', sans-serif;

  /* Spacing */
  --spacing-unit: 1rem;
  --header-height: 80px;
}

/* ---------------------------------- */
/* 2. Global & Base Styles
/* ---------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-background-light);
  color: var(--color-text-dark);
  line-height: 1.7;
  overflow-x: hidden;
}

.main-container {
  overflow: hidden; /* Contains skewed elements */
}

/* ---------------------------------- */
/* 3. Typography
/* ---------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-primary);
  text-shadow: 1px 1px 0px var(--color-secondary);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); }
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
p { margin-bottom: var(--spacing-unit); }

a {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

a:hover, a:focus {
  color: var(--color-highlight);
  text-decoration: underline;
  text-decoration-style: wavy;
}

.section-title {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 3);
  position: relative;
  z-index: 2;
}

.section-subtitle {
  text-align: center;
  max-width: 600px;
  margin: -40px auto 40px;
  font-size: 1.1rem;
  color: #555;
  position: relative;
  z-index: 2;
}

/* ---------------------------------- */
/* 4. Layout & Header/Footer
/* ---------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: rgba(253, 253, 253, 0.9);
  backdrop-filter: blur(5px);
  border-bottom: 3px solid var(--color-border);
  z-index: 1000;
  display: flex;
  align-items: center;
}

.header-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--color-primary);
  text-decoration: none;
}
.logo:hover { text-decoration: none; }

.main-nav ul {
  list-style: none;
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
}

.main-nav a {
  font-weight: 700;
  font-family: var(--font-heading);
  padding: 5px 10px;
  transition: all 0.2s ease;
  position: relative;
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 3px;
  background-color: var(--color-secondary);
  transition: width 0.3s ease-out;
}

.main-nav a:hover::after {
  width: 100%;
}


.site-footer {
  background-color: var(--color-background-dark);
  color: var(--color-text-light);
  padding: calc(var(--spacing-unit) * 4) 0 calc(var(--spacing-unit) * 2);
  border-top: 5px solid var(--color-border);
}

.footer-container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
}

.footer-column h4 {
  color: var(--color-secondary);
  text-shadow: none;
  margin-bottom: var(--spacing-unit);
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: calc(var(--spacing-unit) / 2);
}

.footer-column a {
  color: var(--color-text-light);
}

.footer-column a:hover {
  color: var(--color-secondary);
}

.social-links a {
  display: inline-block;
  margin-right: 15px;
  font-weight: bold;
}

.footer-bottom {
  text-align: center;
  margin-top: calc(var(--spacing-unit) * 3);
  padding-top: var(--spacing-unit);
  border-top: 1px solid #444;
  font-size: 0.9rem;
}


/* ---------------------------------- */
/* 5. UI Components (Buttons, Cards)
/* ---------------------------------- */

/* Global Button Styles */
.cta-button, button, input[type="submit"] {
  display: inline-block;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  text-transform: uppercase;
  color: var(--color-text-dark);
  background-color: var(--color-secondary);
  padding: 12px 30px;
  border: 3px solid var(--color-border);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 4px 4px 0 var(--color-border);
  text-decoration: none;
}

.cta-button:hover, button:hover, input[type="submit"]:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 var(--color-border);
  color: var(--color-text-dark);
  text-decoration: none;
}

.cta-button:active, button:active, input[type="submit"]:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0 var(--color-border);
}

/* Card Styles */
.card {
  background-color: #fff;
  border: 3px solid var(--color-border);
  display: flex;
  flex-direction: column;
  text-align: center;
  overflow: hidden;
  height: 100%;
}

.card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  border-bottom: 3px solid var(--color-border);
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image img {
  transform: scale(1.1);
}

.card-content {
  padding: calc(var(--spacing-unit) * 1.5);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.card-content h3 {
    margin-bottom: 1rem;
    color: var(--color-primary);
    text-shadow: none;
}

/* ---------------------------------- */
/* 6. Section Styles
/* ---------------------------------- */

.content-section, .content-section-dark {
  padding: calc(var(--spacing-unit) * 5) 5%;
}

.content-section-dark {
  background-color: var(--color-primary);
  color: var(--color-text-light);
  transform: skewY(-2deg);
}

.content-section-dark > * {
  transform: skewY(2deg);
}

.content-section-dark h2, .content-section-dark h3 {
  color: var(--color-text-light);
  text-shadow: 2px 2px 0px var(--color-accent);
}

/* Hero Section */
.hero-section {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 100px 5%;
  min-height: 80vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.3));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero-content h1, .hero-content p {
  color: var(--color-text-light);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

/* Mission Section */
.mission-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}
.mission-image-container img {
    width: 100%;
    height: auto;
    border: 3px solid var(--color-border);
    box-shadow: 8px 8px 0 var(--color-secondary);
}

/* Methodology Section */
.methodology-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: calc(var(--spacing-unit) * 2);
  max-width: 1200px;
  margin: 0 auto;
}
.methodology-item {
  border: 2px dashed var(--color-secondary);
  padding: calc(var(--spacing-unit) * 1.5);
}
.methodology-item h3 {
    margin-bottom: 1rem;
}

/* Courses & Testimonials Carousel */
.content-carousel {
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  overflow-x: auto;
  padding: 1rem 0;
  scrollbar-width: thin;
  scrollbar-color: var(--color-secondary) transparent;
}
.content-carousel::-webkit-scrollbar {
  height: 8px;
}
.content-carousel::-webkit-scrollbar-track {
  background: transparent;
}
.content-carousel::-webkit-scrollbar-thumb {
  background-color: var(--color-secondary);
  border: 2px solid var(--color-border);
}
.content-carousel > * {
  flex: 0 0 320px;
}

/* Teachers Gallery */
.teachers-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: calc(var(--spacing-unit) * 2.5);
    max-width: 1200px;
    margin: 0 auto;
}
.teachers-gallery .card-image {
    height: 280px;
    border-radius: 50%;
    width: 280px;
    margin: -40px auto 20px;
    border: 5px solid var(--color-border);
    position: relative;
    background: var(--color-background-light);
}

/* Testimonials */
.testimonial-card {
    background-color: var(--color-background-light);
    border: 3px solid var(--color-border);
    padding: 2rem;
    text-align: center;
}
.testimonial-card img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid var(--color-border);
    margin: 0 auto 1rem;
    object-fit: cover;
}
.testimonial-card blockquote p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #444;
}
.testimonial-card footer {
    font-weight: bold;
    font-family: var(--font-heading);
    color: var(--color-primary);
}


/* External Resources */
.resources-list {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.resource-item {
    border: 2px solid var(--color-accent);
    padding: 1.5rem;
    transition: background-color 0.3s;
}
.resource-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.resource-item h3 a {
    color: var(--color-secondary);
}
.resource-item p {
    margin-bottom: 0;
    color: #ccc;
}


/* Contact Snippet */
.contact-snippet-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem;
    background-color: var(--color-secondary);
    border: 3px solid var(--color-border);
}
.contact-snippet-content h2 {
    color: var(--color-text-dark);
    text-shadow: none;
}
.contact-snippet-content .cta-button {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    box-shadow: 4px 4px 0 var(--color-border);
}

/* ---------------------------------- */
/* 7. Other Pages (Contact, Legal, Success)
/* ---------------------------------- */
.contact-page-container, .legal-page-container, .about-page-container {
    padding: calc(var(--header-height) + 40px) 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}
.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.map-container {
    width: 100%;
    height: 450px;
    border: 3px solid var(--color-border);
}
.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contact-form .form-group {
    margin-bottom: 1.5rem;
}
.contact-form label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    font-family: var(--font-body);
    font-size: 1rem;
    border: 3px solid var(--color-border);
    background-color: #f0f0f0;
    transition: background-color 0.3s;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    background-color: #fff;
    border-color: var(--color-accent);
}
.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

/* Success Page */
.success-page {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: var(--color-secondary);
}
.success-content {
    background-color: var(--color-background-light);
    padding: 3rem;
    border: 4px solid var(--color-border);
}

/* ---------------------------------- */
/* 8. Animations & Interactivity
/* ---------------------------------- */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------------------------------- */
/* 9. Responsiveness
/* ---------------------------------- */
.burger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}
.burger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-border);
    margin: 5px 0;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: var(--header-height);
    left: 0;
    width: 100%;
    background-color: var(--color-background-light);
    border-bottom: 3px solid var(--color-border);
  }
  .main-nav.is-open {
    display: block;
  }
  .main-nav ul {
    flex-direction: column;
    padding: 2rem 0;
    text-align: center;
  }
  .burger-menu {
    display: block;
  }
  .burger-menu.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .burger-menu.is-active span:nth-child(2) {
    opacity: 0;
  }
  .burger-menu.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
  }
  .mission-content {
    grid-template-columns: 1fr;
  }
}