/* =========================================================
   WEATHER STATION BIMS
   Astronomie - gemeenschappelijke stylesheet
   ========================================================= */

:root {
  color-scheme: dark;

  --background: #080f20;
  --panel: #141f32;
  --border: #29374d;
  --text: #e2e8f0;
  --muted: #94a7c0;
  --accent: #ffb547;
  --above: #86c5a5;
  --below: #94a7c0;
}

/* =========================================================
   ALGEMENE INSTELLINGEN
   ========================================================= */

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;

  background: radial-gradient(
    ellipse at 20% 0%,
    #19263d 0%,
    var(--background) 55%
  );

  color: var(--text);

  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;

  line-height: 1.6;
}

.page-container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 30px 35px;
}

/* BIMS-logo */

.site-header {
  padding-bottom: 25px;
  margin-bottom: 35px;
  border-bottom: 1px solid var(--border);
}

.site-header img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 65px;
}

/* Astronomische rubriek */

.section-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 3px;
  margin-bottom: 25px;
}

/* =========================================================
   HOOFDINDELING
   ========================================================= */

.planet-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 45px;
}

/* =========================================================
   LINKERDEEL - HEMELLICHAAM
   ========================================================= */

.planet-intro h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 300;
  letter-spacing: 2px;
  line-height: 1.1;
  color: var(--accent);
  margin: 0 0 10px;
}

.planet-subtitle {
  color: var(--muted);
  font-size: 19px;
  margin: 0 0 25px;
}

.planet-photo {
  display: block;
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  border-radius: 12px;
  mix-blend-mode: screen;
}

.planet-description {
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
  margin-top: 25px;
}

/* Fotografische bronvermelding */

.photo-credit {
  text-align: center;
  font-size: 9px;
  font-style: italic;
  color: var(--muted);
  margin: -20px 0 25px;
}

/* =========================================================
   RECHTERDEEL - ACTUELE POSITIE
   ========================================================= */

.position-card {
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;

  padding: 15px 25px;
  text-align: center;
  min-width: 0;
}

.position-card h2 {
  font-size: 23px;
  font-weight: 400;
  margin: 0;
}

.position-location {
  font-size: 13px;
  color: var(--muted);
  margin: 5px 0 20px;
}

/* Universeel SVG-kompas */

.astro-compass {
  width: 100%;
  max-width: 450px;
  margin: 0 auto;
  background: transparent;
}

.astro-compass svg {
  display: block;
  width: 100%;
  height: auto;
}

/* Status boven of onder de horizon */

.astro-status {
  font-size: 15px;
  margin: 5px 0 25px;
}

.astro-status.above {
  color: var(--above);
}

.astro-status.below {
  color: var(--below);
}

/* Opkomst en ondergang */

.astro-events {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;

  border-top: 1px solid var(--border);
  padding-top: 20px;
}

.astro-event-label {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.astro-event-value {
  color: var(--accent);
  font-size: 23px;
  font-weight: 400;
  line-height: 1.5;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}

.astro-event-date {
  color: var(--muted);
  font-size: 12px;
}

/* Bron en actualisering */

.position-source {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 20px 0 0;
}

/* =========================================================
   ONDERDEEL - ASTRONOMISCHE KERNGEGEVENS
   ========================================================= */

.planet-facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  margin-top: 45px;
}

.fact {
  background-color: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 10px;
  padding: 20px 15px;
}

.fact span {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}

.fact strong {
  display: block;
  font-size: 22px;
  font-weight: 400;
  color: var(--accent);
}

/* =========================================================
   ONDERZIJDE PAGINA
   ========================================================= */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;

  margin-top: 50px;
  padding: 25px 0;
  border-top: 1px solid var(--border);
}

.back-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
}

.back-link:hover {
  color: #ffffff;
}

.copyright {
  color: var(--muted);
  font-size: 12px;
}

/* =========================================================
   UITLEGKNOP
   ========================================================= */

.uitleg-button {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 8px;
  padding: 10px 20px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  margin-top: 25px;
}

.uitleg-button:hover {
  background-color: var(--accent);
  color: var(--background);
}

/* =========================================================
   UITSCHUIFBAAR UITLEGVENSTER
   ========================================================= */

.slide-panel {
  position: fixed;
  top: 0;
  left: 0;
  transform: translateX(-105%);
  width: 100%;
  max-width: 450px;
  height: 100%;

  background-color: var(--panel);
  color: var(--text);
  border-right: 1px solid var(--border);

  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.4);
  overflow-y: auto;
  transition: transform 0.6s ease;
  padding: 30px;
  z-index: 2000;
  visibility: hidden;
}

.slide-panel.active {
  transform: translateX(0);
  visibility: visible;
}

.slide-panel h2 {
  color: var(--accent);
  font-weight: 400;
  margin-top: 0;
}

.slide-panel h3 {
  color: var(--accent);
  font-size: 16px;
  font-weight: 400;
  margin-top: 25px;
}

