/* InTheBeach.com.au — Coastal Design System */
/* Modern, clean, fast — no external dependencies */

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

:root {
  --primary: #0077b6;
  --primary-dark: #005f8a;
  --primary-light: #90e0ef;
  --primary-lighter: #caf0f8;
  --accent: #f4a261;
  --accent-light: #fce4c7;
  --sand: #fdf6ec;
  --sand-dark: #f0e2c8;
  --text: #1a2634;
  --text-secondary: #5b6b7d;
  --bg: #ffffff;
  --bg-secondary: #f4f9fc;
  --bg-warm: #fefcf8;
  --border: #d4e1ea;
  --border-light: #e8f0f5;
  --success: #2a9d8f;
  --success-light: #d4f0ec;
  --warning: #e76f51;
  --danger: #e63946;
  --shadow-sm: 0 1px 3px rgba(0,40,80,0.06);
  --shadow: 0 2px 8px rgba(0,40,80,0.08);
  --shadow-md: 0 4px 16px rgba(0,40,80,0.12);
  --shadow-lg: 0 8px 32px rgba(0,40,80,0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

img { max-width: 100%; height: auto; }

/* ─── Sticky Header / Navbar ─── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0,40,80,0.04);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.site-header .logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-header .logo:hover { color: var(--primary); text-decoration: none; }

/* ─── Header search ─── */
.header-search {
  position: relative;
  flex: 1;
  max-width: 320px;
  margin: 0 1.5rem;
}
.hdr-search-input {
  width: 100%;
  padding: 0.45rem 0.9rem;
  border: 1.5px solid var(--border-light);
  border-radius: 99px;
  font-size: 0.875rem;
  background: #f4f7fa;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}
.hdr-search-input:focus {
  border-color: var(--primary);
  background: #fff;
}
.hdr-results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 200;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,40,80,0.15);
  overflow: hidden;
}
.hdr-results-list {
  list-style: none;
  margin: 0;
  padding: 0.4rem 0;
  max-height: 300px;
  overflow-y: auto;
}
.hdr-results-list li a {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 1rem;
  text-decoration: none;
  color: var(--text);
  transition: background 0.15s;
  font-size: 0.9rem;
}
.hdr-results-list li a:hover { background: #f0f6ff; }
.hdr-results-list li a strong { font-weight: 600; }
.hdr-results-list li a span { font-size: 0.8rem; color: var(--text-secondary); }
@media (max-width: 600px) {
  .header-search { max-width: 140px; margin: 0 0.5rem; }
  .hdr-search-input { font-size: 0.8rem; padding: 0.35rem 0.7rem; }
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition);
}

.nav-links a:hover { color: var(--primary); text-decoration: none; }

/* ─── Layout ─── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ─── Breadcrumb ─── */
.breadcrumb {
  background: var(--bg);
  padding: 0.65rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.85rem;
}

.breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: 0.15rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: '›';
  margin: 0 0.5rem;
  color: var(--border);
  font-weight: 300;
}

.breadcrumb-item a { color: var(--text-secondary); }
.breadcrumb-item:last-child a { color: var(--text); font-weight: 500; pointer-events: none; }

