/* =============================================
   Triad Math Tutor — Main Stylesheet
============================================= */

:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-light: #dbeafe;
  --secondary:     #1e293b;
  --accent:        #f59e0b;
  --white:         #ffffff;
  --bg:            #ffffff;
  --bg-light:      #f8fafc;
  --bg-section:    #eff6ff;
  --text:          #475569;
  --text-heading:  #0f172a;
  --text-muted:    #94a3b8;
  --border:        #e2e8f0;
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.07);
  --shadow:        0 4px 18px rgba(0,0,0,0.10);
  --shadow-lg:     0 10px 40px rgba(0,0,0,0.14);
  --radius:        8px;
  --radius-lg:     16px;
  --transition:    0.25s ease;
  --container:     1100px;
  --nav-height:    72px;
}

/* ── Reset ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
img { max-width: 100%; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }

/* ── Container ──────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Typography ─────────────────────────────── */
h1, h2, h3, h4, h5 {
  color: var(--text-heading);
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: clamp(32px, 5vw, 58px); }
h2 { font-size: clamp(26px, 4vw, 40px); }
h3 { font-size: clamp(20px, 3vw, 26px); }
h4 { font-size: 20px; }
p  { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ── Buttons ────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 14px 30px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  text-align: center;
}
.btn-primary {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}
.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: var(--white);
}
.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  transform: translateY(-2px);
}
.btn-outline-primary {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline-primary:hover {
  background: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

/* ── Navigation ─────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  height: var(--nav-height);
  display: flex;
  align-items: center;
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 800;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}
.nav-logo .nav-logo-text { color: inherit; }
.nav-logo .nav-logo-text span { color: var(--primary); }
.brand-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex-shrink: 0;
  background: var(--primary-light);
  border-radius: 8px;
  padding: 4px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 15px;
  padding: 8px 14px;
  border-radius: var(--radius);
  transition: all var(--transition);
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
  background: var(--primary-light);
}
.nav-links .btn { margin-left: 8px; padding: 10px 22px; font-size: 14px; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-heading);
  border-radius: 2px;
  transition: all var(--transition);
}

/* mobile nav open state */
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Page Hero (inner pages) ────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #2d3f5c 100%);
  color: var(--white);
  padding: 70px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .label {
  display: inline-block;
  background: rgba(245,158,11,0.2);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.page-hero h1 { color: var(--white); margin-bottom: 12px; }
.page-hero p  { color: rgba(255,255,255,0.75); font-size: 18px; max-width: 560px; margin: 0 auto; }
.page-hero-accent {
  display: block;
  height: 4px;
  background: var(--primary);
  width: 100%;
  margin-top: -4px;
}

/* ── Section Layout ─────────────────────────── */
.section { padding: 88px 0; }
.section-light { background: var(--bg-light); }
.section-blue  { background: var(--bg-section); }
.section-dark  { background: var(--secondary); color: var(--white); }
.section-dark h2, .section-dark h3 { color: var(--white); }

.section-header {
  text-align: center;
  margin-bottom: 56px;
}
.section-header .label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}
.section-header h2 { margin-bottom: 16px; }
.section-header p  { color: var(--text); font-size: 17px; max-width: 560px; margin: 0 auto; }
.section-dark .section-header .label { color: var(--accent); }
.section-dark .section-header p { color: rgba(255,255,255,0.70); }

/* ── Cards ──────────────────────────────────── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}
.card-icon {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 26px;
}
.card h3 { margin-bottom: 12px; font-size: 20px; }
.card p  { color: var(--text); font-size: 15px; margin: 0; }

/* ── Grid Layouts ───────────────────────────── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

/* ── Stats Bar ──────────────────────────────── */
.stats-bar {
  background: var(--primary);
  padding: 36px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  text-align: center;
}
.stat-item { color: var(--white); }
.stat-number {
  font-size: 42px;
  font-weight: 800;
  line-height: 1;
  display: block;
}
.stat-label {
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  margin-top: 6px;
  display: block;
}

/* ── Hero (Home) ────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--secondary) 0%, #1a3a5c 60%, #1e3f6e 100%);
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 60px 0;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M50 50c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10s-10-4.477-10-10 4.477-10 10-10zM10 10c0-5.523 4.477-10 10-10s10 4.477 10 10-4.477 10-10 10c0 5.523-4.477 10-10 10S0 25.523 0 20s4.477-10 10-10z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  position: relative;
}
.hero-content .label {
  display: inline-block;
  background: rgba(245,158,11,0.18);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 20px;
}
.hero-content h1 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: clamp(34px, 5vw, 58px);
}
.hero-content p {
  color: rgba(255,255,255,0.78);
  font-size: 18px;
  line-height: 1.75;
  margin-bottom: 36px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-card,
.hero-logo-card,
.location-card {
  background: rgba(255,255,255,0.07);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-lg);
}
.hero-card,
.hero-logo-card {
  padding: 40px 36px;
}
.hero-visual {
  display: grid;
  gap: 24px;
}
.hero-logo-image {
  width: min(100%, 225px);
  margin: 0 auto 24px;
  padding: 12px;
  border-radius: 50%;
  background: rgba(255,255,255,0.94);
}
.hero-card-title {
  color: var(--white);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
}
.hero-feature {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: rgba(255,255,255,0.85);
  font-size: 15px;
}
.hero-feature .check {
  width: 24px;
  height: 24px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 13px;
  color: var(--white);
}
.location-card {
  overflow: hidden;
}
.location-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.location-card figcaption {
  padding: 16px 20px 20px;
  color: rgba(255,255,255,0.82);
  font-size: 14px;
}

/* ── About Section ──────────────────────────── */
.about-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.about-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-section);
  height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 80px;
}
.photo-frame {
  background: var(--white);
  box-shadow: var(--shadow-lg);
}
.photo-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: top center;
}
.about-content .label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 10px;
}
.about-content h2 { margin-bottom: 18px; }
.about-content p  { margin-bottom: 16px; color: var(--text); }
.about-list { margin: 20px 0 28px; }
.about-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-heading);
  margin-bottom: 10px;
}
.about-list li::before {
  content: '✓';
  display: inline-flex;
  width: 22px;
  height: 22px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Testimonials ───────────────────────────── */
.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 32px;
  position: relative;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: 16px;
  left: 24px;
  font-size: 60px;
  color: var(--primary-light);
  font-family: Georgia, serif;
  line-height: 1;
}
.testimonial-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: 20px;
  padding-top: 20px;
}
.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.testimonial-name { font-weight: 700; font-size: 14px; color: var(--text-heading); }
.testimonial-role { font-size: 13px; color: var(--text-muted); }
.stars { color: var(--accent); font-size: 14px; margin-bottom: 8px; }

