/* ==== THE STUDIO SECTION - EXACTLY LIKE IMPACT ==== */
/* Note: CSS variables are defined globally in style.css */

.ica-studio{ 
  padding: var(--global-padding-desktop) 0;
  background: var(--ica-mint);
  height: auto; /* Flexible height */
  min-height: auto; /* No minimum constraint */
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  contain: layout; /* CSS containment for better performance */
  font-display: swap; /* Font loading optimization to prevent CLS */
}

.ica-studio__grid{
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: var(--global-gap-desktop);
  align-items: center;
  width: 100%;
}

/* Grid order: Media first (left), Content second (right) */
.ica-studio__copy {
  order: 2; /* Content comes second (right) */
}

/* Media/slider */
.ica-studio__media{ 
  position: relative; 
  display: flex;
  justify-content: center;
  align-items: center;
  order: 1; /* Image comes first (left) */
  margin: 0; /* Remove default margins */
  padding: 0; /* Remove default padding */
}

/* Image Slider Container */
.ica-studio__slider {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: var(--ica-mint);
  contain: layout; /* CSS containment for better performance */
  width: 100%;
  max-width: 100%; /* Prevent overflow */
  height: 450px; /* Base height for slider */
  box-sizing: border-box; /* Include padding in width calculation */
}

/* Individual Slides */
.ica-studio__slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.ica-studio__slide.active {
  opacity: 1;
  transform: scale(1);
  z-index: 3;
}

.ica-studio__slide.prev {
  opacity: 0;
  transform: scale(1.05);
  z-index: 2;
}

/* Slide Images */
.ica-studio__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback Placeholder */
.ica-studio__placeholder {
  width: 100%;
  background: var(--ica-mint);
  border: 2px dashed rgba(0, 0, 0, 0.2);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(0, 0, 0, 0.7);
}

.ica-studio__placeholder-content {
  text-align: center;
  padding: 2rem;
}

.ica-studio__placeholder-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.ica-studio__placeholder p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  margin: 0;
  opacity: 0.8;
}

/* Studio Logo */
.studio-logo {
  position: absolute; 
  left: 50%; 
  top: 50%; 
  transform: translate(-50%, -50%);
  width: 250px;
  height: 125px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.25));
  pointer-events: none;
  z-index: 4;
}

/* Copy column */
.ica-studio__copy .eyebrow{
  font-size: 70px; /* Fixed 70px for all screens */
  font-weight: 300;
  line-height: 1; 
  color: var(--ica-green-deep); 
  margin: 0 0 .6rem;
  font-family: var(--font-heading) !important;
  font-display: swap; /* Font loading optimization for CLS prevention */
  min-height: 1.1em; /* Prevent layout shift during font load */
}

/* Prevent h2 link color change on hover */
.ica-studio__copy .eyebrow a {
  color: inherit; /* Inherit the green color from parent */
  text-decoration: none; /* Remove underline */
}

.ica-studio__copy .eyebrow a:hover,
.ica-studio__copy .eyebrow a:focus,
.ica-studio__copy .eyebrow a:active {
  color: inherit; /* Keep the same green color on hover/focus/active */
  text-decoration: none; /* No underline on hover */
}

.ica-studio__copy h3{
  font-size: 19px; /* Fixed 19px for desktop screens */
  line-height: 1.3em; 
  margin: .4rem 0 1rem; 
  color: var(--ica-green-deep);
  font-weight: 600;
  font-family: var(--font-ui) !important; /* Termina for studio title */
  letter-spacing: -0.2px; /* looks dense */
  font-display: swap; /* Font loading optimization for CLS prevention */
  min-height: 1.3em; /* Prevent layout shift during font load */
}

.ica-studio__copy p{ 
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  font-style: normal;
  color: var(--ica-green-deep);
  margin: 0 0 0rem 0; /* Add bottom margin for paragraph spacing */
  text-align: left;
  /* Font loading optimization for CLS prevention */
  font-display: swap;
  min-height: 2.6em; /* Prevent layout shift during font load */
}

/* Highlight text */
.ica-studio__copy .studio-highlight {
  background: linear-gradient(180deg,rgba(255,255,255,0) 50%, rgba(255,255,255,0.48) 50%);
  background-repeat: no-repeat; /* only paint once per line */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone; /* keep highlight behind wrapped lines only */
  font-family: var(--font-ui) !important; /* Termina font */
  font-size: 14px;
  font-weight: 700;
  color: var(--ica-green-deep) !important;
  margin: 1.0rem 0 0.5rem 0;
  text-align: left;
  line-height: 2.6em;
  text-transform: uppercase;
  display: inline; /* allow proper per-line fragments */

}

/* CTA Buttons Container - Layout only, styling handled by ica-buttons.css */
.studio-cta-buttons {
  display: flex;
  gap: 1.5rem;
  margin-top: 1.2rem;
  align-items: flex-start;
  flex-wrap: wrap; /* allow buttons to wrap to next line when needed */
}

/* Button Layout - Equal space distribution like IMPACT component */
.studio-cta-buttons .btn-ica,
.studio-cta-buttons .btn-ica-white {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  text-align: center;
}

/* Desktop dimensions */
@media (min-width: 1025px){
  .ica-studio__slider {
    width: 530px !important; /* Desktop width */
    height: 450px !important; /* Desktop height */
  }
}

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) and (min-width: 768px){
  .ica-studio__slider {
    width: 100% !important;
    max-width: 500px;
    height: 50vh !important; /* 50vh height for tablet */
  }
}

/* Mobile - 767px and below */
@media (max-width: 767px){
  .ica-studio__grid{ 
    grid-template-columns: 1fr; 
    gap: var(--global-gap-mobile);
  }
  
  .ica-studio__slider {
    width: 100% !important;
    max-width: calc(100vw - 4rem); /* Account for section padding */
    height: 40vh !important; /* 40vh height for mobile */
  }
  
  /* Mobile: allow wrap with smaller gap */
  .studio-cta-buttons {
    flex-direction: row;
    width: 100%;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px){
  .ica-studio{
    padding: var(--global-padding-mobile);
  }
  /* Small mobile maintains 16:9 aspect ratio */
  .ica-studio__slider,
  .ica-studio__placeholder {
    aspect-ratio: 16/9;
    max-width: calc(100vw - 3rem); /* Account for section padding */
  }
}

/* Very small screens */
@media (max-width: 375px){
  .ica-studio__grid {
    gap: 0.75rem;
  }
  
  .ica-studio__slider {
    aspect-ratio: 16/9;
    max-width: calc(100vw - 2rem); /* Account for section padding */
  }
}


/* ===== RESPONSIVE TYPOGRAPHY ===== */

/* Responsive H2 heading font sizes - Simplified */
@media (max-width: 850px) {
  .ica-studio__copy .eyebrow {
    font-size: 65px; /* H2 heading font size for screens below 850px */
  }
}

@media (max-width: 767px) {
  .ica-studio__copy .eyebrow {
    font-size: 70px; /* H2 heading font size for all screens below 767px */
  }
}

/* Responsive H3 subheading font sizes - Simplified */
@media (max-width: 1100px) {
  .ica-studio__copy h3 {
    font-size: 18px; /* H3 subheading font size for screens below 1100px */
  }
}

@media (max-width: 767px) {
  .ica-studio__copy h3 {
    font-size: 18px; /* H3 subheading font size for all screens below 767px */
  }
}

