/* ============================================
   KASARACHI FOUNDATION - Real photo styles
   ============================================ */

.media-frame {
  width: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--light-alt);
}

.media-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-frame-square {
  max-width: 400px;
  aspect-ratio: 1 / 1;
}

.media-frame-portrait {
  max-width: 350px;
  aspect-ratio: 3 / 4;
}

.media-frame-wide {
  aspect-ratio: 16 / 10;
}

.media-frame-hero {
  aspect-ratio: 4 / 5;
  max-width: 420px;
}

.program-detail-visual .media-frame {
  width: 100%;
  max-width: 420px;
}

.program-detail-visual .media-frame-wide {
  aspect-ratio: 4 / 3;
}

.founder-img,
.founder-avatar {
  overflow: hidden;
  padding: 0;
  background: var(--light-alt);
}

.founder-img {
  width: 96px;
  height: 96px;
}

.founder-avatar {
  width: 90px;
  height: 90px;
}

.avatar-photo,
.founder-avatar img,
.team-avatar img,
.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-avatar {
  overflow: hidden;
  padding: 0;
  background: var(--light-alt);
}

.testimonial-avatar {
  overflow: hidden;
  padding: 0;
}

.story-image .media-frame-portrait {
  margin-left: auto;
  max-width: 100%;
}

.hero-photo-collage {
  position: relative;
  width: min(100%, 440px);
  height: 400px;
}

.hero-photo-collage .photo-card {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28);
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.hero-photo-collage .photo-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-photo-collage .photo-main {
  top: 0;
  left: 0;
  width: 68%;
  height: 72%;
}

.hero-photo-collage .photo-secondary {
  bottom: 0;
  right: 0;
  width: 52%;
  height: 48%;
}

.hero-photo-collage .photo-accent {
  top: 38%;
  right: 6%;
  width: 38%;
  height: 32%;
  border-radius: var(--radius);
}

.gallery-photo,
.masonry-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-photo,
.masonry-item:hover .masonry-photo {
  transform: scale(1.05);
}

.gallery-item .gallery-overlay,
.masonry-item .photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.78));
  color: var(--white);
  padding: 40px 20px 16px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.35s ease;
  pointer-events: none;
}

.gallery-item:hover .gallery-overlay,
.masonry-item:hover .photo-caption {
  opacity: 1;
  transform: translateY(0);
}

.masonry-item {
  position: relative;
}

.blog-card-img img,
.featured-image img,
.video-thumbnail img,
.insta-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.featured-image {
  overflow: hidden;
  min-height: 280px;
}

.blog-card-img {
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.video-thumbnail {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.video-thumbnail .play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: rgba(0, 0, 0, 0.25);
  color: var(--white);
  transition: background 0.3s ease;
}

.video-card:hover .play-icon {
  background: rgba(0, 0, 0, 0.4);
}

.insta-item {
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.map-embed {
  width: 100%;
  min-height: 220px;
  border: 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.map-embed-large {
  min-height: 360px;
}

.news-card:has(.news-card-img) {
  padding: 0;
  overflow: hidden;
}

.news-card-img {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.news-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.news-card-body {
  padding: 24px;
}

.carousel--testimonial .testimonial .testimonial-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  margin: 0 auto 16px;
  overflow: hidden;
}

.founder-img,
.founder-avatar,
.team-avatar {
  border-radius: 50%;
}

.page-hero-bg.has-photo {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.88) 0%, rgba(13, 110, 253, 0.55) 100%),
    url('../images/foundation-outreach.png') center / cover no-repeat;
}

.hero-bg.has-photo {
  background:
    linear-gradient(135deg, rgba(10, 22, 40, 0.9) 0%, rgba(13, 110, 253, 0.5) 55%, rgba(25, 135, 84, 0.35) 100%),
    url('../images/group-photo.png') center / cover no-repeat;
}

@media (max-width: 768px) {
  .hero-photo-collage {
    height: 320px;
    margin: 0 auto;
  }

  .media-frame-square,
  .media-frame-portrait {
    max-width: 100%;
  }
}
