
/* Base styles for MVA Wine website */
/* This file is rendered as a Django template to support static tags */

.error {
  color: var(--error-color);
}

.banner-container {
}
.banner-container > img,
.banner-container > video {
  width: 100%;
  height: auto;
  border-radius: 14px;
}

/* Navigation bar */
.top_nav_container {
  width: 100%;
  max-width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  background: white;
  z-index: 1;
}

.top_nav_container nav {
  width: calc(100% - 2*var(--viewport-border));
  max-width: var(--global-max-width);
  margin-inline: 0;
  background-color: transparent;
  z-index: 1000;
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 3em;
  padding-block: calc(var(--nav-padding-block) + 8px) var(--nav-padding-block);
  padding-inline: var(--main-default-margin);
  transition: background-color var(--transition-speed) ease;
  border-bottom: 1px solid white;
}
.top_nav_container nav.white {
  background-color: white;
  border-bottom: 0;
  transition: background-color .6s ease;
}

nav > ul {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  font-family: "Sombra Variable";
  font-variation-settings: normal;
  font-weight: 300;
}

.top_nav_container nav > ul {
  flex-grow: .3;
  gap: clamp(1.125rem, 2 * var(--scale-factor), 2rem);
}
.top_nav_container nav > ul:first-of-type {
  justify-content: flex-start;
}
.top_nav_container nav > ul:last-of-type {
  justify-content: flex-end;
}

nav.top-nav a.logo {
  flex-grow: 2;
  display: flex;
  justify-content: center;
}

nav.top-nav a.logo img {
  width: auto;
  height: var(--nav-logo-height);
}

nav a {
  font-family: "Sombra Variable";
  font-variation-settings: normal;
  font-weight: 300;
  color: var(--nav-color);
  font-size: var(--nav-font-size);
  line-height: var(--nav-line-height);
  letter-spacing: var(--nav-letter-spacing);
  white-space: nowrap;
  text-transform: lowercase;
  transition: color var(--transition-speed) ease-in-out, text-decoration-color var(--transition-speed) ease-in-out;
}

nav .nav__item--current a {
  font-weight: 400;
}

/* Hide Mobile Navigation by Default */
.mobile-nav {
  opacity: 0;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  position: absolute;
  top: 100%;
  right: -12px;
  width: auto;
  background: white;
  padding: 1em;
  list-style: none;
  border: 1px solid black;
  border-radius: 8px;
  gap: 2px;
  transition: opacity var(--transition-speed) ease, visibility var(--transition-speed) linear;
}

/* Hide the Hamburger Button on Desktop */
.menu-toggle {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
  min-width: unset;
  max-width: unset;
}

/* Hamburger Menu Lines */
.menu-toggle span {
    display: block;
    width: 30px;
    height: 2px;
    background: black;
}

/* Hide the Checkbox */
.mobile-nav-container {
  display: none;
}

#menu-toggle {
    display: none;
}

footer {
  width: 100%;
  padding-inline: var(--main-default-margin);
  padding-block: var(--main-default-margin) 2rem;
}
footer nav > span {
  font-size: var(--footer-font-size);
  line-height: var(--footer-line-height);
}
footer nav > a {
  font-size: var(--footer-font-size);
  line-height: var(--footer-line-height);
  letter-spacing: 0.4px;
  color: var(--nav-color);
  margin-right: 1ch;
}
footer nav > a:visited {
  color: var(--nav-color);
}

main {
  padding-top: var(--main-padding-top);
  z-index: 0;
}
main.full-viewport {
  padding-top: 0;
  margin-inline: 0;
}

.btn {
  display: flex;
  background: transparent;
  white-space: nowrap;
  width: min-content;
  height: min-content;
  font-family: "Sombra Variable";
  font-variation-settings: normal;
  font-weight: 300;
  color: var(--nav-color);
  border: 2px solid var(--button-border-color);
  padding: .725rem 1rem;
  font-size: var(--button-font-size);
  line-height: var(--button-line-height);
  letter-spacing: 0.48px;
  cursor: pointer;
  transition: color var(--transition-speed) ease-in-out, background-color var(--transition-speed) ease-in-out;
}

