/* ==========================================================================
   home-slider.css — Home page slider styles
   ========================================================================== */

:root {
  /* layout vars (dynamic vw-based with sensible limits) */
  --vh: 1vh;
  --slide-bottom-offset: 6vw;
  --slider-arrow-left: 1vw;
  --slider-arrow-size: 2.5vw;
  --caption-left-gap: 5vw;
  /* caret vertical offset — tweak to move caret down/up */
  --caret-vert-offset: 0.4vw;
  /* fallback sizing */
  --header-compact-scale-forced: 0.95;
}

/* Font loaded via common-scripts.php for better performance */

/* ---------------- Slider Styles ---------------- */
.edge-slider-bleed {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  box-sizing: border-box;
  padding: 0;
  overflow: hidden;
  background: #000;
  z-index: 10;
  height: calc(var(--vh, 1vh) * 100); /* Full viewport height - edge to edge */
  min-height: 100vh; /* Fallback for browsers without --vh */
}

/* Mobile devices - keep full viewport height */
@media (max-width: 767px) {
  .edge-slider-bleed {
    height: calc((var(--vh, 1vh) * 100));
    min-height: 400px;
  }
}

/* Header styles moved to header.css */

.home-edge-swiper,
.home-edge-swiper .swiper-wrapper {
  height: 100%;
}

.home-edge-swiper .swiper-slide {
  min-height: 280px;
  height: 100%;
  position: relative;
  overflow: hidden;

  /* OPTIMIZATION: CSS containment for isolated rendering */
  contain: layout paint;
}

/* Gradient overlays for slider images */
.swiper-slide.gradient-left::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 60%;
  height: 100%;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 40%, transparent 100%);
  z-index: 50;
  pointer-events: none;
}

/* Responsive adjustments */
@media (max-width: 991px) {

  .swiper-slide.gradient-left::before,
  .swiper-slide.gradient-right::before {
    width: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 50%, transparent 100%);
  }
}

.home-edge-swiper .swiper-slide img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center center;
}

/* Mobile portrait optimization - reduce aggressive cropping */
@media (max-width: 767px) and (orientation: portrait) {
  .home-edge-swiper .swiper-slide img {
    /* Scale image to show more width, accepting some height crop */
    object-fit: cover;
    object-position: center 40%;
  }
}

/* iPhone 14 Pro Max, 13 Pro Max, 12 Pro Max (430px, 428px) */
@media (max-width: 430px) and (orientation: portrait) {
  .home-edge-swiper .swiper-slide img {
    object-position: center 45%;
  }
}

/* iPhone 14 Pro, 13 Pro, 12 Pro (393px) */
@media (max-width: 393px) and (orientation: portrait) {
  .home-edge-swiper .swiper-slide img {
    object-position: center 45%;
  }
}

/* iPhone SE, 13 mini (375px and below) */
@media (max-width: 375px) and (orientation: portrait) {
  .home-edge-swiper .swiper-slide img {
    object-position: center 50%;
  }
}

/* Captions */
.slide-link {
  position: absolute;
  inset: 0;
  display: block;
  z-index: 100;
  background: transparent;
  text-decoration: none;
}

.slide-caption {
  z-index: 110;
  pointer-events: none;
  position: absolute;
  top: 50%;
  left: calc(var(--slider-arrow-left) + var(--slider-arrow-size) + var(--caption-left-gap));
  transform: translateY(-3.5vw);
  width: calc(100% - (var(--slider-arrow-left) + var(--slider-arrow-size) + var(--caption-left-gap) + 40px));
  display: flex;
  justify-content: flex-start;
  text-align: left;
}

@media (max-width:1199px) {
  .slide-caption {
    left: 50%;
    transform: translate(-50%, -8vw);
    width: calc(100% - 40px);
    justify-content: center;
    text-align: center;
  }
}

.slide-caption .caption-inner {
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  /* pointer-events removed - clicks pass through to .slide-link for navigation */
  /* Desktop readability: 70% width - increased for better content display while maintaining readability */
  /* Your content (48-78 chars) fits comfortably; still prevents excessive width on ultra-wide displays */
  max-width: 70%;
  background: transparent;
  padding: 1vw 2vw;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.65);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 200ms cubic-bezier(.2, .9, .3, 1), transform 200ms cubic-bezier(.2, .9, .3, 1);
}

.slide-caption .caption-inner.caption-visible {
  opacity: 1;
  transform: translateY(0);
}

