/* ==========================================================================
   NeuroVIZR Responsive & Clean Styles
   ========================================================================== */

/* Prevent horizontal overflow on all devices */
html, body {
  max-width: 100%;
  overflow-x: hidden !important;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

/* Fix split-words animated headings spacing */
.split-words {
  display: inline-block !important;
}

.split-words .word {
  display: inline-block !important;
}

.split-words .whitespace {
  display: inline-block !important;
  width: 0.35em !important;
}

/* Image & Media responsiveness */
img, picture, svg {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
}

video {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

/* YouTube & iframe responsive containers */
iframe {
  max-width: 100%;
  border: 0;
}

.video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background-color: #000;
}

.video-player iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.video-player .video-cover {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  z-index: 5;
  transition: opacity 0.3s ease;
}

.video-player .watch-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: rgba(164, 119, 101, 0.9);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
}

.video-player .watch-btn:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: #a47765;
}

/* Header & Hamburger Menu Button */
.header__icons--end .menu-drawer-button {
  display: none !important;
}

@media screen and (max-width: 768px) {
  .header {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  .header__logo-link img {
    max-width: 140px !important;
    height: auto !important;
  }

  .header__icons--start .menu-drawer-button {
    min-width: 44px;
    min-height: 44px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }
}

/* Mobile Menu Drawer state toggling */
.menu-drawer.active,
menu-drawer[open],
.menu-drawer[open] {
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 99999 !important;
}

.menu-drawer.active .drawer__panel,
menu-drawer[open] .drawer__panel,
.menu-drawer[open] .drawer__panel {
  transform: translateX(0) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Drawer overlay */
.menu-drawer.active::before,
menu-drawer[open]::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: -1;
}

/* Fluid Typography */
h1, .h1 {
  font-size: clamp(2rem, 5vw + 0.5rem, 3.5rem);
  line-height: 1.15;
}

h2, .h2 {
  font-size: clamp(1.6rem, 3.5vw + 0.5rem, 2.6rem);
  line-height: 1.25;
}

h3, .h3 {
  font-size: clamp(1.25rem, 2.5vw + 0.4rem, 1.85rem);
  line-height: 1.3;
}

/* Responsive Grids & Cards on Mobile */
@media screen and (max-width: 768px) {
  .grid {
    gap: 1.5rem;
  }

  .section--padding {
    padding-top: max(2rem, var(--section-padding-top, 2rem) * 0.6) !important;
    padding-bottom: max(2rem, var(--section-padding-bottom, 2rem) * 0.6) !important;
  }

  .video-cards-section {
    padding: 40px 16px !important;
  }

  .video-cards-section .container {
    padding: 0 !important;
  }

  /* History science toggle section */
  .history-toggle-wrapper {
    transition: all 0.4s ease;
  }
  
  .history-toggle-wrapper:not(.active) .history-toggle-content {
    display: none;
  }

  .history-toggle-wrapper.active .history-toggle-content {
    display: block;
    animation: fadeIn 0.3s ease;
  }
}

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

/* Custom Buy Button enhancement */
.custom-buy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 9999px;
  border: none;
  background: #b07d62;
  color: #fff !important;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(176, 125, 98, 0.4);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  min-height: 48px;
  cursor: pointer;
}

.custom-buy-btn:hover {
  background: #9a6b53;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(176, 125, 98, 0.5);
}

/* Footer responsiveness */
@media screen and (max-width: 768px) {
  .footer {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  .footer__item {
    width: 100% !important;
    margin-bottom: 24px;
  }

  .footer-copyright {
    text-align: center;
    padding-top: 16px;
    padding-bottom: 24px;
  }
}

/* Privacy Policy Page Layout & Styling */
.shopify-policy__container {
  max-width: 860px;
  margin: 40px auto 60px;
  padding-left: 24px;
  padding-right: 24px;
  color: #2c2c2c;
  font-family: 'Montserrat', sans-serif;
  line-height: 1.75;
}

.shopify-policy__title h1 {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: #1a1a1a;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.2;
}

.shopify-policy__body h2 {
  font-family: 'Libre Baskerville', serif;
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  color: #a47765;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  line-height: 1.3;
}

.shopify-policy__body h3 {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.shopify-policy__body p {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  color: #404040;
}

.shopify-policy__body ul,
.shopify-policy__body ol {
  padding-left: 28px;
  margin-bottom: 1.25rem;
}

.shopify-policy__body li {
  margin-bottom: 0.5rem;
  color: #404040;
}

.shopify-policy__body a {
  color: #a47765;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.shopify-policy__body a:hover {
  color: #7d594b;
}

/* Accessibility Focus Ring */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #b07d62;
  outline-offset: 3px;
}
