@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    color-scheme: light dark;
    --color-accent: #4a9eff;
    --color-moon: #f4f1de;
    --color-sun: #ffb627;
    --color-eclipse: #8b5cf6;
    --color-launch: #ff4757;
    --color-dark: #0e1b34;
  --color-light: rgba(18,24,35,0.85);

    --page-bg: #f4f1de;
    --page-text: #121823;
    --section-bg: rgba(7, 11, 22, 0.98);
    --section-text: #e7e9ef;
    --header-bg: rgba(10, 16, 34, 0.96);
    --panel-bg: rgba(6, 10, 29, 1);
    --surface: rgba(255, 255, 255, 0.08);
    --surface-strong: rgba(255, 255, 255, 0.14);
    --shadow: rgba(0, 0, 0, 0.18);
    --nav-link: #fff;
    --nav-link-hover-bg: rgba(74, 158, 255, 0.18);
    --link-color: #1f5fd1;
    --link-hover-color: #0d3d8b;
    --link-on-dark: #7ec4ff;
    --link-on-dark-hover: #cdeaff;
    --image-caption-color: #e7e9ef;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page-bg: #050812;
    --page-text: #f4f4f4;
    --section-bg: #090f1f;
    --section-text: #f4f4f4;
    --header-bg: rgba(0, 0, 12, 0.92);
    --panel-bg: rgba(6, 10, 29, 1);
    --surface: rgba(255, 255, 255, 0.06);
    --surface-strong: rgba(255, 255, 255, 0.12);
    --shadow: rgba(0, 0, 0, 0.5);
    --nav-link: #f4f4f4;
    --nav-link-hover-bg: rgba(74, 158, 255, 0.22);
    --color-light: rgba(244,244,244,0.88);
    --link-color: #7ec4ff;
    --link-hover-color: #cdeaff;
    --link-on-dark: #7ec4ff;
    --link-on-dark-hover: #d9eeff;
    --image-caption-color: #f5f7ff;
  }
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

section[id],
article[id],
div[id],
header[id] {
    scroll-margin-top: 5rem;
}

body {
  min-height: 100vh;
  line-height: 1.7;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: radial-gradient(circle at top left, rgba(74, 158, 255, 0.08), transparent 24%),
              radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.05), transparent 20%),
              var(--page-bg);
  color: var(--page-text);
  overflow-x: hidden;
}

a {
  color: var(--link-color);
  transition: color 0.25s ease;
}

a:hover,
a:focus-visible {
  color: var(--link-hover-color);
}

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

html.nav-open,
body.nav-open {
  overflow: hidden;
  overscroll-behavior: none;
}

body.nav-open {
  width: 100%;
}

.skip-link {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.75rem 1rem;
  background: rgba(26, 26, 46, 0.95);
  color: white;
  transform: translateY(-120%);
  transition: transform 0.2s ease;
  z-index: 2000;
}

.skip-link:focus-visible {
  transform: translateY(0);
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

button,
.button {
  font: inherit;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.75rem;
  cursor: pointer;
  transition: transform 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  background: linear-gradient(135deg, #5f95ff, #3c78f8);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(17, 45, 78, 0.18);
}

button:hover,
.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(17, 45, 78, 0.2);
}

button.button-secondary,
.button.button-secondary {
  background: transparent;
  color: var(--color-accent);
  border: 1px solid rgba(74, 158, 255, 0.55);
}

button.button-secondary:hover,
.button.button-secondary:hover {
  background: rgba(74, 158, 255, 0.12);
}

input,
textarea {
  font: inherit;
}

/* Header styling */
#header-main {
  position: fixed;
  top: 0;
  width: 100%;
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  z-index: 1000;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border-radius: 50%;
  overflow: hidden;
  background: transparent;
}

.logo-link {
  padding: 0;
  border-radius: 50%;
}

.logo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

#navigation-main {
  display: flex;
  gap: 1.8rem;
  align-items: center;
}

.nav-link {
  position: relative;
  color: var(--nav-link);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.25s ease;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.25rem;
  height: 2px;
  background: var(--color-accent);
  opacity: 0;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-link:hover::after,
.nav-link-active::after {
  opacity: 1;
  transform: scaleX(1);
}

#mobile-navigation-main {
  display: none;
}

button.nav-link,
.dropdown-toggle {
  background: transparent;
  border: none;
  color: var(--nav-link);
  font: inherit;
  font-weight: 700;
  padding: 0;
  margin: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  text-align: left;
}

.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  width: 100%;
  padding: 0.75rem 0;
}

.dropdown-toggle,
button.nav-link {
  color: var(--nav-link);
}

.dropdown-toggle:hover,
button.nav-link:hover,
.nav-link:hover {
  color: white;
  background-color: var(--nav-link-hover-bg);
}

.mobile-menu-toggle,
.mobile-menu-close {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.4rem;
  cursor: pointer;
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  display: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.mobile-nav-backdrop.active {
  display: block;
  opacity: 1;
  visibility: visible;
  pointer-events: none;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-weight: bold;
  transition: color 0.25s ease, background-color 0.25s ease;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
  user-select: none;
}

.nav-link:hover {
  cursor: pointer;
}

/* Ensure mobile nav links are interactive and show pointer cursor */
.mobile-navigation,
.mobile-nav-link {
  pointer-events: auto !important;
  cursor: pointer !important;
}

/* Override any inherited styles that might hide the cursor */
.mobile-nav-link:hover,
.mobile-nav-link:focus {
  cursor: pointer !important;
}

/* On larger screens force-hide the mobile nav/backdrop to avoid layout bleed */
@media (min-width: 601px) {
  #mobile-navigation-main {
    display: none !important;
    transform: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
  .mobile-nav-backdrop {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

/* Explicitly show desktop navigation and hide mobile on desktop */
@media (min-width: 769px) {
  #navigation-main {
    display: flex !important;
  }
  #mobile-menu-button {
    display: none !important;
  }
  #mobile-navigation-main,
  .mobile-nav-backdrop {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
  /* Ensure body doesn't have nav-open class effects on desktop */
  body.nav-open {
    overflow: auto !important;
  }
}

/* Debug helpers (toggle by visiting ?debug=nav) */
.debug-outline {
  outline: 3px dashed rgba(255, 99, 71, 0.95) !important;
  box-shadow: 0 0 0 3px rgba(255, 99, 71, 0.06) !important;
}

.debug-log-panel {
  position: fixed;
  right: 12px;
  bottom: 12px;
  width: 320px;
  max-height: 40vh;
  overflow: auto;
  background: rgba(6,10,29,0.96);
  color: #fff;
  font-size: 12px;
  padding: 8px;
  border-radius: 8px;
  z-index: 99999;
  box-shadow: 0 8px 30px rgba(0,0,0,0.6);
}

.debug-log-panel h4 {
  margin: 0 0 6px 0;
  font-size: 12px;
  font-weight: 700;
}

.debug-log-entry {
  margin-bottom: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,0.04);
}

.nav-link:hover,
button.nav-link:hover,
.dropdown-toggle:hover {
  color: white;
  background-color: rgba(74, 158, 255, 0.18);
}

button.nav-link {
  padding: 0.25rem 0.5rem;
  border-radius: 0.35rem;
}

/* Dropdown styling */
.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: rgba(0, 0, 0, 0.98);
  min-width: 250px;
  box-shadow: 0px 8px 24px 0px rgba(0,0,0,0.3);
  z-index: 1;
  border-radius: 6px;
  margin-top: 0.5rem;
  left: 50%;
  transform: translateX(-50%);
}

