/* ===== css/recent_projects.css ===== */
/* Config */
:root {
  --rp-accent: #6cf;
  --rp-card-w: 400px;
  /* base width for side images */
  --rp-active-w: 480px;
  /* width for center/active image */
  --rp-card-h: 500px;
  /* section & card height */
  --rp-nav-size: 50px;
  /* navigation button size */
}

/* Reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== Layout ===== */
.rp_section {
  display: flex;
  gap: 20px;
  padding: 40px 20px;
  background: #01396f;
  color: #000000;
}

/* 3 parts for gallery */
.rp_gallery {
  flex: 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* 1 part for side title panel */
/* Side panel — matches the provided design */
.rp_side {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  border-radius: 12px;
  background:
    radial-gradient(1200px 600px at 20% 0%, rgba(255, 255, 255, .06) 0%, transparent 60%),
    linear-gradient(180deg, #0b1b22 0%, #0a151a 100%);
  /* deep teal/blue look */
}

/* Wrapper to stack lines and center */
.rp_side_title {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  line-height: 1.05;
  margin: 0;
}

/* “Some of our” */
.rp_kicker {
  color: #ffffff;
  font-weight: 600;
  letter-spacing: .2px;
  /* Responsive size: ~28px desktop down to ~18px mobile */
  font-size: clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: 10px;
  opacity: .95;
}

/* “Iconic Projects” */
.rp_headline {
  color: #FFC400;
  /* bold yellow */
  font-weight: 800;
  /* Responsive size: ~86px desktop down to ~44px mobile */
  font-size: clamp(2rem, 5vw, 6rem);
  text-transform: none;
  letter-spacing: .5px;
  line-height: 1.0;
  text-shadow: 0 2px 0 rgba(0, 0, 0, .15);
}

/* Optional: subtle entrance animation */
@media (prefers-reduced-motion: no-preference) {
  .rp_side_title {
    animation: rpFadeUp .6s ease both;
  }

  @keyframes rpFadeUp {
    from {
      opacity: 0;
      transform: translateY(8px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

/* Tighten spacing on small screens when stacked */
@media (max-width: 992px) {
  .rp_side {
    width: 100%;
    padding: 24px 20px;
  }
}


/* ===== Coverflow ===== */
.rp_coverflow {
  position: relative;
  perspective: 2000px;
  width: 100%;
  max-width: 1400px;
  height: var(--rp-card-h);
  overflow: visible;
  /* allow side images to be visible */
}

/* Slides */
.rp_slide {
  position: absolute;
  top: 0;
  left: 50%;
  width: var(--rp-card-w);
  height: var(--rp-card-h);
  transform-style: preserve-3d;
  transition:
    transform 0.6s ease,
    opacity 0.6s ease,
    width 0.6s ease;
  will-change: transform, width;
  cursor: pointer;
  backface-visibility: hidden;
  overflow: hidden;
  /* clip image zoom */
  border-radius: 12px;
  isolation: isolate;
  /* keeps caption above image */
  background: transparent;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* Wider active slide */
.rp_slide.rp_is-active {
  width: var(--rp-active-w);
}

/* Image fills 80% of card height */
.rp_slide img {
  width: 100%;
  height: 80%;
  /* Image covers 80% of card height */
  object-fit: cover;
  display: block;
  border-radius: 6px;
  transition: transform 0.4s ease;
}

/* Hover zoom on image */
.rp_slide img:hover {
  transform: scale(1.2);
}

/* Caption in bottom 20% of slide */
.rp_caption {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
  pointer-events: none;
}

/* Caption accent on hover */
.rp_slide:hover .rp_caption {
  background: rgb(0, 0, 0);
  transform: scale(1.03);
}

/* Navigation buttons */
.rp_nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: var(--rp-nav-size);
  height: var(--rp-nav-size);
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 26px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  z-index: 5;
  outline: none;
}

.rp_nav--prev {
  left: 10px;
  z-index: 9999;
}

.rp_nav--next {
  right: 10px;
    z-index: 9999;

}

.rp_nav:focus-visible {
  box-shadow: 0 0 0 3px rgba(102, 204, 255, 0.45);
}

.rp_nav:hover {
  background: rgba(0, 0, 0, 0.7);
  border-color: rgba(255, 255, 255, 0.55);
}

/* ===== Responsive tweaks ===== */
@media (max-width: 992px) {
  .rp_section {
    flex-direction: column;
  }

  .rp_gallery,
  .rp_side {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 768px) {
  :root {
    --rp-card-w: 300px;
    --rp-active-w: 360px;
    --rp-card-h: 420px;
    --rp-nav-size: 44px;
  }
}

@media (max-width: 480px) {
  :root {
    --rp-card-w: 240px;
    --rp-active-w: 280px;
    --rp-card-h: 360px;
    --rp-nav-size: 40px;
  }
}