/* ═══════════════════════════════════════════════════════════
   Images, Hero V3, Alignments & Mobile Optimization
   ═══════════════════════════════════════════════════════════ */

/* ─── Hero V3 — Content + Image Gallery ─────────────────── */
.hero-v3 .hero-v2-inner { display: none; }

.hero-v3-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2rem;
}

.hero-v3-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  width: 100%;
  text-align: left;
}

.hero-v3-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.25rem;
  max-width: 560px;
}

.hero-v3-content .hero-v2-badge { align-self: flex-start; }
.hero-v3-content .hero-v2-tags { justify-content: flex-start; }
.hero-v3-content .hero-v2-actions { justify-content: flex-start; }

/* Image showcase */
.hero-v3-gallery {
  position: relative;
  min-height: 420px;
  width: 100%;
}

.hero-img-main {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  max-height: 480px;
  width: 75%;
  margin-left: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

.hero-img-main .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-img-badge {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  background: var(--yellow);
  color: var(--black);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  z-index: 2;
}

.hero-img-float {
  position: absolute;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,0.15);
  z-index: 3;
}

.hero-img-float .hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-img-float-1 {
  width: 42%;
  aspect-ratio: 1;
  top: -5%;
  left: 0;
  animation: float-img 7s ease-in-out infinite;
}

.hero-img-float-2 {
  width: 38%;
  aspect-ratio: 4/3;
  bottom: 5%;
  left: 8%;
  animation: float-img 8s ease-in-out infinite reverse;
}

.hero-img-accent {
  position: absolute;
  top: 10%;
  right: -5%;
  width: 120px;
  height: 120px;
  border: 4px solid var(--yellow);
  border-radius: var(--radius-md);
  z-index: 0;
  opacity: 0.6;
}

@keyframes float-img {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* Trust strip */
.trust-strip {
  padding: 2rem 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.trust-strip-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  align-items: stretch;
}

.trust-item {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.65rem;
}

.trust-item-img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 2px solid var(--border);
  transition: all 0.35s;
}

.trust-item:hover .trust-item-img {
  border-color: var(--yellow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

.trust-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.trust-item span {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--black);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ─── Image Cards ───────────────────────────────────────── */
.image-card {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.image-card-media {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}

.image-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-card:hover .image-card-img { transform: scale(1.06); }

.image-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.5) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
}

.image-card:hover .image-card-overlay { opacity: 1; }

.image-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.image-card-body h3 {
  font-size: 1.05rem;
  color: var(--black);
  margin: 0;
}

.image-card-body p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ─── Split Section (Image + Content) ───────────────────── */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
}

.split-section.reverse { direction: rtl; }
.split-section.reverse > * { direction: ltr; }

.split-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-hover);
}

.split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.split-image::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--yellow);
}

.split-content {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: flex-start;
}

.split-content .section-header {
  text-align: left;
  margin: 0;
  max-width: none;
}

.split-content .section-line { margin-left: 0; }

.split-content p {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

/* ─── Facility cards with images ────────────────────────── */
.facility-card-v2 {
  padding: 0 !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.facility-card-v2 .facility-img-wrap {
  aspect-ratio: 16/10;
  overflow: hidden;
  position: relative;
}

.facility-card-v2 .facility-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.facility-card-v2:hover .facility-img-wrap img { transform: scale(1.05); }

.facility-card-v2 .facility-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
}

.facility-card-v2 h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--black);
}

.facility-card-v2 p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0;
}

/* ─── Image grid (3 col) ────────────────────────────────── */
.image-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: stretch;
}

.image-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.image-grid-4 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
}

/* ─── Page hero with image ──────────────────────────────── */
.page-hero.has-image {
  padding-bottom: 0;
}

.page-hero-banner {
  margin-top: 2rem;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: 360px;
  box-shadow: var(--shadow-hover);
}

.page-hero-banner img {
  width: 100%;
  height: 360px;
  object-fit: cover;
  display: block;
}

