/* ═══════════════════════════════════════════════
   GLOBAL TOKENS & DESIGN SYSTEM
   ═══════════════════════════════════════════════ */
:root {
  /* Color Palette */
  --teal: #023154;
  --teal-light: #d4eded;
  --teal-dark: #076666;
  --navy: #0f1e2d;
  --text: #1a2535;
  --muted: #445566;
  --sage: #e6f2ee;
  --white: #ffffff;
  --radius: 12px;
  --fb-blue: #1877f2;
  --fb-blue-dark: #0e5cbf;

  /* Standardized Spacing Tokens */
  --space-section-desktop: 56px 48px;
  --space-section-mobile: 40px 24px;
  --space-card-padding: 16px 16px;
  --space-grid-gap: 16px;
  
  /* Standardized Button Tokens */
  --btn-padding: 12px 24px;
  --btn-margin: 12px 0;
}

/* ── BASE RESET & TYPOGRAPHY ── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: 'Fraunces', serif;
}

/* ── STANDARD SECTIONS ──
   Ensures uniform structural padding everywhere */
.hero, .why, .services, .reviews, .pricing, .payment, 
.phone-section, .location, .teacher-refs, .privacy-page, .faq {
  padding: var(--space-section-desktop);
  max-width: 100%;
  box-sizing: border-box;
}

/* ── STANDARD CARDS ──
   Locks structural card internals together */
.card, .review-card, .contact-card, .location-card, .ref-card, .faq-item, .payment-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: var(--space-card-padding);
  border: 1.5px solid var(--teal-light);
  contain: layout style paint;
  box-sizing: border-box;
}

/* ── STANDARD GRIDS ──
   Locks all layout gutters to identical sizes */
.hero, .why-grid, .services-grid, .reviews-grid, .faq-grid, 
.price-cards, .payment-grid, .ref-cards {
  display: grid;
  gap: var(--space-grid-gap);
  contain: layout;
  width: 100%;
}

.why-grid { padding-top: 16px; }

/* Desktop Grid Maps */
.hero, .services-grid, .faq-grid, .payment-grid { grid-template-columns: repeat(2, 1fr); }
.why-grid, .reviews-grid, .ref-cards { grid-template-columns: repeat(3, 1fr); }
.price-cards { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }


/* ═══════════════════════════════════════════════
   BUTTONS & BADGES (STANDARDIZED DIMENSIONS)
   ═══════════════════════════════════════════════ */
.btn, .fb-badge, .g-badge, #avg-banner .btn, .contact-card .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--btn-padding) !important;
  margin: var(--btn-margin) !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  text-align: center;
  box-sizing: border-box;
  transition: background 0.2s, transform 0.15s;
}

/* Button Color States */
.btn, #avg-banner .btn, .contact-card .btn { background: var(--teal); color: var(--white); }
.btn:hover, #avg-banner .btn:hover, .contact-card .btn:hover { background: var(--teal-dark); }


/* ═══════════════════════════════════════════════
   NAVIGATION COMPONENT
   ═══════════════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1.5px solid var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 60px;
  box-shadow: 0 1px 8px rgba(11, 138, 138, 0.07);
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--teal);
  text-decoration: none;
  white-space: nowrap;
}

.nav-links {
  display: flex;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  display: block;
  padding: 6px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}


/* ═══════════════════════════════════════════════
   COMPONENT UNIQUE VARIATIONS & STYLES
   ═══════════════════════════════════════════════ */

/* ── HERO ── */
.hero { align-items: center; }
.hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); color: var(--teal); line-height: 1.15; margin-bottom: 20px; }
.hero-lead { font-size: 1.1rem; color: var(--muted); margin-bottom: 16px; font-weight: 600; }
.hero p { color: var(--muted); margin-bottom: 16px; }
.hero-img, .about-img { 
  border-radius: var(--radius); 
  overflow: hidden; 
  background: var(--teal-light); 
  contain: layout style paint; 
}
.hero-img img, .about-img img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover; 
  border-radius: var(--radius); 
  will-change: transform; 
}

.hero-img { aspect-ratio: 4/3; }
.about-img { aspect-ratio: 366/365; }

/* ── CARD VARIANTS ── */
.card--accent-top { border-top: 3px solid var(--teal); border-left: none; border-right: none; border-bottom: none; }
.card--teal { background: var(--teal); color: white; border-color: var(--teal); }
.card--highlight { background: var(--teal-light); border: none; }
.card--teal h2 { color: white; }

/* ── REVENUE BACKGROUNDS ── */
.why, .reviews, .payment, .contact-options, .location, .teacher-refs { background: var(--sage); }

