/* IELTS Online Preps — real photos blended into the pages (phase 32 preview).
 * Photos: assets/img/photos (Unsplash licence, see CREDITS.txt). Everything here is additive: a page without these
 * classes looks exactly as before. */

/* 1. Sub-page header: a round photo on the right, sitting inside the teal ring the header already has. */
.page-hero.has-photo .wrap { position: relative; }
.ph-photo { position: absolute; right: 1.5rem; top: 50%; transform: translateY(-52%); width: 290px; height: 290px; margin: 0; z-index: 1;
  border-radius: 50%; overflow: hidden; border: 8px solid rgba(255, 255, 255, .14); box-shadow: 0 18px 50px rgba(0, 0, 0, .35); }
.ph-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph-photo figcaption { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; padding: .25rem .7rem; border-radius: 999px;
  background: rgba(11, 36, 71, .78); color: #fff; font: 700 .75rem/1.2 Manrope, sans-serif; letter-spacing: .02em; }
@media (min-width: 981px) {
  .page-hero.has-photo .wrap > :not(.ph-photo) { max-width: calc(100% - 360px); }
}
@media (max-width: 980px) {
  /* phones and tablets: a short rounded banner under the heading instead of the circle */
  .ph-photo { position: relative; right: auto; top: auto; transform: none; width: 100%; height: 170px; margin-top: 1.4rem; border-radius: 18px; border-width: 4px; }
  .ph-photo figcaption { left: 12px; transform: none; bottom: 10px; }
}

/* 2. Home "Which one are you?" cards: a photo at the top, the icon as a badge on its edge. */
.path.has-pic { padding-top: 0; overflow: hidden; }
.path-pic { display: block; margin: 0 -1.4rem .1rem; height: 150px; background: #e8eef6; }
.path-pic img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.path.has-pic:hover .path-pic img { transform: scale(1.04); }
.path.has-pic > .ms { align-self: flex-start; margin-top: -30px; width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%;
  background: #fff; box-shadow: 0 6px 16px rgba(11, 36, 71, .18); font-size: 26px; position: relative; }
@media (max-width: 560px) { .path-pic { height: 170px; } }

/* 3. Home "Choose how you want to prepare": a wide photo heading each option. */
.prep.has-pic { padding-top: 0; overflow: hidden; }
.prep-pic { display: block; margin: 0 -1.6rem .3rem; height: 190px; background: #e8eef6; }
.prep-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prep.has-pic > .ms { margin-top: -34px; width: 58px; height: 58px; display: grid; place-items: center; border-radius: 50%; background: #fff; box-shadow: 0 6px 16px rgba(11, 36, 71, .18); position: relative; }

/* 4. Home "Would you rather talk to someone?": a friendly face in the band. */
.cta-band.has-face { grid-template-columns: auto 1.4fr auto; }
.cta-face { width: 132px; height: 132px; border-radius: 50%; object-fit: cover; border: 5px solid rgba(255, 255, 255, .18); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
@media (max-width: 820px) { .cta-band.has-face { grid-template-columns: 1fr; } .cta-face { width: 96px; height: 96px; } }

/* 5. Home "IELTS in two minutes": a photo strip of the four skills above the cards. */
.skill-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin: 0 0 1.4rem; }
.skill-strip figure { margin: 0; position: relative; border-radius: 18px; overflow: hidden; height: 170px; box-shadow: var(--shadow); }
.skill-strip img { width: 100%; height: 100%; object-fit: cover; display: block; }
.skill-strip figcaption { position: absolute; inset: auto 0 0 0; padding: 1.6rem .9rem .7rem; color: #fff; font: 800 1rem/1.2 Manrope, sans-serif;
  background: linear-gradient(transparent, rgba(11, 36, 71, .85)); }
.skill-strip figcaption small { display: block; font: 600 .78rem/1.3 Manrope, sans-serif; color: #d4e4fa; }
@media (max-width: 760px) { .skill-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .skill-strip figure { height: 140px; } }

/* Shorter headers (the contact page) get a smaller photo so it stays clear of the cards below. */
@media (min-width: 981px) { body[data-page="page_contact"] .ph-photo { width: 220px; height: 220px; transform: translateY(-58%); } }
