/* ===== OUR HISTORY SECTION ===== */

.ica-history{ 
  padding: 80px 0; 
  background: var(--ica-mint);
  margin-top: 2rem;
  height: auto;
  min-height: auto;
  max-height: none;
  contain: layout;
}

/* ===== REVEAL ANIMATIONS ===== */

/* Base reveal state - hidden by default */
.ica-history .reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
              transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Revealed state - visible when scrolled into view */
.ica-history .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation delays */
.ica-history__media.reveal {
  transition-delay: 0.1s;
}

.ica-history__copy.reveal {
  transition-delay: 0.3s;
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
  .ica-history .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .ica-history .reveal.revealed {
    opacity: 1 !important;
    transform: none !important;
  }
}

.ica-history .section__inner--wide {
  padding-left: clamp(2rem, 5vw, 3rem);
  padding-right: clamp(2rem, 5vw, 3rem);
}

.ica-history__grid{
  display: grid;
  grid-template-columns: 1fr 1fr; /* Equal columns for better balance */
  gap: clamp(1.5rem, 3vw, 2.5rem); /* Reduced gap for tighter spacing */
  align-items: center;
  width: 100%;
}

/* Grid order: Media first (left), Content second (right) - REVERSED FROM IMPACT */
.ica-history__copy {
  order: 2; /* Content comes second (right) */
}

.ica-history__media {
  order: 1; /* Image comes first (left) */
}

/* Media/image - SAME AS THE STUDIO */
.ica-history__media{ 
  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: 85px; /* Fixed 85px 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: 21px; /* Fixed 24px 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: "roboto-condensed", sans-serif;
  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 */
}

/* 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 - Two buttons in one row */
.history-cta-buttons {
  display: flex;
  gap: 1.75rem;
  margin-top: 1.2rem;
  align-items: flex-start;
}

/* Buttons now use the ICA button system with specific classes */
/* Custom button sizing for History section */
.history-cta-buttons .btn-ica {
  flex: 0 1 auto;
  width: auto;
  max-width: 160px;
  min-width: 180px;
  white-space: nowrap;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-ui) !important;
  transition: all 0.3s ease;
}

/* Primary button styling - green background with white text */
.history-cta-buttons .btn-ica--primary {
  background: var(--ica-green-deep);
  color: var(--ica-white);
  border: 2px solid var(--ica-green-deep);
}

.history-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 - white background with green text */
.history-cta-buttons .btn-ica--secondary {
  background: var(--ica-white);
  color: var(--ica-green-deep);
  border: 2px solid var(--ica-green-deep);
}

.history-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);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Desktop - Ensure desktop dimensions and layout */
@media (min-width: 1025px){
  .ica-history__grid {
    grid-template-columns: 1fr 1fr; /* Equal columns */
    gap: 2rem; /* Fixed gap for desktop */
    max-width: 1200px; /* Limit max width */
    margin: 0 auto; /* Center the grid */
  }
  
  .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;
    aspect-ratio: 3 / 4 !important; /* 3:4 aspect ratio */
    height: auto !important;
  }
}

/* Tablet and Mobile - Stack vertically */
@media (max-width: 1024px){
  .ica-history__grid{ 
    grid-template-columns: 1fr; 
    gap: 2rem;
  }
  
  .ica-history__copy {
    order: 2; /* Content second on mobile */
  }
  
  .ica-history__media {
    order: 1; /* Image first on mobile */
  }
  
  .ica-history {
    margin-top: 1.5rem;
  }
  
  .ica-history .section__inner--wide {
    padding-left: clamp(1.5rem, 4vw, 2.5rem);
    padding-right: clamp(1.5rem, 4vw, 2.5rem);
  }
  
  .ica-history__image {
    width: 100% !important;
    max-width: 100%;
    aspect-ratio: 16 / 9 !important;
    height: auto !important;
  }
  
  .history-logo {
    width: clamp(120px, 20vw, 200px);
  }
}

@media (max-width: 768px){
  .ica-history {
    padding: 60px 0;
    margin-top: 1rem;
  }
  
  .ica-history__grid{
    gap: 1.5rem;
  }
  
  .ica-history .section__inner--wide {
    padding-left: clamp(1rem, 4vw, 2rem);
    padding-right: clamp(1rem, 4vw, 2rem);
  }
  
  .ica-history__copy .history-highlight {
    font-size: clamp(0.8125rem, 0.75rem + 0.25vw, 0.875rem);
    padding: 0.6rem 0.8rem;
    margin: 1rem 0 1.2rem 0;
  }
  
  .history-cta-buttons {
    gap: 1rem;
  }
  
  .history-cta-buttons .btn-ica {
    min-width: 150px;
    max-width: 170px;
  }
}

@media (max-width: 560px){
  .ica-history {
    padding: 40px 0;
    margin-top: 0.5rem;
  }
  
  .ica-history__grid{
    gap: 1rem;
  }
  
  .ica-history__image,
  .ica-history__placeholder {
    aspect-ratio: 16/9;
  }
  
  .ica-history .section__inner--wide {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .ica-history__copy .history-highlight {
    padding: 0.5rem 0.7rem;
    margin: 0.8rem 0 1rem 0;
  }
  
  .history-cta-buttons {
    gap: 1.75rem;
  }
  
  .history-cta-buttons .btn-ica {
    min-width: 140px;
    max-width: 160px;
  }
}

@media (max-width: 375px){
  .ica-history {
    padding: 30px 0;
  }
  
  .ica-history .section__inner--wide {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .ica-history__grid {
    gap: 0.75rem;
  }
  
  .ica-history__image {
    aspect-ratio: 16/9;
  }
  
  .history-cta-buttons {
    gap: 1.75rem;
  }
}

/* ===== RESPONSIVE TYPOGRAPHY ===== */

/* Responsive H2 heading font sizes */
@media (max-width: 980px) and (min-width: 900px){
  .ica-history__copy .eyebrow {
    font-size: 75px;
  }
}

@media (max-width: 950px) and (min-width: 850px){
  .ica-history__copy .eyebrow {
    font-size: 70px;
  }
}

@media (max-width: 850px) and (min-width: 769px){
  .ica-history__copy .eyebrow {
    font-size: 65px;
  }
}

@media (max-width: 767px){
  .ica-history__copy .eyebrow {
    font-size: 85px;
  }
}

@media (max-width: 540px){
  .ica-history__copy .eyebrow {
    font-size: 70px;
  }
}

/* Responsive H3 subheading font sizes */
@media (max-width: 1240px) and (min-width: 1100px){
  .ica-history__copy h3 {
    font-size: 20px;
  }
}

@media (max-width: 1100px) and (min-width: 778px){
  .ica-history__copy h3 {
    font-size: 18px;
  }
}

@media (max-width: 778px) and (min-width: 769px){
  .ica-history__copy h3 {
    font-size: 17px;
  }
}

@media (max-width: 767px){
  .ica-history__copy h3 {
    font-size: 20px;
  }
}

@media (max-width: 540px){
  .ica-history__copy h3 {
    font-size: 17px;
  }
}