/* ── CTA Banner ─────────────────────────────── */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 72px 0;
  text-align: center;
}
.cta-banner h2 { color: var(--white); margin-bottom: 14px; }
.cta-banner p  { color: rgba(255,255,255,0.80); font-size: 18px; margin-bottom: 32px; }
.cta-btns { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ── Contact Form ───────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 48px;
  align-items: start;
}
.contact-info h3 { margin-bottom: 20px; }
.contact-detail {
  display: flex;
  gap: 14px;
  margin-bottom: 24px;
  align-items: flex-start;
}
.contact-icon {
  width: 44px;
  height: 44px;
  background: var(--primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.contact-detail h4 { font-size: 15px; margin-bottom: 2px; }
.contact-detail p  { font-size: 14px; color: var(--text); margin: 0; }

.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 15px;
  color: var(--text-heading);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.form-group textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  display: none;
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-top: 16px;
  font-weight: 500;
}

/* ── Subjects Page ──────────────────────────── */
.subject-group { margin-bottom: 52px; }
.subject-group h3 {
  font-size: 22px;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
  color: var(--primary-dark);
}
.subject-tags { display: flex; flex-wrap: wrap; gap: 10px; }
.subject-tag {
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 30px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-heading);
  transition: all var(--transition);
}
.subject-tag:hover {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ── Tutors ─────────────────────────────────── */
.tutor-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  text-align: center;
  transition: transform var(--transition), box-shadow var(--transition);
}
.tutor-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tutor-avatar {
  background: linear-gradient(135deg, var(--primary-light), var(--bg-section));
  padding: 36px 20px 24px;
  font-size: 60px;
}
.tutor-info { padding: 20px 24px 28px; }
.tutor-info h3 { font-size: 18px; margin-bottom: 4px; }
.tutor-role { color: var(--primary); font-size: 13px; font-weight: 600; margin-bottom: 10px; }
.tutor-info p { font-size: 14px; color: var(--text); margin: 0; }

/* ── Process Steps ──────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.step { text-align: center; padding: 20px; }
.step-number {
  width: 52px;
  height: 52px;
  background: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
  margin: 0 auto 18px;
}
.step h3 { margin-bottom: 10px; font-size: 18px; }
.step p  { font-size: 15px; color: var(--text); margin: 0; }

/* ── Footer ─────────────────────────────────── */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.70);
  padding: 64px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer-brand .nav-logo { color: var(--white); font-size: 22px; margin-bottom: 14px; display: block; }
.footer-brand p { font-size: 14px; line-height: 1.7; max-width: 260px; }
.footer-col h4 {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 8px; }
.footer-col ul li a {
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--white); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}
.footer-bottom a { color: rgba(255,255,255,0.55); }
.footer-bottom a:hover { color: var(--white); }

/* ── Responsive ─────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner    { grid-template-columns: 1fr; }
  .hero-card     { display: none; }
  .about-split   { grid-template-columns: 1fr; }
  .contact-layout{ grid-template-columns: 1fr; }
  .grid-3        { grid-template-columns: repeat(2, 1fr); }
  .grid-4        { grid-template-columns: repeat(2, 1fr); }
  .stats-grid    { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .steps         { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .section { padding: 60px 0; }
  .nav-links { display: none; flex-direction: column; gap: 4px; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: var(--nav-height);
    left: 0; right: 0;
    background: var(--white);
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
  .nav-toggle { display: flex; }
  .grid-3, .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .stats-grid   { grid-template-columns: repeat(2, 1fr); }
  .footer-grid  { grid-template-columns: 1fr; }
  .form-row     { grid-template-columns: 1fr; }
  .hero-btns    { flex-direction: column; }
  .cta-btns     { flex-direction: column; align-items: center; }
  .footer-bottom{ flex-direction: column; gap: 8px; text-align: center; }
}
