/* ============================================================
   RPE Education Services — style.css
   Brand: #DD183B (crimson), #0F172A (dark navy), #FFFFFF
   Fonts: Roboto Slab (headings) + Roboto (body)
============================================================ */

/* ---------- CSS Custom Properties ---------- */
:root {
  --brand:        #DD183B;
  --brand-dark:   #b01230;
  --brand-light:  #FFEDE6;
  --navy:         #0F172A;
  --navy-mid:     #1e293b;
  --text:         #3A3A3A;
  --text-muted:   #6b7280;
  --bg:           #ffffff;
  --bg-soft:      #f9fafb;
  --border:       #e5e7eb;
  --footer-bg:    #323f44;
  --footer-text:  rgba(255,255,255,0.72);

  --font-heading: 'Roboto Slab', Georgia, serif;
  --font-body:    'Roboto', system-ui, sans-serif;

  --radius:       8px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08);
  --shadow-md:    0 4px 16px rgba(0,0,0,0.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,0.14);

  --container:    1200px;
  --transition:   0.22s ease;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-dark); }
ul { list-style: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--navy);
  line-height: 1.2;
}
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ---------- Layout ---------- */
.container {
  width: min(100%, var(--container));
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.section { padding-block: 6rem; }

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 3.5rem;
}
.section-title { margin-bottom: 1rem; }
.section-subtitle { color: var(--text-muted); font-size: 1.05rem; }
.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  color: #fff;
  box-shadow: 0 4px 14px rgba(221,24,59,0.35);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.7);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}

.btn-light {
  background: #fff;
  color: var(--brand);
  border-color: #fff;
}
.btn-light:hover {
  background: var(--brand-light);
  border-color: var(--brand-light);
  color: var(--brand-dark);
}

.btn-full { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 72px;
}

.logo-link { flex-shrink: 0; }
.logo-img { height: 48px; width: auto; object-fit: contain; }

.primary-nav { flex: 1; }
.primary-nav ul {
  display: flex;
  gap: 0.25rem;
  align-items: center;
}
.primary-nav a {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--text);
  font-weight: 500;
  font-size: 0.93rem;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
}
.primary-nav a:hover,
.primary-nav a.active {
  color: var(--brand);
  background: var(--brand-light);
}

.header-cta { flex-shrink: 0; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  background-image: url('images/hero-bg.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: scroll;
  padding-top: 72px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(221,24,59,0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding-block: 5rem;
}

.hero-eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  margin-bottom: 1rem;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  color: #fff;
  margin-bottom: 1.25rem;
  font-weight: 700;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  max-width: 540px;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.5);
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ---------- Stats Band ---------- */
.stats-band {
  background: var(--brand);
  color: #fff;
  padding-block: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  text-align: center;
}

.stat-item { padding: 1rem; }

.stat-number {
  display: block;
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-label {
  display: block;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.04em;
}

/* ---------- Services ---------- */
.services { background: var(--bg-soft); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
}

.service-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.service-icon {
  width: 56px; height: 56px;
  margin-bottom: 1.25rem;
  color: var(--brand);
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1.1rem;
}
.service-card p { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- About ---------- */
.about { background: var(--bg); }

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-image-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.about-img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.about-badge {
  position: absolute;
  bottom: -1.5rem;
  right: -1.5rem;
  background: var(--brand);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-md);
}
.badge-number {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.badge-text { font-size: 0.8rem; opacity: 0.9; }

.about-content .section-title { margin-bottom: 1rem; }
.about-content p { color: var(--text-muted); }

.about-highlights {
  margin: 1.5rem 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.about-highlights li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
}
.about-highlights li svg {
  flex-shrink: 0;
  width: 18px; height: 18px;
  color: var(--brand);
}

/* ---------- Tutors ---------- */
.tutors { background: var(--bg-soft); }

.tutors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
}

.tutor-card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
}
.tutor-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.tutor-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
}
.tutor-img-wrap img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.tutor-card:hover .tutor-img-wrap img { transform: scale(1.04); }

.tutor-info { padding: 1.5rem; }
.tutor-info h3 { margin-bottom: 0.25rem; font-size: 1.05rem; }
.tutor-subject { color: var(--brand); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.6rem; }
.tutor-info p { color: var(--text-muted); font-size: 0.9rem; }

