/* ===== OUR HISTORY SECTION ===== */

.ica-history{ 
  padding: var(--global-padding-desktop) 0;
  background: var(--ica-mint);
  height: auto;
  min-height: auto;
  max-height: none;
  contain: layout;
}
.ica-history__grid{ 
  gap: var(--global-gap-desktop);
  display: grid;
  grid-template-columns: 1fr 1fr; /* Equal columns for better balance */
  align-items: center;
  width: 100%;
}
/* Copy section - Second (right side) */
.ica-history__copy {
  order: 2; /* Content second (right side) */
}

/* Media/image - SAME AS THE STUDIO */
.ica-history__media{ 
  order: 1; /* Image slider first (left side) */
  position: relative; 
  margin: 0; /* Remove default figure margin */
  padding: 0; /* Remove default figure padding */
}

/* Single Image Container */
.ica-history__image {
  border-radius: 18px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  background: var(--ica-mint);
  will-change: transform; /* Optimize for animations */
}

/* Single Image */
.ica-history__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Fallback Placeholder - EXACTLY LIKE THE STUDIO */
.ica-history__placeholder {
  width: 100%;
  aspect-ratio: 4 / 3;
  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-history__placeholder-content {
  text-align: center;
  padding: 2rem;
}

.ica-history__placeholder-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.ica-history__placeholder p {
  font-family: var(--font-body);
  font-size: 1.125rem;
  margin: 0;
  opacity: 0.8;
}

/* History Logo - EXACTLY LIKE THE STUDIO */
.history-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 - EXACTLY LIKE THE STUDIO */
.ica-history__copy .eyebrow{
  font-size: 70px; /* Fixed 70px for all screens */
  font-weight: 300;
  line-height: 1; 
  color: var(--ica-green-deep); 
  margin: 0 0 15px .6rem;
  font-family: var(--font-heading) !important; /* IvyPresto Display for main heading */
}

.ica-history__copy h3{
  font-size: 20px; /* Fixed 20px for all screens above 540px */
  line-height: 1.3em;
  margin: .4rem 0 1rem;
  color: var(--ica-green-deep);
  font-weight: 600;
  font-family: var(--font-ui) !important;
}

.ica-history__copy p{ 
  font-family: var(--font-body);
  font-size: 20px;
  line-height: 1.3;
  font-weight: 400;
  color: var(--ica-green-deep);
  margin: 0 0 1rem 0; /* Add bottom margin for paragraph spacing */
  text-align: justify; /* Justify paragraph content */
}

/* Highlight text - History message */
.ica-history__copy .history-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;
  padding: 0.75rem 1rem;
  line-height: 1.6em;
  text-transform: uppercase;
  display: inline-block;
  width: fit-content;
}

/* CTA Buttons Container - Layout only, styling handled by ica-buttons.css */
.history-cta-buttons {
  display: flex; /* Added missing property */
  gap: 1.5rem; /* Added missing property */
  margin-top: 1.2rem;
  align-items: flex-start;
  flex-wrap: wrap; /* allow buttons to wrap to next line when needed */
}

/* Button Layout - Auto width for single button with increased height */
.history-cta-buttons .btn-ica-white {
  text-align: center;
  padding: 1.2rem 2rem; /* Increased height with more padding */
  width: 100%; /* Full width button */
  border: 1px solid var(--ica-green-deep); /* Green deep border */
}

/* Focus States - Critical for keyboard accessibility */
.history-cta-buttons .btn-ica-white:focus {
  outline: 2px solid var(--ica-green-deep);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 123, 67, 0.2);
}

.history-cta-buttons .btn-ica-white:focus-visible {
  outline: 2px solid var(--ica-green-deep);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0, 123, 67, 0.2);
}

/* Ensure focus states work with reduced motion */
@media (prefers-reduced-motion: reduce) {
  .history-cta-buttons .btn-ica-white:focus,
  .history-cta-buttons .btn-ica-white:focus-visible {
    outline: 2px solid var(--ica-green-deep);
    outline-offset: 2px;
    box-shadow: none; /* Remove shadow for reduced motion */
  }
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop - Ensure desktop dimensions and layout */
@media (min-width: 1025px){  
  .ica-history__image {
    width: 530px !important; /* Desktop width */
    height: 450px !important; /* Desktop height */
    margin: 0 auto; /* Center the image within its column */
  }
}

/* Medium screens - 3:4 aspect ratio */
@media (max-width: 1024px) and (min-width: 768px){
  .ica-history__image {
    width: 100% !important;
    max-width: 500px;
    height: 50vh !important;
  }
}

/* Mobile - Stack vertically */
@media (max-width: 768px){
  .ica-history__grid{ 
    grid-template-columns: 1fr; 
  }
  
  .ica-history__copy {
    order: 2; /* Content second on mobile */
  }
  
  .ica-history__media {
    order: 1; /* Image first on mobile */
  }
  
  .history-logo {
    width: clamp(120px, 20vw, 200px);
  }
  
  .ica-history__image {
    width: 100% !important;
    max-width: 100%;
    height: 40vh !important;
  }
  
  .ica-history__copy .history-highlight {
    padding: 0.6rem 0.8rem;
    margin: 1rem 0 1.2rem 0;
  }
  
  .history-cta-buttons {
    flex-direction: column; /* Stack buttons on small screens */
    gap: 0.75rem;
  }
}

@media (max-width: 560px){
  .ica-history{ 
    padding: var(--global-padding-mobile);
  }
  .ica-history__grid{
    gap: var(--global-gap-mobile);
  }
  
  .ica-history__placeholder {
    aspect-ratio: 16/9;
  }
  
  .ica-history__copy .history-highlight {
    padding: 0.5rem 0.7rem;
    margin: 0.8rem 0 1rem 0;
  }
}
/* ===== RESPONSIVE TYPOGRAPHY ===== */

/* Responsive H2 heading font sizes - Simplified */
@media (max-width: 850px) {
  .ica-history__copy .eyebrow {
    font-size: 65px; /* H2 heading font size for screens below 850px */
  }
}

@media (max-width: 767px) {
  .ica-history__copy .eyebrow {
    font-size: 66px; /* H2 heading font size for all screens below 767px */
  }
}

/* Responsive H3 subheading font sizes - Simplified */
@media (max-width: 1100px) {
  .ica-history__copy h3 {
    font-size: 18px; /* H3 subheading font size for screens below 1100px */
  }
}

@media (max-width: 540px) {
  .ica-history__copy h3 {
    font-size: 17px; /* H3 subheading font size for screens below 540px */
  }
}

