/* ============================================================
   Thời Tiết Nha Trang — Coastal Editorial Theme
   ============================================================ */

:root {
  /* Ocean palette */
  --ocean-deep: #0b2545;
  --ocean-mid: #13507c;
  --ocean-light: #1a7ab5;
  --ocean-pale: #d6eaf8;
  --ocean-whisper: #eef6fc;

  /* Sand & warmth */
  --sand-warm: #f5e6c8;
  --sand-light: #faf3e7;
  --sand-gold: #d4a959;
  --coral: #e8634a;
  --coral-soft: #f9ded8;

  /* Neutrals */
  --ink: #1a1a2e;
  --ink-soft: #3d3d56;
  --mist: #7a8a9e;
  --cloud: #f7f9fc;
  --white: #ffffff;

  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', 'Segoe UI', sans-serif;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cloud);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--ocean-light);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--coral);
}

/* ---- Container ---- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* ---- Wave Decorations ---- */
.wave-top {
  position: relative;
  z-index: 2;
  margin-bottom: -2px;
}

.wave-top svg {
  display: block;
  width: 100%;
  height: 80px;
}

.wave-bottom {
  position: relative;
  margin-bottom: -2px;
}

.wave-bottom svg {
  display: block;
  width: 100%;
  height: 80px;
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(165deg,
      var(--ocean-deep) 0%,
      var(--ocean-mid) 40%,
      var(--ocean-light) 70%,
      #3db8e8 100%);
  overflow: hidden;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 30% 80%, rgba(212, 169, 89, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* Animated grain texture */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.5;
  pointer-events: none;
}

/* Animated wave shapes */
.hero::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 200%;
  height: 120px;
  background: var(--cloud);
  mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,30 C240,60 480,0 720,30 C960,60 1200,0 1440,30 L1440,60 L0,60Z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0,30 C240,60 480,0 720,30 C960,60 1200,0 1440,30 L1440,60 L0,60Z' fill='white'/%3E%3C/svg%3E");
  mask-size: 50% 100%;
  -webkit-mask-size: 50% 100%;
  mask-repeat: repeat-x;
  -webkit-mask-repeat: repeat-x;
  animation: waveSlide 8s linear infinite;
}

@keyframes waveSlide {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--white);
  padding: var(--space-lg) var(--space-md);
  max-width: 700px;
  animation: fadeUp 1s var(--ease-out) both;
}

.hero__eyebrow {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: var(--space-sm);
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: var(--space-md);
}

.hero__highlight {
  display: inline-block;
  background: linear-gradient(135deg, var(--sand-gold), var(--coral));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  line-height: 1.8;
  opacity: 0.9;
  max-width: 520px;
  margin: 0 auto var(--space-md);
}

.hero__cta {
  display: inline-block;
  padding: 0.9rem 2.2rem;
  background: rgba(255, 255, 255, 0.15);
  color: var(--white);
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  backdrop-filter: blur(10px);
  transition: all 0.3s var(--ease-out);
}

.hero__cta:hover {
  background: var(--white);
  color: var(--ocean-deep);
  border-color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.hero__temp-badge {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-lg);
  padding: var(--space-sm) var(--space-md);
  color: var(--white);
  animation: fadeUp 1.2s var(--ease-out) 0.3s both;
}

.hero__temp-num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1;
}

.hero__temp-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.8;
}

/* ============================================================
   SECTIONS (shared)
   ============================================================ */
.section {
  padding: var(--space-xl) 0;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section__tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ocean-light);
  background: var(--ocean-pale);
  padding: 0.3rem 1rem;
  border-radius: 50px;
  margin-bottom: var(--space-sm);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--ocean-deep);
  line-height: 1.2;
  margin-bottom: var(--space-xs);
}

.section__desc {
  font-size: 1.05rem;
  color: var(--mist);
  max-width: 600px;
  margin: var(--space-xs) auto 0;
}

/* ============================================================
   OVERVIEW CARDS
   ============================================================ */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

.overview-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 2px 20px rgba(11, 37, 69, 0.04);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s;
}

.overview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(11, 37, 69, 0.08);
}

.overview-card__icon {
  font-size: 2.5rem;
  margin-bottom: var(--space-sm);
}

.overview-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ocean-deep);
  margin-bottom: var(--space-xs);
}

.overview-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ============================================================
   MONTHLY TABLE
   ============================================================ */
.section--monthly {
  background: var(--sand-light);
}

.month-table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 30px rgba(11, 37, 69, 0.06);
}

.month-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  font-size: 0.95rem;
}

.month-table thead {
  background: var(--ocean-deep);
  color: var(--white);
}

