/* css/home.css - the public homepage sections around the achievers panel (css/achievers.css): the hero photo, the programs overview, the facilities preview, the instructor
 * introduction and the closing call to action. Every section sits in the page's own container (style.css `section`: 5% side padding, 1280px at most), the same content edges
 * as the header and the hero. The photographs are the real ones from the existing R2 bucket (js/home.js); each box has its size from the first paint, so nothing moves. */

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--c-focus); outline-offset: 2px; }

/* ---------------------------------------------------------------- A. hero photo */
.hero-photo { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), rgba(0, 175, 185, 0.2)); border: 1px solid rgba(255, 255, 255, 0.16); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45); }
.hero-photo-fallback { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(4rem, 9vw, 6.5rem); color: rgba(255, 255, 255, 0.2); }
.hero-photo-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: 0; transition: opacity 0.7s ease; }
.hero-photo-img[hidden] { display: none; }
.hero-photo.is-ready .hero-photo-img { opacity: 1; }
.hero-photo-tag { position: absolute; left: 14px; right: 14px; bottom: 14px; z-index: 1; padding: 8px 12px; border-radius: 10px; background: rgba(3, 28, 45, 0.74); backdrop-filter: blur(6px); color: #fff; font-size: 0.8rem; font-weight: 600; line-height: 1.35; }
.hero-photo-tag i { margin-right: 6px; color: var(--accent); }

/* ---------------------------------------------------------------- B. programs overview */
.po .section-header, .hf .section-header { margin-bottom: 36px; }
.po-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; }
.po-card { position: relative; display: flex; flex-direction: column; padding: 26px 24px 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); box-shadow: 0 2px 10px rgba(4, 41, 64, 0.06); overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease; }
.po-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--secondary), var(--accent)); }
.po-card:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(4, 41, 64, 0.14); border-color: rgba(0, 119, 145, 0.35); }
.po-tag { align-self: flex-start; margin-bottom: 14px; padding: 4px 10px; border-radius: 999px; background: rgba(0, 119, 145, 0.1); color: var(--primary); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.po-name { margin: 0; font-size: 2rem; line-height: 1.1; letter-spacing: -0.02em; color: var(--secondary); }
.po-sub { margin: 4px 0 12px; font-weight: 600; color: var(--text-dark); }
.po-desc { margin: 0 0 20px; flex: 1 1 auto; color: var(--text-muted); font-size: 0.95rem; line-height: 1.6; }
.po-btn { align-self: flex-start; gap: 8px; }
.po-btn:focus-visible, .hf-tile:focus-visible, .hi-card a:focus-visible, .join a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- D. facilities preview */
.hf { background: var(--white); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.hf[hidden] { display: none; }
.hf-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.hf-tile { position: relative; display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: #dfe7ec; box-shadow: 0 2px 10px rgba(4, 41, 64, 0.1); }
.hf-tile[hidden] { display: none; }
.hf-tile-lead { grid-column: 1 / -1; aspect-ratio: 16 / 10; }
.hf-tile img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; transition: transform 0.5s ease; }
.hf-tile img[hidden] { display: none; }
.hf-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(3, 28, 45, 0) 55%, rgba(3, 28, 45, 0.4)); opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.hf-tile:hover img { transform: scale(1.05); }
.hf-tile:hover::after { opacity: 1; }
.hf-more { margin-top: 28px; text-align: center; }

/* ---------------------------------------------------------------- E. meet our instructor */
.hi { padding-block: 70px; }
.hi-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; padding: 28px 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); box-shadow: 0 6px 24px rgba(4, 41, 64, 0.08); }
.hi-photo { position: relative; margin: 0; width: 100%; max-width: 300px; justify-self: center; }
.hi-photo::before { content: ""; position: absolute; z-index: 0; inset: 12px -10px -10px 12px; border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(0, 119, 145, 0.22), rgba(0, 175, 185, 0.12)); }
.hi-photo img { position: relative; z-index: 1; display: block; width: 100%; height: auto; aspect-ratio: 768 / 1376; border-radius: var(--radius-lg); background: #dfe7ec; box-shadow: var(--shadow-hover); }
.hi-info { min-width: 0; text-align: center; }
.hi-name { margin: 6px 0 4px; font-size: clamp(2rem, 4.5vw, 2.6rem); line-height: 1.1; letter-spacing: -0.02em; color: var(--secondary); }
.hi-role { margin: 0 0 4px; font-weight: 700; color: var(--primary); }
.hi-org { margin: 0 0 18px; color: var(--text-muted); }
.hi-areas { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.hi-areas li { padding: 5px 12px; border-radius: 999px; background: var(--secondary); color: #fff; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em; }

/* ---------------------------------------------------------------- F. closing call to action */
.join { padding-top: 20px; padding-bottom: 80px; }
.join-card { padding: clamp(36px, 6vw, 64px) clamp(20px, 5vw, 56px); border-radius: var(--radius-xl); background: linear-gradient(135deg, #032030 0%, #042940 50%, #005c53 100%); color: #fff; text-align: center; box-shadow: var(--shadow-hover); }
.join-eyebrow { display: block; margin-bottom: 10px; font-size: 0.85rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--accent); }
.join-card h2 { margin: 0 auto 14px; max-width: 760px; color: #fff; font-size: clamp(1.6rem, 3.6vw, 2.4rem); line-height: 1.2; letter-spacing: -0.01em; }
.join-card > p { margin: 0 auto 26px; max-width: 640px; color: rgba(255, 255, 255, 0.82); line-height: 1.6; }
.join-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.join-btn-main { background: #fff; color: var(--primary); border-color: #fff; }
.join-btn-main:hover { background: #e8f6f8; color: var(--primary); }
.join-btn-alt { border-color: rgba(255, 255, 255, 0.45); color: #fff; }
.join-btn-alt:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.join-card .join-contact { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 26px; margin: 26px auto 0; font-size: 0.95rem; }
.join-contact a { color: #fff; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, 0.35); }
.join-contact a:hover { border-bottom-color: #fff; }
.join-contact i { margin-right: 7px; color: var(--accent); }

@media (min-width: 640px) {
    .po-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .hf-grid { gap: 14px; }
}
@media (min-width: 900px) {
    .hf-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
    .hf-tile { aspect-ratio: 4 / 3; }
    .hf-tile-lead { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
    .hi-card { grid-template-columns: 300px minmax(0, 1fr); gap: 52px; padding: 38px 46px; }
    .hi-info { text-align: left; }
    .hi-areas { justify-content: flex-start; }
}
@media (min-width: 1100px) { .po-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; } }
@media (prefers-reduced-motion: reduce) {
    .hero-photo-img, .po-card, .hf-tile img, .hf-tile::after { transition: none; }
    .po-card:hover { transform: none; }
    .hf-tile:hover img { transform: none; }
}
