/* ==============================================
   LITTLE RED THOUGHT — Global Stylesheet
   Singapore-themed preschool learning resources
   ============================================== */

/* Google Fonts imported in HTML <link> tags */

:root {
  --red:          #EF3340;
  --red-dark:     #C0192A;
  --red-light:    #FFEAEC;
  --white:        #FFFFFF;
  --yellow:       #FFD166;
  --yellow-light: #FFF8E1;
  --blue:         #118AB2;
  --blue-dark:    #0A6180;
  --blue-light:   #E0F4FF;
  --green:        #06C48A;
  --green-dark:   #049668;
  --green-light:  #DFFAF2;
  --orange:       #FF9F1C;
  --orange-light: #FFF3E0;
  --purple:       #7B4FD6;
  --purple-light: #F0EAFF;
  --bg:           #FFFBF5;
  --text-dark:    #1A1A2E;
  --text-mid:     #555577;
  --text-light:   #9999AA;
  --border:       #EEEEEE;
  --shadow:       0 4px 20px rgba(0, 0, 0, 0.07);
  --shadow-hover: 0 10px 36px rgba(0, 0, 0, 0.14);
  --radius:       16px;
  --radius-sm:    8px;
  --radius-lg:    28px;
}

/* ============ RESET ============ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background-color: var(--bg);
  color: var(--text-dark);
  line-height: 1.65;
  font-size: 16px;
}

h1, h2, h3, h4, h5 {
  font-family: 'Baloo 2', cursive;
  line-height: 1.2;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }

/* ============ LAYOUT ============ */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 72px 0; }

/* ============ NAVBAR ============ */
.navbar {
  background: var(--white);
  box-shadow: 0 2px 14px rgba(0, 0, 0, 0.07);
  position: sticky;
  top: 0;
  z-index: 999;
}

.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-dot {
  width: 38px;
  height: 38px;
  background: var(--red);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-family: 'Baloo 2', cursive;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: -0.5px;
  flex-shrink: 0;
}

.logo-name {
  font-family: 'Baloo 2', cursive;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--red);
}

.logo-name em {
  font-style: normal;
  color: var(--text-dark);
}

/* Nav links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links > li > a {
  display: block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text-mid);
  transition: all 0.2s;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  background: var(--red-light);
  color: var(--red);
}

.nav-links .nav-cta > a {
  background: var(--red);
  color: white !important;
  border-radius: 50px;
  padding: 8px 20px;
}

.nav-links .nav-cta > a:hover {
  background: var(--red-dark);
}

/* Dropdown */
.dropdown { position: relative; }

.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-hover);
  min-width: 200px;
  padding: 8px 0;
  z-index: 999;
  border: 1px solid var(--border);
}

.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-mid);
  transition: all 0.15s;
}

.dropdown-menu li a:hover {
  background: var(--red-light);
  color: var(--red);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2.5px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: 0.3s;
}

/* ============ HERO ============ */
.hero {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  padding: 88px 24px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -50px;
  width: 280px; height: 280px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  pointer-events: none;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.18);
  border-radius: 50px;
  padding: 6px 16px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

.hero h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 18px;
  line-height: 1.1;
}

.hero h1 span { color: var(--yellow); }

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 540px;
  margin: 0 auto 36px;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-white {
  background: white;
  color: var(--red);
}
.btn-white:hover {
  background: #f4f4f4;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.btn-outline-white {
  background: transparent;
  color: white;
  border: 2px solid rgba(255,255,255,0.65);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  transform: translateY(-2px);
}

.btn-red {
  background: var(--red);
  color: white;
}
.btn-red:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239,51,64,0.35);
}

/* ============ SECTION HEADINGS ============ */
.section-label {
  display: inline-block;
  background: var(--red-light);
  color: var(--red);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  padding: 5px 14px;
  border-radius: 50px;
  margin-bottom: 10px;
}

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text-dark);
  margin-bottom: 10px;
}

.section-subtitle {
  font-size: 1.02rem;
  color: var(--text-mid);
  max-width: 560px;
}

.text-center { text-align: center; }
.text-center .section-subtitle { margin: 0 auto; }

/* ============ SUBJECT CARDS (home/resources) ============ */
.subject-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.subject-card {
  border-radius: var(--radius);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  transition: all 0.3s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.subject-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.subject-card.english { background: var(--blue-light); }
.subject-card.chinese { background: var(--red-light); }
.subject-card.maths   { background: var(--green-light); }

.subject-card-icon {
  font-size: 2.4rem;
  line-height: 1;
}

.subject-card h3 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-dark);
}

.subject-card p {
  font-size: 0.93rem;
  color: var(--text-mid);
  flex-grow: 1;
}

.subject-card .card-arrow {
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.2s;
}

.subject-card:hover .card-arrow { transform: translateX(6px); }

.subject-card.english .card-arrow { color: var(--blue); }
.subject-card.chinese .card-arrow { color: var(--red); }
.subject-card.maths   .card-arrow { color: var(--green-dark); }

/* ============ ABOUT SECTION ============ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.about-visual {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 48px 36px;
  text-align: center;
  color: white;
  position: relative;
  overflow: hidden;
}

.about-visual::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
}

.about-visual-emoji {
  font-size: 4.5rem;
  margin-bottom: 20px;
  display: block;
  position: relative;
  z-index: 1;
}

.about-visual h3 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 10px;
  position: relative;
  z-index: 1;
}

.about-visual p {
  font-size: 0.93rem;
  opacity: 0.88;
  position: relative;
  z-index: 1;
}

.about-content h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
}

.about-content > p {
  color: var(--text-mid);
  font-size: 0.98rem;
  margin-bottom: 14px;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 28px;
}

.about-feature {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.af-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.af-icon { flex-shrink: 0; }

.about-feature h4 {
  font-size: 0.93rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.about-feature p {
  font-size: 0.84rem;
  color: var(--text-light);
  margin: 0;
}

/* ============ PAGE HERO (inner pages) ============ */
.page-hero {
  padding: 60px 24px;
  text-align: center;
}

