/* Page reset + nice defaults */
:root {
    --max-third-4k: 1600px;
    /* ~1/3 of 3840px */
    --min-read-width: 40ch;
    /* keeps line-length readable on tiny screens */
    --base-gap: 1.25rem;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background: #f7f7f7;
    color: #111;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

model-viewer {
    display: block;
    /* make it behave like a block */
    width: 100%;
    /* fill the .container horizontally */
    height: 60vh;
    /* or whatever height you want */
    max-width: 100%;
    /* prevent it from exceeding container */
    border-radius: 8px;
    /* optional, to match your container style */
}

/* Centering wrapper (horizontal by default; change align-items to center to vertically center too) */
.page {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    /* stack vertically */
    justify-content: center;
    /* horizontal centering */
    align-items: center;
    /* change to 'center' to vertically center the column */
    padding: calc(var(--base-gap) * 2);
    box-sizing: border-box;
}

/* The reading column */
.container {
    /* responsive width: scale with viewport, but clamp to a max and a minimum readable width */
    width: min(90vw, 100ch); /* fills 90% until text lines get too long */
    /* roughly ~1/3 of viewport width; on 4k this is ~1305px */
    min-width: var(--min-read-width);
    /* prefer using characters for ideal line length if you want: */
    max-width: min(var(--max-third-4k), 100ch);

    background: #fff;
    padding: calc(var(--base-gap) * 1.5);
    border-radius: 12px;
    box-shadow: 0 6px 20px rgba(10, 10, 15, 0.06);
    line-height: 1.6;
    box-sizing: border-box;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 6rem);
    /* scales with screen */
    font-weight: 900;
    text-align: center;
    margin: 0 0 2rem 0;
    line-height: 1.1;
    background: linear-gradient(90deg, #0077ff, #00cc88, #ff3366);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 1;
    transition: opacity 0.2s ease-out;
}

.swiper-wrapper {
  width: 100% !important;
  margin: 0;
  padding: 0;
}

.swiper-container {
  position: relative;
  width: 110%;
  /* maintain 16:9 aspect ratio */
  aspect-ratio: 4 / 3; 
  border-radius: 12px;
  overflow: hidden;
  background: transparent;
}

.swiper-slide {
  width: 100% !important;
  height: 100% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  background: lightgray;    /* make sure slides don’t add color */
}

.swiper-slide img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;        /* keep aspect ratio */
  object-position: center;    /* center image */
  display: block; /* removes inline spacing issues */
  user-select: none;       /* prevents text/image selection */
  -webkit-user-drag: none; /* prevents drag highlight on Chrome/Safari */
  outline: none;           /* remove focus outline */
}

.swiper-container.fullscreen {
  position: fixed;
  top: 45%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90vw;
  height: 80vh;
  z-index: 10001;
  background: rgba(0,0,0,0.7);
}

/* Swiper navigation arrows */
.swiper-button-next,
.swiper-button-prev {
  color: white;
  background: rgba(0,0,0,0.5);
  padding: 10px;
  border-radius: 6px;
  width: 45px;
  height: 45px;
  top: 50%;
  transform: translateY(-50%);
  transition: background 0.3s;
  z-index: 2;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: rgba(0,0,0,0.8);
}

/* Pagination bullets */
.swiper-pagination {
  bottom: 10px !important;
}

.swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.7);
  opacity: 1;
}

.swiper-pagination-bullet-active {
  background: white;
}

/* Fullscreen button */
#fullscreenBtn {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  font-size: 32px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.3s;
}

#fullscreenBtn:hover {
  background: rgba(0,0,0,0.8);
}

/* Full-page gray overlay */
.overlay {
  display: none;               /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.6);
  z-index: 10000;              /* behind Swiper but above page content */
}

/* When active, gray page and block scrolling */
body.no-scroll {
  overflow: hidden;
}

/* Optional: make Swiper appear above overlay in fullscreen */
.swiper-container.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  height: 95vh;
  z-index: 10001;
}

/* Exit button (optional, only in fullscreen mode) */
#exitBtn {
  position: absolute;
  top: 10px;
  right: 60px; /* leave space from fullscreen button */
  z-index: 2;
  font-size: 32px;
  background: rgba(0,0,0,0.5);
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: none; /* show only in fullscreen mode */
}

.swiper-container.fullscreen #exitBtn {
  display: block;
}

/* Full-page gray overlay */
#pageOverlay {
  display: none;           /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.5);  /* semi-transparent gray */
  z-index: 9999;          /* above the page but below slideshow if needed */
}

/* Optional: fullscreen Swiper styling */
.swiper-container.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  height: 95vh;
  z-index: 10000;         /* above overlay */
}

/* Disable scrolling on body */
body.no-scroll {
  overflow: hidden;
}


/* Optional: make Swiper appear above overlay in fullscreen */
.swiper-container.fullscreen {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 95vw;
  height: 95vh;
  z-index: 10001;
}

#exitBtn:hover {
  background: rgba(0,0,0,0.8);
}

h1 {
    margin-top: 0;
}