.dropdown-content a,
.dropdown-content .sub-links a,
.dropdown-content .sub-sub-links a {
  color: #f4f4f4;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  transition: background-color 0.3s, color 0.3s;
  margin: 0;
}

.dropdown-content a:hover {
  background-color: rgba(255, 255, 255, 0.08);
  color: white;
  margin: 0;
}

/* Keep dropdown open when hovering over it */
.dropdown:hover .dropdown-content,
.dropdown .dropdown-content:hover {
  display: block;
}

/* Extend hover area to include gap */
.dropdown::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  height: 0.5rem;
}

/* Nested dropdown */
.sub-links {
  padding-left: 16px;
  background-color: rgba(20, 20, 20, 0.5);
}

.sub-links a {
  padding-left: 28px;
  font-size: 0.95rem;
}

.sub-sub-links {
  padding-left: 16px;
  background-color: rgba(10, 10, 10, 0.5);
}

.sub-sub-links a {
  padding-left: 44px;
  font-size: 0.9rem;
}

/* Sections */
section {
  min-height: auto;
  padding: 5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--section-bg);
  color: var(--section-text);
  scroll-margin-top: 80px;
}

section a:not(.button):not(.nav-link) {
  color: var(--link-on-dark);
}

section a:not(.button):not(.nav-link):hover,
section a:not(.button):not(.nav-link):focus-visible {
  color: var(--link-on-dark-hover);
}

@media (max-width: 900px) {
  section {
    padding: 3rem 1.5rem;
  }

  .feature-card-grid,
  .gallery-page-grid {
    grid-template-columns: 1fr;
  }
}

/* CTA section needs extra top padding for fixed header */
#section-cta {
  padding-top: 8rem;
  padding-bottom: 3rem;
  background: radial-gradient(circle at 50% 10%, rgba(74, 158, 255, 0.2), transparent 38%),
              linear-gradient(180deg, rgba(7, 11, 22, 0.95), rgba(7, 11, 22, 0.98));
}

.content-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.cta-container {
  width: 100%;
  max-width: 1100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  padding: 1rem 0;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.hero-actions .button {
  min-width: 180px;
}

.cta-container h1 {
  font-size: clamp(3rem, 4vw, 4.4rem);
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.03em;
  max-width: 12ch;
}

.cta-container h2 {
  max-width: 42rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(1.25rem, 1.65vw, 1.75rem);
  line-height: 1.6;
}

.cta-img {
  width: 50%;
  max-width: 520px;
  height: auto;
  object-fit: contain;
  border-radius: 22px;
  box-shadow: 0 42px 90px rgba(0, 0, 0, 0.2);
}

#section-about {
  flex-direction: column;
}

#section-about .content-wrapper {
  text-align: center;
}

#section-about article {
  margin-top: 2rem;
}

#section-about article p {
  margin: 1rem 0;
}

#section-about article hr {
  border: none;
  border-top: 1px solid rgba(134, 145, 156, 0.3);
  margin: 1.5rem auto;
  width: 50%;
}

.section-heading, .heading {
  font-size: clamp(2.4rem, 2.8vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
  position: relative;
  text-align: center;
}

.section-heading::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.7rem;
  transform: translateX(-50%);
  width: 4rem;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--color-accent), rgba(74, 158, 255, 0.45));
}

.section-subheading, .subheading {
  font-size: clamp(1.4rem, 1.8vw, 1.8rem);
  margin-bottom: 1.1rem;
}

.section-intro {
  max-width: 720px;
  margin: 0 auto 2rem;
  text-align: center;
  color: rgba(255,255,255,0.78);
}

.page-hero .content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 980px;
}

.page-hero .section-heading,
.page-hero .heading,
.page-hero .section-intro {
  margin-left: auto;
  margin-right: auto;
}

.feature-gallery-section {
  min-height: auto;
}

.home-update-grid {
  align-items: stretch;
}

.home-update-card {
  min-height: 100%;
}

.home-update-card-featured {
  background: linear-gradient(135deg, rgba(255, 182, 39, 0.12), rgba(74, 158, 255, 0.12)), rgba(255, 255, 255, 0.06);
}

.home-update-meta {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.feature-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 2.5rem;
}

  .feature-card,
  .gallery-card {
    position: relative;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 28px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 32px 70px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(18px);
    overflow: hidden;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
  }

  .feature-card::before,
  .gallery-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0) 55%);
    pointer-events: none;
  }

  .feature-card h3,
  .gallery-card h2 {
    font-size: 1.45rem;
    margin: 0;
    letter-spacing: 0.02em;
  }

  .feature-card p,
  .gallery-card p {
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.9;
    margin-bottom: 1.5rem;
  }

  .feature-card .button,
  .gallery-card .button {
    margin-top: auto;
  }

  .feature-card:hover,
  .gallery-card:hover {
    border-color: rgba(74, 158, 255, 0.28);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.2);
    background: rgba(255, 255, 255, 0.1);
  }

  .page-hero {
    min-height: 52vh;
    padding-top: 7rem;
    padding-bottom: 3rem;
  }

  .gallery-page-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-bottom: 2.5rem;
  }

.session-container {
  margin-top: 2rem;
}

.reviews-disclaimer {
  margin-bottom: 2rem;
}

.reviews-disclaimer p {
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.9;
  margin-bottom: 0;
}

.review-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.reviews-empty-state {
  grid-column: 1 / -1;
}

.review-link-card {
  padding: 0;
  overflow: hidden;
}

.review-card-link {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  min-height: 100%;
}

.review-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  transition: transform 0.35s ease;
}

.review-card-title {
  margin: 0;
  padding: 1.1rem 1.3rem 1.4rem;
  line-height: 1.35;
  font-size: 1.15rem;
}

.review-card-link:hover .review-card-image {
  transform: scale(1.03);
}

.review-card-link:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: -3px;
}

.session-container p {
  margin-bottom: 1rem;
  text-align: center;
}