a.btn {
  text-decoration: none;
  -webkit-text-decoration: none;
}

a.btn:hover,
button.btn:hover {
  color: white;
  background: black !important;
  text-decoration: none;
  -webkit-text-decoration: none;
  transition: color var(--transition-speed) ease-in-out, background-color var(--transition-speed) ease-in-out;
}

#mini_cart small {
  padding-left: var(--default-gap);
}

@media (min-width:1200px) {
  body {
    margin-inline: auto;
  }
  footer nav {
    display: flex;
    justify-content: space-between;
  }
}

/* Mobile Styles */
@media (max-width: 1023px) {
/* Adjust navbar for mobile */
  nav.top-nav > ul {
    display: none;
  }
  nav.top-nav a.logo {
    justify-content: left;
    display: flex;
    justify-content: center;
  }
  nav.top-nav a.logo img {
  }
  .navbar {
      justify-content: space-between;
  }

  /* Show Hamburger and Hide Desktop Nav */
  .mobile-nav-container {
    display: flex;
    position: absolute;
    top: 28px;
    right: 28px;
    z-index: 1;
  }
  .menu-toggle {
      display: flex;
  }
  .desktop-nav {
      display: none;
  }

  /* Move logo to the left */
  .logo {
      order: 0;
  }

  /* Show Mobile Menu When Checkbox is Checked */
  #menu-toggle:checked ~ .mobile-nav {
    visibility: visible;
    opacity: 100%;
    transition: opacity var(--transition-speed) ease, visibility 0s linear;
  }
}

@media (max-width: 767px) {
  :root {
    --headline-padding-block: calc(clamp(var(--nav-padding-block), 16vw, 100px) - var(--nav-padding-block));
    --nav-font-size: clamp(1.5rem, 1.8vw, 1.875rem);
    --button-font-size: 1.25rem;
    --info-button-font-size: 1.125rem;
  }
  body {
  }
  nav.top-nav {
    border-bottom: none;
    padding-bottom: 1em;
  }
  main {
    padding-inline: 0;
    width: 100%;
    margin-bottom: var(--main-default-margin);
  }
  /* Adjust navbar for mobile */
  nav.top-nav > ul {
    display: none;
  }
  nav.top-nav a.logo {
    justify-content: left;
    display: flex;
    justify-content: center;
  }
  nav.top-nav a.logo img {
  }
  .navbar {
      justify-content: space-between;
  }

  /* Show Hamburger and Hide Desktop Nav */
  .mobile-nav-container {
    display: flex;
    position: absolute;
    top: 28px;
    right: 28px;
    z-index: 1;
  }
  .menu-toggle {
      display: flex;
  }
  .desktop-nav {
      display: none;
  }

  /* Move logo to the left */
  .logo {
      order: 0;
  }

  /* Show Mobile Menu When Checkbox is Checked */
  #menu-toggle:checked ~ .mobile-nav {
    visibility: visible;
    opacity: 100%;
    transition: opacity var(--transition-speed) ease, visibility 0s linear;
  }
  footer {
    padding-inline: 0;
    margin-inline: 0;
    padding-block: 2rem 1rem;
  }
  footer ul li:last-of-type {
    padding-block: 2rem 0;
    text-align: left;
    line-height: var(--p-line-height);
  }
  footer nav > span {
    display: block;
    padding-top: 1em;
    line-height: 1;
  }
}

@media (max-width: 375px) {
  footer nav > a {
    margin-right: 4px;
  }
}

#scroll-hint {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.5s ease, transform 0.5s ease;
  pointer-events: none;
}
#scroll-hint.hidden {
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
}
@media (max-width: 767px) {
  #scroll-hint {
    display: none;
  }
}

/* Home page specific styles */

:root {
  --card-section-internal-padding: var(--content-default-margin);
}
main {
  gap: var(--default-gap);
  --banner-font-size: clamp(1rem, calc(2.5 * var(--scale-factor)), 2rem);
  --section-title-font-size: 1.875rem;
  --section-title-line-height: 1;
}

