/* Fullscreen Mobile Mode Styles */

/* Fullscreen Mobile Active State */
body.fullscreen-mobile-active {
  overflow: hidden;
  position: fixed;
  width: 100%;
  height: 100vh;
}

body.fullscreen-mobile-active header {
  display: none !important;
}

body.fullscreen-mobile-active main {
  width: min(100vw, calc(100vh * 16 / 9));
  height: min(100vh, calc(100vw * 9 / 16));
  max-width: 100vw;
  max-height: 100vh;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  padding: 0;
  margin: auto;
  position: relative;
}

body.fullscreen-mobile-active main::after {
  content: attr(data-section);
  position: fixed;
  top: var(--space-4);
  left: var(--space-4);
  background-color: rgba(0, 61, 115, 0.9);
  color: white;
  padding: var(--space-2) var(--space-4);
  border-radius: 4px;
  font-size: var(--font-size-xs);
  z-index: 999;
  pointer-events: none;
  font-weight: var(--font-weight-semibold);
}

body.fullscreen-mobile-active section {
  display: none;
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: var(--space-8) var(--space-6);
  margin: 0;
  -webkit-overflow-scrolling: touch;
}

body.fullscreen-mobile-active section.active {
  display: block;
  padding: var(--space-24) 0 60px;
  animation: fadeIn 300ms ease-in-out;
}

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

/* Footer */
body.fullscreen-mobile-active footer {
  display: none !important;
}

/* Progress bar at bottom */
body.fullscreen-mobile-active::after {
  content: "";
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #003d73 0%, #0a5a5a 100%);
  animation: autoProgressTimer 10s linear infinite;
  z-index: 1000;
}

body.fullscreen-mobile-active.auto-advance-complete::after {
  animation: none;
  width: 100%;
}

@keyframes autoProgressTimer {
  0% {
    width: 0%;
  }
  100% {
    width: 100%;
  }
}

/* Exit hint */
body.fullscreen-mobile-active main {
  position: relative;
}

/* Add exit hint before main content */
body.fullscreen-mobile-active section.active::before {
  content: "← Back to exit | ESC to exit";
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.75);
  color: white;
  padding: var(--space-3) var(--space-6);
  border-radius: 4px;
  font-size: var(--font-size-xs);
  z-index: 998;
  pointer-events: none;
  text-align: center;
  white-space: nowrap;
  font-weight: var(--font-weight-medium);
}

/* Keep desktop layout proportions while fullscreen mode is active */
body.fullscreen-mobile-active section .container {
  max-width: var(--max-width-container);
  padding: 0 var(--space-6);
  margin: 0 auto;
}

body.fullscreen-mobile-active .grid--2-cols {
  grid-template-columns: repeat(2, 1fr);
}

body.fullscreen-mobile-active .grid--3-cols {
  grid-template-columns: repeat(3, 1fr);
}

body.fullscreen-mobile-active .grid--4-cols {
  grid-template-columns: repeat(4, 1fr);
}

/* Hero section specific */
body.fullscreen-mobile-active .section--hero {
  background-color: var(--color-bg-primary);
}

/* Keep desktop-only visual blocks visible in fullscreen */
body.fullscreen-mobile-active .hide-mobile {
  display: block !important;
}

/* Ensure text is readable */
body.fullscreen-mobile-active section {
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
}

body.fullscreen-mobile-active section.section--alt {
  background-color: var(--color-bg-secondary);
}

