/* =========================================================================
   InstaParadise Beach Template CSS — v2.0
   Modernized 2026-08-16 — matches home page tokens exactly
   Locked contract: every beach page must use this. No per-page CSS.
   ========================================================================= */

:root {
  --primary: #718DA4;
  --primary-deep: #5a7a92;
  --mako: #42474E;
  --edward: #A4AAAB;
  --spring-wood: #F1EEE4;
  --spring-wood-warm: #E8E3D8;
  --white: #ffffff;
  --text: #2a2e35;
  --text-soft: #5a6068;
  --text-light: #8a9099;
  --transition-colors: background 0.3s, color 0.3s, border-color 0.3s;
}
[data-theme="dark"] {
  --bg: #1e2126; --bg-warm: #272c33;
  --spring-wood: #1e2126; --spring-wood-warm: #272c33;
  --white: #272c33; --text: #f0ede8;
  --text-soft: #a0a8b0; --text-light: #6a7480;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--spring-wood);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: 'Fraunces', serif; }
a { text-decoration: none; color: inherit; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* ========== NAV (verbatim from home page) ========== */
nav#nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 14px 40px; transition: background 0.3s, box-shadow 0.3s;
}
.nav-left { flex: 1; display: flex; justify-content: flex-start; }
.nav-center { flex: 1; display: flex; justify-content: center; }
.nav-right { flex: 1; display: flex; justify-content: flex-end; align-items: center; }
.nav-logo { display: flex; align-items: center; margin-right: 40px; }
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; gap: 32px; list-style: none; align-items: center; }
.nav-links a {
  font-size: 0.88rem; font-weight: 500; color: var(--text-soft);
  transition: color 0.2s; text-decoration: none;
}
.nav-links a:hover { color: var(--primary); }
.nav-dropdown { position: relative; }
.dropdown-menu {
  position: absolute; top: calc(100% - 4px); left: 0;
  background: white; border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15);
  padding: 8px 0; min-width: 180px;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: all 0.2s ease; list-style: none; margin-top: 0;
  z-index: 1000; pointer-events: none;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown:focus-within .dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0); pointer-events: auto;
}
.dropdown-menu li { margin: 0; }
.dropdown-menu a {
  display: block; padding: 10px 16px;
  font-size: 14px; color: var(--text);
  transition: all 0.15s ease; white-space: nowrap;
}
.dropdown-menu a:hover { background: var(--spring-wood-warm); color: var(--primary); padding-left: 20px; }
.nav-dropdown::after { content: ''; position: absolute; top: 100%; left: 0; right: 0; height: 12px; }
.theme-toggle {
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.25);
  color: white; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; cursor: pointer; transition: background 0.2s; flex-shrink: 0;
}
.theme-toggle:hover { background: rgba(255,255,255,0.25); }
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; border: none; background: none;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.3s ease, opacity 0.3s ease; }
.hamburger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.is-open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ========== MOBILE NAV DRAWER ========== */
.mobile-nav-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 2000;
  opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
}
.mobile-nav-overlay.open { opacity: 1; pointer-events: auto; }
.mobile-nav-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
  background: var(--white); z-index: 2001;
  transform: translateX(100%); transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0; overflow-y: auto; box-shadow: -10px 0 30px rgba(0,0,0,0.1);
}
.mobile-nav-drawer.open { transform: translateX(0); }
.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 24px; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.mobile-nav-logo img { height: 30px; }
.mobile-nav-close {
  background: none; border: none; font-size: 1.4rem;
  color: var(--text-soft); cursor: pointer; padding: 4px;
}
.mobile-nav-links { list-style: none; padding: 12px 0; }
.mobile-nav-links a {
  display: block; padding: 14px 24px;
  font-size: 1rem; color: var(--text); font-weight: 500;
  transition: background 0.15s;
}
.mobile-nav-links a:hover { background: var(--spring-wood-warm); }
.mobile-nav-cta-wrap { padding: 16px 24px; border-top: 1px solid rgba(0,0,0,0.06); }
.mobile-nav-cta-wrap button {
  width: 100%; background: var(--primary); color: white; border: none;
  padding: 14px; border-radius: 100px; font-weight: 700; font-size: 0.95rem;
}

