/* CSS Design System - Eclipse Solar Total 2027 (Sur de España) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #07090e;
  --bg-card: #0f1523;
  --bg-card-hover: #161e33;
  --border-card: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(251, 191, 36, 0.4);
  --accent-gold: #fbbf24;
  --accent-gold-glow: rgba(251, 191, 36, 0.25);
  --accent-violet: #8b5cf6;
  --accent-cyan: #38bdf8;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --shadow-glow: 0 0 25px rgba(251, 191, 36, 0.15);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --transition-fast: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
}

/* Background Atmosphere */
.space-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: 
    radial-gradient(circle at 15% 20%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 75%, rgba(251, 191, 36, 0.06) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(15, 21, 35, 1) 0%, rgba(7, 9, 14, 1) 100%);
  z-index: -1;
  pointer-events: none;
}

/* Header & Hero Section */
.hero-banner {
  position: relative;
  background: linear-gradient(180deg, rgba(15, 21, 35, 0.8) 0%, rgba(7, 9, 14, 0.95) 100%);
  border-bottom: 1px solid var(--border-card);
  padding: 3rem 1.5rem 2.5rem 1.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
}

.corona-halo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: radial-gradient(circle, #000 50%, var(--accent-gold) 100%);
  box-shadow: 0 0 35px var(--accent-gold), 0 0 60px rgba(251, 191, 36, 0.4);
  animation: pulseCorona 4s ease-in-out infinite alternate;
  margin-bottom: 1.25rem;
}

@keyframes pulseCorona {
  0% { box-shadow: 0 0 25px var(--accent-gold), 0 0 50px rgba(251, 191, 36, 0.3); transform: scale(1); }
  100% { box-shadow: 0 0 45px var(--accent-gold), 0 0 80px rgba(251, 191, 36, 0.6); transform: scale(1.05); }
}

.hero-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 30%, var(--accent-gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto 2rem auto;
}

/* Countdown Clock Component */
.countdown-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
  flex-wrap: wrap;
}

.countdown-box {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.25rem;
  min-width: 90px;
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-glow);
  text-align: center;
}

.countdown-val {
  font-family: 'Outfit', sans-serif;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-gold);
  line-height: 1;
}

.countdown-lbl {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* Eclipse Quick Stats Strip */
.eclipse-stats-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.stat-chip {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
}

.stat-icon {
  font-size: 1.6rem;
  color: var(--accent-gold);
}

.stat-chip h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

.stat-chip p {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Main Container Layout */
.main-wrapper {
  max-width: 1350px;
  margin: 2rem auto;
  padding: 0 1.25rem;
}

/* Map Section */
.map-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 2.5rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.section-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-card);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  background: rgba(255, 255, 255, 0.02);
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#map {
  height: 480px;
  width: 100%;
  z-index: 1;
  background: #0b0e17;
}

/* Custom Leaflet Dark Popup */
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-gold) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7) !important;
  padding: 0 !important;
}

.leaflet-popup-tip {
  background: var(--bg-card) !important;
  border: 1px solid var(--border-gold) !important;
}

.map-popup-card {
  width: 260px;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.map-popup-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.map-popup-body {
  padding: 0.85rem;
}

.map-popup-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
  color: #fff;
}

.map-popup-tag {
  display: inline-block;
  background: rgba(251, 191, 36, 0.15);
  color: var(--accent-gold);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-sm);
  padding: 0.2rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

/* Filters Control Bar */
.filters-bar {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  align-items: center;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.filter-select, .filter-input {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  color: var(--text-main);
  padding: 0.65rem 0.85rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition-fast);
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.2);
}

/* Grid Layout for Accommodation Cards */
.accommodations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

/* Accommodation Card */
.acc-card {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-fast);
  position: relative;
}

.acc-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-gold);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5), 0 0 20px rgba(251, 191, 36, 0.12);
}

.acc-image-box {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.acc-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.acc-card:hover .acc-img {
  transform: scale(1.06);
}

.acc-badge-platform {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(7, 9, 14, 0.85);
  backdrop-filter: blur(8px);
  color: #fff;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.acc-badge-totality {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.95), rgba(217, 119, 6, 0.95));
  color: #000;
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.acc-body {
  padding: 1.35rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.acc-location {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent-gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.35rem;
}

.acc-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.65rem;
  line-height: 1.3;
}

.acc-capacity {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Sightline Geometry Specs Box */
.sightline-box {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  margin-bottom: 1rem;
}

.sightline-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  margin-bottom: 0.4rem;
}

.sightline-row:last-child {
  margin-bottom: 0;
}

.sightline-label {
  color: var(--text-muted);
}

.sightline-value {
  font-weight: 700;
  color: var(--text-main);
}

/* Orientation Score Meter */
.meter-container {
  height: 6px;
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 0.3rem;
}

.meter-fill {
  height: 100%;
  background: linear-gradient(90deg, #8b5cf6 0%, #fbbf24 100%);
  border-radius: 3px;
}

.availability-notice {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: #fca5a5;
  border-radius: var(--radius-sm);
  padding: 0.6rem 0.75rem;
  font-size: 0.78rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.acc-footer {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-card);
}

.price-tag {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
}

.price-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  display: block;
}

.btn-booking {
  background: linear-gradient(135deg, var(--accent-gold), #d97706);
  color: #000;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.65rem 1.1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  transition: var(--transition-fast);
}

.btn-booking:hover {
  box-shadow: 0 0 15px rgba(251, 191, 36, 0.4);
  transform: translateY(-1px);
}

.btn-detail {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  border: 1px solid var(--border-card);
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition-fast);
}

.btn-detail:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* Eclipse Simulator Section */
.simulator-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: var(--shadow-glow);
}

.simulator-flex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

@media (max-width: 850px) {
  .simulator-flex {
    grid-template-columns: 1fr;
  }
}

.canvas-container {
  background: #05070c;
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  position: relative;
  overflow: hidden;
  height: 300px;
}

#eclipseCanvas {
  width: 100%;
  height: 100%;
}

/* Useful Links Section */
.links-section {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 3rem;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.link-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  padding: 1.1rem;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition-fast);
}

.link-card:hover {
  border-color: var(--accent-gold);
  background: rgba(251, 191, 36, 0.05);
  transform: translateY(-2px);
}

.link-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--accent-gold);
  margin-bottom: 0.35rem;
}

.link-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem 1.5rem;
  border-top: 1px solid var(--border-card);
  color: var(--text-dim);
  font-size: 0.85rem;
}

/* Modal Lightbox */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem;
  position: relative;
  box-shadow: 0 25px 60px rgba(0,0,0,0.8);
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
}

/* Responsiveness */
@media (max-width: 640px) {
  .hero-banner {
    padding: 2rem 1rem 1.5rem 1rem;
  }
  .countdown-box {
    min-width: 70px;
    padding: 0.5rem;
  }
  .countdown-val {
    font-size: 1.4rem;
  }
  .accommodations-grid {
    grid-template-columns: 1fr;
  }
  .filters-bar {
    grid-template-columns: 1fr;
  }
}