/* ─── Hero ─── */
.hero {
  background: linear-gradient(135deg, #023e8a 0%, #0077b6 35%, #00b4d8 70%, #48cae4 100%);
  color: white;
  padding: 3rem 1.25rem;
  text-align: center;
  position: relative;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 0.35rem;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.hero .subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 400;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.hero .badge {
  display: inline-block;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: 24px;
  padding: 0.3rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* ─── Wave Divider ─── */
.wave-divider {
  display: block;
  width: 100%;
  line-height: 0;
  margin-top: -1px;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 48px;
}

.wave-divider-flip {
  transform: rotate(180deg);
}

/* ─── Home Hero ─── */
.home-hero {
  background: linear-gradient(135deg, #023e8a 0%, #0077b6 30%, #0096c7 55%, #00b4d8 80%, #48cae4 100%);
  color: white;
  padding: 5rem 1.25rem 3.5rem;
  text-align: center;
  position: relative;
}

.home-hero h1 {
  font-size: 3rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  letter-spacing: -0.03em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.home-hero .tagline {
  font-size: 1.3rem;
  opacity: 0.92;
  margin-bottom: 2rem;
  font-weight: 400;
}

.home-hero .search-input {
  max-width: 520px;
  margin: 0 auto;
  display: block;
  border: none;
  font-size: 1.05rem;
  padding: 1rem 1.5rem;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
  transition: box-shadow var(--transition), transform var(--transition);
}

.home-hero .search-input:focus {
  box-shadow: 0 6px 28px rgba(0,0,0,0.25);
  transform: translateY(-1px);
}

/* ─── Stat Counters ─── */
.stat-bar {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  padding: 1.5rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

.stat-item {
  text-align: center;
  min-width: 100px;
}

.stat-number {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.15rem;
}

/* ─── Section Headings ─── */
.section-heading {
  text-align: center;
  margin-bottom: 1.75rem;
}

.section-heading h2 {
  font-size: 1.65rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.section-heading p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* ─── Cards ─── */
.card-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  padding: 1rem 0;
}

@media (min-width: 768px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 1.5rem;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card h2, .card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* About card special styling */
.card.about-card {
  border-left: 4px solid var(--primary-light);
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-secondary) 100%);
}

.card.about-card p {
  line-height: 1.8;
  color: var(--text);
  font-size: 1rem;
}

/* ─── Info List (key-value table) ─── */
.info-list {
  list-style: none;
}

.info-list li {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 0.75rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 0.92rem;
  align-items: baseline;
}

.info-list li:last-child { border-bottom: none; }

.info-list .label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-list .value {
  font-weight: 600;
  color: var(--text);
}

/* ─── Facility Badges ─── */
.facility-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.facility-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 500;
  transition: all var(--transition);
}

.facility-badge.available {
  background: var(--success-light);
  border-color: #a5d6a7;
  color: #1b5e20;
}

/* Safety facilities: green */
.facility-badge.cat-safety {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}

/* Food facilities: amber */
.facility-badge.cat-food {
  background: #fff8e1;
  border-color: #ffe082;
  color: #f57f17;
}

/* Transport facilities: blue */
.facility-badge.cat-transport {
  background: #e3f2fd;
  border-color: #90caf9;
  color: #1565c0;
}

/* Recreation facilities: purple */
.facility-badge.cat-recreation {
  background: #f3e5f5;
  border-color: #ce93d8;
  color: #7b1fa2;
}

/* Amenity facilities: teal */
.facility-badge.cat-amenity {
  background: #e0f2f1;
  border-color: #80cbc4;
  color: #00695c;
}

.facility-badge.unavailable {
  background: #f8f9fa;
  border-color: #e8eaed;
  color: #b0b8c1;
  text-decoration: line-through;
  opacity: 0.6;
}

/* ─── Patrol Status ─── */
.patrol-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
}

.patrol-status.patrolled {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.patrol-status.unpatrolled {
  background: #fff3e0;
  color: #e65100;
  border: 1px solid #ffcc80;
}

/* ─── Tags ─── */
.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.2rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ─── Map ─── */
.map-container {
  width: 100%;
  height: 300px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--border);
}

.map-container iframe { width: 100%; height: 100%; border: none; }

/* ─── Nearby Beaches ─── */
.nearby-list { list-style: none; }

.nearby-list li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--border-light);
}

.nearby-list li:last-child { border-bottom: none; }

.nearby-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem 0;
  transition: color var(--transition);
}

.nearby-list a:hover { text-decoration: none; color: var(--primary-dark); }

.nearby-list .beach-state {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ─── Search ─── */
.search-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
}

.search-input {
  width: 100%;
  padding: 0.85rem 1.15rem;
  font-size: 1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--bg);
  color: var(--text);
}

.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.12);
}

.search-input::placeholder { color: #9aabba; }

.search-results {
  list-style: none;
  margin-top: 0.5rem;
  border-radius: var(--radius);
  overflow: hidden;
}

.search-results li {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-light);
  transition: background var(--transition);
}

.search-results li:hover { background: var(--bg-secondary); }

.search-results li:last-child { border-bottom: none; }

.search-results li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.search-results .beach-suburb {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 400;
}

/* ─── State Cards (homepage) ─── */
.state-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .state-cards { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .state-cards { grid-template-columns: repeat(4, 1fr); }
}

.state-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 1.5rem 1rem;
  text-align: center;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.state-card::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  opacity: 0;
  transition: opacity var(--transition);
}

.state-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  text-decoration: none;
  border-color: var(--primary-light);
}

.state-card:hover::before { opacity: 1; }

.state-card .state-emoji {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  display: block;
}

.state-card .state-name {
  font-weight: 700;
  color: var(--text);
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}

.state-card .beach-count {
  color: var(--text-secondary);
  font-size: 0.82rem;
  margin-top: 0.2rem;
  font-weight: 500;
}

/* ─── Featured Beaches ─── */
.featured-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (min-width: 640px) {
  .featured-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 900px) {
  .featured-grid { grid-template-columns: repeat(4, 1fr); }
}

