/* ==== THE STUDIO SECTION - EXACTLY LIKE IMPACT ==== */
/* Note: CSS variables are defined globally in style.css */

.ica-studio{ 
  padding: 80px 0; 
  background: #DCF4EF; /* Studio section background color */
  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 */
  /* Animation initial state */
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
  will-change: auto; /* Optimize for animations */
}

/* Add base horizontal spacing for the section content */
.ica-studio .section__inner--wide {
  padding-left: clamp(2rem, 5vw, 3rem);
  padding-right: clamp(2rem, 5vw, 3rem);
}

.ica-studio__grid{
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 4vw, 3rem);
  align-items: center;
  width: 100%;
}

/* Grid order: Media first (left), Content second (right) */
.ica-studio__copy {
  order: 2; /* Content comes second (right) */
  /* Animation initial state */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: auto; /* Optimize for animations */
}

/* 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 */
  /* Animation initial state */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  will-change: auto; /* Optimize for animations */
}

/* 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: #DCF4EF;
  contain: layout; /* CSS containment for better performance */
  will-change: auto; /* Optimize for animations */
}

/* 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;
  will-change: auto; /* Optimize for animations */
}

.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%;
  aspect-ratio: 4 / 3;
  background: #DCF4EF;
  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: clamp(160px, 24vw, 280px);
  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: 85px; /* Fixed 85px 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 */
}

.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 impact 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: "roboto-condensed", sans-serif;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  font-style: normal;
  color: var(--ica-green-deep);
  margin: 0 0 1rem 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%);
  font-family: var(--font-ui) !important; /* Termina font */
  font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem);
  font-weight: 700;
  color: var(--ica-green-deep) !important;
  margin: 1.2rem 0 1.5rem 0;
  text-align: left;
  line-height: 1.6em;
  text-transform: uppercase;
  display: inline-block;
  width: fit-content;
  font-display: swap; /* Font loading optimization for CLS prevention */
  min-height: 2.6em; /* Prevent layout shift during font load */
}

/* CTA Buttons Container */
.studio-cta-buttons {
  display: flex;
  gap: 1.75rem;
  margin-top: 1.2rem;
  align-items: flex-start;
}

/* Custom button sizing for Studio section */
.studio-cta-buttons .btn-ica {
  flex: 0 1 auto;
  width: auto;
  max-width: 160px;
  min-width: 140px;
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-ui) !important;
  transition: all 0.3s ease;
}

/* Primary button styling */
.studio-cta-buttons .btn-ica--primary {
  background: var(--ica-green-deep);
  color: var(--ica-white);
  border: 2px solid var(--ica-green-deep);
}

.studio-cta-buttons .btn-ica--primary:hover {
  background: var(--ica-bg);
  color: var(--ica-green-deep);
  box-shadow: -6px 6px 0px 1px rgba(30, 49, 47, 0.45);
  transform: translateY(-2px);
}

/* Secondary button styling */
.studio-cta-buttons .btn-ica--secondary {
  background: var(--ica-white);
  color: var(--ica-green-deep);
  border: 2px solid var(--ica-green-deep);
}

.studio-cta-buttons .btn-ica--secondary:hover {
  background: var(--ica-green-deep);
  color: var(--ica-white);
  border-color: var(--ica-green-deep);
  box-shadow: -6px 6px 0px 1px rgba(30, 49, 47, 0.45);
  transform: translateY(-2px);
}

/* Desktop dimensions */
@media (min-width: 1025px){
  .ica-studio__slider {
    width: 530px !important; /* Desktop width */
    height: 450px !important; /* Desktop height */
  }
}

/* Medium screens - 3:4 aspect ratio */
@media (max-width: 1024px) and (min-width: 768px){
  .ica-studio__slider {
    width: 100% !important;
    max-width: 500px;
    aspect-ratio: 3 / 4 !important; /* 3:4 aspect ratio */
    height: auto !important;
  }
}

/* Responsive breakpoints */
@media (max-width: 1024px){
  .ica-studio__grid{ 
    grid-template-columns: 1fr; 
    gap: 2rem;
  }
  
  /* Add horizontal spacing for medium screens */
  .ica-studio .section__inner--wide {
    padding-left: clamp(1.5rem, 4vw, 2.5rem);
    padding-right: clamp(1.5rem, 4vw, 2.5rem);
  }
  
  /* Mobile slider - 16:9 aspect ratio */
  .ica-studio__slider {
    width: 100% !important;
    max-width: 100%;
    aspect-ratio: 16 / 9 !important; /* 16:9 aspect ratio for mobile */
    height: auto !important;
  }
  
  /* Mobile adjustments */
  .studio-logo {
    width: clamp(120px, 20vw, 200px);
  }
}

