/* ===================================
   Three Up Cards Section - Static Three-Card Layout
   =================================== */

/* Section Container */
.three-up-cards {
  position: relative;
  overflow: hidden;
}

/* Header Content */
.three-up-cards__header {
  text-align: center;
  margin: 0 auto var(--space-xl);
  max-width: 900px;
}

@media (min-width: 1024px) {
  .three-up-cards__header {
    margin-bottom: var(--space-2xl);
  }
}

/* Main Heading */
.three-up-cards__heading {
  margin: 0 0 var(--space-md);
  text-transform: uppercase;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

/* Subtext */
.three-up-cards__subtext {
  margin: 0 auto;
  max-width: 531px;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* Cards Grid */
.three-up-cards__grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  align-items: center;
}

@media (min-width: 768px) {
  .three-up-cards__grid {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-md);
  }
}

@media (min-width: 1024px) {
  .three-up-cards__grid {
    gap: var(--space-lg);
  }
}

/* Individual Card */
.three-up-cards__card {
  display: flex;
  flex-direction: column-reverse;
  width: 100%;
  max-width: 450px;
  height: 512px;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
  .three-up-cards__card {
    max-width: 450px;
    flex: 0 1 calc(33.333% - var(--space-md));
  }
}

@media (min-width: 1024px) {
  .three-up-cards__card {
    flex: 0 1 450px;
  }
}

/* Middle Card Offset Effect */
.three-up-cards__card--offset {
  margin-top: 0;
}

@media (min-width: 768px) {
  .three-up-cards__card--offset {
    margin-top: 100px;
    margin-bottom: -100px;
  }
}

/* Card Hover Effect */
.three-up-cards__card:hover {
  transform: translateY(-8px);
  box-shadow: none;
}

/* Image Wrapper */
.three-up-cards__image-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  min-height: 0;
  position: relative;
  z-index: 2;
}

@media (min-width: 1024px) {
  .three-up-cards__image-wrapper {
    padding: var(--space-lg);
  }
}

/* Card Image */
.three-up-cards__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 284px;
  display: block;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

/* Card Content */
.three-up-cards__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding: var(--space-md);
  position: relative;
  z-index: 1;
}

@media (min-width: 768px) {
  .three-up-cards__content {
    padding: var(--space-lg);
    padding-top: var(--space-xl);
  }
}

/* Card Title */
.three-up-cards__title {
  margin: 0 0 var(--space-xs);
  line-height: 1.15;
  letter-spacing: -0.01em;
}

/* Card Description */
.three-up-cards__description {
  margin: 0;
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .three-up-cards__card {
    height: 415px;
  }
  
  .three-up-cards__image-wrapper {
    padding: var(--space-sm);
  }
  
  .three-up-cards__image {
    max-height: 240px;
  }
  
  .three-up-cards__content {
    padding: var(--space-sm);
  }
}

/* Focus States for Accessibility */
.three-up-cards__card:focus-within {
  outline: 2px solid var(--clr-info);
  outline-offset: 4px;
}

.three-up-cards__card:focus:not(:focus-visible) {
  outline: none;
}

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
  .three-up-cards__card {
    transition: none;
  }
  
  .three-up-cards__card:hover {
    transform: none;
  }
}

/* Print Styles */
@media print {
  .three-up-cards__card {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  
  .three-up-cards__card:hover {
    transform: none;
    box-shadow: none;
  }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  .three-up-cards__card {
    border: 2px solid currentColor;
  }
}

/* Loading State Optimization */
.three-up-cards__image {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Smooth Rendering */
.three-up-cards__card,
.three-up-cards__image {
  transform: translateZ(0);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .three-up-cards__card,
  .three-up-cards__image {
    will-change: auto;
  }
}

