/* === Playas Cerca / PlayaCheck === */
:root {
  --brand: #0891B2;
  --brand-hover: #0E7490;
  --brand-light: #ECFEFF;
  --text: #1F2937;
  --text-muted: #6B7280;
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --border: #E5E7EB;
  --radius: 12px;
  --temp-cold: #3B82F6;
  --temp-cool: #22C55E;
  --temp-warm: #F97316;
  --temp-hot: #EF4444;
  --temp-unknown: #9CA3AF;
}

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

body {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* --- Header --- */
.header {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header__inner {
  display: flex;
  align-items: center;
  height: 56px;
  gap: 24px;
}
.header__logo {
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  white-space: nowrap;
}
.header__logo:hover { text-decoration: none; }
.header__nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
  font-weight: 500;
}
.header__nav a { color: var(--text-muted); }
.header__nav a:hover { color: var(--brand); text-decoration: none; }
/* --- Language switcher --- */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  margin-left: auto;
  margin-right: 8px;
}
.lang-switch__active {
  color: var(--brand);
}
.lang-switch__link {
  color: var(--text-muted);
  text-decoration: none;
}
.lang-switch__link:hover {
  color: var(--brand);
  text-decoration: none;
}

.header__menu {
  display: none;
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* --- Hero --- */
.hero {
  padding: 32px 0 16px;
}
.hero h1 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.3;
}
.hero__sub {
  color: var(--text-muted);
  margin-top: 6px;
  font-size: 15px;
}
.btn-nearby {
  display: inline-block;
  margin-top: 12px;
  padding: 10px 20px;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-nearby:hover { background: var(--brand-hover); }

/* --- Map --- */
.map-section {
  margin: 16px 0 24px;
  position: relative;
}
.map-compact {
  height: 50vh;
  min-height: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.map-beach {
  height: 300px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F3F4F6;
  cursor: pointer;
  transition: background 0.2s;
}
.map-placeholder:hover { background: #E5E7EB; }
.map-placeholder__text {
  font-size: 16px;
  font-weight: 600;
  color: var(--brand);
}
.map-expand-btn {
  display: inline-block;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 500;
}

/* --- Section --- */
.section {
  margin-bottom: 32px;
}
.section h2 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
}

/* --- Beach table --- */
.beach-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.beach-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.beach-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
}
.beach-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.beach-table tbody tr {
  cursor: pointer;
  transition: background 0.15s;
}
.beach-table tbody tr:hover {
  background: var(--brand-light);
}
.beach-table .temp-hot td:first-child { border-left: 3px solid var(--temp-hot); }
.beach-table .temp-warm td:first-child { border-left: 3px solid var(--temp-warm); }
.beach-table .temp-cool td:first-child { border-left: 3px solid var(--temp-cool); }
.beach-table .temp-cold td:first-child { border-left: 3px solid var(--temp-cold); }

/* --- Region cards --- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.region-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color 0.2s, box-shadow 0.2s;
  color: var(--text);
}
.region-card:hover {
  border-color: var(--brand);
  box-shadow: 0 2px 8px rgba(8, 145, 178, 0.1);
  text-decoration: none;
}
.region-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.region-card__stats {
  display: flex;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

/* --- Tag cloud (cities) --- */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.15s;
}
.tag:hover {
  background: var(--brand-light);
  border-color: var(--brand);
  text-decoration: none;
  color: var(--brand);
}

/* --- Weather cards (beach page) --- */
.weather-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin: 20px 0;
}
.weather-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.weather-card__icon { font-size: 24px; display: block; }
.weather-card__label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 4px 0;
  display: block;
}
.weather-card__value {
  font-size: 22px;
  font-weight: 700;
  display: block;
}
.weather-card.temp-hot { border-color: var(--temp-hot); }
.weather-card.temp-warm { border-color: var(--temp-warm); }
.weather-card.temp-cool { border-color: var(--temp-cool); }
.weather-card.temp-cold { border-color: var(--temp-cold); }

/* --- Beach detail --- */
.beach-location {
  color: var(--text-muted);
  margin-bottom: 16px;
  font-size: 15px;
}
.breadcrumb {
  padding: 16px 0 8px;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--brand); }

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.detail {
  padding: 8px 0;
  font-size: 14px;
}
.detail strong {
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* --- Facilities --- */
.facilities-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.facility {
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}
.facility--yes {
  background: #ECFDF5;
  color: #065F46;
}
.facility--no {
  background: #F3F4F6;
  color: #9CA3AF;
  text-decoration: line-through;
}

/* --- Badge --- */
.badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}
.badge--blue-flag {
  background: #DBEAFE;
  color: #1E40AF;
}

/* --- Highlight box --- */
.highlight-box {
  background: var(--brand-light);
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  font-size: 18px;
}
.highlight-box strong {
  font-size: 36px;
  display: block;
  color: var(--brand);
}

/* --- FAQ --- */
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  background: var(--card);
}
.faq-item summary {
  padding: 14px 16px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+ "; color: var(--brand); font-weight: 700; }
.faq-item[open] summary::before { content: "- "; }
.faq-item p {
  padding: 0 16px 14px;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --- Footer --- */
.footer {
  margin-top: 48px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.footer p { margin: 4px 0; }

/* --- Mobile --- */
@media (max-width: 768px) {
  .header__nav { display: none; flex-direction: column; position: absolute; top: 56px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 16px; gap: 12px; }
  .header__nav.open { display: flex; }
  .header__menu { display: block; }
  .hero h1 { font-size: 22px; }
  .weather-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid { grid-template-columns: 1fr; }
  .beach-table { font-size: 13px; }
  .beach-table th, .beach-table td { padding: 8px; }
}

/* --- Dark mode --- */
@media (prefers-color-scheme: dark) {
  :root {
    --text: #F3F4F6;
    --text-muted: #9CA3AF;
    --bg: #111827;
    --card: #1F2937;
    --border: #374151;
    --brand-light: #164E63;
  }
  .header { background: #1F2937; }
  .header__nav { background: #1F2937; }
  .facility--yes { background: #064E3B; color: #6EE7B7; }
  .facility--no { background: #1F2937; color: #4B5563; }
  .badge--blue-flag { background: #1E3A5F; color: #93C5FD; }
}
