/* ============================================
   THE AMMAZING LIFE — Responsive Stylesheet
   Applies to all TAL page templates
   Breakpoints: 1024px (tablet), 768px (mobile)
   ============================================ */

/* ── HAMBURGER BUTTON ── */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 200;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #2C1A0E;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

/* ============================================
   TABLET — max-width: 1024px
   ============================================ */
@media (max-width: 1024px) {

  /* Header */
  .site-header { padding: 0 4%; }
  .site-nav { gap: 1.5rem; }
  .site-nav a { font-size: 0.78rem; }

  /* Homepage Hero */
  .hero { max-height: none; min-height: auto; }
  .hero-title { font-size: 2.4rem; }

  /* Posts grid */
  .posts-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .posts-grid .post-card:last-child {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
    width: 100%;
  }

  /* About section (homepage) */
  .about-section { gap: 3rem; }

  /* Travel feature */
  .travel-feature { grid-template-columns: 1fr !important; }
  .travel-map-visual { min-height: 280px; }

  /* Newsletter */
  .newsletter { gap: 3rem; }

  /* Footer */
  .footer-top { gap: 3rem; }
  .footer-nav-cols { grid-template-columns: repeat(2, 1fr) !important; }

  /* About page — pillar sections */
  .pillar-inner { gap: 3rem; }
  .pillar-letter-bg { font-size: 8rem; }

  /* About page — family section */
  .family-section { gap: 3rem; }

}

/* ============================================
   MOBILE — max-width: 768px
   ============================================ */
@media (max-width: 768px) {

  /* ── NAVIGATION ── */
  .nav-toggle { display: flex !important; }

  .site-nav {
    display: none !important;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    background: #F2EDE3;
    flex-direction: column !important;
    padding: 2rem 5%;
    gap: 0 !important;
    border-top: 1px solid rgba(44,26,14,0.1);
    border-bottom: 3px solid #B5522A;
    z-index: 150;
    box-shadow: 0 8px 30px rgba(44,26,14,0.12);
  }

  .site-nav.open { display: flex !important; }

  .site-nav a {
    font-size: 0.9rem !important;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(44,26,14,0.07);
    letter-spacing: 1px;
  }

  .site-nav a:last-child { border-bottom: none; }
  .site-nav a::after { display: none; }

  /* ── HOMEPAGE HERO ── */
  .hero {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    max-height: none !important;
  }

  .hero-text {
    padding: 3rem 6% 2.5rem !important;
    order: 1;
  }

  .hero-text::after { display: none; }

  .hero-image {
    order: 2;
    height: 380px;
    min-height: unset;
  }

  .hero-title { font-size: 2rem !important; }
  .hero-subtitle { font-size: 0.92rem; max-width: 100%; }

  /* ── PILLARS ── */
  .pillars { grid-template-columns: 1fr !important; }

  .pillar-card {
    border-right: none !important;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding: 2.5rem 6% !important;
  }

  .pillar-card:last-child { border-bottom: none; }

  /* ── POSTS GRID ── */
  .posts-grid {
    grid-template-columns: 1fr !important;
  }

  .posts-grid .post-card:last-child {
    grid-column: auto !important;
    max-width: 100% !important;
  }

  .latest-posts { padding: 4rem 6% !important; }

  /* ── ABOUT SECTION (homepage) ── */
  .about-section {
    grid-template-columns: 1fr !important;
    padding: 4rem 6% !important;
    gap: 3rem !important;
  }

  .about-photo-frame { aspect-ratio: 4/3; }

  /* ── TRAVEL FEATURE (homepage) ── */
  .travel-section { padding: 4rem 6% !important; }
  .travel-map-visual { min-height: 240px; }
  .travel-dest-name { font-size: 2.2rem !important; }
  .travel-content { padding: 2.5rem !important; }

  /* ── NEWSLETTER ── */
  .newsletter {
    grid-template-columns: 1fr !important;
    padding: 4rem 6% !important;
    gap: 2.5rem !important;
  }

  .newsletter-title { font-size: 1.8rem !important; }

  /* ── FOOTER ── */
  .footer-top {
    grid-template-columns: 1fr !important;
    gap: 3rem !important;
    padding: 3rem 0 !important;
  }

  .footer-nav-cols {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 2rem !important;
  }

  .site-footer { padding: 3rem 6% 2rem !important; }

  .footer-bottom {
    flex-direction: column !important;
    gap: 1rem;
    text-align: center;
  }

  /* ── ABOUT PAGE HERO ── */
  .about-hero {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    max-height: none !important;
  }

  .about-hero-text {
    padding: 3.5rem 6% 3rem !important;
    order: 1 !important;
  }

  .about-hero-text::before { display: none; }
  .about-hero-title { font-size: 2rem !important; }
  .about-hero-body { font-size: 0.92rem; }

  .about-hero-image {
    order: 2 !important;
    height: 420px;
  }

  /* ── FAMILY SECTION ── */
  .family-section {
    grid-template-columns: 1fr !important;
    padding: 4rem 6% !important;
    gap: 3rem !important;
  }

  .family-photo-frame { aspect-ratio: 4/3; }
  .family-photo-frame img { object-position: center 15%; }

  /* ── PILLAR SECTIONS ── */
  .pillar-section { padding: 4rem 6% !important; }

  .pillar-inner {
    grid-template-columns: 1fr !important;
    gap: 2.5rem !important;
  }

  /* Always show visual before copy on mobile */
  .pillar-inner .pillar-visual { order: 1 !important; }
  .pillar-inner .pillar-copy { order: 2 !important; }

  .visual-box { min-height: 320px !important; }

  .pillar-letter-bg { display: none; }

  .pillar-copy h2 { font-size: 1.7rem !important; }

  /* ── WHERE TO START ── */
  .start-section { padding: 4rem 6% !important; }

  .start-grid {
    grid-template-columns: 1fr !important;
  }

  /* ── SECTION TITLES ── */
  .section-title { font-size: 1.8rem !important; margin-bottom: 1.8rem !important; }

  /* ── BOOKS STRIP ── */
  .books-strip { gap: 0.6rem; }
  .book-pill { font-size: 0.74rem; }

  /* ── FAMILY TAGS ── */
  .family-members { gap: 0.5rem; }
  .family-tag { font-size: 0.68rem; }

}

/* ============================================
   SMALL MOBILE — max-width: 480px
   ============================================ */
@media (max-width: 480px) {

  .hero-title { font-size: 1.75rem !important; }
  .about-hero-title { font-size: 1.75rem !important; }
  .hero-image { height: 300px; }
  .about-hero-image { height: 340px; }

  .footer-nav-cols {
    grid-template-columns: 1fr !important;
  }

  .newsletter-title { font-size: 1.6rem !important; }

  .pillar-copy h2 { font-size: 1.5rem !important; }

  .visual-box { min-height: 260px !important; }

  .travel-dest-name { font-size: 1.8rem !important; }

  .start-card { padding: 2rem 1.5rem !important; }

}