/* ============================================
   FROSTED GLASS LEGIBILITY SYSTEM
   Premium blur + vignette for video overlay
   ============================================ */

/* Scroll hint: white on homepage for video background */
#scroll-hint img {
  filter: brightness(0) invert(1);
}

/* Nav: clean transparent bg, vignette handles legibility */
.top_nav_container {
  background-color: transparent;
  transition: background-color .3s ease;
}
.top_nav_container:has(nav.white) {
  background-color: white;
  transition: background-color .6s ease;
}
.top_nav_container nav {
  padding-inline: var(--card-section-internal-padding);
  margin-inline: 0;
}
.top_nav_container nav.white {
  background-color: transparent;
}

/* Nav text: Sombra Variable uses standard weights (300, 400, etc.) */
.top_nav_container nav a {
  font-weight: 400;
}
/* White nav text with refined shadow */
.top_nav_container nav:not(.white) a {
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 0, 0, 0.15);
  text-decoration: none;
  text-decoration-color: transparent;
  transition: text-shadow 0.2s ease;
}
.top_nav_container nav:not(.white) a:hover {
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.8);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 255, 255, 0.2);
}
/* White logo over video (filter inverts black SVG to white) */
.top_nav_container nav:not(.white) a.logo img {
  filter: brightness(0) invert(1);
  transition: filter 0.3s ease;
}
.top_nav_container nav.white a.logo img {
  filter: none;
}

/* Mobile: white hamburger menu over video */
.top_nav_container nav:not(.white) .menu-toggle span {
  background: white;
}
/* Mobile nav dropdown: black text, no shadow */
.top_nav_container nav:not(.white) .mobile-nav {
  box-shadow: none;
}
.top_nav_container nav:not(.white) .mobile-nav a {
  color: var(--nav-color);
  text-shadow: none;
}
.top_nav_container nav:not(.white) .mobile-nav a:hover {
  text-decoration: underline;
  text-decoration-color: var(--nav-color);
}

/* Cinematic vignette gradient on video for guaranteed nav legibility */
main div.banner-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 180px;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.15) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
  border-radius: 14px 14px 0 0;
}

/* Banner card base styles */
main div.banner-container > div {
  padding: 1.8em 2em;
  margin: -1.5em;
  border-radius: 16px;
  color: white;
}

/* Frosted glass effect */
main div.banner-container > div {
  background: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

footer {
  padding-inline: var(--card-section-internal-padding);
  padding-block-start: 0px;
}

main div.banner-container {
  position: relative;
  display: flex;
  font-family: "Attila Sans Variable", sans-serif;
  font-variation-settings: "wght" var(--attila-regular), "cnst" var(--attila-sharp);
}

main div.banner-container > video {
  width: 100%;
  height: auto;
  display: block;
}

main div.banner-container > div {
  position: absolute;
  top: clamp(6rem, 16lvw, 11rem);
  right: calc(8.5rem - clamp(3rem, calc(4 * var(--scale-factor)), 3.125rem));
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  gap: clamp(1.25rem, 2.6lvw, 2.4rem);
  gap: clamp(var(--default-gap), calc(2.5 * var(--scale-factor)), calc(2 * var(--default-gap)))
}

main div.banner-container div.banner-text {
  font-size: var(--banner-font-size);
  line-height: 1.2;
  display: flex;
  flex-direction: column;
  gap: var(--default-gap);
}
main div.banner-container div.banner-text span {
  font-size: var(--banner-font-size);
  line-height: 1.1;
  display: block;
  font-family: "Attila Sans Variable", sans-serif;
  font-variation-settings: "wght" var(--attila-semibold), "cnst" var(--attila-sharp);
  color: white;
}
main div.banner-container div.banner-text p {
  font-size: clamp(.875rem, calc(2.5 * var(--scale-factor)), calc(var(--banner-font-size) * 0.55));
  line-height: 1.27;
  color: white;
  font-variation-settings: "wght" var(--attila-medium), "cnst" var(--attila-sharp);
  letter-spacing: .2px;
}

/* Text shadows */
main div.banner-container > div div.banner-text span,
main div.banner-container > div div.banner-text p {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

main div.banner-container div.banner-text b {
  font-variation-settings: "wght" var(--attila-semibold), "cnst" var(--attila-sharp);
}

main div.banner-container a.btn {
  display: block;
  font-size: var(--button-font-size);
  width: min-content;
  white-space: nowrap;
  cursor: pointer;
  z-index: 2;
  min-width: 150px;
  text-align: center;
  color: white;
  border-color: white;
  font-weight: 400;
}

main div.banner-container > div a.btn {
  font-size: var(--nav-font-size);
}
main div.banner-container > div a.btn:hover {
  text-decoration-color: rgba(255, 255, 255, 0.8);
  text-shadow: 0;
  background: white !important;
  color: var(--nav-color);
}


main .sections {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--default-gap);
  padding-block: var(--card-section-internal-padding);
  padding-inline: var(--card-section-internal-padding);
  transition: grid-template-columns 0.5s ease;
  --laptop-max-height: 780px;
}

main section {
  padding: 0;
  border: 1px solid #d1d1d1;
  border-radius: 17px;
  overflow: hidden;
  box-sizing: border-box;
  position: relative;
}

main section img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top;
  aspect-ratio: calc(89/92);
  height: calc(100% - (3 * var(--section-title-font-size)))
}