.subheading a, p a {
  color: var(--link-on-dark);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.subheading a:hover, p a:hover {
  color: var(--link-on-dark-hover);
}

.image-group {
  display: flex;
  flex-direction: row;
  width: 100%;
  justify-content: space-evenly;
  margin: 2rem 0;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 1rem;
}

.image-container {
  width: 30%;
  text-align: center;
}

.image-container .img-link {
  display: block;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.image-container .image {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 14px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.image-container .img-link:hover .image {
  transform: scale(1.03);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.16);
}

.image-container p {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--image-caption-color);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1.5;
}

.image-group-uniform .image-container .img-link {
  aspect-ratio: 4 / 3;
}

.image-group-uniform .image-container .image {
  width: 100%;
  height: 100%;
}

.affiliate-page .content-wrapper > .feature-card + .feature-card {
  margin-top: 1.75rem;
}

.reviews-page #reviews-list + .feature-card,
.reviews-page .content-wrapper > .feature-card + .feature-card {
  margin-top: 1.75rem;
}

.guide-page .guide-card-grid > .section-subheading {
  grid-column: 1 / -1;
  margin-bottom: 0.25rem;
}

/* Project sections styling */
#section-projects {
  flex-direction: column;
}

.project-section {
  margin: 2rem 0;
}

.project-subsection {
  margin: 2rem 0;
}

.weather-panel {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}

.weather-page #page-main > section:nth-of-type(2) .content-wrapper {
  display: grid;
  gap: 1.75rem;
  align-items: start;
}

.about-page .page-copy-card + .feature-card {
  margin-top: 2.75rem;
}

.weather-page .weather-panel {
  grid-template-columns: 1fr;
  gap: 1.15rem;
}

.weather-controls {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.weather-action-row {
  display: flex;
  gap: 1rem;
  flex-wrap: nowrap;
  align-items: stretch;
}

.location-search {
  display: grid;
  grid-template-columns: minmax(140px, 0.9fr) minmax(210px, 1.3fr) auto;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
  align-items: stretch;
}

.location-search input {
  flex: 1;
  min-width: 16rem;
  padding: 0.85rem 1rem;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.95);
  caret-color: rgba(255, 255, 255, 0.95);
}

.location-search select {
  min-width: 0;
  padding: 0.85rem 1rem;
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.95);
}

.location-search #weather-search-btn,
#weather-location-btn {
  min-height: 48px;
}

#weather-location-btn {
  flex-shrink: 0;
}

.location-search #weather-search-btn {
  min-width: 5.8rem;
  padding: 0.75rem 1rem;
}

.location-search input::placeholder {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.92rem;
}

#weather-fallback-link {
  align-self: flex-start;
  font-size: 0.88rem;
  padding: 0.65rem 1rem;
}

.weather-page .weather-output {
  align-items: flex-start;
}

.weather-note {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
  max-width: 38rem;
}

.weather-output {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.clearoutside-result {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.clearoutside-result.hidden {
  display: none;
}

.clearoutside-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  align-items: center;
}

.clearoutside-location {
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
}

.clearoutside-embed {
  width: 100%;
  min-height: 740px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(6, 10, 29, 0.95);
}

.weather-status {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.98rem;
  line-height: 1.6;
}

.weather-card {
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: start;
}

.weather-card.hidden {
  display: none;
}

.weather-summary {
  display: grid;
  gap: 1rem;
}

.weather-temp {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
}

.weather-desc {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.85);
}

.weather-meta {
  display: grid;
  gap: 0.75rem;
}

.weather-meta div {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.darksky-results {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.3rem;
}

.darksky-results h4 {
  margin-top: 0;
  margin-bottom: 1rem;
  color: white;
}

.darksky-list {
  display: grid;
  gap: 0.85rem;
}

.darksky-site {
  padding: 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.darksky-site strong {
  display: block;
  margin-bottom: 0.3rem;
  color: white;
}

.darksky-site span {
  color: rgba(255, 255, 255, 0.75);
  display: block;
}

.resources-page .resource-sections {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.resources-page .resource-card {
  margin: 0;
}

.resources-page .resource-card:hover {
  transform: none;
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: 0 32px 70px rgba(0, 0, 0, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.resources-page .resource-card p {
  margin-bottom: 0.6rem;
}

.resources-page .resource-download-card {
  background: linear-gradient(135deg, rgba(255, 182, 39, 0.12), rgba(74, 158, 255, 0.12)), rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.resources-page .resource-eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 0.9rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 182, 39, 0.15);
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.resources-page .resource-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-top: 1rem;
}

.resources-page .resource-download-button {
  min-width: 12rem;
}

.resources-page .resource-download-note {
  color: rgba(255, 255, 255, 0.82);
}

.guide-page .page-hero {
  min-height: 46vh;
}

.guide-page .guide-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.5rem;
}

.guide-page .guide-card-grid {
  margin-top: 1.5rem;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(320px, 1fr));
  align-items: start;
}

.guide-page .guide-card-grid > .feature-card {
  height: 100%;
  min-width: 0;
}

.guide-page .guide-card-grid > .feature-card h3 {
  font-size: clamp(1.8rem, 2.2vw, 2.7rem);
}

.news-page .calendar-wrapper + .feature-card {
  margin-top: 2rem;
}

.news-page .content-wrapper > .feature-card:first-of-type {
  margin-bottom: 1.7rem;
}

.guide-page .guide-list {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.7rem;
  color: rgba(255, 255, 255, 0.86);
}

.guide-page .guide-numbered-list {
  padding-left: 1.3rem;
}

.guide-page .guide-list li {
  line-height: 1.7;
}

.guide-page .guide-experiment-card {
  background: linear-gradient(135deg, rgba(255, 182, 39, 0.12), rgba(74, 158, 255, 0.12)), rgba(255, 255, 255, 0.06);
}

.guide-page .guide-red-flags-card {
  background: linear-gradient(145deg, rgba(196, 45, 45, 0.32), rgba(120, 10, 10, 0.24)), rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 110, 110, 0.38);
}

@media (min-width: 1080px) {
  .guide-page .guide-card-grid {
    grid-template-columns: repeat(2, minmax(320px, 1fr));
  }

  .guide-page .guide-experiment-card {
    grid-column: 1 / -1;
    order: 98;
  }

  .guide-page .guide-red-flags-card {
    grid-column: 1 / -1;
    order: 99;
  }
}

.darkskies-page #page-main > section:nth-of-type(2) .content-wrapper {
  display: grid;
  gap: 2.25rem;
}

.darkskies-page .feature-card {
  padding-top: 2.2rem;
  padding-bottom: 2.2rem;
}

.darkskies-page .feature-card p,
.darkskies-page .resource-list li {
  line-height: 1.85;
}

.darkskies-page .darksky-panel {
  margin: 0.25rem 0;
}

.resources-page .resource-list {
  margin: 0.25rem 0 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.7rem;
}

.resources-page .resource-list li {
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
}

.resources-page .resource-list a {
  color: var(--section-text);
  text-decoration: underline;
}

.resources-page .resource-list a:hover {
  color: var(--section-text);
  opacity: 0.9;
}

.darksky-empty {
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
}

/* ============================================ */
/* CALENDAR SECTION STYLES */
/* ============================================ */

#section-calendar {
  background: linear-gradient(180deg, #0a0e27 0%, #1a1a2e 50%, #16213e 100%);
}