.slide-panel li {
  margin-bottom: 12px;
}

.close-btn {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
}

.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1500;
}

.overlay.active {
  display: block;
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {
  .planet-grid {
    gap: 25px;
  }

  .planet-facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .position-card {
    padding: 15px 10px;
  }
}

/* =========================================================
   MOBIELE TELEFOON
   ========================================================= */

@media (max-width: 768px) {
  .page-container {
    padding: 20px;
  }

  .planet-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .planet-intro h1 {
    font-size: 48px;
  }

  .planet-subtitle {
    font-size: 17px;
  }

  .planet-photo {
    max-width: 350px;
  }

  .position-card {
    padding: 10px 0;
  }

  .fact strong {
    font-size: 19px;
  }

  .site-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .astro-events {
    gap: 10px;
  }

  .astro-event-label {
    font-size: 9px;
    letter-spacing: 1px;
  }

  .astro-event-value {
    font-size: 21px;
  }
}
/* =====================================================
   ASTRONOMISCH OVERZICHT
   ===================================================== */

.overview-intro h1 {
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 300;
  letter-spacing: 1px;
  line-height: 1.2;
  margin: 0 0 12px;
}

.overview-subtitle {
  font-size: 19px;
  color: var(--muted);
  margin: 0 0 20px;
}

.overview-description {
  max-width: 760px;
  font-size: 15px;
  line-height: 1.8;
  color: var(--text);
}

.overview-location {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0;
  margin: 25px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}

/* Overzichtskaarten */

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.overview-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 12px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.overview-card:hover {
  border-color: var(--accent);
}

/* Afbeeldingen */

.overview-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 210px;
  padding: 20px;
}

.overview-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
}

.overview-placeholder {
  font-size: 110px;
  font-weight: 300;
  color: var(--accent);
  opacity: 0.65;
}

/* Inhoud */

.overview-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 0 22px 22px;
}

.overview-content h2 {
  font-size: 30px;
  font-weight: 300;
  color: var(--accent);
  margin: 0;
}

.overview-type {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 20px;
}

.overview-status {
  font-size: 13px;
  margin-bottom: 18px;
}

.overview-status.above {
  color: var(--above);
}

.overview-status.below {
  color: var(--below);
}

/* Astronomische gegevens */

.overview-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 15px 0;
}

.overview-values span,
.overview-rise span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.overview-values strong {
  display: block;
  font-size: 19px;
  font-weight: 400;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.overview-rise {
  margin: 18px 0 22px;
}

.overview-rise strong {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--text);
  margin-top: 4px;
}

/* Hyperlinks */

.overview-link {
  display: block;
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  text-align: center;
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  transition: background 0.3s ease;
}

.overview-link:hover {
  background: var(--accent);
  color: var(--background);
}

.overview-unavailable {
  margin-top: auto;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}

.overview-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.8;
  margin: 30px 0 0;
}

/* Tablet */

@media (max-width: 1000px) {
  .overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Telefoon */

@media (max-width: 600px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .overview-image {
    height: 220px;
  }

  .overview-location {
    flex-direction: column;
  }

  .overview-content h2 {
    font-size: 28px;
  }
}

/* =====================================================
   DYNAMISCHE MAAN - OVERZICHT
   ===================================================== */

.overview-moon {
  width: 100%;
  max-width: 180px;
  margin: 0 auto;
}

.overview-moon svg {
  display: block;
  width: 100%;
  height: auto;
}

/* =====================================================
   MAAN - SPECIFIEKE DETAILPAGINA
   ===================================================== */

.detail-moon {
  width: 100%;
  max-width: 350px;
  margin: 20px auto;
}

.detail-moon svg {
  display: block;
  width: 100%;
  height: auto;
}

.moon-phase-info {
  text-align: center;
  margin: 15px 0 35px;
}

#moon-phase-name {
  font-size: 21px;
  font-weight: 400;
  color: var(--accent);
}

#moon-illumination {
  font-size: 36px;
  font-weight: 300;
  color: var(--accent);
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.moon-illumination-label {
  font-size: 12px;
  color: var(--muted);
}

.moon-calendar {
  margin-top: 40px;
}

.moon-calendar h2 {
  font-size: 23px;
  font-weight: 400;
  margin: 0 0 20px;
}

.moon-calendar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
}

.moon-calendar-grid .fact {
  text-align: center;
}

.moon-calendar-grid .fact strong {
  font-size: 16px;
  line-height: 1.6;
}

.moon-phase-symbol {
  font-size: 38px;
  color: var(--accent);
  line-height: 1.4;
  margin-bottom: 10px;
}

@media (max-width: 900px) {
  .moon-calendar-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .detail-moon {
    max-width: 280px;
  }

  .moon-calendar-grid .fact strong {
    font-size: 14px;
  }
}

/* =====================================================
   EINDE MAAN - SPECIFIEKE DETAILPAGINA
   ===================================================== */

/* =====================================================
   EINDE ASTRONOMISCH OVERZICHT
   ===================================================== */