@media (max-width: 768px){
  .ica-studio {
    padding: clamp(2rem, 4vw, 3rem) 0;
  }
  
  .ica-studio__grid{
    gap: 1.5rem;
  }
  
  /* Add horizontal spacing for mobile */
  .ica-studio .section__inner--wide {
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
  }
  
  
  /* Keep buttons in one row on mobile */
  .studio-cta-buttons {
    flex-direction: row;
    gap: 1rem;
    width: auto;
  }
  
  /* Mobile button sizing */
  .studio-cta-buttons .btn-ica {
    min-width: 150px;
    max-width: 170px;
  }
}

@media (max-width: 560px){
  .ica-studio {
    padding: clamp(1.5rem, 3vw, 2rem) 0;
  }
  
  .ica-studio__grid{
    gap: 1rem;
  }
  
  /* Small mobile maintains 16:9 aspect ratio */
  .ica-studio__slider,
  .ica-studio__placeholder {
    aspect-ratio: 16/9;
  }
  
  /* Ensure proper spacing on small mobile */
  .ica-studio .section__inner--wide {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .studio-cta-buttons {
    gap: 1.75rem;
    flex-direction: row; /* Ensure buttons stay in one row */
  }
  
  /* Small mobile button sizing */
  .studio-cta-buttons .btn-ica {
    min-width: 140px;
    max-width: 160px;
  }
}

/* Very small screens */
@media (max-width: 375px){
  .ica-studio {
    padding: 1.5rem 0;
  }
  
  .ica-studio .section__inner--wide {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .ica-studio__grid {
    gap: 0.75rem;
  }
  
  .ica-studio__slider {
    aspect-ratio: 16/9;
  }
  
  .studio-cta-buttons {
    gap: 1.75rem;
  }
}

/* Animation triggered state */
.ica-studio.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.ica-studio__media.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.ica-studio__copy.animate-in {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays */
.ica-studio__copy.animate-in {
  transition-delay: 0.1s; /* Content animates slightly after media */
}

.ica-studio__media.animate-in {
  transition-delay: 0.2s; /* Media animates first */
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */

/* Responsive H2 heading font sizes */
@media (max-width: 980px) and (min-width: 900px){
  .ica-studio__copy .eyebrow {
    font-size: 75px; /* H2 heading font size for 900-980px screens */
  }
}

@media (max-width: 950px) and (min-width: 850px){
  .ica-studio__copy .eyebrow {
    font-size: 70px; /* H2 heading font size for 850-950px screens */
  }
}

@media (max-width: 850px) and (min-width: 769px){
  .ica-studio__copy .eyebrow {
    font-size: 65px; /* H2 heading font size for 769-850px screens */
  }
}

@media (max-width: 767px){
  .ica-studio__copy .eyebrow {
    font-size: 85px; /* H2 heading font size for all screens below 767px */
  }
}

@media (max-width: 540px){
  .ica-studio__copy .eyebrow {
    font-size: 70px; /* H2 heading font size for screens below 540px */
  }
}

/* Responsive H3 subheading font sizes */
@media (max-width: 1240px) and (min-width: 1100px){
  .ica-studio__copy h3 {
    font-size: 20px; /* H3 subheading font size for 1100-1240px screens */
  }
}

@media (max-width: 1100px) and (min-width: 778px){
  .ica-studio__copy h3 {
    font-size: 18px; /* H3 subheading font size for 778-1100px screens */
  }
}

@media (max-width: 778px) and (min-width: 769px){
  .ica-studio__copy h3 {
    font-size: 17px; /* H3 subheading font size for 769-778px screens */
  }
}

@media (max-width: 767px){
  .ica-studio__copy h3 {
    font-size: 18px; /* H3 subheading font size for all screens below 767px */
  }
}

@media (max-width: 540px){
  .ica-studio__copy h3 {
    font-size: 17px; /* H3 subheading font size for screens below 540px */
  }
}

/* Small screens - consistent padding */
@media (max-width: 600px){
  .ica-studio {
    padding: 40px 0; /* Slightly reduced padding for small screens */
  }
}