.calendar-wrapper {
  width: 100%;
}

/* Calendar Header Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Calendar Controls */
.calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 1s ease 0.2s backwards;
}

.hemisphere-picker {
  border: 0;
  margin: 0;
  padding: 0;
}

.hemisphere-picker legend {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

.hemisphere-options {
  display: flex;
  gap: 0.35rem;
}

.hemisphere-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  padding: 0.55rem 0.7rem;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.hemisphere-btn:hover,
.hemisphere-btn.active {
  background: rgba(74, 158, 255, 0.2);
  border-color: var(--color-accent);
  color: white;
}

.hemisphere-btn i {
  color: var(--color-accent);
  margin-right: 0.25rem;
}

.month-navigation {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-btn {
  background: var(--color-accent);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-btn:hover {
  background: #3a8eef;
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(74, 158, 255, 0.5);
}

.current-month {
  font-size: 1.8rem;
  font-weight: 600;
  color: white;
  min-width: 250px;
  text-align: center;
}

.view-toggle {
  display: flex;
  gap: 0.5rem;
}

.view-btn {
  padding: 0.6rem 1.2rem;
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-light);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.view-btn.active {
  background: var(--color-accent);
  color: white;
  border-color: var(--color-accent);
}

.view-btn:hover:not(.active) {
  background: rgba(255, 255, 255, 0.15);
}

/* Calendar Grid */
.mobile-upcoming-list {
  display: none;
  margin-bottom: 1.25rem;
  padding: 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-upcoming-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.mobile-upcoming-title {
  color: white;
  font-size: 1rem;
  font-weight: 700;
}

.mobile-upcoming-subtitle {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.9rem;
}

.mobile-upcoming-toggle {
  padding: 0.5rem 0.8rem;
  border-radius: 999px;
  background: var(--color-accent);
  color: white;
  font-size: 0.8rem;
}

.mobile-upcoming-days {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  max-height: 60vh;
  overflow-y: auto;
  padding-right: 0.2rem;
}

.mobile-upcoming-day {
  padding: 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-upcoming-date {
  color: white;
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.mobile-upcoming-events {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.mobile-upcoming-event {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.76rem;
}

.mobile-upcoming-more {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.45rem;
  border-radius: 999px;
  background: rgba(74, 158, 255, 0.16);
  color: white;
  font-size: 0.76rem;
}

.mobile-upcoming-empty {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
  animation: fadeIn 1s ease 0.4s backwards;
  /* Ensure each calendar row uses a fixed row height so boxes align */
  grid-auto-rows: 180px;
}

/* Smaller row height on narrow screens */
@media (max-width: 600px) {
  .calendar-grid {
    grid-auto-rows: 140px;
  }
}

.day-header {
  text-align: center;
  font-weight: 600;
  color: var(--color-accent);
  padding: 1rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.calendar-day {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem;
  /* Fill the grid row height so all boxes in a row match */
  height: 100%;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.calendar-day:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(74, 158, 255, 0.2);
}

.calendar-day.other-month {
  opacity: 0.3;
}

.calendar-day.today {
  border: 2px solid var(--color-accent);
  background: rgba(74, 158, 255, 0.1);
}

.day-number {
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.5rem;
}

.moon-phase {
  font-size: 1.5rem;
  margin: 0.5rem 0;
  text-align: center;
}

.event-indicator {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  margin-top: 0.3rem;
  padding: 0.2rem 0.4rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: relative;
  min-width: 0;
}

.event-label {
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 0;
}

.event-label-text {
  display: inline-block;
  white-space: nowrap;
}

.event-label-long {
  text-overflow: clip;
}

@keyframes event-label-marquee {
  0%, 18% {
    transform: translateX(0);
  }
  82%, 100% {
    transform: translateX(calc(-1 * var(--marquee-shift, 0px)));
  }
}

.event-label-long .event-label-text {
  padding-right: 1rem;
}

@media (min-width: 1025px) {
  .calendar-day,
  .event-list {
    overflow: visible;
  }

  .event-list {
    max-height: none;
    overflow: visible !important;
  }

  .calendar-day:has(.event-indicator:hover),
  .calendar-day:has(.event-indicator:focus-visible) {
    z-index: 30;
  }

  .event-indicator[data-tooltip]:hover,
  .event-indicator[data-tooltip]:focus-visible {
    overflow: visible;
    z-index: 20;
  }

  .event-indicator[data-tooltip]::after {
    background: #101827;
    border: 1px solid rgba(120, 190, 255, 0.7);
    border-radius: 8px;
    bottom: calc(100% + 0.6rem);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    color: #f5f8ff;
    content: attr(data-tooltip);
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    left: 0;
    line-height: 1.4;
    min-width: 230px;
    max-width: 300px;
    width: max-content;
    opacity: 0;
    padding: 0.7rem 0.8rem;
    pointer-events: none;
    position: absolute;
    transform: translateY(0.25rem);
    transition: opacity 0.15s ease, transform 0.15s ease;
    white-space: normal;
    visibility: hidden;
  }

  .event-indicator[data-tooltip]:hover::after,
  .event-indicator[data-tooltip]:focus-visible::after {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
}

/* Wrapper to cap visible events so day box doesn't expand */
.event-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  /* Allow the list to scroll inside the fixed-height cell when there are many events */
  max-height: calc(100% - 3.2rem);
  overflow-y: auto;
}

/* Fallback: hide any .event-indicator beyond the first 3 to guarantee cap */
.event-list .event-indicator:nth-of-type(n+4) {
  display: none !important;
}

.more-indicator {
  color: white;
  background: rgba(255,255,255,0.04);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

/* Tooltip with full event list */
/* Removed tooltip UI - keep hidden by default */
.calendar-tooltip {
  display: none !important;
}

.calendar-tooltip-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tooltip-event-item {
  color: white;
  font-size: 0.95rem;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(255,255,255,0.02);
  cursor: pointer;
}

/* Tooltip removed - no hover behavior */

.event-indicator.eclipse {
  background: rgba(139, 92, 246, 0.3);
  border-left: 3px solid var(--color-eclipse);
}

.event-indicator.meteor {
  background: rgba(255, 182, 39, 0.3);
  border-left: 3px solid var(--color-sun);
}

.event-indicator.supermoon {
  background: rgba(244, 241, 222, 0.2);
  border-left: 3px solid var(--color-moon);
}

.event-indicator.deep-sky {
  background: rgba(74, 158, 255, 0.25);
  border-left: 3px solid var(--color-accent);
}

.event-indicator.launch {
  background: rgba(255, 71, 87, 0.3);
  border-left: 3px solid var(--color-launch);
}

/* Events Sidebar */
.events-sidebar {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 15px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeIn 1s ease 0.6s backwards;
}

.events-heading {
  font-size: 1.8rem;
  color: white;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  border-left: 4px solid var(--color-accent);
  transition: all 0.3s;
  cursor: pointer;
}

.event-card:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(5px);
}

.event-card.eclipse {
  border-left-color: var(--color-eclipse);
}

.event-card.meteor {
  border-left-color: var(--color-sun);
}

.event-card.supermoon {
  border-left-color: var(--color-moon);
}

.event-card.deep-sky {
  border-left-color: var(--color-accent);
}

.event-card.launch {
  border-left-color: var(--color-launch);
}

.event-date {
  font-size: 0.9rem;
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.event-title {
  font-size: 1.1rem;
  color: white;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.event-description {
  font-size: 0.9rem;
  color: #ffffff;
  line-height: 1.5;
}

.event-meta {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.4;
  margin-top: 0.45rem;
}

.event-meta i {
  color: var(--color-accent);
  margin-right: 0.35rem;
  width: 0.9rem;
}

.export-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--color-accent);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  margin-top: 0.5rem;
  transition: all 0.3s;
}

.export-btn:hover {
  background: #3a8eef;
  box-shadow: 0 5px 15px rgba(74, 158, 255, 0.3);
  transform: translateY(-2px);
}

.watch-btn {
  background: var(--color-launch);
}

.watch-btn:hover {
  background: #e63946;
  box-shadow: 0 5px 15px rgba(255, 71, 87, 0.3);
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 20px;
  padding: 2rem;
  max-width: 600px;
  width: 90%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.4s ease;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.modal-header h2 {
  font-size: 1.8rem;
  color: white;
}

.close-modal {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: none;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 1.2rem;
}

.close-modal:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

  .event-details-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 65vh;
    overflow-y: auto;
    padding-right: 0.25rem;
  }

  .event-details-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 1.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
  }

  .event-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
  }

  .event-details-card .event-title {
    font-size: 1.15rem;
    color: white;
    font-weight: 700;
  }

  .event-details-card .event-date {
    font-size: 0.9rem;
    color: var(--color-accent);
    margin-top: 0.3rem;
  }

  .event-details-card .event-description {
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1.6;
  }

  .event-details-card .event-location {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    gap: 0.5rem;
  }

  .details-btn {
    padding: 0.6rem 1rem;
    border: none;
    border-radius: 10px;
    background: rgba(255, 71, 87, 0.9);
    color: white;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    transition: all 0.3s;
  }

  .details-btn:hover {
    background: rgba(255, 71, 87, 1);
    transform: translateY(-1px);
  }

  .event-details-card.eclipse {
    border-left: 4px solid var(--color-eclipse);
  }

  .event-details-card.meteor {
    border-left: 4px solid var(--color-sun);
  }

  .event-details-card.supermoon {
    border-left: 4px solid var(--color-moon);
  }

  .event-details-card.launch {
    border-left: 4px solid var(--color-launch);
  }


.export-option i {
  font-size: 2rem;
  color: var(--color-accent);
  margin-bottom: 0.5rem;
}

.export-option span {
  display: block;
  color: white;
  font-weight: 600;
}

/* Legend */
.legend {
  display: flex;
  gap: 2rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding: 1rem;
  animation: fadeIn 1s ease 0.8s backwards;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legend-color {
  width: 20px;
  height: 20px;
  border-radius: 4px;
}

.legend-color.eclipse {
  background: var(--color-eclipse);
}

.legend-color.meteor {
  background: var(--color-sun);
}

.legend-color.supermoon {
  background: var(--color-moon);
}

.legend-color.deep-sky {
  background: var(--color-accent);
}

.legend-color.launch {
  background: var(--color-launch);
}

/* ============================================ */
/* END CALENDAR SECTION STYLES */
/* ============================================ */

/* Contact Form Styles */
.contact-form {
  max-width: 600px;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: bold;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: 0.01em;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.14);
  color: white;
  font-size: 1rem;
}

.form-group textarea {
  min-height: 10rem;
  resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(100, 149, 237, 0.38);
}

.form-group input:hover,
.form-group textarea:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.18);
}

.form-group input:focus-visible,
.form-group textarea:focus-visible,
.submit-btn:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.submit-btn {
  padding: 0.95rem 1.6rem;
  background: linear-gradient(135deg, #5f95ff, #3c78f8);
  color: white;
  border: none;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
  box-shadow: 0 18px 32px rgba(17, 45, 78, 0.18);
}

.submit-btn:hover {
  background: linear-gradient(135deg, #4a88ff, #3269d8);
  transform: translateY(-2px);
  box-shadow: 0 22px 38px rgba(17, 45, 78, 0.22);
}

.submit-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.28), 0 22px 38px rgba(17, 45, 78, 0.22);
}

/* Footer styling */
footer {
  background: rgba(6, 10, 29, 0.98);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  padding: 3.5rem 2rem;
  color: var(--section-text);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.footer-content .copyright-container {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.97rem;
}

.social-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-heading {
  font-weight: 700;
  font-size: 1.05rem;
  color: white;
}

.footer-content a {
  transition: transform 0.25s ease, background-color 0.25s ease;
}

.footer-content a:hover {
  transform: translateY(-2px);
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-links a {
  color: white;
  font-size: 1.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  transition: color 0.3s, transform 0.3s, background-color 0.3s;
}

.social-links a:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.copyright-container {
  text-align: right;
  font-size: 0.9rem;
}

/* ============================================ */
/* MEDIA QUERIES FOR MOBILE RESPONSIVENESS */
/* ============================================ */

/* Tablet and smaller desktop (1024px and below) */
@media screen and (max-width: 1024px) {
  .cta-container h1 {
    font-size: 2.5rem;
  }
  
  .cta-img {
    width: 60%;
  }
  

  .guide-page .guide-card-grid {
    grid-template-columns: 1fr !important;
    gap: 1.35rem;
  }
  .image-container {
    width: 45%;
  }
  
  section {
    padding: 3rem 1.5rem;
  }

  .calendar-controls {
    flex-direction: column;
    gap: 1rem;
  }

  .current-month {
    min-width: auto;
  }
}

@media screen and (max-width: 900px) {
  .feature-card-grid,
  .gallery-page-grid {
    grid-template-columns: 1fr;
  }

  .feature-card,
  .gallery-card {
    width: 100%;
  }
}

/* Tablets (768px and below) */
@media screen and (max-width: 768px) {
  #header-main {
    padding: 1rem 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
  }
  
  #navigation-main {
    gap: 1rem;
    font-size: 0.9rem;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  section {
    min-height: auto;
    padding: 2.5rem 1rem;
    align-items: flex-start;
    justify-content: flex-start;
    display: block;
  }

  .page-hero .content-wrapper {
    align-items: center;
    text-align: center;
  }

  .content-wrapper,
  .cta-container,
  .weather-panel,
  .weather-card,
  .darksky-results,
  .image-container,
  .project-section,
  .calendar-grid,
  .export-options {
    width: 100%;
    max-width: 100%;
  }

  .cta-container {
    padding: 0;
  }

  .cta-container h1 {
    font-size: 2.2rem;
  }
  
  .cta-container h2 {
    font-size: 1.2rem;
  }
  
  .cta-img {
    width: 100%;
    max-width: 360px;
  }
  
  .section-heading, .heading {
    font-size: 2rem;
  }
  
  .section-subheading, .subheading {
    font-size: 1.5rem;
  }
  
  .image-container {
    width: 100%;
  }
  
  .image-group {
    flex-direction: column;
    align-items: center;
  }

  .weather-panel,
  .weather-card {
    grid-template-columns: 1fr;
  }

  .clearoutside-embed {
    min-height: 680px;
  }

  .weather-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .location-search {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .location-search input {
    width: 100%;
  }

  .location-search select {
    width: 100%;
  }

  .darksky-results {
    padding: 1rem;
  }

  .resources-page .resource-sections {
    gap: 1.15rem;
    margin-top: 1rem;
  }

  .resources-page .resource-card {
    padding: 1.35rem;
    border-radius: 20px;
  }

  .resources-page .resource-download-actions {
    align-items: stretch;
  }

  .resources-page .resource-download-button {
    width: 100%;
  }

  .guide-page .guide-action-row {
    align-items: stretch;
  }

  .guide-page .guide-action-row .button {
    width: 100%;
  }

  .calendar-grid-container {
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
  }

  .calendar-grid {
    gap: 0.75rem;
    grid-template-columns: repeat(7, minmax(120px, 1fr));
    min-width: 100%;
  }

  .calendar-day {
    min-height: 80px;
    padding: 0.6rem;
  }

  .day-number {
    font-size: 0.95rem;
  }

  .moon-phase {
    font-size: 1.1rem;
  }

  .export-options {
    grid-template-columns: 1fr;
  }
}

/* Mobile landscape and small tablets (700px and below) */
@media screen and (max-width: 700px) {
  .cta-container h1 {
    font-size: 1.9rem;
  }
  
  .cta-img {
    width: 90%;
  }
  
  .section-heading, .heading {
    font-size: 1.8rem;
  }
  
  .image-container {
    width: 100%;
    margin-bottom: 1rem;
  }
  
  .image-group {
    flex-direction: column;
    align-items: center;
  }

  .guide-page .guide-card-grid {
    margin-top: 1rem;
    grid-template-columns: 1fr !important;
    gap: 1.15rem;
  }

  .guide-page .guide-card-grid > .feature-card {
    padding: 1.45rem;
    border-radius: 22px;
  }

  .guide-page .guide-card-grid > .feature-card h3 {
    font-size: clamp(1.05rem, 7vw, 1.6rem);
    line-height: 1.3;
  }

  .news-page .calendar-wrapper + .feature-card {
    margin-top: 1.4rem;
  }

  .news-page .content-wrapper > .feature-card:first-of-type {
    margin-bottom: 1.95rem;
  }
  
  #section-about article hr {
    width: 70%;
  }
  
  .weather-panel,
  .weather-card,
  .darksky-results {
    width: 100%;
  }
}

/* Mobile devices (600px and below) */
@media screen and (max-width: 600px) {
  #header-main {
    padding: 0.8rem 1rem;
    flex-wrap: nowrap;
    justify-content: space-between;
  }
  .content-wrapper {
    padding: 0 0.5rem;
  }

  /* Ensure content wrapper shrinks on small screens */
  .content-wrapper {
    max-width: 100%;
  }

  /* Prevent images from overflowing */
  img {
    max-width: 100%;
    height: auto;
  }

  #section-cta {
    padding-top: 3.5rem;
  }
  
  .mobile-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    position: relative;
    margin-left: auto;
    z-index: 10003;
    touch-action: manipulation;
  }
  
  #navigation-main {
    display: none;
  }

  #mobile-navigation-main {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 90%);
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, var(--panel-bg) 0%, rgba(16, 24, 56, 0.98) 100%);
    backdrop-filter: blur(18px);
    flex-direction: column;
    align-items: flex-start;
    padding: 4.25rem 1.5rem 1.5rem;
    gap: 1.25rem;
    transform: translateX(110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: -18px 0 56px rgba(0, 0, 0, 0.45);
    z-index: 10003;
    isolation: isolate;
    overflow-y: auto;
    display: flex;
  }

  .mobile-submenu {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-submenu-title {
    display: block;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding-bottom: 0.5rem;
  }

  .mobile-nav-link {
    width: 100%;
    display: block;
    padding: 0.75rem 0;
    border-radius: 0.4rem;
    cursor: pointer;
    position: relative;
    z-index: 10003;
    pointer-events: auto;
    opacity: 0;
    transform: translateX(10px);
    transition: opacity 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  }

  #mobile-navigation-main.open .mobile-nav-link {
    opacity: 1;
    transform: translateX(0);
  }

  #mobile-navigation-main.open .mobile-nav-link:nth-child(2) { transition-delay: 0.04s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(3) { transition-delay: 0.08s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(4) { transition-delay: 0.12s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(5) { transition-delay: 0.16s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(6) { transition-delay: 0.20s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(7) { transition-delay: 0.24s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(8) { transition-delay: 0.28s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(9) { transition-delay: 0.32s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(10) { transition-delay: 0.36s; }
  #mobile-navigation-main.open .mobile-nav-link:nth-child(11) { transition-delay: 0.40s; }

  .mobile-nav-link:hover {
    background-color: rgba(74, 158, 255, 0.16);
  }

  .nav-link-active {
    outline: 2px solid rgba(74,158,255,0.9);
    transform: translateY(0);
  }
  
  #mobile-navigation-main::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(74, 158, 255, 0.14), transparent 24%),
                radial-gradient(circle at 24% 12%, rgba(255, 255, 255, 0.06), transparent 14%);
    pointer-events: none;
  }

  #mobile-navigation-main.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .mobile-menu-close {
    display: inline-flex;
    margin-bottom: 1rem;
    align-self: flex-end;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
  }
  
  .mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.14);
  }
  
  .nav-link {
    color: var(--nav-link);
    font-size: 1rem;
    padding: 0.75rem 0;
  }

  /* Make weather and dark sky panels stack on small screens */
  .weather-panel {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .weather-card {
    grid-template-columns: 1fr;
  }

  .clearoutside-embed {
    min-height: 620px;
  }

  .darksky-panel {
    padding: 0.75rem 0;
  }

  .resources-page .resource-sections {
    gap: 1rem;
  }

  /* Ensure nav links are above decorative pseudo elements and accept pointer events */
  .nav-link {
    position: relative;
    z-index: 1300;
    cursor: pointer;
  }

  .logo-container a {
    width: 52px;
    height: 52px;
  }

  .cta-img {
    width: 70%;
  }

  .logo-img {
    width: 100%;
    height: 100%;
  }

  #header-main {
    padding: 0.75rem 1rem;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
  }
  
  .dropdown-content {
    position: static;
    display: none;
    background: transparent;
    box-shadow: none;
    min-width: auto;
    left: auto;
    right: auto;
    transform: none;
    margin: 0;
    border-radius: 0;
    padding-left: 1rem;
    z-index: 1300;
  }
  
  .dropdown.open .dropdown-content {
    display: block;
  }
  
  .dropdown-content a {
    display: block;
    width: 100%;
    padding: 0.75rem 0;
    cursor: pointer;
    position: relative;
    z-index: 1300;
  }
  
  .dropdown-content .sub-links a,
  .dropdown-content .sub-sub-links a {
    cursor: pointer;
    position: relative;
    z-index: 1300;
  }
  
  .dropdown .nav-link {
    display: flex;
    justify-content: space-between;
    width: 100%;
    align-items: center;
  }
  
  .dropdown .nav-link::after {
    content: '\f107';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.7rem;
    font-size: 0.9rem;
  }
  
  .dropdown.open > .nav-link::after {
    content: '\f106';
  }
  
  .dropdown:hover .dropdown-content,
  .dropdown .dropdown-content:hover {
    display: none;
  }
  .dropdown-content[aria-hidden="true"] {
    display: none;
  }
  
  #section-cta {
    padding-top: 6rem;
  }
  
  #section-cta {
    padding-top: 6rem;
  }
  
  .cta-container h1 {
    font-size: 1.7rem;
    padding: 0 1rem;
  }
  
  .cta-container h2 {
    font-size: 1.1rem;
    padding: 0 1rem;
  }
  
  .cta-img {
    width: 90%;
  }
  
  .section-heading, .heading {
    font-size: 1.6rem;
  }
  
  .section-subheading, .subheading {
    font-size: 1.3rem;
  }
  
  section {
    padding: 2rem 1rem;
    min-height: auto;
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }
  
  .copyright-container {
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }

  .calendar-controls {
    padding: 1rem;
  }

  .mobile-upcoming-list {
    display: block;
  }

  .calendar-grid-container {
    display: none;
  }

  .month-navigation {
    gap: 1rem;
  }

  .current-month {
    font-size: 1.4rem;
  }

  .nav-btn {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }
}

