/* Standard breakpoints:
   - Tablet & down: 1024px
   - Mobile & down: 768px
   Order mirrors main.css sections for easy navigation.
*/

/* ===== Nav ===== */

/* Tablet & down */
@media (max-width: 1024px) {
  /* (no tablet-specific nav overrides in source) */
}

/* Mobile & down */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: calc(100% - 0.25rem);
    right: 1rem;
    left: 1rem;
    display: block;
    background: var(--color-bg);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1100;
  }
  .nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links li:last-child {
    border-bottom: 0;
  }
  .nav-links li a {
    display: block;
    padding: 1rem 1.25rem;
  }
  .nav-links li a::after {
    left: 1.25rem;
    right: 1.25rem;
  }
  nav.nav-open .nav-links {
    max-height: 60vh;
  }
  nav.nav-open .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  nav.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
  }
  nav.nav-open .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .logo-text {
    display: none;
  }
  .logo-img {
    height: 32px;
  }
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  .nav-links,
  .hamburger span {
    transition: none;
  }
}

@media (max-width: 1366px) {
  .hamburger {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: calc(100% - 0.25rem);
    right: 1rem;
    left: 1rem;
    display: block;
    background: var(--color-bg);
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.14);
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 1100;
  }
  .nav-links li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .nav-links li:last-child {
    border-bottom: 0;
  }
  .nav-links li a {
    display: block;
    padding: 1rem 1.25rem;
  }
  .nav-links li a::after {
    left: 1.25rem;
    right: 1.25rem;
  }
  nav.nav-open .nav-links {
    max-height: 60vh;
  }
  nav.nav-open .hamburger span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
  }
  nav.nav-open .hamburger span:nth-child(2) {
    opacity: 0;
  }
  nav.nav-open .hamburger span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
  }

  .logo-text {
    display: none;
  }
  .logo-img {
    height: 32px;
  }
}

@media (max-width: 768px) {
  .theme-toggle-wrapper,
  .theme-toggle-wrapper.collapsed {
    display: none;
  }
  .theme-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: 0.5rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-accent-green);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
  }
  :root[data-theme="light"] .theme-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: #dad3f6;
    color: #3f3b98;
  }
  .theme-icon:active {
    transform: scale(0.96);
  }
}

@media (max-width: 1366px) {
  .theme-toggle-wrapper,
  .theme-toggle-wrapper.collapsed {
    display: none;
  }
  .theme-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    margin-left: 0.5rem;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: var(--color-accent-green);
    cursor: pointer;
    transition: transform 0.15s ease, background 0.2s ease;
  }
  :root[data-theme="light"] .theme-icon {
    background: rgba(0, 0, 0, 0.05);
    border-color: #dad3f6;
    color: #3f3b98;
  }
  .theme-icon:active {
    transform: scale(0.96);
  }
}

/* ===== Header / Hero ===== */

/* Tablet & down */
@media (max-width: 1024px) {
  /* (no tablet-specific hero overrides in source) */
}

/* Mobile & down */
@media (max-width: 768px) {
  header #container {
    grid-template-columns: 1fr;
    min-height: 45vh;
    max-height: none;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 75vh;
    padding-top: 0;
    gap: 1rem;
  }
  header .image {
    max-width: 80%;
  }
  header .content {
    margin: 0;
    padding: 0;
    width: 90%;
  }
}

/* ===== Productions ===== */

/* Mobile-specific h1 size */
@media (max-width: 768px) {
  #productions h1 {
    font-size: clamp(1.5rem, 5vw + 0.5rem, 2.25rem);
  }
}

/* Toolbar stacking (tablet & down -> we’ll use 820→1024 standard) */
@media (max-width: 1024px) {
  .prod-controls {
    gap: 0.75rem;
  }
  .prod-search {
    order: 2;
    flex: 1 1 100%;
    max-width: 100%;
  }
  .prod-filters {
    order: 1;
  }
}

/* Legacy “enhancements” grid steps consolidated */
@media (min-width: 1440px) {
  .prod-grid {
    grid-template-columns: repeat(8, 1fr);
  }
}
@media (max-width: 1200px) {
  .prod-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (max-width: 768px) {
  .prod-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ===== About ===== */

/* Mobile-specific h1 size */
@media (max-width: 768px) {
  #about h1 {
    font-size: clamp(1.5rem, 5vw + 0.5rem, 2.25rem);
  }
}

/* 2-col → 1-col at ~tablet */
@media (max-width: 1024px) {
  .about-hero {
    grid-template-columns: 1fr;
  }
  .about-photo {
    order: -1;
  }
}

/* ===== Testimonials ===== */
/* (structure already responsive) */

/* ===== Endorsements ===== */
/* (no size-based changes other than wrap in base) */

/* ===== Services ===== */

/* Tablet & down: 3 → 2 columns */
@media (max-width: 1024px) {
  #services .services-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Mobile & down: stack, tighter outer margins */
@media (max-width: 768px) {
  #services {
    margin: 4rem auto;
    padding: 0 1rem;
  }
  #services .services-container {
    grid-template-columns: 1fr;
  }
  #services h1 {
    font-size: clamp(1.5rem, 5vw + 0.5rem, 2.25rem);
  }
}

/* Motion preference */
@media (prefers-reduced-motion: reduce) {
  #services .services-column {
    transition: none;
  }
  .text-holder h1 a::after {
    transition: none;
  }
}

/* Desktop-plus specific icon enlargement (kept) */
@media (min-width: 1025px) {
  #services .services-icon {
    height: 96px;
    width: 100%;
  }
  #services .services-column img {
    width: 72px;
    height: 72px;
  }
}

/* ===== Contact ===== */

/* Mobile & down: smaller heading, stack input rows, tighter gutters */
@media (max-width: 768px) {
  #contact h1 {
    font-size: clamp(1.5rem, 5vw + 0.5rem, 2.25rem);
  }
  .input-row {
    flex-direction: column;
  }
}
@media (max-width: 420px) {
  #contact {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: left;
  }

  .footer-tagline {
    font-size: 0.75rem;
  }
}

@media (max-width: 768px) {
  #yt-lightbox .ytlb__dialog {
    width: 95vw;
  }
  #yt-lightbox .ytlb__close {
    top: 0.5rem;
    right: 0.5rem;
    width: 32px;
    height: 32px;
    font-size: 12px;
    line-height: 1;
    border-width: 1px;
  }
}
@media (max-width: 640px) {
  #yt-lightbox .ytlb__nav {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
}
@media (max-width: 768px) {
  #yt-lightbox .ytlb__prev {
    left: -40px;
  }
  #yt-lightbox .ytlb__next {
    right: -40px;
  }
}