.featured-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: block;
}

.featured-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px) scale(1.02);
  text-decoration: none;
}

.featured-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.featured-card:hover img {
  transform: scale(1.08);
}

.featured-card .featured-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.25rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(0,20,40,0.85));
  color: white;
}

.featured-card .featured-name {
  font-size: 0.95rem;
  font-weight: 700;
  display: block;
  letter-spacing: -0.01em;
}

.featured-card .featured-state {
  font-size: 0.75rem;
  opacity: 0.85;
  font-weight: 400;
}

/* ─── Beach List (state pages) ─── */
.beach-list { list-style: none; }

.beach-list li {
  background: var(--bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
  padding: 0.85rem 1.15rem;
  margin-bottom: 0.6rem;
  transition: all var(--transition);
}

.beach-list li:hover {
  box-shadow: var(--shadow);
  transform: translateX(4px);
  border-left-color: var(--primary);
}

.beach-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.beach-list a:hover { text-decoration: none; }

.beach-list .beach-meta {
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 400;
}

/* ─── State Stat Bar ─── */
.state-stat-bar {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.25rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border-light);
}

.state-stat-bar .stat-item { min-width: 80px; }

.state-stat-bar .stat-number {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.state-stat-bar .stat-label {
  font-size: 0.72rem;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ─── About Section ─── */
.about-section {
  padding: 3rem 0;
  text-align: center;
}

.about-section h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 0.75rem;
  color: var(--text);
  letter-spacing: -0.02em;
}

.about-section p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1rem;
}

/* ─── Footer ─── */
footer {
  position: relative;
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 2.5rem 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  margin-top: 3rem;
}

footer::before {
  content: '';
  position: absolute;
  top: -24px;
  left: 0;
  right: 0;
  height: 24px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 24'%3E%3Cpath d='M0,24 L0,12 Q300,0 600,12 Q900,24 1200,12 L1200,24 Z' fill='%231a2634'/%3E%3C/svg%3E") center/cover no-repeat;
}

footer a {
  color: rgba(255,255,255,0.85);
  transition: color var(--transition);
}

footer a:hover { color: white; }

footer .footer-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
  margin-bottom: 0.5rem;
}

footer .footer-links {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  opacity: 0.65;
}

footer .footer-links a { opacity: 0.85; }
footer .footer-links a:hover { opacity: 1; }

/* ─── Weather & Conditions Box ─── */
.weather-box {
  text-align: center;
  margin-top: 1.25rem;
  padding: 1.25rem;
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.weather-box h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.weather-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

/* ─── Utility ─── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* ─── Responsive ─── */
@media (max-width: 640px) {
  .hero h1 { font-size: 1.65rem; }
  .hero { padding: 2rem 1rem; }
  .home-hero h1 { font-size: 2rem; }
  .home-hero .tagline { font-size: 1.05rem; }
  .home-hero { padding: 3rem 1rem 2.5rem; }
  .stat-bar { gap: 1rem; padding: 1rem; }
  .stat-number { font-size: 1.35rem; }
  .stat-label { font-size: 0.7rem; }
  .featured-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
  .state-cards { gap: 0.75rem; }
  .info-list li { grid-template-columns: 110px 1fr; gap: 0.5rem; font-size: 0.88rem; }
  .card { padding: 1.15rem; }
  .site-header .container { height: 48px; }
  .site-header .logo { font-size: 1.1rem; }
  footer { padding: 2rem 1rem; }
}

@media (max-width: 380px) {
  .home-hero h1 { font-size: 1.65rem; }
  .stat-bar { gap: 0.75rem; }
  .featured-grid { grid-template-columns: 1fr; }
  .state-cards { grid-template-columns: repeat(2, 1fr); }
  .info-list li { grid-template-columns: 1fr; }
  .info-list .value { margin-top: 0.1rem; }
}

/* ─── Food section ─── */
.food-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.food-item { background: #f8fafc; border: 1px solid var(--border-light); border-radius: 10px; padding: 0.75rem 1rem; }
.food-name { font-weight: 600; font-size: 0.95rem; color: var(--text); }
.food-meta { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }
.card-note { font-size: 0.82rem; color: var(--text-secondary); margin: -0.25rem 0 0.5rem; }
.food-hidden { display: none; margin-top: 0.75rem; }
.food-toggle { margin-top: 0.75rem; background: none; border: 1.5px solid var(--primary); color: var(--primary); border-radius: 99px; padding: 0.4rem 1.1rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.15s, color 0.15s; }
.food-toggle:hover { background: var(--primary); color: #fff; }