/* Small mobile devices (480px and below) */
@media screen and (max-width: 480px) {
  #header-main {
    padding: 0.7rem 0.8rem;
  }

  section {
    padding-inline: 0.75rem;
  }

  .content-wrapper {
    padding-inline: 0.35rem;
  }
  
  .logo-container {
    font-size: 0.9rem;
  }
  
  #navigation-main {
    gap: 0.7rem;
    font-size: 0.75rem;
  }
  
  .nav-link {
    font-size: 0.75rem;
  }
  
  #section-cta {
    padding-top: 4.5rem;
  }
  
  .cta-container {
    gap: 1rem;
  }
  
  .cta-container h1 {
    font-size: 1.5rem;
    line-height: 1.3;
  }
  
  .cta-container h2 {
    font-size: 1rem;
    line-height: 1.4;
  }
  
  .section-heading, .heading {
    font-size: 1.4rem;
  }
  
  .section-subheading, .subheading {
    font-size: 1.1rem;
  }
  
  section p, .session-container p {
    font-size: 0.95rem;
    line-height: 1.6;
  }

  .spec-name,
  .spec-what,
  .spec-meaning,
  .improvement-heading {
    padding: 1rem;
  }
  
  .sub-links a {
    padding-left: 20px;
    font-size: 0.85rem;
  }
  
  .sub-sub-links a {
    padding-left: 32px;
    font-size: 0.8rem;
  }
  
  footer {
    padding: 2rem 1rem;
  }
  
  .footer-heading {
    font-size: 1rem;
  }
  
  .social-links a {
    font-size: 1.3rem;
  }
  
  .copyright-container {
    font-size: 0.85rem;
  }

  .current-month {
    font-size: 1.2rem;
  }

  .calendar-day {
    min-height: 60px;
    padding: 0.3rem;
  }

  .event-indicator {
    font-size: 0.65rem;
  }
}