/* ========== FOOTER (verbatim from home page) ========== */
footer { background: var(--text); color: rgba(255,255,255,0.65); padding: 64px 48px 36px; }
.footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  max-width: 1100px; margin: 0 auto 44px;
}
.footer-logo { height: 36px; width: auto; opacity: 0.90; margin-bottom: 10px; display: block; }
.footer-brand p { font-size: 0.85rem; line-height: 1.65; margin-top: 14px; color: rgba(255,255,255,0.45); max-width: 260px; }
.footer-col h4 {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.5px; color: rgba(255,255,255,0.4); margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.85rem; color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col ul a:hover { color: var(--primary); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px;
  max-width: 1100px; margin: 0 auto;
  display: flex; justify-content: center; align-items: center;
  font-size: 0.8rem; color: rgba(255,255,255,0.3);
}
.footer-bottom a { color: rgba(255,255,255,0.45); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--primary); }

/* ========== BUTTONS ========== */
.btn-coral {
  background: var(--primary); color: white; border: none;
  padding: 14px 32px; border-radius: 100px;
  font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-coral:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(113,141,164,0.35); }
.btn-outline-white {
  background: transparent; color: white;
  border: 2px solid rgba(255,255,255,0.7);
  padding: 12px 28px; border-radius: 100px;
  font-size: 0.95rem; font-weight: 600;
  cursor: pointer; transition: all 0.2s;
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-outline-white:hover { background: white; color: var(--text); }

/* ========== SECTION 1 — BEACH HERO ========== */
.beach-hero {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  text-align: center; padding: 0 24px 80px; overflow: hidden;
}
.beach-hero-bg {
  position: absolute; inset: 0; z-index: 0;
  background-size: cover; background-position: center;
  transform: scale(1.05); transition: transform 8s ease-out;
}
.beach-hero-bg.loaded { transform: scale(1); }
.beach-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(20,24,30,0.25) 0%, rgba(20,24,30,0.45) 60%, rgba(20,24,30,0.78) 100%);
}
.beach-hero-content {
  position: relative; z-index: 2; color: white; max-width: 800px;
  animation: heroFadeUp 1s ease-out 0.2s both;
}
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.beach-rank-badge-hero {
  display: inline-block; background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,0.3);
  color: white; padding: 6px 16px; border-radius: 100px;
  font-size: 0.85rem; font-weight: 700; letter-spacing: 1px;
  margin-bottom: 20px;
}
.beach-hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700; letter-spacing: -1.5px;
  margin-bottom: 12px; line-height: 1.05;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.beach-hero-location {
  font-size: 1.15rem; color: rgba(255,255,255,0.9);
  font-weight: 400; margin-bottom: 6px;
}
.beach-hero-country {
  font-size: 0.85rem; color: rgba(255,255,255,0.7);
  letter-spacing: 2px; text-transform: uppercase;
  margin-bottom: 28px;
}
.beach-hero-actions {
  display: flex; gap: 12px; justify-content: center; flex-wrap: wrap;
}

/* ========== Prev/Next Beach Nav ========== */
.beach-nav {
  position: relative; z-index: 5; background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 14px 24px; display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}
.nav-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; background: var(--spring-wood);
  border-radius: 100px; font-size: 0.9rem; font-weight: 500;
  color: var(--text); transition: all 0.2s;
}
.nav-link:hover { background: var(--primary); color: white; }
.back-to-list {
  padding: 10px 22px; background: var(--primary); color: white;
  border-radius: 100px; font-weight: 600; font-size: 0.9rem;
  transition: background 0.2s;
}
.back-to-list:hover { background: var(--primary-deep); }

/* ========== SECTION 2 — QUICK STATS ========== */
.quick-stats {
  background: var(--white); padding: 40px 24px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  max-width: 1100px; margin: -40px auto 0; position: relative; z-index: 5;
  border-radius: 16px; box-shadow: 0 8px 24px rgba(0,0,0,0.06);
}
.qs-item { text-align: center; padding: 0 12px; border-right: 1px solid rgba(0,0,0,0.06); }
.qs-item:last-child { border-right: none; }
.qs-icon { font-size: 1.5rem; margin-bottom: 6px; }
.qs-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--text-light); margin-bottom: 4px;
}
.qs-value { font-family: 'Fraunces', serif; font-size: 1.5rem; font-weight: 600; color: var(--text); }