.contact-options {padding: var(--space-card-padding);}

/* ── HEADER TYPOGRAPHY ── */
.why h2, .services h2, .reviews h2, .pricing h1, .payment h2, .location h2, .teacher-refs h2, .privacy-page h1, .faq h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--teal);
  margin-bottom: 24px;
}
.reviews h2, .payment h2, .location h2, .faq h2 { text-align: center; }

/* Standardized Card Titles */
.why-card h3, .review-card h3, .payment-card h3, .contact-card h2, .location-card strong, .ref-name, .faq-btn {
  font-size: 1.05rem;
  color: var(--navy);
  font-weight: 600;
}

.why-card p, .service-list li, .travel-fee p, .payment-card p, .fine-print, .contact-card p, .location-card p, .ref-note, .ref-role, .faq-answer {
  color: var(--muted);
  font-size: 0.95rem;
}

.fine-print {text-align: center; padding: 0 20px; margin-top: 12px;}

/* ── PAYMENT CARD & LOGO FIXES ── */
.payment-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}
.payment-logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}
.payment-logo--photo {
  border-radius: 6px;
}

/* ── REVIEWS DYNAMIC BANNER ── */
.reviews-header { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 20px; margin-bottom: 28px; }
#avg-banner { display: flex; flex-direction: column; align-items: center; text-align: center; }
#reviews-static { display: none; }
.avg-banner-inner { display: flex; align-items: center; gap: 16px; }
.avg-score { font-size: 2.5rem; font-weight: 700; color: #1a2b3c; line-height: 1; }
.avg-count { font-size: 0.85rem; color: #5a6a7a; margin-top: 2px; }
.stars, .avg-stars { color: #f4b942; letter-spacing: 2px; }
.stars { font-size: 1rem; margin-bottom: 10px; }
.avg-stars { font-size: 1.2rem; }
.review-text, .ref-quote { font-style: italic; line-height: 1.6; margin-bottom: 16px; }

.ref-quote::before {
  content: "“";
  font-weight: bold;
  margin-right: 4px;
}

.ref-quote::after {
  content: "”";
  font-weight: bold;
  margin-left: 4px;
}

/* ── FLEX LISTS ── */
.service-item, .project-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--teal-light);
  border-radius: 8px;
  font-weight: 500;
}

.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;        /* Adds clean vertical space between the items */
  margin-top: 12px; /* Generates breathing room below the "Vad jag har gjort" label */
}

.service-item::before { content: "✓"; color: var(--teal); font-weight: 700; font-size: 1.1rem; flex-shrink: 0; }
.project-list li::before { content: "🛠"; flex-shrink: 0; }

.service-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.service-list li::before { content: ">"; font-weight: 700; flex-shrink: 0; opacity: 0.8; margin-right: 10px; }

/* ── PRICING & STRIPS (FIXED PAD/WIDTH) ── */
.price-amount { font-family: 'Fraunces', serif; font-size: 3rem; font-weight: 700; color: var(--teal); margin: 16px 0 4px; }
.card--teal .price-amount { color: white; }

.travel-fee, .discount-banner {
  width: 100%; /* Adapts flawlessly to container layout width */
  margin-top: 32px; /* Fixes missing top spacing below cards */
  margin-bottom: 32px;
  border-radius: var(--radius);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
}
.travel-fee { background: var(--sage); }
.travel-fee .amount { font-family: 'Fraunces', serif; font-size: 2rem; font-weight: 700; color: var(--teal); white-space: nowrap; }
.discount-banner { background: linear-gradient(135deg, var(--teal) 0%, var(--teal-dark) 100%); color: white; }

