/* ==========================================================
   PCET – home.css  (HOME PAGE ONLY – index.php, load after main.css)
   Flyer · Ticker · Highlights · section headings (.index-h2) · About · Institutes · Awards · Student Life
   Layout = Bootstrap grid; sections are styled by their id – no custom classes.
   ========================================================== */

/* ---------- FLYER / HERO SLIDER (#flyer) ----------
   Campus photos change in the background; the text stays fixed on top.
   Fonts: Anybody (top line + headline) · Inter (programmes + buttons) */
#flyer { --flyer-gold: #ffb81c; --flyer-navy: #0b1f4d; --flyer-font: "Inter", sans-serif; --flyer-display-font: "Anybody", sans-serif; position: relative; height: clamp(480px, 75vh, 760px); overflow: hidden; background: var(--flyer-navy); }

/* Carousel fills the section; photos zoom slowly (restarts on each image) */
#flyer .carousel, #flyer .carousel-inner { position: absolute; inset: 0; }
#flyer .carousel-item { height: 100%; }
#flyer .carousel-item > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 55%; transform: scale(1.02); animation: flyerZoom 14s ease-out forwards; }

/* Dark overlay (on the carousel, so it never fades with the images) */
#flyer .carousel::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(ellipse at center, rgba(0, 0, 0, .45) 0%, rgba(0, 0, 0, .75) 70%), linear-gradient(0deg, rgba(0, 0, 0, .55), rgba(0, 0, 0, .15)); }
#flyer > .container { position: relative; z-index: 2; }

/* Top line: gold capitals with a thin line on both sides */
#flyer p:first-child { display: inline-flex; align-items: center; gap: 14px; color: var(--flyer-gold); font-family: var(--flyer-display-font); font-stretch: 100%; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; font-size: clamp(.8rem, 1.2vw, 2rem); margin-bottom: 1rem; text-shadow: 0 1px 8px rgba(0, 0, 0, .35); }
#flyer p:first-child::before, #flyer p:first-child::after { content: ""; width: 40px; height: 1px; background: var(--flyer-gold); }

/* Second line (tagline under the top line): white, readable on the dark photo */
#flyer p:first-child + p { font-family: var(--flyer-font); font-weight: 500; font-size: clamp(1rem, 1.6vw, 1.25rem); letter-spacing: .02em; color: rgba(255, 255, 255, .92); margin: 0 0 .9rem; text-shadow: 0 1px 10px rgba(0, 0, 0, .45); }

/* Headline: Anybody capitals; "Nursery To PHD" in gold, always on one line */
#flyer h1 { font-family: var(--flyer-display-font); font-weight: 800; font-stretch: 100%; text-transform: uppercase; font-size: clamp(1.8rem, 3.6vw, 3rem); line-height: 1.05; letter-spacing: .01em; color: #fff; margin: 0 0 1rem; text-shadow: 0 2px 18px rgba(0, 10, 40, .35); }
#flyer h1 em { font-style: normal; font-weight: 900; color: var(--flyer-gold); white-space: nowrap; }

/* Programmes: two lines separated by gold dots */
#flyer h1 + p { font-family: var(--flyer-font); color: rgba(255, 255, 255, .88); font-size: 1rem; line-height: 1.65; letter-spacing: .02em; margin: 0 auto 2rem; }
#flyer h1 + p span { white-space: nowrap; }
#flyer h1 + p span + span::before { content: "·"; color: var(--flyer-gold); font-weight: 700; margin: 0 .55em 0 .2em; }
#flyer h1 + p br + span::before { content: none; }

/* Buttons */
#flyer .btn { font-family: var(--flyer-font); font-weight: 700; font-size: 1.0625rem; border-radius: 50rem; padding: .85rem 1.85rem; min-width: 12rem; margin: .375rem; }
#flyer .btn:focus-visible { outline: 3px solid var(--flyer-gold); outline-offset: 2px; box-shadow: none; }