/* Very small mobile devices (360px and below) */
@media screen and (max-width: 360px) {
  #header-main {
    padding: 0.6rem;
  }
  
  #navigation-main {
    gap: 0.5rem;
    font-size: 0.7rem;
  }
  
  #section-cta {
    padding-top: 4rem;
  }
  
  .cta-container h1 {
    font-size: 1.3rem;
  }
  
  .cta-container h2 {
    font-size: 0.9rem;
  }
  
  .section-heading, .heading {
    font-size: 1.2rem;
  }
  
  .section-subheading, .subheading {
    font-size: 1rem;
  }
  
  section p, .session-container p {
    font-size: 0.9rem;
  }

  .content-wrapper {
    padding-inline: 0;
  }

  .spec-name,
  .spec-what,
  .spec-meaning,
  .improvement-heading {
    padding: 0.85rem;
  }
  
  section {
    padding: 1.5rem 0.8rem;
  }

  .calendar-grid {
    gap: 0.3rem;
  }
}

@media (hover: none), (pointer: coarse) {
  button:hover,
  .button:hover,
  .feature-card:hover,
  .gallery-card:hover,
  .submit-btn:hover,
  .footer-content a:hover,
  .social-links a:hover,
  .mobile-menu-close:hover,
  .mobile-nav-link:hover,
  .dropdown-content a:hover,
  .review-card-link:hover .review-card-image {
    transform: none;
    box-shadow: none;
    background-color: inherit;
  }

  .nav-link:hover::after {
    opacity: 0;
    transform: scaleX(0);
  }

  .dropdown-toggle:hover,
  button.nav-link:hover,
  .nav-link:hover {
    color: var(--nav-link);
    background-color: transparent;
  }

  .submit-btn:hover {
    background: linear-gradient(135deg, #5f95ff, #3c78f8);
  }
}

@media screen and (max-width: 600px) {
  #header-main {
    padding: 1.05rem 1rem 1.15rem;
    gap: 0.95rem;
  }

  #section-cta {
    padding-top: 7.25rem;
    padding-bottom: 3.25rem;
  }

  .cta-container {
    gap: 1.25rem;
  }

  .cta-img {
    width: min(92%, 420px);
    margin-top: 0.85rem;
  }

  .page-hero {
    padding-top: 8rem;
    padding-bottom: 3.75rem;
  }
}