main section h2 {
  text-align: center;
  padding-block: 1em;
  font-size: var(--section-title-font-size);
  line-height: var(--section-title-line-height);
  font-weight: 400;
}

main section h2 a {
  color: black;
}


/* carousel */

.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  height: calc(100% - (3 * var(--section-title-font-size)))
}

.carousel-images {
  display: flex;
  transition: transform 0.5s ease-in-out;
  position: relative;
  max-height: 100%;
  height: 100%;
}

.carousel-images a {
  max-width: 100%;
  width: 100%;
  flex-shrink: 0;
}
.carousel-images img {
  max-width: 100%;
  flex-shrink: 0;
  width: 100%;
  height: 100%;
}

.carousel.centered .carousel-images img,
.carousel-images img.centered {
  object-position: center;
}

.carousel-indicators {
  position: absolute;
  bottom: 1em;
  left: 0;
  right: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 4px;
  z-index: 10;
  pointer-events: auto;
}

.carousel-indicators .indicator {
  width: 16px;
  height: 16px;
  border: 1px solid black;
  border-radius: 50%;
  background-color: white;
  cursor: pointer;
}

.carousel-indicators .indicator.active {
  background-color: black;
}

.carousel_paging_container {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  justify-content: space-around;
}
.carousel_paging_container img {
  height: var(--section-title-font-size);
  width: var(--section-title-font-size);
  object-fit: contain;
  aspect-ratio: 1;
  cursor: pointer;
}
.carousel_paging_container img:first-of-type {
  transform: rotate(180deg);
}

.carousel-overlay {
  position: absolute;
  top: 0;
  z-index: 9;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fafafafa;
  padding: 20px 16px;
  font-family: "Attila Sans Variable", sans-serif;
  font-variation-settings: "wght" var(--attila-light), "cnst" var(--attila-sharp);
  --overlay-font-at-1200: 1.7rem;
  font-size: clamp(1.5rem, 2 * var(--scale-factor), var(--overlay-font-at-1200));
  line-height: 1.2;
  border: 1px solid #d1d1d1;
  border-radius: 0 0 17px 17px;
  cursor: pointer;
  opacity: 90%;
}

/* Flippable cards */

.flipside {
  opacity: 0;
  transition: opacity .5s ease;
  position: absolute;
  top: 0;
  bottom: calc((3 * var(--section-title-font-size)));
  z-index: 99;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #fafafad8;
  padding: calc(2 * var(--default-gap));
  font-size: 1.20rem;
  line-height: 1.25;
}