.slide-caption .caption-inner h2 {
  margin: 0 0 5vw 0; /* Increased bottom margin to push p further down */
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: #fff;
  font-size: clamp(24px, 2.6vw, 72px);
  /* Use full width of container (70%) - your content: 48-76 chars fits comfortably */
  max-width: 100%;
  overflow-wrap: break-word;
  hyphens: auto;
}

.slide-caption .caption-inner p {
  margin-top: 0; /* Reset to 0 - gap created by h2's margin-bottom */
  color: #f7f7f7;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
  font-weight: 400;
  font-size: clamp(18px, 1.4vw, 38px);
  line-height: 1.6;
  /* Limit to 1-2 lines for desktop readability (your content: 54-78 chars) */
  /* Line clamp ensures graceful overflow handling while maintaining clean layout */
  max-width: 100%;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; /* Maximum 2 lines */
  line-clamp: 2; /* Standard property for modern browsers */
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive breakpoints - Using clamp() for smooth scaling */
@media (max-width: 767px) {
  .slide-caption .caption-inner {
    /* Mobile: Use percentage only, remove character-based restriction */
    max-width: 92%;
    padding: 2vw 3vw;
  }

  .slide-caption .caption-inner h2 {
    line-height: 1.25;
    margin-bottom: 14vw; /* Increased to push p further down on mobile */
    /* Mobile: Remove character-based restriction, use full width */
    max-width: 100%;
  }

  .slide-caption .caption-inner p {
    margin-top: 0; /* Reset - gap created by h2's margin-bottom */
    line-height: 1.6;
    /* Mobile: Allow more lines, remove line-clamp for better readability */
    -webkit-line-clamp: 3; /* Allow up to 3 lines on mobile */
    line-clamp: 3; /* Standard property for modern browsers */
  }
}

@media (max-width: 480px) {
  .slide-caption .caption-inner {
    max-width: 95%;
    padding: 2.5vw 3.5vw;
  }

  .slide-caption .caption-inner h2 {
    line-height: 1.3;
  }
}

/* Swiper arrows */
.home-edge-swiper .swiper-button-next,
.home-edge-swiper .swiper-button-prev {
  color: #fff;
  min-width: var(--slider-arrow-size);
  min-height: var(--slider-arrow-size);
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
  z-index: 90;
  padding: 6px;
}

.home-edge-swiper .swiper-button-prev {
  left: var(--slider-arrow-left);
}

.home-edge-swiper .swiper-button-next {
  right: var(--slider-arrow-left);
}

.home-edge-swiper .swiper-pagination-bullet {
  background: rgba(255, 255, 255, 0.6);
  width: clamp(10px, 0.8vw, 20px);
  height: clamp(10px, 0.8vw, 20px);
  margin: 0 clamp(5px, 0.4vw, 12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.home-edge-swiper .swiper-pagination-bullet-active {
  background: #fff;
  transform: scale(1.3);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   PROFESSIONAL SLIDER ENHANCEMENTS
   ========================================================================== */

/* ----------------- KEN BURNS EFFECT (Cinematic Zoom + Pan) ----------------- */
.home-edge-swiper .swiper-slide img {
  transition: transform 7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  transform: scale(1);
  will-change: transform;
}

.home-edge-swiper .swiper-slide.ken-burns-active img {
  transform: scale(1.08) translateX(-2%);
}

/* Alternate Ken Burns directions for variety */
.home-edge-swiper .swiper-slide:nth-child(even).ken-burns-active img {
  transform: scale(1.08) translateX(2%);
}

.home-edge-swiper .swiper-slide:nth-child(3n).ken-burns-active img {
  transform: scale(1.06) translateY(-1.5%);
}

/* Disable Ken Burns for reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .home-edge-swiper .swiper-slide img,
  .home-edge-swiper .swiper-slide.ken-burns-active img {
    transform: scale(1) !important;
    transition: none !important;
  }
}

/* ----------------- PROGRESS INDICATOR ----------------- */
.swiper-progress-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  z-index: 120;
  overflow: hidden;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.swiper-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.6) 0%,
    rgba(255, 255, 255, 0.95) 50%,
    rgba(255, 255, 255, 0.6) 100%);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.5);
  transition: width 100ms linear;
  will-change: width;
}

/* Mobile progress bar */
@media (max-width: 767px) {
  .swiper-progress-bar {
    height: 3px;
  }
}

/* ----------------- SIMPLE WHITE NAVIGATION ARROWS ----------------- */
.home-edge-swiper .swiper-button-next,
.home-edge-swiper .swiper-button-prev {
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  transition: all 0.3s ease;
  opacity: 0.9;
}

