/* studios-carousel.css */

/* 1. Section wrapper: contains both desktop and mobile */
#studios-carousel {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* 2. Desktop scroll container: sticky, full-width, viewport height */
.studios-scroll-container {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 100vh;
  z-index: 10;
  width: 100%;
  margin: 0;
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

/* 3. Slides wrapper: flexible height to fill remaining space */
.studios-slides {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
}

/* 4. Each slide: absolute, cover, fade transition */
.studio-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4,0,0.2,1);
  pointer-events: none;
  z-index: 0;
}

.studio-slide.is-active {
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

/* 5. Background image: cover container */
.studio-slide .slide-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.8);
}

/* 6. Slide content overlay: centered text & CTA */
.studio-slide .slide-content {
  position: absolute;
  top: 30%;
  left: 50%;
  transform: translate(-50%, -30%);
  text-align: center;
  color: #fff;
  width: 70%;
  max-width: 1010px;
  z-index: 2;
}

.studio-slide .slide-content h1 {
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
  margin-bottom: 40px;
}

.studio-slide .slide-content .slide-cta {
  display: inline-block;
  padding: 2.5rem 5rem;
  background: var(--color-1);
  color: #fff;
  font-weight: 700;
  font-size: 1.5rem;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
  border: none;
}

.studio-slide .slide-content .slide-cta:hover {
  background: var(--color-1);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.studio-slide .slide-content h2 {
  margin-bottom: 10vh;
}

/* 7. Navigation buttons container */
.studio-nav {
  display: flex;
  justify-content: stretch;
  align-items: stretch;
  gap: 0;
  padding: 0;
  background: #222;
  border-radius: 0 0 0.5rem 0.5rem;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  flex-shrink: 0;
  min-height: 120px;
  max-height: 25vh;
}

/* 8. Each nav item: flex, responsive height, fallback bg */
.studio-nav-item {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  background: #444;
  color: #fff;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 700;
  border: none;
  outline: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  position: relative;
  z-index: 1;
  letter-spacing: 0.01em;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 0;
}

.studio-nav-item-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  transition: background-color 0.2s ease;
}

.studio-nav-item.active .studio-nav-item-overlay {
  background-color: var(--active-color);
}

.studio-nav-item-content {
  z-index: 1;
  padding: 20px;
}

.studio-nav-item.active,
.studio-nav-item:focus,
.studio-nav-item:not(.active):hover {
  background-color: var(--color-1);
  color: #fff;
}

.studio-nav-item:not(.active):not(:hover) {
  background-color: #222;
  color: #fff;
}

/* 9. Studio label text inside nav button */
.studio-nav-item .label {
  display: block;
  position: absolute;
  bottom: 0.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
  pointer-events: none;
  text-shadow: 0 0 3px rgba(0, 0, 0, 0.7);
  line-height: 1;
}

/* 10. Overlay for hover & active states */
.studio-nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  /* transparent */
  transition: background-color 0.2s ease;
}

.studio-nav-item:not(.active):hover::after {
  background-color: rgba(255, 140, 0, 0.3);
  /* orange @ 30% */
}

/* 11. Scroll container height for desktop scroll effect */
#studios-carousel {
  height: 600vh; /* 5 studios + 1 buffer = 6 x 100vh */
}

.studio-slide.hidden {
  display: none;
}

/* Accordion styles for mobile */
.studios-accordion {
  display: none;
}

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

/* ========================= */
/* Standard Responsive Breakpoints */
/* ========================= */

/* Extra large devices (large desktops, 1200px and down) */
@media (max-width: 1200px) {
  /* No specific rules from previous breakpoints, but ready for future use */
}

/* Large devices (desktops, 992px and down) */
@media (max-width: 992px) {
  .studios-scroll-container {
    height: calc(100vh - 150px); /* Account for larger mobile header */
    height: calc(100dvh - 150px); /* Use dynamic viewport height for better mobile support */
    max-height: calc(100vh - 150px);
    max-height: calc(100dvh - 150px);
  }
  .studio-slide .slide-content .slide-cta {
    padding: 14px 24px;
    font-size: 1rem;
  }
  
  .studio-nav {
    min-height: 80px;
    max-height: 20vh;
  }
  .studio-nav-item {
    font-size: clamp(0.9rem, 3vw, 1.4rem);
  }
}

/* Medium devices (tablets, 768px and down) */
@media (max-width: 768px) {
  #studios-carousel {
    height: auto; /* Reset height for mobile */
    position: relative;
    z-index: 1; /* Lower z-index than hero section */
  }
  
  .studios-scroll-container {
    display: none !important; /* Hide desktop version */
  }

  .studios-accordion {
    display: block !important;
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
    margin-top: 2rem; /* Add spacing to prevent overlap with hero section */
  }
  
  .studio-accordion-item {
    border-bottom: 1px solid #eee;
  }
  .studio-accordion-header {
    width: 100%;
    text-align: left;
    padding: 1.2rem 1rem;
    font-size: 1.2rem;
    font-weight: 700;
    background: var(--color-3, #333);
    color: #fff;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background 0.2s;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .studio-accordion-header:after {
    content: '\25BC';
    font-size: 1rem;
    margin-left: 1rem;
    transition: transform 0.2s;
  }
  .studio-accordion-item.active .studio-accordion-header:after {
    transform: rotate(-180deg);
  }
  .studio-accordion-panel {
    display: none;
    background: #222;
    padding: 1rem 1rem 2rem 1rem;
    animation: fadeIn 0.3s;
  }
  .studio-accordion-item.active .studio-accordion-panel {
    display: block;
  }
  .studio-accordion-panel .slide-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
    filter: brightness(0.85);
  }
  .studio-accordion-panel .slide-content {
    position: static;
    width: 100%;
    max-width: 100%;
    color: #fff;
    text-align: left;
    padding: 0;
    margin: 0;
  }
  .studio-accordion-panel .slide-content h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 2rem;
    text-shadow: none;
  }
  .studio-accordion-panel .slide-cta {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    background: var(--color-1);
    color: var(--color-6);
    text-decoration: none;
  }
}

/* Small devices (landscape phones, 576px and down) */
@media (max-width: 576px) {
  .studio-nav {
    min-height: 60px;
    max-height: 15vh;
  }
  .studio-slide .slide-content .slide-cta {
    padding: 8px 8px;
  }
  
  .studios-accordion {
    margin-top: 3rem; /* Extra spacing for very small screens */
  }
}