/* ─── Gallery masonry with real images ──────────────────── */
.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s;
}

.gallery-item:hover img { transform: scale(1.04); }

.gallery-placeholder { display: none; }

/* ─── Leadership with photo ─────────────────────────────── */
.leadership-photo {
  aspect-ratio: 3/4;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 3px solid var(--yellow);
}

.leadership-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ─── Program cards with image ──────────────────────────── */
.program-card-v2 {
  padding: 0 !important;
  overflow: hidden;
  display: block;
  color: var(--text);
  height: 100%;
}

.program-card-v2:hover { color: var(--text); }

.program-card-v2 .program-img {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.program-card-v2 .program-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.program-card-v2:hover .program-img img { transform: scale(1.06); }

.program-card-v2 .program-card-content {
  padding: 1.5rem;
}

/* ─── SEO content block ─────────────────────────────────── */
.seo-content-block {
  padding: 2.5rem;
  line-height: 1.85;
}

.seo-content-block h2 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--black);
}

.seo-content-block h3 {
  font-size: 1.15rem;
  margin: 1.5rem 0 0.75rem;
  color: var(--black);
}

.seo-content-block p,
.seo-content-block li {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}

.seo-content-block ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

/* ─── Global alignment fixes ────────────────────────────── */
.section > .container {
  width: 100%;
  max-width: var(--container);
  margin-left: auto;
  margin-right: auto;
}

.why-grid,
.facilities-grid,
.programs-grid,
.news-grid,
.blog-grid,
.values-grid,
.stream-grid,
.degree-grid,
.image-grid-3,
.image-grid-2,
.image-grid-4 {
  align-items: stretch;
}

.why-card,
.facility-card,
.program-card,
.news-card,
.blog-card,
.value-card,
.stream-card,
.degree-card,
.image-card,
.facility-card-v2,
.program-card-v2 {
  height: 100%;
}

/* Overview image */
.overview-image-wrap .overview-image-real {
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}

.overview-image-wrap {
  aspect-ratio: auto;
  min-height: 360px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
}

/* Blog / news card images */
.news-card-image,
.blog-card-image {
  background: var(--yellow-light);
}

.news-card-image img,
.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Lazy load fade-in */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity 0.5s;
}

img[loading="lazy"].loaded,
img[loading="eager"] {
  opacity: 1;
}

/* ─── Mobile Optimization ───────────────────────────────── */
@media (max-width: 1024px) {
  .hero-v3-layout {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-v3-content {
    align-items: center;
    max-width: 100%;
    text-align: center;
  }

  .hero-v3-content .hero-v2-badge,
  .hero-v3-content .hero-v2-tags,
  .hero-v3-content .hero-v2-actions {
    align-self: center;
    justify-content: center;
  }

  .hero-v3-gallery {
    min-height: 340px;
    max-width: 480px;
    margin: 0 auto;
  }

  .hero-img-main { width: 85%; }

  .trust-strip-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .split-section {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .split-section.reverse { direction: ltr; }

  .image-grid-3,
  .image-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero-v3-gallery { min-height: 280px; }

  .hero-img-float-1 { width: 36%; }
  .hero-img-float-2 { width: 32%; }

  .hero-img-accent { display: none; }

  .trust-strip-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .trust-item span { font-size: 0.65rem; }

  .image-grid-3,
  .image-grid-2,
  .image-grid-4 {
    grid-template-columns: 1fr;
  }

  .page-hero-banner img { height: 220px; }

  .hero-v2-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-content .section-header { text-align: center; }
  .split-content .section-line { margin: 1rem auto 0; }
  .split-content { align-items: center; text-align: center; }
}

@media (max-width: 480px) {
  .hero-img-main { width: 100%; aspect-ratio: 3/4; }
  .hero-img-float { display: none; }

  .trust-strip-grid { grid-template-columns: 1fr 1fr; }
}

/* Touch targets */
@media (hover: none) {
  .lvgi-btn,
  .nav-list a,
  .faq-question {
    min-height: 44px;
  }
}