/* ========== SECTION 3 — EDITORIAL CONTENT ========== */
.content-wrapper {
  max-width: 1100px; margin: 80px auto; padding: 0 24px;
  display: grid; grid-template-columns: 1.6fr 1fr; gap: 60px;
}
.editorial-section { }
.editorial-body h2 {
  font-size: 2rem; font-weight: 600; letter-spacing: -0.5px;
  margin-bottom: 24px; color: var(--text);
}
.editorial-body h3 {
  font-size: 1.25rem; font-weight: 600; margin-top: 28px; margin-bottom: 10px;
  color: var(--primary-deep);
}
.editorial-body p {
  font-size: 1.05rem; line-height: 1.75; color: var(--text-soft);
  margin-bottom: 16px;
}
.editorial-body p.lead {
  font-size: 1.2rem; font-style: italic; color: var(--text);
  border-left: 3px solid var(--primary); padding-left: 20px;
  margin-bottom: 24px;
}
.sidebar-card {
  background: var(--white); border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06); position: sticky; top: 24px;
}
.sidebar-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.sidebar-card-body { padding: 20px; }
.sidebar-card-body h3 { font-size: 1.1rem; margin-bottom: 8px; }
.sidebar-meta { font-size: 0.85rem; color: var(--text-soft); margin-bottom: 16px; }
.sidebar-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 16px; border-top: 1px solid rgba(0,0,0,0.06); }
.ss-item .ss-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-light); }
.ss-item .ss-value { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; }

/* ========== SECTION 4 — PHOTO GALLERY ========== */
.photo-gallery { max-width: 1100px; margin: 80px auto; padding: 0 24px; }
.photo-gallery h2 {
  font-size: 2rem; font-weight: 600; letter-spacing: -0.5px;
  margin-bottom: 32px; text-align: center;
}
.photo-gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.photo-gallery-grid img {
  width: 100%; aspect-ratio: 4/3; object-fit: cover;
  border-radius: 12px; transition: transform 0.3s, box-shadow 0.3s;
  cursor: pointer;
}
.photo-gallery-grid img:hover { transform: scale(1.02); box-shadow: 0 12px 32px rgba(0,0,0,0.15); }
.photo-gallery-grid img:nth-child(1) { grid-column: span 2; aspect-ratio: 16/9; }

/* ========== SECTION 5 — PHOTOGRAPHY GUIDE ========== */
.photo-guide { background: var(--spring-wood-warm); padding: 80px 24px; }
.photo-guide h2 {
  font-size: 2rem; font-weight: 600; letter-spacing: -0.5px;
  margin-bottom: 12px; text-align: center;
}
.photo-guide > p {
  font-size: 1rem; color: var(--text-soft); text-align: center;
  max-width: 600px; margin: 0 auto 40px;
}
.photo-tips-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
  max-width: 1100px; margin: 0 auto;
}
.photo-tip-card {
  background: var(--white); border-radius: 16px; padding: 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}
.photo-tip-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.08); }
.tip-icon { font-size: 2rem; margin-bottom: 12px; }
.photo-tip-card h3 { font-size: 1.15rem; margin-bottom: 8px; color: var(--text); }
.photo-tip-card p { font-size: 0.92rem; line-height: 1.6; color: var(--text-soft); margin-bottom: 12px; }
.tip-best-for {
  display: inline-block; background: var(--spring-wood);
  color: var(--primary-deep); padding: 4px 12px; border-radius: 100px;
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.5px;
}

/* ========== SECTION 6 — PRACTICAL INFO ========== */
.practical-info { max-width: 1100px; margin: 80px auto; padding: 0 24px; }
.practical-info h2 {
  font-size: 2rem; font-weight: 600; letter-spacing: -0.5px;
  margin-bottom: 32px; text-align: center;
}
.practical-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.practical-card {
  background: var(--white); border-radius: 16px; padding: 24px;
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}
.practical-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0,0,0,0.06); }
.practical-icon { font-size: 2rem; margin-bottom: 12px; }
.practical-card h3 { font-size: 1.05rem; margin-bottom: 8px; color: var(--text); }
.practical-card p { font-size: 0.9rem; line-height: 1.55; color: var(--text-soft); }