.flipside p {
  font-family: 'Attila Sans Variable';
  font-variation-settings: "wght" var(--attila-light), "cnst" var(--attila-sharp);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.flippable:hover .flipside {
  opacity: 100%;
}

/* Specific cards */

.curation p {
  line-height: 1.25;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: var(--default-gap);
}

.curation p span,
.curation p date {
  display: block;
  font-variation-settings: "wght" var(--attila-medium), "cnst" var(--attila-sharp);
}

.mvdetails p {
  justify-content: center;
}

.mvdetails p img {
  object-fit: contain;
  aspect-ratio: unset;
  height: auto;
  width: 100%;
}

.icon_600_card.flippable:hover .flipside {
  height: fit-content;
}
.icon_600_card.flippable:hover .flipside a:hover,
.icon_600_card.flippable:hover .flipside a:active {
  text-decoration: none;
  -webkit-text-decoration: none;
  text-decoration-color: transparent;
}

/* 600 card - uses CSS variables set in HTML */
#id_600_svg {
  fill: var(--six-hundred-text-color, black);
  aspect-ratio: calc(89 / 92);
  max-height: 100%;
}

.icon_600_container {
  display: block;
  text-align: center;
  background: var(--six-hundred-bg-color, rgb(173, 175, 115));
  height: calc(100% - (3 * var(--section-title-font-size)));
}
.icon_600 {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.playlists_card.flippable:hover .flipside {
  height: min-content;
}

.newsletter_cta {
  display: grid;
  padding-block-end: var(--card-section-internal-padding);
  padding-inline: var(--card-section-internal-padding);
  grid-template-columns: 2fr 1fr;
  gap: var(--default-gap);
}

.newsletter_cta .col1,
.newsletter_cta .col2 {
  display: flex;
  flex-direction: column;
  gap: var(--default-gap);
}

.newsletter_cta .col1 h3,
.newsletter_cta .col1 strong {
  font-size: var(--section-title-font-size);
  line-height: 1.2;
  text-wrap-style: balance;
}

.newsletter_cta .col1 p {
  padding-inline-end: clamp(0px, 5lvw, 5em);
}

.newsletter_cta .col2 {
}

.newsletter_cta form {
  display: contents;
}

.newsletter_cta input {
  font-family: "Sombra Variable";
  font-variation-settings: normal;
  font-weight: 300;
  font-size: var(--input-font-size);
  line-height: var(--input-line-height);
  padding: 1rem;
  border: 1px solid #707070;
  outline-color: var(--nav-color);
  width: auto;
  box-sizing: content-box;
  height: var(--input-font-size);
}
.newsletter_cta input[required]::placeholder {
  color: black;
}
.newsletter_cta input[name=nba] {
  display: none;
}

.newsletter_cta a.btn {
  margin-block-end: var(--default-gap);
}

@media (min-width: 1441px) {
  main .sections {
  }
}

@media (max-width: 1440px) {
  main .sections {
  }
}

@media (max-width: 1023px) {
  main .sections {
    grid-template-columns: repeat(2, 1fr);
  }
  .flipside {
    font-size: clamp(1.2em, 2.5 * var(--scale-factor), 1.5em);
  }
  .curation p {
    font-size: clamp(1.20rem, 3lvw, 2.00rem);
  }
  .icon_600_card .flipside,
  .icon_600_card .flipside p {
    font-size: 1.5rem;
  }
}

@media (max-width: 767px) {
  :root {
    --card-section-internal-padding: 0;
  }
  main {
    padding: 0;
    --section-title-font-size: 1.5rem;
    --banner-font-size: 2rem;
  }
  main div.banner-container a.btn {
    width: fit-content;
    margin-inline: auto;
    text-align: center;
    font-size: 1.625rem;
  }
  main .sections {
    grid-template-columns: repeat(2, 1fr);
    padding-top: 0;
  }

  main div.banner-container {
    margin-inline: 0;
    padding-inline: 0;
    display: block;
  }
  /* On mobile, banner text is below video - no blur or shadow needed */
  main div.banner-container::before {
    display: none;
  }
  main div.banner-container > div {
    position: initial;
    width: 100%;
    padding-inline: 0;
    padding-block: 1em 3em;
    margin: 0;
    border-radius: 0;
    gap: 1em;
    font-size: 2rem;
    line-height: 1.1;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  main div.banner-container div.banner-text span {
    font-size: var(--banner-font-size);
    margin-bottom: var(--default-gap);
    color: black;
    text-shadow: none;
  }
  main div.banner-container div.banner-text p {
    font-size: clamp(1.275rem, calc(2.5 * var(--scale-factor)), calc(var(--banner-font-size) * 0.55));
    color: black;
    text-shadow: none;
  }
  main div.banner-container a.btn {
    color: black;
    border-color: black;
  }
  main div.banner-container a.btn:hover {
    background: black;
    color: white;
  }
  .banner-container img,
  .banner-container video {
    height: 48vh;
    width: 100%;
    object-fit: cover;
    overflow: hidden;
    object-position: left center;
  }
  .carousel-overlay {
    font-size: clamp(1.125rem, 3.8 * var(--scale-factor), var(--overlay-font-at-1200));
  }
  .carousel-indicators {
    gap: 4px;
  }
  .carousel-indicators .indicator {
    width: 18px;
    height: 18px;
  }
  .flipside {
    font-size: clamp(.80rem, 3lvw, 1.50rem);
  }
  .curation p {
    font-size: clamp(.80rem, 3lvw, 1.50rem);
  }
  .mvdetails p img {
    height: 100%;
    width: auto;
    padding-top: 1rem;
    max-width: 100%;
  }

  .icon_600_card .flipside,
  .icon_600_card .flipside p {
    font-size: clamp(.8725rem, 3.68vw, 1rem);
    text-wrap-style: pretty;
  }
}

@media (max-width: 767px) and (max-device-width: 767px) {
  .carousel-indicators .indicator {
    width: 18px;
    height: 18px;
  }
  .carousel-overlay {
    font-size: 1rem;
  }
}


@media (max-width: 767px) {
  main {
    --section-title-font-size: 1.875rem;
  }
  main .sections {
    grid-template-columns: repeat(1, 1fr);
    max-height: none;
    height: auto;
  }
  .carousel-overlay {
    font-size: 1.875rem;
  }
  .flipside {
    font-size: 1.5rem;
    opacity: 100%;
  }
  .playlists_card.flippable .flipside {
    height: min-content;
  }
  .curation p {
    font-size: 1.5rem;
  }
  .icon_600_card .flipside,
  .icon_600_card .flipside p {
    font-size: clamp(1rem, 8vw, 1.7rem);
  }
  .icon_600_container {
    height: 350px;
  }
  .newsletter_cta {
    grid-template-columns: 1fr;
    padding-inline: 0em;
    padding-block: 3em 1em;
    gap: calc(2 * var(--default-gap));
  }
}

/* Full-screen video modal */
.video-modal {
  display: none;
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.video-modal.open {
  display: block;
  opacity: 1;
}

.video-modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.video-modal-wrapper {
  position: relative;
  width: 100%;
  max-width: 1920px;
  aspect-ratio: 16 / 9;
}

.video-modal-close {
  position: fixed;
  top: 1rem;
  right: 1rem;
  background: rgba(0, 0, 0, 0.5);
  border: 2px solid white;
  color: white;
  font-size: 3rem;
  font-weight: 300;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: all 0.2s ease;
  pointer-events: auto;
  isolation: isolate;
  opacity: 0;
}

.video-modal.open ~ .video-modal-close {
  display: flex;
  opacity: 1;
}

/* Hide header and scroll hint when video modal is open */
body:has(.video-modal.open) .top_nav_container,
body:has(.video-modal.open) #scroll-hint {
  display: none;
}

.video-modal-close:hover {
  background-color: white;
  color: black;
  transform: scale(1.1);
}

@media (max-width: 767px) {
  .video-modal-content {
    padding: 1rem;
  }

  .video-modal-close {
    width: 2rem;
    height: 2rem;
    font-size: 2rem;
    top: 0.6rem;
    right: 0.5rem;
  }
}

/* Video modal CTA card */
.video-modal-cta {
  position: absolute;
  bottom: 6rem;
  right: 1rem;
  line-height: 1.5;
  padding: 1.2em 1.6em .86em;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  font-family: "Attila Sans Variable", sans-serif;
  font-variation-settings: "wght" var(--attila-medium), "cnst" var(--attila-sharp);
  opacity: 0;
  transform: translateY(30px);
  z-index: 10;
  pointer-events: none;
}

.video-modal.open .video-modal-cta {
  animation: slideInCta 0.5s ease 0.8s forwards;
  pointer-events: auto;
}

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

.video-modal-cta a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  letter-spacing: 0.3px;
  display: flex;
  align-items: center;
  gap: 0.6em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: all 0.2s ease;
}

.video-modal-cta a span {
  display: inline;
  line-height: 1.4;
}

.video-modal-cta a i {
  font-style: normal;
  font-size: 1.2em;
  transition: transform 0.5s ease;
  display: inline-block;
}

.video-modal-cta:hover {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(255, 255, 255, 0.5);
}

.video-modal-cta:hover a {
  color: var(--nav-color, #1a1a1a);
  text-shadow: none;
  gap: 0.6em;
}

.video-modal-cta:hover a i {
  transform: translateX(4px);
}

@media (max-width: 767px) {
  .video-modal-cta {
    right: 1rem;
    left: auto;
    padding: 0.9em;
    overflow: hidden;
    transition: padding 0.3s ease;
  }

  .video-modal-cta a {
    font-size: 1rem;
    white-space: nowrap;
    justify-content: center;
    gap: 0em;
  }

  .video-modal-cta a span {
    opacity: 0;
    max-width: 0;
    overflow: hidden;
    display: inline-block;
    transition: opacity 0.3s ease, max-width 0.5s ease, margin 0.5s ease;
    font-size: 1.25rem;
    margin-right: 0;
    line-height: 1.3;
  }

  .video-modal-cta a i {
    font-size: 1.4em;
    line-height: 1;
  }

  .video-modal-cta:hover,
  .video-modal-cta:focus-within {
    padding: 0.9em 1.2em 0.65em;
  }

  .video-modal-cta:hover a span,
  .video-modal-cta:focus-within a span {
    opacity: 1;
    max-width: 16rem;
    margin-right: 0.5em;
  }
}

/* Mobile portrait: CTA below video, full width, hovered look */
@media (max-width: 767px) and (orientation: portrait) {
  .video-modal-wrapper {
    flex-shrink: 0;
  }

  .video-modal-content {
    flex-direction: column;
    justify-content: flex-start;
    padding-top: 15vh;
  }

  .video-modal-cta {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    width: 100%;
    margin-top: 1.5rem;
    text-align: center;
    padding: 1em 1.2em 0.8em;
    /* Hovered look */
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(255, 255, 255, 0.5);
  }

  .video-modal-cta a {
    justify-content: center;
    gap: 0.5em;
    color: var(--nav-color, #1a1a1a);
    text-shadow: none;
  }

  .video-modal-cta a span {
    opacity: 1;
    max-width: none;
    margin-right: 0;
  }

  .video-modal-cta a i {
    transform: translateX(4px);
  }
}

/* Click overlay for hiding CTA in landscape - only visible in landscape mobile */
.video-click-overlay {
  display: none;
}

@media (max-width: 767px) and (orientation: landscape) {
  .video-click-overlay {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 5;
    cursor: pointer;
  }
}

/* Mobile landscape: expanded CTA, semi-transparent white, closer to bottom */
@media (max-width: 767px) and (orientation: landscape) {
  .video-modal-cta {
    bottom: 0.75rem;
    padding: 0.7em 1em 0.6em;
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
  }

  .video-modal-cta a {
    font-size: 0.85rem;
    color: var(--nav-color, #1a1a1a);
    text-shadow: none;
    gap: 0.5em;
  }

  .video-modal-cta a span {
    opacity: 1;
    max-width: none;
    font-size: 0.85rem;
    color: white;
  }

  .video-modal-cta a i {
    font-size: 1.1em;
    color: white;
  }
}