@media screen and (max-width: 480px) {
  #header-main {
    padding: 1rem 0.9rem 1.1rem;
  }

  #section-cta {
    padding-top: 6.8rem;
  }

  .cta-img {
    margin-top: 0.75rem;
  }
}

/* Review entry pages: hero, alternating text/image blocks, specs grid */
.rev-hero .content-wrapper {
  text-align: center;
}

.rev-block .content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.rev-content {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.rev-text {
  flex: 1 1 48%;
  min-width: 0;
  align-self: center;
  padding: 1.5rem 0 1.5rem 1.5rem;
  border-left: 3px solid var(--color-accent);
  background: linear-gradient(90deg, rgba(74, 158, 255, 0.1), transparent 72%);
}

.rev-img {
  flex: 1 1 48%;
  max-width: 42rem;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.rev-text p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.9;
}

.rev-text p:last-child {
  margin-bottom: 0;
}

.rev-advanced .field-rotation-tooltip {
  display: inline-block;
  position: relative;
}

.rev-advanced .field-rotation-link {
  color: inherit;
  font-size: 1.05em;
  font-weight: 600;
}

.rev-advanced .field-rotation-link:hover,
.rev-advanced .field-rotation-link:focus-visible {
  color: inherit;
}

.rev-advanced .field-rotation-explanation {
  position: absolute;
  z-index: 2;
  bottom: calc(100% + 0.75rem);
  left: 50%;
  width: min(19rem, calc(100vw - 2rem));
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(126, 196, 255, 0.5);
  border-radius: 8px;
  background: #101b32;
  box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.35);
  color: var(--section-text);
  font-size: 0.82rem;
  font-weight: 400;
  line-height: 1.5;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 0.35rem);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.rev-advanced .field-rotation-explanation::after {
  position: absolute;
  bottom: -0.4rem;
  left: 50%;
  width: 0.7rem;
  height: 0.7rem;
  border-right: 1px solid rgba(126, 196, 255, 0.5);
  border-bottom: 1px solid rgba(126, 196, 255, 0.5);
  background: #101b32;
  content: "";
  transform: translateX(-50%) rotate(45deg);
}