/* ---------- Testimonials ---------- */
.testimonials { background: var(--navy); overflow: hidden; }
.testimonials .section-eyebrow { color: var(--brand); }
.testimonials .section-title { color: #fff; }
.testimonials .section-subtitle { color: rgba(255,255,255,0.65); }

.testimonials-slider {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.testimonials-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.4s ease;
  will-change: transform;
}

.testimonial-card {
  flex: 0 0 calc(33.333% - 1rem);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stars { color: #f59e0b; font-size: 1.1rem; letter-spacing: 2px; }

.testimonial-text {
  color: rgba(255,255,255,0.85);
  font-size: 0.97rem;
  font-style: italic;
  flex: 1;
  margin-bottom: 0;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.testimonial-author img {
  width: 46px; height: 46px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.testimonial-author strong { display: block; color: #fff; font-size: 0.92rem; }
.testimonial-author span { color: rgba(255,255,255,0.55); font-size: 0.8rem; }

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

.slider-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.25);
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), border-color var(--transition);
}
.slider-btn:hover { background: var(--brand); border-color: var(--brand); }
.slider-btn svg { width: 18px; height: 18px; }

.slider-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  cursor: pointer;
  transition: background var(--transition), width var(--transition);
  border: none;
}
.dot.active { background: var(--brand); width: 24px; border-radius: 4px; }

/* ---------- CTA Band ---------- */
.cta-band {
  background: var(--brand);
  padding-block: 4rem;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-text h2 { color: #fff; font-size: clamp(1.4rem, 3vw, 2rem); margin-bottom: 0.5rem; }
.cta-text p { color: rgba(255,255,255,0.85); margin: 0; }

/* ---------- Contact ---------- */
.contact { background: var(--bg-soft); }

.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 5rem;
  align-items: start;
}

.contact-info .section-title { margin-bottom: 1rem; }
.contact-info > p { color: var(--text-muted); margin-bottom: 2rem; }

.contact-details { display: flex; flex-direction: column; gap: 1.25rem; }
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.contact-item svg {
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: var(--brand);
  margin-top: 2px;
}
.contact-item strong { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 2px; }
.contact-item span, .contact-item a { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Form ---------- */
.contact-form-wrap {
  background: var(--bg);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { display: flex; flex-direction: column; margin-bottom: 1.25rem; }
.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--navy);
}
.form-group label span { color: var(--brand); }

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(221,24,59,0.12);
}
.form-group input.error,
.form-group textarea.error {
  border-color: #e11d48;
}
.form-group textarea { resize: vertical; min-height: 120px; }

.field-error { font-size: 0.8rem; color: #e11d48; margin-top: 0.25rem; }

.form-success {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  background: #d1fae5;
  color: #065f46;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
}
.form-success svg { width: 22px; height: 22px; flex-shrink: 0; }
.form-success[hidden] { display: none; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--footer-text); }

.footer-inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.4fr;
  gap: 3rem;
  padding-block: 4rem;
}

.footer-brand .footer-logo { height: 52px; width: auto; object-fit: contain; margin-bottom: 1rem; filter: brightness(1.1); }
.footer-brand p { color: var(--footer-text); font-size: 0.93rem; line-height: 1.7; }

.footer-links h4,
.footer-services h4,
.footer-contact-info h4 {
  color: #fff;
  font-family: var(--font-heading);
  font-size: 1rem;
  margin-bottom: 1.1rem;
}

.footer-links ul li, .footer-services ul li { margin-bottom: 0.5rem; }
.footer-links a { color: var(--footer-text); transition: color var(--transition); }
.footer-links a:hover { color: #fff; }
.footer-services ul li { color: var(--footer-text); font-size: 0.93rem; }

.footer-contact-info address { font-style: normal; }
.footer-contact-info p { color: var(--footer-text); font-size: 0.93rem; margin-bottom: 0.4rem; }
.footer-contact-info a { color: var(--footer-text); }
.footer-contact-info a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-block: 1.25rem;
}
.footer-bottom p { color: rgba(255,255,255,0.45); font-size: 0.85rem; text-align: center; }

/* ---------- Scroll-Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .about-inner { gap: 3rem; }
  .contact-inner { gap: 3rem; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 2rem; }
  .testimonial-card { flex: 0 0 calc(50% - 0.75rem); }
}

@media (max-width: 768px) {
  .section { padding-block: 4rem; }

  /* Header mobile */
  .header-cta { display: none; }
  .hamburger { display: flex; }
  .primary-nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    display: none;
    box-shadow: var(--shadow-md);
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0; }
  .primary-nav a { padding: 0.75rem 0; border-radius: 0; border-bottom: 1px solid var(--border); }
  .primary-nav li:last-child a { border-bottom: none; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* About */
  .about-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-img { height: 320px; }
  .about-badge { bottom: -1rem; right: 1rem; }

  /* Testimonials */
  .testimonial-card { flex: 0 0 100%; }

  /* CTA */
  .cta-inner { flex-direction: column; text-align: center; }

  /* Contact */
  .contact-inner { grid-template-columns: 1fr; gap: 2.5rem; }
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .contact-form-wrap { padding: 1.5rem; }
}