/* Admission Enquiry: navy with a gold edge and gold text; fills gold on hover */
#flyer .btn-warning { --bs-btn-color: #ffd166; --bs-btn-bg: var(--flyer-navy); --bs-btn-border-color: var(--flyer-gold); --bs-btn-hover-color: var(--flyer-navy); --bs-btn-hover-bg: var(--flyer-gold); --bs-btn-hover-border-color: var(--flyer-gold); --bs-btn-active-color: var(--flyer-navy); --bs-btn-active-bg: #f5a60f; --bs-btn-active-border-color: #f5a60f; border-width: 2px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); transition: background .25s, color .25s, transform .2s; }
#flyer .btn-warning:hover { transform: translateY(-1px); }

/* Explore Institutes: white outline on frosted glass; white with black text on hover */
#flyer .btn-outline-light { border-width: 1.5px; background: rgba(255, 255, 255, .08); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
#flyer .btn-outline-light:hover, #flyer .btn-outline-light:active { background: #fff; border-color: #fff; color: #000; }

/* Text rises in ONCE when the page opens – not on every slide */
#flyer .col-12 > * { animation: flyerUp .8s cubic-bezier(.2, .7, .2, 1) both; }
#flyer h1 { animation-delay: .12s; }
#flyer h1 + p { animation-delay: .24s; }
#flyer .btn { animation-delay: .36s; }

