/* ============================================================
   DeepYogaWay — 09_images.css
   Bruges i Simple Custom CSS & JS PRO → All Website
   Load order: 9 af 9
   ============================================================
   Indhold:
   1. Globale image-regler (object-fit: cover overalt)
   2. Focus-klasser (.img-focus-top, -center, -person osv.)
   3. Responsive crop per sektion og breakpoint
   4. Hero billede per breakpoint
   5. Card billeder
   6. Content-grid billeder
   7. Article hero
   ============================================================
   BRUG I HTML:
   Tilføj en klasse til billedets wrapper-div:
     <div class="group-section__image img-focus-top">
     <div class="content-grid__image img-focus-person">
   ============================================================ */

/* ── 1. Global image base ── */
img {
  display: block;
  max-width: 100%;
}

.hero__media img,
.content-grid__image img,
.group-section__image img,
.for-section__image img,
.about-section__image img,
.card__image img,
.featured-card__image img,
.article-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── 2. Focus-klasser — bruges på wrapper-div ── */
/* !important sikrer at inline object-position på <img> overrides */

/* Person centreret — standard */
.img-focus-center img { object-position: center center !important; }

/* Person i toppen — portræt, ansigt øverst */
.img-focus-top img { object-position: center top !important; }

/* Person i bunden — aerial shots, grupper */
.img-focus-bottom img { object-position: center 70% !important; }

/* Person lidt til venstre */
.img-focus-left img { object-position: 35% center !important; }

/* Person lidt til højre */
.img-focus-right img { object-position: 65% center !important; }

/* Person-billede: fokus øverste tredjedel — bruges til portræt og meditation */
.img-focus-person img { object-position: center 25% !important; }

/* Landskab: fokus på horisont */
.img-focus-horizon img { object-position: center 55% !important; }

/* Blød crop — ingen aggressiv zoom */
.img-crop-soft img {
  object-fit: cover !important;
  object-position: center center !important;
}

/* Blød crop — ingen aggressiv zoom */
.img-crop-soft img {
  object-fit: cover;
  object-position: center center;
}

/* Portrait crop (3:4) */
.img-crop-portrait {
  aspect-ratio: 3 / 4;
  overflow: hidden;
}

.img-crop-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Landscape crop (16:9) */
.img-crop-landscape {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.img-crop-landscape img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── 3. Hero billede — per breakpoint ── */

/* Desktop (1367px+): bred crop, Milana centreret */
.hero__media img {
  object-position: center 35%;
}

/* Laptop (1025–1366px): blødere crop, ikke for tæt på person */
@media (min-width: 1025px) and (max-width: 1366px) {
  .hero__media img {
    object-position: center 38%;
  }

  /* Portræt-billeder: lidt mere luft over */
  .content-grid__image img {
    object-position: center 15% !important;
  }

  /* Focus-top: bevar top-fokus men lidt mere luft */
  .img-focus-top img {
    object-position: center 8% !important;
  }

  /* Focus-person: blødere på laptop */
  .img-focus-person img {
    object-position: center 28% !important;
  }

  /* Group-sektion: centrer på laptop */
  .group-section__image img {
    object-position: center 55%;
  }

  /* For-sektion (meditation): person øverst */
  .for-section__image img {
    object-position: center 20%;
  }

  /* About Milana: ansigt i top-tredjedel */
  .about-section__image img {
    object-position: center 12%;
  }

  /* Featured card: mere luft */
  .featured-card__image img {
    object-position: center 42%;
  }
}

/* Tablet (768–1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .hero__media img {
    object-position: center 42%;
  }

  .content-grid__image img {
    object-position: center center !important;
  }
}

/* Mobil: centrer alle hero-billeder */
@media (max-width: 768px) {
  .hero__media img {
    object-position: center center !important;
  }
}

/* ── 4. Content-grid billeder ── */

/* Desktop */
.content-grid__image img {
  object-position: center top;
}

/* Laptop */
@media (min-width: 1025px) and (max-width: 1366px) {
  .content-grid__image img {
    object-position: center center;
  }
}

/* Mobil: blødere crop */
@media (max-width: 768px) {
  .content-grid__image img {
    object-position: center 20% !important;
    aspect-ratio: 4 / 5;
  }
}

/* ── 5. Group section billede ── */
/* Nu portræt 900×1200 — ingen aggressiv crop nødvendig */
.group-section__image img {
  object-position: center center;
}

@media (max-width: 768px) {
  .group-section__image img {
    object-position: center center !important;
    aspect-ratio: 4 / 3 !important;
  }
}

/* ── 6. For-section (Milana meditation billede) ── */
.for-section__image img {
  object-position: center 30%;
}

@media (max-width: 768px) {
  /* Mobil: flyt fokus ned så Milana ikke skæres af øverst */
  .for-section__image img {
    object-position: center 45% !important;
    aspect-ratio: 4 / 3 !important;
  }
}

/* ── 7. About section billede (Milana portræt) ── */
.about-section__image img {
  object-position: center top;
}

@media (max-width: 768px) {
  .about-section__image img {
    object-position: center 15% !important;
    aspect-ratio: 4 / 3 !important;
  }
}

/* ── 8. Card billeder — konsistent 4:3 ── */
.card__image {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.7s ease;
}

/* Ingen zoom-hover på touch/mobil */
@media (max-width: 768px) {
  .card:hover .card__image img {
    transform: none !important;
  }
}

/* ── 9. Featured article billede ── */
.featured-card__image img {
  object-position: center 40%;
  min-height: 420px;
}

@media (max-width: 1024px) {
  .featured-card__image img {
    min-height: 300px;
    object-position: center 45%;
  }
}

@media (max-width: 768px) {
  .featured-card__image img {
    min-height: auto !important;
    aspect-ratio: 4 / 3;
    object-position: center center !important;
  }
}

/* ── 10. Article hero billede ── */
.article-hero-image {
  overflow: hidden;
  max-height: 520px;
}

.article-hero-image img {
  object-position: center 40%;
}

@media (min-width: 1025px) and (max-width: 1366px) {
  .article-hero-image img {
    object-position: center 45%;
  }
}

@media (max-width: 768px) {
  .article-hero-image {
    max-height: none !important;
  }

  .article-hero-image img {
    aspect-ratio: 4 / 3 !important;
    object-position: center center !important;
  }
}

/* ── 11. Milana portræt lille (sidebar/avatar) ── */
.sidebar-author__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