.page-hero.english-hero { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: white; }
.page-hero.chinese-hero { background: linear-gradient(135deg, var(--red), var(--red-dark)); color: white; }
.page-hero.maths-hero   { background: linear-gradient(135deg, var(--green), var(--green-dark)); color: white; }
.page-hero.resources-hero { background: linear-gradient(135deg, #7B4FD6, #5A33A8); color: white; }
.page-hero.contact-hero { background: var(--red-light); }

.page-hero.contact-hero h1 { color: var(--red); }
.page-hero.contact-hero p  { color: var(--text-mid); }

.page-hero h1 {
  font-size: 2.6rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.page-hero p {
  font-size: 1.05rem;
  opacity: 0.92;
  max-width: 520px;
  margin: 0 auto;
}

.page-hero-emoji {
  font-size: 3rem;
  margin-bottom: 14px;
  display: block;
}

/* ============ RESOURCE CARDS ============ */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
  margin-top: 32px;
}

.resource-card {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.3s;
  border: 2px solid transparent;
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--red-light);
}

.resource-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.resource-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-dark);
  flex: 1;
}

.resource-card p {
  font-size: 0.88rem;
  color: var(--text-mid);
  flex-grow: 1;
}

.resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 0.74rem;
  font-weight: 700;
}

.tag-red    { background: var(--red-light);    color: var(--red); }
.tag-blue   { background: var(--blue-light);   color: var(--blue-dark); }
.tag-green  { background: var(--green-light);  color: var(--green-dark); }
.tag-yellow { background: var(--yellow-light); color: #C47B00; }
.tag-orange { background: var(--orange-light); color: #C46A00; }
.tag-purple { background: var(--purple-light); color: var(--purple); }

/* ============ FILTER TABS ============ */
.filter-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.tab {
  padding: 8px 20px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: 2px solid var(--border);
  background: white;
  color: var(--text-mid);
  transition: all 0.2s;
}

.tab:hover, .tab.active {
  border-color: var(--red);
  background: var(--red-light);
  color: var(--red);
}

/* ============ CONTACT PAGE ============ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 60px;
  align-items: start;
}

.contact-info h2 {
  font-size: 1.9rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.contact-info > p {
  color: var(--text-mid);
  font-size: 0.97rem;
  margin-bottom: 28px;
}

.contact-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.ci-icon {
  width: 44px;
  height: 44px;
  background: var(--red-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.ci-text h4 {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.ci-text p {
  font-size: 0.88rem;
  color: var(--text-mid);
  margin: 0;
}

/* Form card */
.form-card {
  background: white;
  border-radius: var(--radius);
  padding: 36px;
  box-shadow: var(--shadow);
}

.form-card h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 700;
  font-size: 0.88rem;
  margin-bottom: 7px;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: 'Nunito', sans-serif;
  font-size: 0.95rem;
  color: var(--text-dark);
  background: var(--bg);
  transition: border-color 0.2s, background 0.2s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--red);
  background: white;
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-submit {
  width: 100%;
  padding: 14px;
  background: var(--red);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  margin-top: 4px;
}

.form-submit:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(239,51,64,0.3);
}

/* ============ CTA BANNER ============ */
.cta-banner {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: white;
  text-align: center;
  padding: 72px 24px;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 240px; height: 240px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
}

.cta-banner h2 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
  z-index: 1;
}

.cta-banner p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 480px;
  margin: 0 auto 32px;
  position: relative;
  z-index: 1;
}

.cta-banner .btn { position: relative; z-index: 1; }

/* ============ FOOTER ============ */
footer {
  background: var(--text-dark);
  color: rgba(255,255,255,0.75);
  padding: 52px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 44px;
}

.footer-brand .logo-name {
  color: white;
  font-size: 1.2rem;
}

.footer-brand .logo-dot {
  background: var(--red);
}

.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.65;
  margin-top: 12px;
  opacity: 0.65;
}

.footer-col h4 {
  font-family: 'Baloo 2', cursive;
  font-size: 0.98rem;
  font-weight: 700;
  color: white;
  margin-bottom: 14px;
}

.footer-col ul li { margin-bottom: 9px; }

.footer-col ul a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}

.footer-col ul a:hover { color: var(--yellow); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  opacity: 0.55;
}

/* ============ BREADCRUMB ============ */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--text-light);
  margin-bottom: 36px;
}

.breadcrumb a { color: var(--red); font-weight: 700; }

/* ============ RESPONSIVE ============ */
@media (max-width: 900px) {
  .subject-grid { grid-template-columns: 1fr 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .contact-layout { grid-template-columns: 1fr; gap: 36px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    left: 0; right: 0;
    background: white;
    flex-direction: column;
    padding: 12px 24px 20px;
    box-shadow: 0 10px 24px rgba(0,0,0,0.1);
    gap: 2px;
  }

  .nav-links.open { display: flex; }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 12px;
    padding-top: 4px;
  }

  .hamburger { display: flex; }

  .hero h1 { font-size: 2.2rem; }

  .about-features { grid-template-columns: 1fr; }

  .form-row { grid-template-columns: 1fr; }

  .section-title { font-size: 1.9rem; }

  .page-hero h1 { font-size: 2rem; }
}

@media (max-width: 540px) {
  .subject-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-banner h2 { font-size: 1.8rem; }
}