.month-table th {
  padding: 1rem 1.2rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.month-table td {
  padding: 0.85rem 1.2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--ink-soft);
}

.month-table tbody tr:hover {
  background: var(--ocean-whisper);
}

.month-table tbody tr:last-child td {
  border-bottom: none;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--great {
  background: #d4edda;
  color: #155724;
}

.badge--good {
  background: #d6f0ff;
  color: #0b4d7a;
}

.badge--ok {
  background: #fff3cd;
  color: #856404;
}

.badge--bad {
  background: #f8d7da;
  color: #721c24;
}

/* ============================================================
   SEASONS
   ============================================================ */
.seasons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-md);
}

.season-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 30px rgba(11, 37, 69, 0.06);
}

.season-card__deco {
  height: 8px;
  width: 100%;
}

.season-card--dry .season-card__deco {
  background: linear-gradient(90deg, var(--sand-gold), var(--coral));
}

.season-card--wet .season-card__deco {
  background: linear-gradient(90deg, var(--ocean-light), var(--ocean-deep));
}

.season-card__content {
  padding: var(--space-md);
}

.season-card__period {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--mist);
}

.season-card__title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--ocean-deep);
  margin: var(--space-xs) 0 var(--space-sm);
}

.season-card p {
  color: var(--ink-soft);
  font-size: 0.95rem;
  margin-bottom: var(--space-sm);
}

.season-card__list {
  list-style: none;
  margin-bottom: var(--space-md);
}

.season-card__list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.4rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
}

.season-card__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--ocean-light);
  font-weight: 700;
}

.season-card__verdict {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.9rem;
  color: var(--mist);
}

/* ============================================================
   TIPS
   ============================================================ */
.section--tips {
  background: var(--sand-light);
}

.tips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
}

.tip-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: transform 0.3s var(--ease-out);
}

.tip-card:hover {
  transform: translateY(-3px);
}

.tip-card__num {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ocean-pale);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.tip-card__title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ocean-deep);
  margin-bottom: var(--space-xs);
}

.tip-card p {
  color: var(--ink-soft);
  font-size: 0.93rem;
}

/* ============================================================
   FAQ
   ============================================================ */
.faq-list {
  max-width: 750px;
  margin: 0 auto;
}

.faq-item {
  margin-bottom: var(--space-sm);
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: box-shadow 0.3s;
}

.faq-item[open] {
  box-shadow: 0 4px 20px rgba(11, 37, 69, 0.06);
}

.faq-item__q {
  padding: 1.2rem var(--space-md);
  font-weight: 600;
  color: var(--ocean-deep);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
}

.faq-item__q::-webkit-details-marker {
  display: none;
}

.faq-item__q::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--ocean-light);
  transition: transform 0.3s var(--ease-out);
  flex-shrink: 0;
}

.faq-item[open] .faq-item__q::after {
  transform: rotate(45deg);
}

.faq-item__a {
  padding: 0 var(--space-md) 1.2rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  position: relative;
  background: var(--ocean-deep);
  color: rgba(255, 255, 255, 0.7);
  padding-top: 0;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  text-align: center;
}

.footer__logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: var(--space-xs);
}

.footer__logo span {
  color: var(--sand-gold);
}

.footer__tagline {
  font-size: 0.9rem;
  margin-bottom: var(--space-md);
}

.footer__nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
}

.footer__nav a {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer__nav a:hover {
  color: var(--white);
}

.footer__copy {
  font-size: 0.8rem;
  opacity: 0.5;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }
.reveal:nth-child(5) { transition-delay: 0.4s; }
.reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .hero {
    min-height: 80vh;
  }

  .hero__temp-badge {
    top: var(--space-sm);
    right: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
  }

  .hero__temp-num {
    font-size: 1.8rem;
  }

  .section {
    padding: var(--space-lg) 0;
  }

  /* Responsive table */
  .month-table thead {
    display: none;
  }

  .month-table,
  .month-table tbody,
  .month-table tr,
  .month-table td {
    display: block;
  }

  .month-table tr {
    padding: var(--space-sm);
    border-bottom: 2px solid var(--ocean-pale);
  }

  .month-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
  }

  .month-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--ocean-deep);
    font-size: 0.85rem;
  }

  .month-table td:first-child {
    background: var(--ocean-whisper);
    margin: calc(-1 * var(--space-sm));
    margin-bottom: var(--space-xs);
    padding: 0.6rem var(--space-sm);
    border-radius: var(--radius-sm);
  }

  .month-table td:first-child::before {
    display: none;
  }

  .seasons-grid {
    grid-template-columns: 1fr;
  }

  .tips-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 2.5rem;
  }

  .container {
    padding: 0 var(--space-sm);
  }
}