.rev-advanced .field-rotation-tooltip:hover .field-rotation-explanation,
.rev-advanced .field-rotation-link:focus-visible + .field-rotation-explanation {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .rev-advanced .field-rotation-explanation {
    transition: none;
  }
}

.rev-img {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.rev-img img,
.rev-img video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.rec-img {
  margin-top: 1.5rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
}

.rec-img img {
  width: 100%;
  height: auto;
  display: block;
}

.sun-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30rem;
  isolation: isolate;
}

.sun-gallery a {
  position: absolute;
  width: min(17rem, 72%);
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 4px solid var(--section-bg);
  border-radius: 1rem;
  box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.28);
  transition: transform 0.25s ease, box-shadow 0.25s ease, z-index 0s linear 0.25s;
}

.sun-gallery a:nth-child(1) {
  transform: translateX(-34%);
  z-index: 1;
}

.sun-gallery a:nth-child(2) {
  transform: translateY(-12%);
  z-index: 2;
}

.sun-gallery a:nth-child(3) {
  transform: translateX(34%);
  z-index: 1;
}

.sun-gallery a:hover,
.sun-gallery a:focus-visible {
  z-index: 5;
  box-shadow: 0 1.25rem 2.5rem rgba(0, 0, 0, 0.42);
  transition-delay: 0s;
}

.sun-gallery a:nth-child(1):hover,
.sun-gallery a:nth-child(1):focus-visible {
  transform: translateX(-34%) scale(1.08);
}

.sun-gallery a:nth-child(2):hover,
.sun-gallery a:nth-child(2):focus-visible {
  transform: translateY(-12%) scale(1.08);
}

.sun-gallery a:nth-child(3):hover,
.sun-gallery a:nth-child(3):focus-visible {
  transform: translateX(34%) scale(1.08);
}

.sun-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* add class "rev-block--reverse" on a .rev-block to flip which side rev-text/rev-img sit on */
.rev-block--reverse .rev-content {
  flex-direction: row-reverse;
}

.rev-sessions .rev-content {
  flex-direction: column;
  align-items: stretch;
  gap: 3rem;
}

.rev-sessions .rev-subcontent {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 2.5rem;
  row-gap: 1.75rem;
  width: 100%;
  flex: 0 0 100%;
}

.rev-sessions .rev-subcontent > h2,
.rev-sessions .rev-subcontent > h3 {
  grid-column: 1 / -1;
}

.rev-sessions .rev-subcontent > h2,
.rev-sessions .rev-subcontent > h3 {
  margin: 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  line-height: 1.2;
}

.rev-sessions .rev-subcontent > h2 a,
.rev-sessions .rev-subcontent > h3 a {
  color: var(--section-text);
  text-decoration: none;
  border-bottom: 2px solid var(--color-accent);
  transition: color 0.25s ease, border-color 0.25s ease;
}

.rev-sessions .rev-subcontent > h2 a:hover,
.rev-sessions .rev-subcontent > h2 a:focus-visible,
.rev-sessions .rev-subcontent > h3 a:hover,
.rev-sessions .rev-subcontent > h3 a:focus-visible {
  color: var(--link-on-dark-hover);
  border-color: var(--link-on-dark-hover);
}

.review-entry-page .warning {
  display: inline-block;
  padding: 0.08em 0.4em;
  border: 1px solid rgba(255, 71, 87, 0.9);
  border-radius: 0.25rem;
  background: rgba(255, 71, 87, 0.16);
  color: #ff6b78;
  font-size: 1.1em;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  box-shadow: 0 0 0 2px rgba(255, 71, 87, 0.08);
}

.rev-sessions .rev-subcontent > .rev-txt {
  grid-column: 1;
  grid-row: 2;
}

.rev-sessions .rev-subcontent > .rec-img,
.rev-sessions .rev-subcontent > .rev-img {
  grid-column: 2;
  grid-row: 2;
  width: 100%;
}

.rev-sessions .rev-subcontent:nth-child(even) > .rev-txt {
  grid-column: 2;
}

.rev-sessions .rev-subcontent:nth-child(even) > .rec-img,
.rev-sessions .rev-subcontent:nth-child(even) > .rev-img {
  grid-column: 1;
}

.specs-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  overflow: hidden;
  margin-top: 2rem;
}

.spec-row {
  display: contents;
}

.spec-name,
.spec-what,
.spec-meaning {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  line-height: 1.7;
}

.spec-name {
  font-weight: 700;
}

.spec-what,
.spec-meaning {
  color: rgba(255, 255, 255, 0.78);
}

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

.improvement-heading {
  padding: 1.25rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  font-weight: 700;
  line-height: 1.7;
}

.improvement-row {
  display: contents;
}

@media (max-width: 800px) {
  .rev-content {
    flex-direction: column !important;
  }

  .rev-text {
    padding: 0 0 0 1rem;
  }

  .rev-img {
    width: 100%;
    min-height: 0;
    aspect-ratio: 4 / 3;
  }

  .sun-gallery {
    min-height: 22rem;
  }

  .sun-gallery a {
    width: min(13rem, 62%);
  }

  .rev-sessions .rev-subcontent {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 1.5rem;
  }

  .rev-sessions .rev-subcontent > .rev-txt,
  .rev-sessions .rev-subcontent > .rec-img,
  .rev-sessions .rev-subcontent > .rev-img {
    width: 100%;
  }

  /* mobile flip-card behaviour (front/back faces, click to reveal meaning) added later */
  .specs-grid {
    grid-template-columns: 1fr;
  }

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

  .spec-row {
    display: block;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  }

  .spec-row:last-child {
    border-bottom: none;
  }
}