/* ========== SECTION 7 — LOCAL TIPS ========== */
.local-tips { background: var(--spring-wood-warm); padding: 80px 24px; }
.local-tips h2 {
  font-size: 2rem; font-weight: 600; letter-spacing: -0.5px;
  margin-bottom: 32px; text-align: center;
}
.local-tips-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; max-width: 1100px; margin: 0 auto; }
.local-tip-card {
  background: var(--white); border-radius: 16px; padding: 28px;
  border-left: 4px solid var(--primary);
}
.local-tip-card h3 {
  font-size: 1.15rem; margin-bottom: 10px; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.local-tip-card p { font-size: 0.95rem; line-height: 1.65; color: var(--text-soft); }

/* ========== SECTION 8 — RELATED BEACHES ========== */
.related-beaches { max-width: 1100px; margin: 80px auto; padding: 0 24px; }
.related-beaches h2 {
  font-size: 2rem; font-weight: 600; letter-spacing: -0.5px;
  margin-bottom: 32px; text-align: center;
}
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.related-card {
  background: var(--white); border-radius: 16px; overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
  transition: transform 0.25s, box-shadow 0.25s; cursor: pointer;
  display: block;
}
.related-card:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(113,141,164,0.18); }
.related-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.related-card-body { padding: 18px; }
.related-card-body h3 { font-size: 1.1rem; margin-bottom: 4px; color: var(--text); }
.related-card-body p { font-size: 0.85rem; color: var(--text-soft); }

/* ========== SECTION 9 — CTA / EMAIL CAPTURE ========== */
.cta-section { background: var(--spring-wood-warm); padding: 80px 24px; text-align: center; }
.cta-section h2 {
  font-size: 2.2rem; font-weight: 600; letter-spacing: -0.5px;
  margin-bottom: 12px;
}
.cta-section > p {
  font-size: 1rem; color: var(--text-soft);
  max-width: 600px; margin: 0 auto 32px;
}
.email-form {
  display: flex; gap: 12px; max-width: 480px; margin: 0 auto;
  background: var(--white); border-radius: 100px; padding: 6px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.email-form input {
  flex: 1; border: none; outline: none; padding: 14px 20px;
  background: transparent; font-size: 1rem; color: var(--text);
  font-family: inherit;
}
.email-form button {
  background: var(--primary); color: white; border: none;
  padding: 14px 28px; border-radius: 100px;
  font-weight: 700; font-size: 0.95rem; transition: background 0.2s;
}
.email-form button:hover { background: var(--primary-deep); }
.cta-note { font-size: 0.8rem; color: var(--text-light); margin-top: 16px; }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .content-wrapper { grid-template-columns: 1fr; gap: 40px; }
  .sidebar-card { position: static; }
  .practical-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-tips-grid, .local-tips-grid, .related-grid { grid-template-columns: repeat(2, 1fr); }
  .quick-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .qs-item:nth-child(2) { border-right: none; }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .footer-col:last-child { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  nav#nav { padding: 10px 16px; }
  .nav-left { display: none !important; }
  .nav-center { display: none !important; }
  .hamburger { display: flex; }
  .nav-right { flex: unset; justify-content: center; }
  .beach-hero { min-height: 90vh; padding: 0 16px 60px; }
  .beach-hero h1 { font-size: 2.4rem; }
  .beach-hero-actions { flex-direction: column; width: 100%; }
  .beach-hero-actions button { width: 100%; justify-content: center; }
  .quick-stats { grid-template-columns: repeat(2, 1fr); margin: -20px 16px 0; }
  .content-wrapper { margin: 50px auto; padding: 0 16px; }
  .editorial-body h2 { font-size: 1.6rem; }
  .photo-gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-gallery-grid img:nth-child(1) { grid-column: span 2; }
  .photo-tips-grid, .local-tips-grid, .related-grid { grid-template-columns: 1fr; }
  .practical-grid { grid-template-columns: 1fr; }
  footer { padding: 48px 20px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .beach-nav { padding: 12px 16px; }
  .nav-link, .back-to-list { padding: 8px 14px; font-size: 0.85rem; }
  .email-form { flex-direction: column; border-radius: 16px; }
  .email-form input { min-width: unset; width: 100%; }
  .email-form button { width: 100%; }
  .photo-guide, .local-tips, .cta-section { padding: 60px 20px; }
  .photo-guide h2, .local-tips h2, .cta-section h2, .practical-info h2, .related-beaches h2, .photo-gallery h2 { font-size: 1.6rem; }
}
@media (max-width: 540px) {
  .photo-gallery-grid { grid-template-columns: 1fr; }
  .photo-gallery-grid img:nth-child(1) { grid-column: span 1; aspect-ratio: 4/3; }
  .footer-grid { grid-template-columns: 1fr; }
}