/* ── FILTER INPUTS ── */
.filter-bar { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.filter-group { display: flex; align-items: center; background: white; border-radius: 10px; border: 1.5px solid #d0e8e8; overflow: hidden; }
.filter-group label { padding: 0 12px; font-size: 0.8rem; font-weight: 600; color: var(--teal); text-transform: uppercase; border-right: 1.5px solid #d0e8e8; height: 40px; display: flex; align-items: center; background: var(--teal-light); }
.filter-group select { appearance: none; -webkit-appearance: none; border: none; outline: none; background: white url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%230b8a8a' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") no-repeat right 10px center; padding: 0 32px 0 12px; height: 40px; font-size: 0.88rem; color: var(--navy); font-weight: 500; cursor: pointer; min-width: 140px; }

/* ── CONTACT SPECIFICS ── */
.contact-hero { background: var(--teal); color: white; padding: 64px 48px; text-align: center; }
.phone-number { display: inline-block; font-family: 'Fraunces', serif; font-size: clamp(2rem, 6vw, 3.2rem); color: var(--teal); font-weight: 700; text-decoration: none; border-bottom: 3px solid var(--teal-light); padding-bottom: 4px; }
.fb-badge { background: var(--fb-blue); color: white; }
.fb-badge:hover { background: var(--fb-blue-dark); }
.g-badge { background: #fff; color: #3c4043; }
.g-badge:hover { background: #f1f3f4; }

/* ── ABOUT PAGE LAYOUT ── */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 48px; align-items: start; padding: var(--space-section-desktop); }

/* ── ACCORDION FAQ ── */
.faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-align: left;
  font-family: inherit;
}
.faq-icon {
  transition: transform 0.2s ease;
  color: var(--teal);
  flex-shrink: 0;
}
.faq-btn[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}
.faq-answer {
  margin-top: 12px;
}
.faq-answer[hidden] {
  display: none;
}

/* ── SITE FOOTER ── */
site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; border-top: 1.5px solid #d4eded; padding: 28px 48px; font-size: 0.88rem; color: #445566; }
site-footer .footer-links {
  position: static;
  height: auto;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: auto;
  gap: 20px;
}


/* ═══════════════════════════════════════════════
   MOBILE RESPONSIVENESS (100% WIDE GRID ROWS)
   ═══════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Dynamic mobile padding compression */
  .hero, .why, .services, .reviews, .pricing, .payment, 
  .phone-section, .location, .teacher-refs, .privacy-page, .faq, .about {
    padding: var(--space-section-mobile);
  }

  /* Force all rows into clean, single-column structures across screens */
  .hero, .why-grid, .services-grid, .reviews-grid, .faq-grid, 
  .price-cards, .payment-grid, .ref-cards, .about, .contact-card {
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  /* Force ALL action points and badge nodes to full row width */
  .btn, .fb-badge, .g-badge, #avg-banner .btn, .contact-card .btn {
    width: 100% !important;
    display: flex !important;
    text-align: center;
  }

  /* Flip structural visuals (like media/photos) to peak naturally above descriptions */
  .hero-img, .about-photo { order: -1; }
  .travel-fee, .discount-banner, .filter-group { flex-direction: column; align-items: stretch; text-align: center; }
  
  /* Filter Stacking adjustments */
  .filter-group { width: 100%; }
  .filter-group label { border-right: none; border-bottom: 1.5px solid #d0e8e8; width: 100%; justify-content: center; }
  .filter-group select { width: 100%; text-align: center; }

  /* Nav Links Adaptive Drawer Adjustment */
  nav { padding: 0 20px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none; flex-direction: column; gap: 4px;
    position: absolute; top: 60px; left: 0; right: 0;
    background: var(--white); border-bottom: 1.5px solid var(--teal-light);
    padding: 12px 16px 16px; box-shadow: 0 4px 12px rgba(11, 138, 138, 0.1);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; font-size: 0.95rem; }

  /* Footer Row Normalization */
  site-footer { padding: 24px 20px; flex-direction: column; align-items: flex-start; gap: 16px; }
  site-footer .footer-links { flex-direction: column; align-items: flex-start; gap: 12px; width: 100%; }
}

@media (min-width: 769px) {
  /* 1. Give text more room and shrink the image column down */
  .hero { 
    grid-template-columns: 1.4fr 1fr; 
  }

  /* 2. Cap the maximum size of the portrait and snap it to the right side */
  .hero-img, .about-img {
    max-width: 440px;  
    justify-self: end; 
    width: 100%;
  }

  /* 3. Keep the photo caption box pinned and sized directly to the image */
  .hero > div:last-child {
    justify-self: end;
    width: 100%;
    max-width: 440px;
  }
}

/* ── CONTACT COMPONENT FIXES ── */
.contact-hero {
  background: var(--teal);
  color: var(--white);
  padding: 64px 24px;
  text-align: center;
}

.badge-group {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 20px;
}

.phone-section {
  text-align: center;
  background: var(--white);
}

.phone-subtext {
  color: var(--muted);
  font-size: 0.95rem;
  margin-top: 8px;
}

.contact-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  text-align: left;
}

.card-icon {
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.email-address {
  font-size: 0.85rem;
  color: var(--muted);
  text-align: center;
  margin-top: 4px;
}

.location {
  text-align: center;
}

@media (max-width: 768px) {
  .contact-options {
    grid-template-columns: 1fr !important;
  }
}