.home-edge-swiper .swiper-button-next::after,
.home-edge-swiper .swiper-button-prev::after {
  font-size: clamp(28px, 2.2vw, 80px);
  font-weight: bold;
  color: #ffffff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.home-edge-swiper .swiper-button-next:hover,
.home-edge-swiper .swiper-button-prev:hover {
  opacity: 1;
  transform: scale(1.15);
}

.home-edge-swiper .swiper-button-next:active,
.home-edge-swiper .swiper-button-prev:active {
  transform: scale(0.95);
}

/* ==========================================================================
   MOBILE/TABLET: Hide navigation arrows, enhance touch UX
   ========================================================================== */

/* Hide navigation arrows on mobile and tablet (≤1199px)
   Covers all iPads including Pro 12.9" landscape, tablets, and mobile
   Touch devices use swipe gestures + pagination dots for navigation */
@media (max-width: 1199px) {
  .home-edge-swiper .swiper-button-next,
  .home-edge-swiper .swiper-button-prev {
    display: none !important;
  }

  /* Larger tap targets for pagination bullets */
  .home-edge-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    margin: 0 8px;
  }
}

/* ----------------- ENHANCED PAGINATION ----------------- */
.home-edge-swiper .swiper-pagination {
  bottom: 20px;
  padding: 12px 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.home-edge-swiper .swiper-pagination-bullet {
  opacity: 1;
  position: relative;
}

.home-edge-swiper .swiper-pagination-bullet .bullet-inner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0;
  height: 0;
  background: #fff;
  border-radius: 50%;
  transition: width 0.3s ease, height 0.3s ease;
}

.home-edge-swiper .swiper-pagination-bullet-active .bullet-inner {
  width: 8px;
  height: 8px;
}

.home-edge-swiper .swiper-pagination-bullet:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: scale(1.2);
}

/* Mobile pagination */
@media (max-width: 767px) {
  .home-edge-swiper .swiper-pagination {
    bottom: 12px;
  }

  .home-edge-swiper .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 5px;
  }
}