@keyframes flyerZoom { from { transform: scale(1.02); } to { transform: scale(1.1); } }
@keyframes flyerUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* ---------- HIGHLIGHTS TICKER (#ticker) – slim navy bar under the flyer ----------
   Amber slanted "HIGHLIGHTS" tag on the left; headlines enter on the right, glide across once and leave on the left, then repeat (main-1.js sets the speed),
   pause while the mouse is over them or a link has keyboard focus. Each headline is a link (white → amber on hover). */
#ticker { font-family: "Montserrat", sans-serif; background: var(--pcet-navy-deep); border-bottom: 3px solid var(--pcet-amber); }
#ticker > div:first-child { background: var(--pcet-amber); color: var(--pcet-navy-deep); font-size: 13px; letter-spacing: .12em; padding-right: 34px !important; clip-path: polygon(0 0, 100% 0, calc(100% - 16px) 100%, 0 100%); }
#ticker > div:last-child { -webkit-mask: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); mask: linear-gradient(90deg, transparent, #000 3%, #000 97%, transparent); }
#ticker > div:last-child > div { animation: tickerRun var(--ticker-time, 40s) linear infinite; }
#ticker > div:last-child:hover > div, #ticker > div:last-child:focus-within > div { animation-play-state: paused; }
#ticker li { font-size: 15px; font-weight: 500; }
#ticker li i { color: var(--pcet-amber); }
#ticker a { color: #fff; text-decoration: none; transition: color .2s; }
#ticker a:hover, #ticker a:focus-visible { color: var(--pcet-amber); }
@keyframes tickerRun { from { transform: translateX(var(--ticker-from, 100vw)); } to { transform: translateX(-100%); } }   /* enters from the right edge, leaves on the left */

/* ---------- HIGHLIGHTS (#highlights) – slanted tiles ----------
   White tiles with a slanted gold tab on top. When the section scrolls into view (main-1.js)
   each number counts up while a navy→gold bar fills along the bottom of its tile.
   --p = how much of the bar is filled (0–100); 100 when JavaScript is off. */
#highlights { --hl-gold: #ffb81c; --hl-navy: #0b1f4d; background: #fff; padding: 50px 0; }
#highlights .col > div { position: relative; height: 100%; overflow: hidden; background: #fff; border: 1px solid #e3e9f1; border-radius: 14px; padding: 30px 18px 26px; text-align: center; box-shadow: 0 6px 18px rgba(11, 31, 77, .05); transition: transform .25s, box-shadow .25s; }
#highlights .col > div:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(11, 31, 77, .12); }
#highlights .col > div::before { content: ""; position: absolute; top: 0; left: 50%; width: 46px; height: 6px; margin-left: -23px; background: var(--hl-gold); transform: skewX(-14deg); border-radius: 0 0 3px 3px; }
#highlights .col > div::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--p, 100) * 1%); background: linear-gradient(90deg, var(--hl-navy), var(--hl-gold)); }
#highlights .col > div > div { font-family: "Anybody", sans-serif; font-weight: 900; font-size: clamp(1.8rem, 2.6vw, 2.4rem); line-height: 1.1; color: var(--hl-navy); white-space: nowrap; font-variant-numeric: tabular-nums; }
#highlights .col > div > p { font-family: "Inter", sans-serif; font-size: 18.5px; font-weight: 500; line-height: 1.4; color: #4a5a6e; margin: 8px 0 0; }

/* Index page section headings (.index-h2): About PCET, PCET Institutes, PCET Awards …
   Navy, bold, centred, with a short yellow line underneath. Add class="index-h2" to any new section's h2. */
.index-h2 { font-family: var(--pcet-heading-font); font-weight: 800; font-size: clamp(1.9rem, 3.2vw, .4rem); line-height: 1.15; letter-spacing: -.01em; color: var(--pcet-navy-deep); margin-bottom: .9rem; }
.index-h2::after { content: ""; display: block; width: 64px; height: 4px; margin: 10px auto 0; border-radius: 3px; background: #ffb81c; }

/* ---------- ABOUT PCET (#about) ----------
   Text on the left, the YouTube video (iframe) on the right in a rounded frame with an accent dot pattern. */
#about { --ab-accent: #ffb81c; --ab-navy: #0b1f4d; background: #fff; padding: 35px 0; overflow-x: clip; }
#about .btn { --bs-btn-bg: var(--ab-navy); --bs-btn-color: #fff; --bs-btn-border-color: var(--ab-navy); --bs-btn-hover-bg: var(--ab-accent); --bs-btn-hover-color: var(--ab-navy); --bs-btn-hover-border-color: var(--ab-accent); font-family: "Inter", sans-serif; font-weight: 700; border-radius: 50rem; padding: .8rem 1.8rem; margin-top: 8px; transition: background .25s, color .25s, transform .2s, box-shadow .2s; }
#about .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(11, 31, 77, .2); }

/* Video (#aboutVideo): your iframe in a rounded frame with a shadow and accent dots behind the top-right corner.
   An invisible button covers it: clicking the video opens the pop-up (#aboutPopup). */
#about .col-lg-6:last-child { position: relative; isolation: isolate; }
#about .col-lg-6:last-child::before { content: ""; position: absolute; z-index: -1; right: -6px; top: -30px; width: 180px; height: 140px; background: radial-gradient(var(--ab-accent) 2.4px, transparent 2.6px) 0 0 / 18px 18px; }
#aboutVideo { position: relative; border-radius: 24px; overflow: hidden; background: #000; box-shadow: 0 26px 56px rgba(11, 31, 77, .22); transition: transform .3s, box-shadow .3s; }
#aboutVideo:hover { transform: translateY(-4px); box-shadow: 0 32px 64px rgba(11, 31, 77, .28); }
#aboutVideo iframe { display: block; }
#aboutVideo button { position: absolute; inset: 0; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; }
#aboutVideo button:focus-visible { outline: 3px solid var(--ab-accent); outline-offset: -6px; }

/* Video pop-up: dark screen, video in the middle, ✕ in the top-right corner of the screen */
#aboutPopup { --bs-modal-bg: transparent; --bs-modal-border-width: 0; }
#aboutPopup .modal-content { border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
#aboutPopup iframe { border: 0; }
#aboutPopup .btn-close { position: fixed; top: 22px; right: 26px; z-index: 2; width: 1.4em; height: 1.4em; opacity: .85; }
#aboutPopup .btn-close:hover { opacity: 1; }
.modal-backdrop.show { opacity: .85; }

/* ---------- PCET INSTITUTES (#institutes) ----------
   Card per institute (article): photo with category + short-name badges, tags, name.
   The whole card is one link (stretched-link on the name) – it opens the institute's site in a new tab.
   On hover: card lifts, photo zooms, and a blue bar grows along the bottom. */
#institutes { --in-blue: #136ad5; --in-blue-soft: #e7f0fc; --in-navy: #223a58; background: rgba(11, 31, 77, .045); padding: 35px 0; }
#institutes article { display: flex; flex-direction: column; overflow: hidden; background: #fff; border-radius: 15px; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); transition: transform .3s, box-shadow .3s; }
#institutes article:hover, #institutes article:has(a:focus-visible) { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(0, 0, 0, .12); }

/* Photo + badges */
#institutes article > div:first-child { position: relative; overflow: hidden; }
#institutes article > div:first-child img { display: block; width: 100%; height: 220px; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
#institutes article:hover > div:first-child img { transform: scale(1.07); }
#institutes article > div:first-child span { position: absolute; top: 14px; border-radius: 50rem; font-family: "Inter", sans-serif; font-size: 12px; font-weight: 700; }
#institutes article > div:first-child span:nth-of-type(1) { left: 14px; padding: 5px 12px; background: var(--in-blue); color: #fff; text-transform: uppercase; letter-spacing: .03em; }
#institutes article > div:first-child span:nth-of-type(2) { right: 14px; padding: 8px 14px; background: var(--in-navy); color: #fff; font-size: 13px; }

/* Text part */
#institutes article > div:last-child { flex: 1; padding: 22px 24px 26px; }
#institutes article > div:last-child > div:first-child { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
#institutes article > div:last-child > div:first-child span { font-family: "Inter", sans-serif; font-size: 12px; font-weight: 500; padding: 4px 11px; border-radius: 50rem; background: var(--in-blue-soft); color: var(--in-blue); }
#institutes article > div:last-child > div:first-child span + span { background: #eceff3; color: var(--in-navy); }
#institutes h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin: 0; }
#institutes h3 a { color: var(--in-navy); text-decoration: none; transition: color .2s; }
#institutes article:hover h3 a { color: var(--in-blue); }
#institutes h3 a:focus-visible { outline: none; }
/* Keyboard users only (Tab): blue outline. A mouse click leaves no border behind. */
#institutes article:has(a:focus-visible) { outline: 3px solid var(--in-blue); outline-offset: 3px; }

/* Hover: blue bar grows along the bottom */
#institutes article::after { content: ""; position: absolute; z-index: 2; pointer-events: none; left: 0; bottom: 0; height: 4px; width: 100%; background: var(--in-blue); transform: scaleX(0); transform-origin: left; transition: transform .4s cubic-bezier(.65, 0, .35, 1); }
#institutes article:hover::after, #institutes article:has(a:focus-visible)::after { transform: scaleX(1); }

/* ---------- PCET AWARDS (#awards) ----------
   Each award is a framed certificate: thin gold double border, logo, name, gold divider, details.
   No hover effect. Layout = one-row slider (#awardsSlider): 4 cards desktop · 2 tablet · 1 phone. */
#awards { --aw-gold: #ffb81c; --aw-navy: #0b1f4d; background: rgba(11, 31, 77, .045); padding: 35px 0; }

/* Certificate card */
#awards article { height: 100%; background: #fff; padding: 10px; border-radius: 6px; box-shadow: 0 14px 34px rgba(11, 31, 77, .1); }
#awards article > div { height: 100%; border: 2px solid var(--aw-gold); outline: 1px solid rgba(255, 184, 28, .5); outline-offset: -8px; padding: 30px 22px 26px; text-align: center; }
/* Same-size logo box in every card, so all logos sit on one level */
#awards article img { display: block; width: 100%; max-width: 170px; height: 100px; object-fit: contain; margin: 0 auto 18px; }
/* Title area is always 2 lines tall (gold line at its bottom), so every title and paragraph starts at the same level */
#awards h3 { display: flex; flex-direction: column; gap: 14px; min-height: calc(2.5em + 15px); font-size: 1.2rem; font-weight: 800; line-height: 1.25; color: var(--aw-navy); margin: 0 0 14px; }
#awards h3::after { content: ""; display: block; flex-shrink: 0; width: 110px; height: 1px; margin: auto auto 0; background: linear-gradient(90deg, transparent, var(--aw-gold), transparent); }
#awards article p { font-size: 14px; line-height: 1.7; color: #5a6776; margin: 0 0 6px; }

/* Slider (#awardsSlider): cards sit in one scrolling row that snaps card by card; scrollbar hidden.
   Padding top/bottom keeps the card shadows from being cut off. */
#awardsSlider { position: relative; }
#awardsSlider > .row { overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; overscroll-behavior-x: contain; padding: 8px 0 34px; scrollbar-width: none; -ms-overflow-style: none; }
#awardsSlider > .row::-webkit-scrollbar { display: none; }
#awardsSlider > .row:focus-visible { outline: 2px solid var(--aw-gold); outline-offset: 4px; border-radius: 6px; }
#awardsSlider > .row > * { scroll-snap-align: start; }

/* ‹ › buttons: plain, no colours – they use the page's normal text colour */
#awardsSlider > button { position: absolute; top: calc(50% - 13px); z-index: 2; width: 44px; height: 44px; display: grid; place-items: center; padding: 0 0 4px; border: 1px solid currentColor; border-radius: 50%; background: transparent; color: inherit; font-size: 30px; line-height: 1; transform: translateY(-50%); }
#awardsSlider > button:first-child { left: -64px; }
#awardsSlider > button:last-child { right: -64px; }
#awardsSlider > button:disabled { opacity: .3; cursor: default; }
#awardsSlider[data-all-fit] > button { display: none; }   /* all awards fit → no arrows needed */

/* ---------- STUDENT LIFE (#student-life) – flip cards ----------
   Front = photo + title, back = white with a blue left edge, blue title, text + blue Read More.
   Desktop: flips on hover. Phones: tap the card to flip, tap again (or the ↺ button) to go back – main-1.js.
   Keyboard: Tab to a card and press Enter.
   Slider (#slTrack): one card every 6 s, 0.25 s move, loops – main-1.js; layout = Bootstrap (flex-nowrap, col-12 col-md-6 col-lg-3). */
#student-life { background: #fff; padding: 35px 0; }
#student-life article { height: 280px; perspective: 1200px; cursor: pointer; outline: none; }
#student-life article > div { backface-visibility: hidden; -webkit-backface-visibility: hidden; transition: transform .6s cubic-bezier(.4, .2, .2, 1); }
#student-life article > div:first-child { transform: rotateY(0deg); }
#student-life article > div:first-child h3 { background: linear-gradient(transparent, rgba(11, 31, 77, .9)); }
#student-life article > div:last-child { transform: rotateY(180deg); background: #fff; border: 1px solid #e3e9f1; border-left: 5px solid #136ad5; box-shadow: 0 14px 30px rgba(11, 31, 77, .12); }
#student-life article > div:last-child h3 { color: #136ad5; }
#student-life article > div:last-child p { color: #5a6776; }
#student-life article > div:last-child a.btn { --bs-btn-bg: #136ad5; --bs-btn-border-color: #136ad5; --bs-btn-color: #fff; --bs-btn-hover-bg: #0f58b3; --bs-btn-hover-border-color: #0f58b3; --bs-btn-hover-color: #fff; --bs-btn-active-bg: #0f58b3; --bs-btn-active-border-color: #0f58b3; --bs-btn-active-color: #fff; }
/* Flipped: by mouse hover (desktop), by a tap (data-flipped, set by main-1.js) */
#student-life article[data-flipped] > div:first-child { transform: rotateY(-180deg); }
#student-life article[data-flipped] > div:last-child { transform: rotateY(0deg); }
@media (hover: hover) {
  #student-life article:hover > div:first-child { transform: rotateY(-180deg); }
  #student-life article:hover > div:last-child { transform: rotateY(0deg); }
  #student-life article > div:last-child > button { display: none; }   /* ↺ "back to photo" button only on touch screens */
}
#student-life article:focus-visible > div { outline: 3px solid #ffb81c; outline-offset: 3px; }


/* ==========================================================
   MEDIA QUERIES (home page sections)
   ========================================================== */

/* Desktop (≥1200px) */
@media (min-width: 1200px) {
  #flyer > .container { padding-top: 60px; }            /* flyer text starts below the hanging crest */
}

/* Below 1500px there is no room beside the cards: ‹ › sit centred under the slider */
@media (max-width: 1499.98px) {
  #awardsSlider { padding-bottom: 52px; }
  #awardsSlider > button { top: auto; bottom: 0; transform: none; }
  #awardsSlider > button:first-child { left: calc(50% - 54px); }
  #awardsSlider > button:last-child { right: calc(50% - 54px); }
  #awardsSlider[data-all-fit] { padding-bottom: 0; }
}

/* Laptops (992–1399px): award titles can wrap to 3 lines, so the title area is 3 lines tall */
@media (min-width: 992px) and (max-width: 1399.98px) {
  #awards h3 { min-height: calc(3.75em + 15px); }
}

/* Tablets & phones (<992px): video goes under the text */
@media (max-width: 991.98px) {
  #institutes { padding: 44px 0; }
  #awards { padding: 44px 0; }
  #student-life { padding: 44px 0; }
  #about { padding: 44px 0; }
  #about .col-lg-6:last-child { margin-top: 20px; }
  #about .col-lg-6:last-child::before { right: 0; top: -24px; width: 120px; height: 90px; }
}

/* Phones & small tablets (<768px): programmes become small chips */
@media (max-width: 767.98px) {
  #flyer h1 + p { font-size: .88rem; }
  #flyer h1 + p br { display: none; }
  #flyer h1 + p span::before { content: none !important; }
  #flyer h1 + p span { display: inline-block; margin: 3px 2px; padding: 2px 10px; border: 1px solid rgba(255, 255, 255, .25); border-radius: 50rem; background: rgba(255, 255, 255, .06); }
}

/* Phones (<576px) */
@media (max-width: 575.98px) {
  #flyer { height: auto; min-height: 560px; padding: 40px 0; display: flex; align-items: center; }
  #flyer > .container { height: auto !important; }
  #flyer p:first-child { letter-spacing: .06em; font-size: .72rem; gap: 8px; }
  #flyer p:first-child::before, #flyer p:first-child::after { width: 20px; }
  #flyer p:first-child + p { font-size: .95rem; }
  #flyer h1 { font-size: 1.45rem; }
  #flyer .btn { display: block; width: 100%; max-width: 20rem; margin: .5rem auto 0; }

  #ticker > div:first-child { font-size: 11px; letter-spacing: .08em; padding-right: 26px !important; }   /* smaller tag on phones */
  #ticker li { font-size: 14px; }

  #highlights { padding: 56px 0; }
  #highlights .col > div { padding: 24px 12px 20px; }
  #highlights .col > div > div { font-size: 1.5rem; }
  #highlights .col > div > p { font-size: 12.5px; }

  #institutes article > div:first-child img { height: 200px; }
}

/* Visitors who prefer less motion */
@media (prefers-reduced-motion: reduce) {
  #aboutVideo, #highlights .col > div, #institutes article, #institutes article *, #institutes article::after, #student-life article > div { transition: none; }
  #flyer .carousel-item > img, #flyer .col-12 > * { animation: none !important; }
  #ticker > div:last-child { overflow-x: auto !important; }   /* no gliding: headlines can be scrolled by hand */
  #ticker > div:last-child > div { animation: none; }
}