/* ----------------- STAGGERED CAPTION ANIMATIONS ----------------- */
/* Faster transitions for responsive manual navigation */
.slide-caption .caption-inner h2,
.slide-caption .caption-inner p {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-caption .caption-inner h2.caption-element-visible,
.slide-caption .caption-inner p.caption-element-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Parallax effect on captions (subtle depth) */
@media (min-width: 992px) {
  .slide-caption .caption-inner {
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .home-edge-swiper:hover .slide-caption .caption-inner.caption-visible {
    transform: translateY(-4px);
  }
}

/* ----------------- LOADING STATE ----------------- */
.home-edge-swiper {
  position: relative;
  background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
}

.home-edge-swiper::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
  z-index: 200;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
  pointer-events: none;
}

.home-edge-swiper.swiper-loaded::before {
  opacity: 0;
  visibility: hidden;
}

/* Loading spinner */
.home-edge-swiper::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: slider-spinner 0.8s linear infinite;
  z-index: 201;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.home-edge-swiper.swiper-loaded::after {
  opacity: 0;
  visibility: hidden;
  animation: none;
}

@keyframes slider-spinner {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* ----------------- FADE EFFECT ENHANCEMENTS ----------------- */
/* Note: Swiper handles fade transitions internally via speed parameter (home.js)
   Removing CSS transition prevents conflict with manual navigation */
.home-edge-swiper .swiper-slide {
  opacity: 1;
}

.home-edge-swiper.swiper-fade .swiper-slide {
  pointer-events: none;
}

.home-edge-swiper.swiper-fade .swiper-slide-active {
  pointer-events: auto;
}

/* ----------------- RESPONSIVE OPTIMIZATIONS ----------------- */
/* Tablet portrait (iPad, iPad Air, iPad Pro) */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
  .edge-slider-bleed {
    height: calc(var(--vh, 1vh) * 100); /* Full viewport - edge to edge */
    min-height: 100vh;
  }

  .home-edge-swiper .swiper-slide img {
    object-position: center 45%;
  }
}

/* Tablet landscape */
@media (min-width: 768px) and (max-width: 1199px) and (orientation: landscape) {
  .slide-caption .caption-inner {
    /* Tablet landscape: Increased width for better readability, matching desktop proportion */
    max-width: 80%;
    padding: 1.5vw 2.5vw;
  }

  .slide-caption .caption-inner h2 {
    font-size: clamp(28px, 3.2vw, 58px);
    /* Use full container width */
    max-width: 100%;
  }

  .slide-caption .caption-inner p {
    font-size: clamp(16px, 1.8vw, 32px);
    /* Maintain 2-line limit for tablets */
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property for modern browsers */
  }
}

/* Laptop/Desktop (1280px - 1919px) */
@media (min-width: 1280px) and (max-width: 1919px) {
  .edge-slider-bleed {
    height: calc(var(--vh, 1vh) * 100); /* Full viewport - edge to edge */
    min-height: 100vh;
  }
}

/* 2K/QHD displays (2560px) */
@media (min-width: 2560px) and (max-width: 3839px) {
  .edge-slider-bleed {
    height: calc(var(--vh, 1vh) * 100); /* Full viewport - edge to edge */
    min-height: 100vh;
  }

  .slide-caption .caption-inner h2 {
    font-size: clamp(48px, 2.8vw, 96px);
    /* Use full container width (70%) for optimal display */
    max-width: 100%;
  }

  .slide-caption .caption-inner p {
    font-size: clamp(24px, 1.6vw, 48px);
    /* Keep 2-line limit for clean layout */
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property for modern browsers */
  }

  /* Slider navigation arrows - 2K */
  .home-edge-swiper .swiper-button-next::after,
  .home-edge-swiper .swiper-button-prev::after {
    font-size: clamp(42px, 1.8vw, 54px);
  }

  /* Pagination dots - 2K */
  .home-edge-swiper .swiper-pagination-bullet {
    width: clamp(14px, 0.7vw, 18px);
    height: clamp(14px, 0.7vw, 18px);
    margin: 0 clamp(7px, 0.35vw, 10px);
  }
}

/* 4K displays (3840px) */
@media (min-width: 3840px) and (max-width: 5119px) {
  .edge-slider-bleed {
    height: calc(var(--vh, 1vh) * 100); /* Full viewport - edge to edge */
    min-height: 100vh;
  }

  .slide-caption .caption-inner h2 {
    font-size: clamp(56px, 2.8vw, 110px);
    /* Use full container width (70%) for optimal display */
    max-width: 100%;
  }

  .slide-caption .caption-inner p {
    font-size: clamp(28px, 1.6vw, 56px);
    /* Keep 2-line limit for clean layout */
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property for modern browsers */
  }

  /* Slider navigation arrows - 4K */
  .home-edge-swiper .swiper-button-next::after,
  .home-edge-swiper .swiper-button-prev::after {
    font-size: clamp(52px, 1.6vw, 68px);
  }

  /* Pagination dots - 4K */
  .home-edge-swiper .swiper-pagination-bullet {
    width: clamp(16px, 0.55vw, 22px);
    height: clamp(16px, 0.55vw, 22px);
    margin: 0 clamp(8px, 0.3vw, 12px);
  }
}

/* 5K displays and above (5120px+) */
@media (min-width: 5120px) {
  .edge-slider-bleed {
    height: calc(var(--vh, 1vh) * 100); /* Full viewport - edge to edge */
    min-height: 100vh;
  }

  .slide-caption .caption-inner h2 {
    font-size: clamp(64px, 2.6vw, 120px);
    /* Use full container width (70%) for optimal display */
    max-width: 100%;
  }

  .slide-caption .caption-inner p {
    font-size: clamp(32px, 1.5vw, 64px);
    /* Keep 2-line limit for clean layout */
    -webkit-line-clamp: 2;
    line-clamp: 2; /* Standard property for modern browsers */
  }

  /* Slider navigation arrows - 5K */
  .home-edge-swiper .swiper-button-next::after,
  .home-edge-swiper .swiper-button-prev::after {
    font-size: clamp(60px, 1.5vw, 80px);
  }

  /* Pagination dots - 5K */
  .home-edge-swiper .swiper-pagination-bullet {
    width: clamp(18px, 0.5vw, 26px);
    height: clamp(18px, 0.5vw, 26px);
    margin: 0 clamp(10px, 0.28vw, 14px);
  }

  /* Ensure image quality on 5K - browser will use 3840w and upscale */
  .home-edge-swiper .swiper-slide img {
    image-rendering: high-quality;
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Mobile portrait optimizations */
@media (max-width: 767px) and (orientation: portrait) {
  .slide-caption .caption-inner {
    /* Mobile: Use percentage only, no character-based restriction */
    max-width: 90%;
    padding: 3vw 4vw;
  }

  .slide-caption .caption-inner h2 {
    font-size: clamp(20px, 5vw, 36px);
    margin-bottom: 16vw; /* Increased to push p further down */
    /* Mobile: Remove character-based restriction */
    max-width: 100%;
  }

  .slide-caption .caption-inner p {
    font-size: clamp(14px, 3.5vw, 24px);
    margin-top: 0; /* Reset - gap created by h2's margin-bottom */
    /* Mobile: Allow up to 3 lines for better readability */
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Standard property for modern browsers */
  }
}

/* Mobile landscape optimizations */
@media (max-width: 767px) and (orientation: landscape) {
  .slide-caption .caption-inner {
    /* Mobile landscape: Use percentage only */
    max-width: 70%;
    padding: 2vw 3vw;
  }

  .slide-caption .caption-inner h2 {
    font-size: clamp(18px, 3.5vw, 32px);
    /* Mobile: Remove character-based restriction */
    max-width: 100%;
  }

  .slide-caption .caption-inner p {
    font-size: clamp(14px, 2.5vw, 20px);
    /* Mobile landscape: Allow up to 3 lines */
    -webkit-line-clamp: 3;
    line-clamp: 3; /* Standard property for modern browsers */
  }
}

/* ----------------- ACCESSIBILITY ENHANCEMENTS ----------------- */
/* Focus states for keyboard navigation */
.home-edge-swiper .swiper-button-next:focus,
.home-edge-swiper .swiper-button-prev:focus {
  outline: 3px solid rgba(255, 255, 255, 0.8);
  outline-offset: 4px;
}

.home-edge-swiper .swiper-pagination-bullet:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .home-edge-swiper .swiper-button-next,
  .home-edge-swiper .swiper-button-prev {
    background: rgba(0, 0, 0, 0.8);
    border-color: #ffffff;
  }

  .swiper-progress-fill {
    background: #ffffff;
  }

  .slide-caption .caption-inner {
    background: rgba(0, 0, 0, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.5);
  }
}

/* ----------------- PERFORMANCE OPTIMIZATIONS ----------------- */
/* GPU acceleration for smooth animations */
.home-edge-swiper .swiper-slide,
.home-edge-swiper .swiper-slide img,
.slide-caption .caption-inner,
.swiper-progress-fill,
.home-edge-swiper .swiper-button-next,
.home-edge-swiper .swiper-button-prev {
  will-change: auto;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Prevent layout shift */
.edge-slider-bleed {
  contain: layout style paint;
}

/* Optimize rendering for mobile */
@media (max-width: 767px) {
  .home-edge-swiper .swiper-slide img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* ==========================================================================
   COMPANY INTRODUCTION SECTION - FULL BACKGROUND WITH TEXT OVERLAY
   ========================================================================== */

.section-intro-hero-split {
  width: 100%;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  min-height: auto; /* Allow container to grow with content */
  max-height: none; /* Remove any height constraints */
  height: auto; /* Explicitly set to auto to prevent fixed height */
}

.intro-split-container {
  position: relative;
  /* Content-based height instead of fixed aspect ratio - reduces vertical empty space */
  width: 100%; /* Full width */
  min-height: auto; /* Allow content to determine height naturally */
  display: flex;
  align-items: flex-start; /* Changed from center - content starts from top like NIST */
  justify-content: center;
  padding-top: clamp(50px, 4vh, 80px); /* Reduced to minimize top space */
  padding-bottom: clamp(50px, 4vh, 80px); /* Reduced to minimize bottom space */
  /* Default background image for 1920px (standard desktop) */
  background-image: url('../images/mission-1920.webp');
  background-size: cover;
  background-position: center center; /* Center positioning for better fit */
  background-repeat: no-repeat;
  background-color: #f8f9fa;
}

/* ===== RESPONSIVE BACKGROUND IMAGES - Mobile First Approach ===== */
/* Mobile devices (up to 480px) */
@media (max-width: 480px) {
  .intro-split-container {
    background-image: url('../images/mission-480.webp');
  }
}

/* Tablets and small devices (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .intro-split-container {
    background-image: url('../images/mission-768.webp');
  }
}

/* Tablets landscape and small laptops (769px to 1280px) */
@media (min-width: 769px) and (max-width: 1280px) {
  .intro-split-container {
    background-image: url('../images/mission-1280.webp');
  }
}

/* Standard desktops (1281px to 1920px) */
@media (min-width: 1281px) and (max-width: 1920px) {
  .intro-split-container {
    background-image: url('../images/mission-1920.webp');
  }
}

/* 4K displays and above (1921px+) */
@media (min-width: 1921px) {
  .intro-split-container {
    background-image: url('../images/mission-3840.webp');
  }
}

/* Subtle gradient overlay for smooth blending */
.intro-split-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.15) 0%,
    rgba(255, 255, 255, 0.05) 50%,
    rgba(255, 255, 255, 0.15) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* ----------------- CENTERED TEXT CONTENT - MATCHES NIST TABLE WIDTH ----------------- */
.intro-split-content {
  /* Match NIST Table Header width approach exactly */
  width: 90% !important;
  max-width: none !important;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Reduced vertical padding to minimize empty space */
  padding: clamp(40px, 5vw, 80px) clamp(20px, 3vw, 80px);
  box-sizing: border-box !important;
  position: relative;
  z-index: 10;
  text-align: inherit;
}

.intro-content-inner {
  width: 100%;
  flex: 0 0 100%;
  position: relative;
  z-index: 2;
  box-sizing: border-box;
}

/* ----------------- CENTERED TYPOGRAPHY ----------------- */
.intro-label {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(22px, 2.4vw, 38px); /* Impressive but always smaller than h2 */
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #0066cc;
  margin-bottom: clamp(15px, 1.8vw, 28px); /* Reduced margin */
  display: block;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.intro-label::before,
.intro-label::after {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 2px;
  background: #0066cc;
}

.intro-label::before {
  right: calc(100% + 15px);
}

.intro-label::after {
  left: calc(100% + 15px);
}

/* .intro-main-heading {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: clamp(28px, 3.2vw, 56px);
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a1a;
  margin: 0 0 clamp(25px, 3vw, 40px) 0;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
} */

.intro-main-heading {
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(22px, 2.2vw, 58px); /* ~85% of slider h2 for proper hierarchy */
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: clamp(12px, 1.2vw, 30px); /* Reduced margin */
  color: #1a1a1a;
  letter-spacing: -0.02em;
  text-align: center;
  width: 100% !important;
  max-width: clamp(700px, 65vw, 3000px) !important;
  margin-left: auto;
  margin-right: auto;
}

/* Accent highlight bar - centered */
.intro-highlight-bar {
  width: 80px;
  height: 5px;
  background: linear-gradient(90deg, #0066cc 0%, #0052a3 100%);
  margin: 0 auto clamp(18px, 2.2vw, 32px) auto; /* Reduced margin */
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.intro-sub-heading {
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(18px, 1.4vw, 38px) !important; /* Reduced from 1.7vw */
  font-weight: 600;
  line-height: 1.6;
  color: #4a5568;
  margin: 0 auto clamp(22px, 2.2vw, 50px) !important; /* Reduced margin */
  /* padding: 0; */
  text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  /* Match NIST paragraph width constraints exactly */
  width: 100% !important;
  max-width: clamp(700px, 65vw, 3000px) !important;
  /* box-sizing: border-box !important; */
  margin-left: auto !important;
  margin-right: auto !important;
}

.intro-body-text {
  margin-top: clamp(18px, 2vw, 32px); /* Reduced margin */
  width: 100%;
  box-sizing: border-box;
}

.intro-paragraph {
  font-family: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(16px, 1vw, 26px);
  font-weight: 400;
  line-height: 1.8;
  color: #4a4a4a;
  /* margin: 0 auto clamp(20px, 2.5vw, 30px) auto; */
  margin: 0 auto;
  text-align: justify; /* Full justify alignment */
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  /* Match NIST paragraph width constraints exactly */
  width: 100% !important;
  max-width: clamp(700px, 65vw, 3000px) !important;
  /* box-sizing: border-box !important; */
  /* text-align-last: left; */ /* Prevent last line from stretching */
}

.intro-paragraph:last-child {
  margin-bottom: 0;
}

.intro-paragraph strong {
  font-weight: 700;
  color: #1a1a1a;
}

/* ----------------- TABLET LANDSCAPE (768px - 1199px) ----------------- */
@media (min-width: 768px) and (max-width: 1199px) {
  .intro-split-container {
    min-height: auto; /* Content-based height */
    padding-top: clamp(40px, 4vh, 60px); /* Reduced padding */
    padding-bottom: clamp(40px, 4vh, 60px); /* Reduced padding */
    background-size: cover;
    background-position: center center;
  }

  .intro-split-content {
    /* Match NIST: 90% width, not fixed max-width */
    width: 90% !important;
    max-width: none !important;
    /* Reduced vertical padding */
    padding: clamp(40px, 5vw, 70px) clamp(20px, 3vw, 80px);
    box-sizing: border-box !important;
  }

  .intro-main-heading {
    font-size: clamp(26px, 3.5vw, 48px);
  }

  .intro-sub-heading {
    font-size: clamp(16px, 1.8vw, 24px);
  }

  .intro-paragraph {
    font-size: clamp(14px, 1.3vw, 18px);
  }
}

/* ----------------- TABLET PORTRAIT & MOBILE (max-width: 767px) ----------------- */
/* Mobile alignment fix to match NIST Table Header */
@media (max-width: 767px) {
  .intro-split-container {
    min-height: auto;
    max-height: none;
    background-size: cover;
    background-position: center center;
    /* Match NIST container: vertical padding + 10px horizontal padding */
    padding-top: clamp(40px, 8vw, 60px) !important; /* Override default padding-top */
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: clamp(40px, 8vw, 60px);
  }

  .intro-split-container::before {
    background: linear-gradient(
      to bottom,
      rgba(255, 255, 255, 0.25) 0%,
      rgba(255, 255, 255, 0.1) 50%,
      rgba(255, 255, 255, 0.25) 100%
    );
  }

  .intro-split-content {
    /* Match NIST: 95% width on mobile */
    width: 95% !important;
    max-width: none !important;
    /* Match NIST Table Header padding for perfect alignment */
    padding: clamp(40px, 8vw, 60px) clamp(10px, 4vw, 20px);
    box-sizing: border-box !important;
  }

  .intro-label {
    font-size: clamp(18px, 4.5vw, 28px); /* Smaller than h2 on mobile */
    letter-spacing: 2px;
  }

  .intro-label::before,
  .intro-label::after {
    width: 25px;
  }

  .intro-label::before {
    right: calc(100% + 10px);
  }

  .intro-label::after {
    left: calc(100% + 10px);
  }

  .intro-main-heading {
    font-size: clamp(24px, 6vw, 36px);
    margin-bottom: clamp(20px, 4vw, 30px);
  }

  .intro-highlight-bar {
    width: 60px;
    height: 4px;
    margin-bottom: clamp(20px, 4vw, 30px);
  }

  .intro-sub-heading {
    font-size: clamp(16px, 4vw, 22px);
    margin-bottom: clamp(25px, 5vw, 35px);
    padding: 0;
  }

  .intro-paragraph {
    font-size: clamp(14px, 3.5vw, 17px);
    line-height: 1.7;
    margin-bottom: clamp(18px, 4vw, 25px);
  }
}

/* ----------------- SMALL MOBILE (max-width: 480px) ----------------- */
@media (max-width: 480px) {
  .intro-split-container {
    /* Match NIST container: vertical padding + 10px horizontal padding */
    padding-top: 50px !important; /* Override default padding-top */
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 50px;
  }

  .intro-split-content {
    /* Match NIST: 95% width on mobile */
    width: 95% !important;
    max-width: none !important;
    /* Match NIST Table Header padding for perfect alignment */
    padding: 35px clamp(10px, 4vw, 20px);
    box-sizing: border-box !important;
  }

  .intro-main-heading {
    font-size: clamp(22px, 6.5vw, 32px);
    line-height: 1.25;
  }

  .intro-sub-heading {
    font-size: clamp(15px, 4.2vw, 20px);
  }

  .intro-paragraph {
    font-size: clamp(13px, 3.8vw, 16px);
  }
}

/* ----------------- LARGE DESKTOP (1920px - 2559px) ----------------- */
@media (min-width: 1920px) and (max-width: 2559px) {
  .intro-split-container {
    /* Content-based height - minimize vertical space */
    padding-top: clamp(50px, 4vh, 70px); /* Reduced padding */
    padding-bottom: clamp(50px, 4vh, 70px); /* Reduced padding */
    background-size: cover;
    background-position: center center;
  }

  .intro-split-content {
    /* Match NIST: 90% width */
    width: 90% !important;
    max-width: none !important;
    /* Reduced vertical padding */
    padding: clamp(50px, 5vw, 80px) clamp(20px, 3vw, 80px);
    box-sizing: border-box !important;
  }

  .intro-main-heading {
    font-size: clamp(38px, 2.4vw, 52px); /* ~85% of slider h2 at 1920px */
  }

  .intro-sub-heading {
    font-size: clamp(20px, 1.3vw, 28px);
  }

  .intro-paragraph {
    font-size: clamp(16px, 1vw, 20px);
  }
}

/* ----------------- 2K/QHD DISPLAYS (2560px - 3839px) ----------------- */
@media (min-width: 2560px) and (max-width: 3839px) {
  .intro-split-container {
    /* Content-based height - minimize vertical space */
    padding-top: clamp(60px, 4vh, 80px); /* Reduced padding */
    padding-bottom: clamp(60px, 4vh, 80px); /* Reduced padding */
    background-size: cover;
    background-position: center center;
  }

  .intro-split-content {
    /* Match NIST: 90% width */
    width: 90% !important;
    max-width: none !important;
    /* Reduced vertical padding */
    padding: clamp(60px, 5vw, 90px) clamp(20px, 3vw, 80px);
    box-sizing: border-box !important;
  }

  .intro-label {
    font-size: 38px; /* Doubled for 2K displays */
  }

  .intro-main-heading {
    font-size: clamp(44px, 2.3vw, 62px); /* ~85% of slider h2 at 2K */
  }

  .intro-sub-heading {
    font-size: clamp(24px, 1.3vw, 32px);
  }

  .intro-paragraph {
    font-size: clamp(18px, 0.95vw, 23px);
  }

  .intro-highlight-bar {
    width: 100px;
    height: 6px;
  }
}

/* ----------------- 4K DISPLAYS (3840px - 5119px) ----------------- */
@media (min-width: 3840px) and (max-width: 5119px) {
  .intro-split-container {
    /* Content-based height - minimize vertical space */
    padding-top: clamp(70px, 4vh, 90px); /* Reduced padding */
    padding-bottom: clamp(70px, 4vh, 90px); /* Reduced padding */
    background-size: cover;
    background-position: center center;
  }

  .intro-split-content {
    /* Match NIST: 90% width */
    width: 90% !important;
    max-width: none !important;
    /* Reduced vertical padding */
    padding: clamp(70px, 5vw, 100px) clamp(20px, 3vw, 80px);
    box-sizing: border-box !important;
  }

  .intro-label {
    font-size: 44px; /* Doubled for 4K displays */
    letter-spacing: 4px;
  }

  .intro-main-heading {
    font-size: clamp(52px, 2.2vw, 72px); /* ~85% of slider h2 at 4K */
  }

  .intro-sub-heading {
    font-size: clamp(28px, 1.2vw, 36px);
  }

  .intro-paragraph {
    font-size: clamp(21px, 0.9vw, 26px);
    line-height: 1.9;
  }

  .intro-highlight-bar {
    width: 120px;
    height: 7px;
  }
}

/* ----------------- 5K+ DISPLAYS (5120px+) ----------------- */
@media (min-width: 5120px) {
  .intro-split-container {
    /* Content-based height - minimize vertical space */
    padding-top: clamp(80px, 4vh, 100px); /* Reduced padding */
    padding-bottom: clamp(80px, 4vh, 100px); /* Reduced padding */
    background-size: cover;
    background-position: center center;
  }

  .intro-split-content {
    /* Match NIST: 90% width */
    width: 90% !important;
    max-width: none !important;
    /* Reduced vertical padding */
    padding: clamp(80px, 5vw, 110px) clamp(20px, 3vw, 80px);
    box-sizing: border-box !important;
  }

  .intro-label {
    font-size: 48px; /* Doubled for 5K+ displays */
    letter-spacing: 5px;
  }

  .intro-main-heading {
    font-size: clamp(58px, 2.1vw, 82px); /* ~85% of slider h2 at 5K */
  }

  .intro-sub-heading {
    font-size: clamp(32px, 1.1vw, 40px);
  }

  .intro-paragraph {
    font-size: clamp(24px, 0.85vw, 29px);
    line-height: 2;
  }

  .intro-highlight-bar {
    width: 140px;
    height: 8px;
  }
}

/* ----------------- ACCESSIBILITY & PERFORMANCE ----------------- */
/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .intro-split-container {
    background-attachment: scroll !important;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .intro-highlight-bar {
    box-shadow: none;
  }

  .intro-main-heading {
    color: #000000;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 1);
  }

  .intro-paragraph {
    color: #000000;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 1);
  }

  .intro-paragraph strong {
    color: #000000;
  }
}

/* GPU acceleration */
.intro-split-container,
.intro-split-content,
.intro-highlight-bar {
  will-change: auto;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* Optimize layout */
.section-intro-hero-split {
  contain: layout style paint;
}
