/* ==========================================================================
   PPGMIS — "Modern" frontend theme
   Self-contained design system for the public school website.
   Shares the teal brand identity used across the admin panel and app,
   paired with an editorial serif for headlines to give the public site
   more warmth than the operational dashboard.
   ========================================================================== */

/* -------------------------------------------------------------------------
   1. Design tokens
   ------------------------------------------------------------------------- */
:root {
    /* Brand */
    --pg-primary: #0D9488;
    --pg-primary-dark: #0F766E;
    --pg-primary-deep: #0A3D39;
    --pg-primary-tint: #CCFBF1;
    --pg-accent: #D97706;
    --pg-accent-dark: #B45309;
    --pg-accent-tint: #FEF3C7;

    /* Neutrals (slightly warm, teal-biased grey) */
    --pg-ink: #0F172A;
    --pg-body: #3C4A52;
    --pg-muted: #64748B;
    --pg-line: #E3E9E7;
    --pg-surface: #FFFFFF;
    --pg-bg: #F8FAF9;
    --pg-bg-alt: #F0F5F4;

    /* Feedback */
    --pg-success: #059669;
    --pg-success-bg: #ECFDF5;
    --pg-danger: #DC2626;
    --pg-danger-bg: #FEF2F2;

    /* Type */
    --pg-font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --pg-font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Layout */
    --pg-container: 1180px;
    --pg-radius-sm: 8px;
    --pg-radius: 14px;
    --pg-radius-lg: 22px;
    --pg-shadow-sm: 0 2px 10px -4px rgba(15, 23, 42, 0.10);
    --pg-shadow: 0 16px 40px -14px rgba(10, 61, 57, 0.22);
    --pg-shadow-lg: 0 28px 70px -20px rgba(10, 61, 57, 0.30);
    --pg-header-h: 84px;
}

/* -------------------------------------------------------------------------
   2. Reset & base
   ------------------------------------------------------------------------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--pg-font-body);
    font-size: 16px;
    line-height: 1.65;
    color: var(--pg-body);
    background: var(--pg-surface);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4, h5 {
    font-family: var(--pg-font-display);
    color: var(--pg-ink);
    font-weight: 600;
    line-height: 1.2;
    margin: 0 0 16px;
    text-wrap: balance;
}
p { margin: 0 0 16px; }
h1 { font-size: clamp(34px, 4.4vw, 54px); }
h2 { font-size: clamp(28px, 3.2vw, 38px); }
h3 { font-size: 22px; }
h4 { font-size: 18px; }

:focus-visible {
    outline: 2.5px solid var(--pg-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* -------------------------------------------------------------------------
   3. Layout helpers
   ------------------------------------------------------------------------- */
.pg-container {
    max-width: var(--pg-container);
    margin: 0 auto;
    padding: 0 24px;
}
.pg-section { padding: 88px 0; }
.pg-section--tight { padding: 56px 0; }
.pg-section--alt { background: var(--pg-bg-alt); }
.pg-grid { display: grid; gap: 28px; }
.pg-grid--2 { grid-template-columns: repeat(2, 1fr); }
.pg-grid--3 { grid-template-columns: repeat(3, 1fr); }
.pg-grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 991px) {
    .pg-grid--3, .pg-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .pg-grid--2, .pg-grid--3, .pg-grid--4 { grid-template-columns: 1fr; }
    .pg-section { padding: 56px 0; }
}

.pg-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--pg-primary-dark);
    margin-bottom: 14px;
}
.pg-eyebrow::before {
    content: '';
    width: 22px;
    height: 2px;
    background: var(--pg-accent);
    display: inline-block;
}
.pg-section-head { max-width: 640px; margin-bottom: 48px; }
.pg-section-head.text-center { max-width: 640px; margin-left: auto; margin-right: auto; text-align: center; }
.pg-section-head p { color: var(--pg-muted); font-size: 16.5px; margin: 0; }

/* -------------------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------------------- */
.pg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: var(--pg-font-body);
    font-size: 14.5px;
    font-weight: 700;
    letter-spacing: 0.01em;
    border: 1.5px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease, border-color .15s ease;
    white-space: nowrap;
}
.pg-btn:hover { transform: translateY(-2px); }
.pg-btn-primary {
    background: linear-gradient(135deg, var(--pg-primary) 0%, var(--pg-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 26px -10px rgba(13, 148, 136, 0.55);
}
.pg-btn-primary:hover { box-shadow: 0 16px 32px -10px rgba(13, 148, 136, 0.6); color: #fff; }
.pg-btn-accent {
    background: linear-gradient(135deg, var(--pg-accent) 0%, var(--pg-accent-dark) 100%);
    color: #fff;
    box-shadow: 0 12px 26px -10px rgba(217, 119, 6, 0.5);
}
.pg-btn-accent:hover { color: #fff; }
.pg-btn-outline {
    background: transparent;
    border-color: var(--pg-line);
    color: var(--pg-ink);
}
.pg-btn-outline:hover { border-color: var(--pg-primary); color: var(--pg-primary-dark); }
.pg-btn-invert {
    background: rgba(255,255,255,0.12);
    border-color: rgba(255,255,255,0.4);
    color: #fff;
    backdrop-filter: blur(6px);
}
.pg-btn-invert:hover { background: rgba(255,255,255,0.2); color: #fff; }
.pg-btn-sm { padding: 10px 20px; font-size: 13px; }
.pg-btn[disabled] { opacity: 0.6; cursor: default; transform: none; }

/* -------------------------------------------------------------------------
   5. Top utility bar
   ------------------------------------------------------------------------- */
.pg-topbar {
    background: var(--pg-primary-deep);
    color: rgba(255,255,255,0.82);
    font-size: 13px;
}
.pg-topbar .pg-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 9px;
    padding-bottom: 9px;
    gap: 16px;
}
.pg-topbar-contact { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.pg-topbar-contact span, .pg-topbar-contact a { display: inline-flex; align-items: center; gap: 7px; color: inherit; }
.pg-topbar-contact i { color: var(--pg-primary-tint); }
.pg-topbar-social { display: flex; align-items: center; gap: 14px; }
.pg-topbar-social a {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08);
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    transition: background 0.15s ease;
}
.pg-topbar-social a:hover { background: rgba(255,255,255,0.22); }
@media (max-width: 767px) { .pg-topbar { display: none; } }

/* -------------------------------------------------------------------------
   6. Header / navigation
   ------------------------------------------------------------------------- */
.pg-header { position: relative; z-index: 200; }

/* Brand row: logo + full school name + real identity details (scrolls away) */
.pg-brand-row {
    background: var(--pg-surface);
    border-bottom: 1px solid var(--pg-line);
}
.pg-brand-row-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0;
}
.pg-brand { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pg-brand-mark {
    width: 46px; height: 46px; border-radius: 50%;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    background: var(--pg-bg-alt);
    border: 1px solid var(--pg-line);
    flex-shrink: 0;
}
.pg-brand-mark img { width: 100%; height: 100%; object-fit: cover; }
.pg-brand-mark-lg { width: 64px; height: 64px; border-width: 2px; border-color: var(--pg-primary-tint); }
.pg-brand-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pg-brand-tagline {
    font-size: 12.5px;
    color: var(--pg-muted);
    font-style: italic;
}
.pg-brand-title {
    font-family: var(--pg-font-display);
    font-weight: 600;
    font-size: 21px;
    line-height: 1.25;
    color: var(--pg-primary-deep);
    text-wrap: balance;
}
.pg-brand-name {
    font-family: var(--pg-font-display);
    font-weight: 600;
    font-size: 18px;
    color: var(--pg-ink);
    line-height: 1.2;
}
.pg-brand-meta { display: flex; align-items: center; gap: 28px; flex-shrink: 0; }
.pg-brand-meta div { text-align: right; }
.pg-brand-meta span { display: block; font-size: 11px; color: var(--pg-muted); text-transform: uppercase; letter-spacing: .04em; }
.pg-brand-meta strong { display: block; font-size: 15px; color: var(--pg-ink); font-weight: 700; margin-top: 2px; }
@media (max-width: 767px) { .pg-brand-meta { display: none; } }

/* Nav row: sticky, centered menu */
.pg-nav-row {
    position: sticky;
    top: 0;
    z-index: 200;
    background: rgba(255,255,255,0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--pg-line);
    transition: box-shadow 0.2s ease, min-height 0.2s ease;
}
.pg-header.is-scrolled .pg-nav-row { box-shadow: 0 8px 24px -16px rgba(10, 61, 57, 0.35); }
.pg-nav-row-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    gap: 24px;
}

.pg-nav-toggle {
    display: none;
    width: 44px; height: 44px;
    border-radius: 10px;
    border: 1px solid var(--pg-line);
    background: var(--pg-surface);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.pg-nav-toggle span, .pg-nav-toggle span::before, .pg-nav-toggle span::after {
    width: 19px; height: 2px; background: var(--pg-ink);
    display: block; position: relative; transition: transform .2s ease, opacity .2s ease;
}
.pg-nav-toggle span::before, .pg-nav-toggle span::after { content: ''; position: absolute; left: 0; }
.pg-nav-toggle span::before { top: -6px; }
.pg-nav-toggle span::after { top: 6px; }
.pg-nav-toggle.is-active span { background: transparent; }
.pg-nav-toggle.is-active span::before { transform: translateY(6px) rotate(45deg); }
.pg-nav-toggle.is-active span::after { transform: translateY(-6px) rotate(-45deg); }

/* Desktop menu (renders the exact CMS-driven <ul class="main-menu"> markup) */
.main-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}
.main-menu > li { position: relative; }
.main-menu > li > a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--pg-ink);
    transition: background .15s ease, color .15s ease;
}
.main-menu > li > a:hover { background: var(--pg-bg-alt); color: var(--pg-primary-dark); }
.main-menu > li > a.is-active { background: var(--pg-primary-tint); color: var(--pg-primary-deep); }
.mobile-menu a.is-active { color: var(--pg-primary-dark); }
.main-menu .sub-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: var(--pg-surface);
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius-sm);
    box-shadow: var(--pg-shadow);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
    z-index: 20;
}
.main-menu > li.dropdown-left .sub-menu { left: auto; right: 0; }
.main-menu > li:hover > .sub-menu,
.main-menu > li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.main-menu .sub-menu li { position: relative; }
.main-menu .sub-menu a {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 9px 12px; border-radius: 7px; font-size: 14px; font-weight: 500; color: var(--pg-body);
}
.main-menu .sub-menu a:hover { background: var(--pg-bg-alt); color: var(--pg-primary-dark); }
.main-menu .sub-menu a.is-active { background: var(--pg-primary-tint); color: var(--pg-primary-deep); }
.main-menu .sub-menu .sub-menu { top: -8px; left: calc(100% + 6px); }

.pg-nav-cta { position: absolute; right: 0; top: 50%; transform: translateY(-50%); display: flex; align-items: center; gap: 10px; }

/* Mobile off-canvas menu (renders the exact CMS-driven <ul class="mobile-menu">) */
.pg-mobile-panel {
    position: fixed;
    inset: 0 0 0 auto;
    width: min(340px, 86vw);
    height: 100vh;
    background: var(--pg-surface);
    box-shadow: -18px 0 50px -20px rgba(10,61,57,0.4);
    transform: translateX(100%);
    transition: transform .28s ease;
    z-index: 260;
    overflow-y: auto;
    padding: 24px;
}
.pg-mobile-panel.is-open { transform: translateX(0); }
.pg-mobile-backdrop {
    position: fixed; inset: 0; background: rgba(10,23,21,0.45);
    opacity: 0; visibility: hidden; transition: opacity .25s ease, visibility .25s ease;
    z-index: 250;
}
.pg-mobile-backdrop.is-open { opacity: 1; visibility: visible; }
.pg-mobile-close {
    width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--pg-line);
    background: var(--pg-bg-alt); display: flex; align-items: center; justify-content: center;
    margin-left: auto; cursor: pointer;
}
.mobile-menu { margin-top: 20px; }
.mobile-menu li { border-bottom: 1px solid var(--pg-line); }
.mobile-menu a {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 4px; font-weight: 600; font-size: 15px; color: var(--pg-ink);
}
.mobile-menu .sub-menu { padding-left: 14px; }
.mobile-menu .sub-menu a { font-weight: 500; font-size: 14px; color: var(--pg-body); padding: 11px 4px; }

@media (max-width: 991px) {
    .main-menu, .pg-nav-cta .pg-btn-outline { display: none; }
    .pg-nav-toggle { display: flex; }
}

/* -------------------------------------------------------------------------
   7. Hero / slider
   ------------------------------------------------------------------------- */
.pg-hero { position: relative; overflow: hidden; background: var(--pg-primary-deep); }
.pg-hero-slide {
    position: relative;
    display: none;
    min-height: 620px;
}
.pg-hero-slide.is-active { display: block; }
.pg-hero-slide img {
    width: 100%; height: 620px; object-fit: cover;
}
.pg-hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(100deg, rgba(10,61,57,0.86) 0%, rgba(10,61,57,0.55) 45%, rgba(10,61,57,0.18) 100%);
    display: flex; align-items: center;
}
.pg-hero-caption { max-width: 620px; color: #fff; }
.pg-hero-caption .pg-eyebrow { color: var(--pg-primary-tint); }
.pg-hero-caption .pg-eyebrow::before { background: #fff; }
.pg-hero-caption h1 { color: #fff; }
.pg-hero-caption h1 span { color: var(--pg-primary-tint); }
.pg-hero-caption p { color: rgba(255,255,255,0.86); font-size: 17px; }
.pg-hero-ctas { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.pg-hero-dots {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 9px; z-index: 5;
}
.pg-hero-dots button {
    width: 9px; height: 9px; border-radius: 50%; border: 0; padding: 0;
    background: rgba(255,255,255,0.45); cursor: pointer; transition: background .2s ease, width .2s ease;
}
.pg-hero-dots button.is-active { background: #fff; width: 26px; border-radius: 6px; }
.pg-hero-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.4);
    color: #fff; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 5; transition: background .15s ease;
}
.pg-hero-arrow:hover { background: rgba(255,255,255,0.28); }
.pg-hero-arrow--prev { left: 24px; }
.pg-hero-arrow--next { right: 24px; }
@media (max-width: 767px) {
    .pg-hero-slide, .pg-hero-slide img { min-height: 460px; height: 460px; }
    .pg-hero-arrow { display: none; }
}

/* Featured single image (used on pages with a featured_image but no slider) */
.pg-featured-banner img { width: 100%; height: 320px; object-fit: cover; }

/* Quick-link tiles overlapping the bottom edge of the homepage hero */
.pg-quicklinks-wrap { position: relative; z-index: 10; }
.pg-quicklinks {
    position: relative;
    margin-top: -44px;
    background: var(--pg-surface);
    border-radius: var(--pg-radius-lg);
    box-shadow: var(--pg-shadow-lg);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}
.pg-quicklink {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 20px;
    border-right: 1px solid var(--pg-line);
    color: var(--pg-ink);
    transition: background .15s ease;
}
.pg-quicklink:last-child { border-right: 0; }
.pg-quicklink:hover { background: var(--pg-bg-alt); }
.pg-quicklink-icon {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--pg-primary-tint); color: var(--pg-primary-deep); font-size: 17px;
}
.pg-quicklink strong { display: block; font-size: 14.5px; }
.pg-quicklink span { display: grid; font-size: 12.5px; color: var(--pg-muted); }
@media (max-width: 860px) {
    .pg-quicklinks { grid-template-columns: repeat(2, 1fr); margin-top: -30px; }
    .pg-quicklink:nth-child(2) { border-right: 0; }
    .pg-quicklink { border-bottom: 1px solid var(--pg-line); }
}

/* -------------------------------------------------------------------------
   8. Page header band (inner pages — replaces old .bradcam-area)
   ------------------------------------------------------------------------- */
.pg-pagehead {
    background: linear-gradient(150deg, var(--pg-primary-deep) 0%, var(--pg-primary) 130%);
    padding: 64px 0 54px;
    position: relative;
    overflow: hidden;
}
.pg-pagehead::after {
    content: '';
    position: absolute; width: 380px; height: 380px; border-radius: 50%;
    background: rgba(255,255,255,0.06); top: -160px; right: -100px;
}
.pg-pagehead-inner { position: relative; z-index: 1; }
.pg-pagehead h1 { color: #fff; margin-bottom: 12px; font-size: clamp(28px, 3.6vw, 40px); }
.pg-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,0.75); }
.pg-breadcrumb a { color: rgba(255,255,255,0.85); font-weight: 600; }
.pg-breadcrumb a:hover { color: #fff; }
.pg-breadcrumb .sep { opacity: 0.6; }
.pg-breadcrumb .current { color: #fff; }

/* -------------------------------------------------------------------------
   9. Content / prose
   ------------------------------------------------------------------------- */
.pg-prose { color: var(--pg-body); font-size: 16.5px; }
.pg-prose p { margin-bottom: 18px; }
.pg-prose img { border-radius: var(--pg-radius); margin: 12px 0; }
.pg-prose h2, .pg-prose h3 { margin-top: 32px; }
.pg-prose h2:first-child, .pg-prose h3:first-child { margin-top: 0; }
.pg-prose ul, .pg-prose ol { margin: 0 0 20px; padding-left: 22px; }
.pg-prose li { margin-bottom: 8px; }
.pg-prose strong { color: var(--pg-ink); }

/* Admin-authored tables (e.g. Mandatory Disclosure, Admission age-criteria) */
.pg-prose .pg-table-wrap { overflow-x: auto; margin: 8px 0 28px; border: 1px solid var(--pg-line); border-radius: var(--pg-radius-sm); }
.pg-prose table { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--pg-surface); }
.pg-prose table caption { text-align: left; font-weight: 700; color: var(--pg-ink); padding: 14px 16px 0; }
.pg-prose th, .pg-prose td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--pg-line); vertical-align: top; }
.pg-prose thead th { background: var(--pg-primary-deep); color: #fff; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.pg-prose tbody tr:last-child td { border-bottom: 0; }
.pg-prose tbody tr:nth-child(even) { background: var(--pg-bg-alt); }
.pg-prose table a { color: var(--pg-primary-dark); font-weight: 600; }

/* Quote callout (e.g. principal's message) */
.pg-quote {
    position: relative;
    border-left: 3px solid var(--pg-accent); background: var(--pg-bg-alt);
    padding: 22px 26px 22px 52px; border-radius: 0 var(--pg-radius-sm) var(--pg-radius-sm) 0;
    font-family: var(--pg-font-display); font-size: 19px; color: var(--pg-ink); font-style: italic; margin: 0 0 22px;
}
.pg-quote::before {
    content: '\201C';
    position: absolute; left: 14px; top: 6px;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 46px; font-style: normal; line-height: 1;
    color: var(--pg-accent); opacity: 0.55;
}

/* People / management-desk grid inside page content */
.pg-people-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 24px; margin: 24px 0 32px; text-align: center; }
.pg-people-grid figure { margin: 0; }
.pg-people-grid img { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; box-shadow: var(--pg-shadow-sm); }
.pg-people-grid figcaption strong { display: block; color: var(--pg-ink); font-size: 15px; }
.pg-people-grid figcaption span { display: block; color: var(--pg-primary-dark); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }

/* Feature bullet list (e.g. "A School with difference") */
.pg-feature-list { list-style: none; padding: 0; margin: 0 0 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px 20px; }
.pg-feature-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--pg-body); }
.pg-feature-list li::before { content: '\f00c'; font-family: FontAwesome; color: var(--pg-primary); flex-shrink: 0; margin-top: 3px; font-size: 12px; }

/* Map embed */
.pg-map-frame { border-radius: var(--pg-radius-lg); overflow: hidden; box-shadow: var(--pg-shadow-sm); margin-top: 28px; }
.pg-map-frame iframe { width: 100%; height: 360px; border: 0; display: block; }

.pg-split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 860px) { .pg-split { grid-template-columns: 1fr; gap: 32px; } }
.pg-media-frame { border-radius: var(--pg-radius-lg); overflow: hidden; box-shadow: var(--pg-shadow); }
.pg-media-frame img { width: 100%; height: 100%; object-fit: cover; }

/* Homepage "Principal's Desk" section */
.pg-principal { position: relative; overflow: hidden; }
.pg-principal-decor {
    position: absolute; top: -140px; right: -160px; width: 460px; height: 460px;
    border-radius: 50%; background: radial-gradient(circle, var(--pg-primary-tint) 0%, transparent 72%);
    opacity: 0.6; pointer-events: none;
}
.pg-principal-media { position: relative; }
.pg-principal-badge {
    position: absolute; left: 24px; bottom: -22px;
    background: var(--pg-surface); border-radius: var(--pg-radius-sm);
    padding: 14px 20px; box-shadow: var(--pg-shadow);
    border-left: 3px solid var(--pg-accent);
}
.pg-principal-badge strong { display: block; font-family: var(--pg-font-display); font-size: 15px; color: var(--pg-ink); }
.pg-principal-badge span { display: block; font-size: 12px; color: var(--pg-primary-dark); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
@media (max-width: 480px) { .pg-principal-badge { left: 16px; padding: 11px 16px; } }

/* -------------------------------------------------------------------------
   10. Cards — teachers / notices / events / blog / generic
   ------------------------------------------------------------------------- */
.pg-card {
    background: var(--pg-surface);
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    overflow: hidden;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pg-card:hover { transform: translateY(-4px); box-shadow: var(--pg-shadow); border-color: transparent; }

/* Teacher */
.pg-staff-card { text-align: center; padding: 30px 20px 26px; }
.pg-staff-photo {
    width: 108px; height: 108px; border-radius: 50%; overflow: hidden;
    margin: 0 auto 18px; border: 3px solid var(--pg-bg-alt);
}
.pg-staff-photo img { width: 100%; height: 100%; object-fit: cover; }
.pg-staff-card h4 { margin-bottom: 2px; }
.pg-staff-role { color: var(--pg-primary-dark); font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 12px; }
.pg-staff-meta { font-size: 13.5px; color: var(--pg-muted); margin-bottom: 14px; }
.pg-staff-social { display: flex; justify-content: center; gap: 8px; }
.pg-staff-social a {
    width: 32px; height: 32px; border-radius: 50%; background: var(--pg-bg-alt);
    display: inline-flex; align-items: center; justify-content: center; color: var(--pg-primary-dark); font-size: 13px;
    transition: background .15s ease, color .15s ease;
}
.pg-staff-social a:hover { background: var(--pg-primary); color: #fff; }

/* Notice */
.pg-notice-card { padding: 26px; display: flex; flex-direction: column; gap: 12px; height: 100%; }
.pg-notice-date { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; color: var(--pg-primary-dark); text-transform: uppercase; letter-spacing: .04em; }
.pg-notice-card h3 { font-size: 18.5px; margin: 0; }
.pg-notice-card p { color: var(--pg-muted); font-size: 14.5px; margin: 0; flex: 1; }
.pg-read-more { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 13.5px; color: var(--pg-primary-dark); }
.pg-read-more i { transition: transform .15s ease; }
.pg-card:hover .pg-read-more i { transform: translateX(3px); }

/* Event */
.pg-event-card { display: flex; flex-direction: column; }
.pg-event-thumb { position: relative; height: 190px; }
.pg-event-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pg-event-date-badge {
    position: absolute; top: 14px; left: 14px;
    background: var(--pg-surface); border-radius: 10px; padding: 8px 12px; text-align: center;
    box-shadow: var(--pg-shadow-sm); min-width: 54px;
}
.pg-event-date-badge strong { display: block; font-size: 19px; color: var(--pg-ink); line-height: 1; }
.pg-event-date-badge span { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .06em; color: var(--pg-primary-dark); text-transform: uppercase; margin-top: 3px; }
.pg-event-body { padding: 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pg-event-time { font-size: 13px; color: var(--pg-muted); display: flex; align-items: center; gap: 6px; }
.pg-event-body h4 { margin: 0; font-size: 17px; }
.pg-event-going {
    margin-top: auto; align-self: flex-start;
    font-size: 13px; font-weight: 700; color: var(--pg-primary-dark);
    display: inline-flex; align-items: center; gap: 6px;
}

/* Blog */
.pg-blog-card { display: flex; flex-direction: column; }
.pg-blog-thumb { height: 200px; }
.pg-blog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pg-blog-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pg-blog-meta { font-size: 12.5px; color: var(--pg-muted); }
.pg-blog-body h3 { font-size: 19px; margin: 0; }
.pg-blog-body p { color: var(--pg-muted); font-size: 14.5px; margin: 0; flex: 1; }

.pg-blog-sidebar {
    background: var(--pg-bg-alt);
    border-radius: var(--pg-radius);
    padding: 26px;
}
.pg-blog-sidebar h4 { font-size: 15px; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 16px; }
.pg-blog-sidebar li { border-bottom: 1px solid var(--pg-line); }
.pg-blog-sidebar li:last-child { border-bottom: 0; }
.pg-blog-sidebar a { display: flex; gap: 10px; padding: 12px 0; font-size: 14px; font-weight: 600; color: var(--pg-body); }
.pg-blog-sidebar a:hover { color: var(--pg-primary-dark); }
.pg-blog-sidebar a i { color: var(--pg-primary); margin-top: 3px; flex-shrink: 0; }

.blog-body img.fixedsize { width: 100%; height: 360px; object-fit: cover; border-radius: var(--pg-radius); }

/* -------------------------------------------------------------------------
   11. Stat / info strips
   ------------------------------------------------------------------------- */
.pg-stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 767px) { .pg-stat-row { grid-template-columns: repeat(2, 1fr); } }
.pg-stat { text-align: center; }
.pg-stat strong { display: block; font-family: var(--pg-font-display); font-size: 34px; color: var(--pg-ink); }
.pg-stat span { font-size: 13px; color: var(--pg-muted); text-transform: uppercase; letter-spacing: .05em; }

.pg-stat-card {
    background: linear-gradient(150deg, var(--pg-primary-deep) 0%, var(--pg-primary) 140%);
    border-radius: var(--pg-radius-lg);
    padding: 40px 32px;
    box-shadow: 0 22px 50px -20px rgba(10,61,57,0.45);
}
.pg-stat-card .pg-stat strong { color: #fff; }
.pg-stat-card .pg-stat span { color: rgba(255,255,255,0.72); }

/* "Why us" icon tiles */
.pg-why-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 991px) { .pg-why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .pg-why-grid { grid-template-columns: 1fr; } }
.pg-why-tile {
    background: var(--pg-surface);
    border: 1px solid var(--pg-line);
    border-radius: var(--pg-radius);
    padding: 26px 22px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.pg-why-tile:hover { transform: translateY(-4px); box-shadow: var(--pg-shadow); border-color: transparent; }
.pg-why-icon {
    width: 48px; height: 48px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: var(--pg-primary-tint); color: var(--pg-primary-deep); font-size: 19px;
    margin-bottom: 16px;
}
.pg-why-tile h4 { font-size: 16px; margin: 0 0 6px; }
.pg-why-tile p { font-size: 14px; color: var(--pg-muted); margin: 0; }

/* -------------------------------------------------------------------------
   12. Admissions CTA banner
   ------------------------------------------------------------------------- */
.pg-admissions-banner {
    background: linear-gradient(120deg, var(--pg-accent-dark) 0%, var(--pg-accent) 100%);
    border-radius: var(--pg-radius-lg);
    padding: 42px 44px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    color: #fff;
    box-shadow: 0 22px 50px -20px rgba(217,119,6,0.5);
}
.pg-admissions-banner h3 { color: #fff; margin: 0 0 8px; font-size: 24px; }
.pg-admissions-banner p { color: rgba(255,255,255,0.9); margin: 0; }

/* -------------------------------------------------------------------------
   13. Forms (contact, admission, generic)
   ------------------------------------------------------------------------- */
.pg-field { margin-bottom: 18px; }
.pg-field label { display: block; font-size: 13px; font-weight: 700; color: var(--pg-ink); margin-bottom: 7px; }
.pg-input, .pg-textarea, select.pg-input {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--pg-line);
    border-radius: 10px;
    background: var(--pg-bg-alt);
    font-family: var(--pg-font-body);
    font-size: 14.5px;
    color: var(--pg-ink);
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.pg-input:focus, .pg-textarea:focus { outline: none; border-color: var(--pg-primary); background: #fff; box-shadow: 0 0 0 3px rgba(13,148,136,0.14); }
.pg-textarea { min-height: 130px; resize: vertical; }
.pg-field-hint { font-size: 12px; color: var(--pg-muted); margin-top: 6px; text-align: right; }

/* Contact page */
.pg-contact-info { display: flex; flex-direction: column; gap: 20px; }
.pg-contact-item { display: flex; gap: 16px; align-items: flex-start; }
.pg-contact-icon {
    width: 46px; height: 46px; border-radius: 12px; background: var(--pg-bg-alt); color: var(--pg-primary-dark);
    display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0;
}
.pg-contact-item p { margin: 0; color: var(--pg-body); }
.pg-contact-item strong { display: block; font-size: 13px; color: var(--pg-muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 3px; }
.pg-contact-form-card { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: var(--pg-radius-lg); padding: 34px; box-shadow: var(--pg-shadow-sm); }
.form-messege { font-size: 13.5px; color: var(--pg-primary-dark); margin-top: 8px; }

/* Admission page */
.pg-admission-wrap {
    display: grid;
    grid-template-columns: 320px 1fr;
    border-radius: var(--pg-radius-lg);
    overflow: hidden;
    box-shadow: var(--pg-shadow);
}
@media (max-width: 860px) { .pg-admission-wrap { grid-template-columns: 1fr; } }
.pg-admission-side {
    background: linear-gradient(165deg, var(--pg-primary-deep) 0%, var(--pg-primary) 130%);
    color: #fff;
    padding: 44px 34px;
    text-align: center;
}
.pg-admission-side img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; margin: 0 auto 20px; border: 3px solid rgba(255,255,255,0.35); }
.pg-admission-side h3 { color: #fff; }
.pg-admission-side p { color: rgba(255,255,255,0.85); font-size: 14.5px; }
.pg-admission-main { background: var(--pg-surface); padding: 40px; }
.pg-lookup-box { display: flex; gap: 12px; flex-wrap: wrap; padding: 20px; background: var(--pg-bg-alt); border-radius: var(--pg-radius-sm); margin-bottom: 32px; }
.pg-lookup-box .pg-field { flex: 1; min-width: 160px; margin-bottom: 0; }
.pg-admission-main h3.register-heading { text-align: left; margin-bottom: 22px; }

.image-preview-input-title { margin-left: 2px; overflow: hidden; }
.input-group.image-preview, .input-group.document-preview { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.image-preview-filename, .document-preview-filename {
    flex: 1; padding: 12px 14px; border: 1.5px solid var(--pg-line); border-radius: 10px; background: var(--pg-bg-alt); font-size: 13.5px; color: var(--pg-muted);
}
.image-preview-input, .document-preview-input {
    display: inline-flex; align-items: center; gap: 7px; position: relative; overflow: hidden;
    padding: 12px 16px; border-radius: 10px; background: var(--pg-primary); color: #fff; font-size: 13.5px; font-weight: 700; cursor: pointer; flex-shrink: 0;
}
.image-preview-input input[type=file], .document-preview-input input[type=file] {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
}
.image-preview-clear, .document-preview-clear {
    border: 1.5px solid var(--pg-line); background: #fff; border-radius: 10px; padding: 11px 14px; cursor: pointer; color: var(--pg-danger); flex-shrink: 0;
}
.btnRegister {
    display: inline-flex; align-items: center; gap: 8px; margin-top: 8px;
    border: 0; border-radius: 999px; padding: 13px 30px;
    background: linear-gradient(135deg, var(--pg-primary) 0%, var(--pg-primary-dark) 100%);
    color: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer;
    box-shadow: 0 12px 26px -10px rgba(13,148,136,0.5);
}
.btnRegister[disabled] { opacity: 0.65; }

/* select2 v3 restyle to match theme */
.select2-container .select2-choice {
    height: 46px; line-height: 44px; border: 1.5px solid var(--pg-line); border-radius: 10px; background: var(--pg-bg-alt);
}
.select2-drop { border-radius: 10px; border-color: var(--pg-line); }
.select2-search input, .datepicker { font-family: var(--pg-font-body); }

/* -------------------------------------------------------------------------
   14. Footer
   ------------------------------------------------------------------------- */
.pg-footer {
    position: relative;
    background: linear-gradient(165deg, var(--pg-primary-deep) 0%, #082A27 100%);
    color: rgba(255,255,255,0.78);
    padding-top: 68px;
}
.pg-footer-accent {
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--pg-accent) 0%, var(--pg-primary-tint) 50%, var(--pg-accent) 100%);
}
.pg-footer-grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1fr; gap: 40px; padding-bottom: 44px; }
@media (max-width: 860px) { .pg-footer-grid { grid-template-columns: 1fr; gap: 36px; } }
.pg-footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.pg-footer-brand .pg-brand-mark { width: 52px; height: 52px; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.pg-footer-brand-name { font-family: var(--pg-font-display); color: #fff; font-size: 19px; font-weight: 600; line-height: 1.25; }
.pg-footer p { font-size: 14.5px; color: rgba(255,255,255,0.68); max-width: 340px; }
.pg-footer-social { display: flex; gap: 10px; margin-top: 20px; }
.pg-footer-social a {
    width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.14);
    display: inline-flex; align-items: center; justify-content: center; color: #fff; transition: background .15s ease, transform .15s ease;
}
.pg-footer-social a:hover { background: var(--pg-primary); transform: translateY(-2px); }
.pg-footer h5 {
    color: #fff; font-family: var(--pg-font-body); font-size: 13.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .07em; margin-bottom: 20px;
    position: relative; padding-bottom: 12px;
}
.pg-footer h5::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 2px; background: var(--pg-accent); }
.pg-footer-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 20px;
}
.pg-footer-links li { margin-bottom: 4px; }
.pg-footer-links a {
    display: flex; align-items: center; gap: 8px; min-width: 0;
    font-size: 14.5px; color: rgba(255,255,255,0.72); transition: color .15s ease, transform .15s ease;
    padding: 6px 0;
}
.pg-footer-links a i { font-size: 11px; color: var(--pg-primary-tint); transition: transform .15s ease; flex-shrink: 0; }
.pg-footer-links a span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-footer-links a:hover { color: #fff; transform: translateX(3px); }
@media (max-width: 420px) { .pg-footer-links { grid-template-columns: 1fr; } }
.pg-footer-contact { display: flex; flex-direction: column; gap: 14px; }
.pg-footer-contact li { display: flex; align-items: flex-start; gap: 12px; font-size: 14.5px; color: rgba(255,255,255,0.78); line-height: 1.5; }
.pg-footer-contact li i {
    width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,0.08);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--pg-primary-tint); font-size: 13px; margin-top: 1px;
}
.pg-footer-contact a { color: rgba(255,255,255,0.78); transition: color .15s ease; }
.pg-footer-contact a:hover { color: #fff; }

.pg-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; font-size: 13px; color: rgba(255,255,255,0.55); }
.pg-footer-bottom-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.pg-footer-bottom a { color: rgba(255,255,255,0.8); font-weight: 600; }
.pg-footer-totop { display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,0.7); font-weight: 600; transition: color .15s ease; }
.pg-footer-totop:hover { color: #fff; }
@media (max-width: 560px) { .pg-footer-bottom-inner { flex-direction: column; text-align: center; } }

/* -------------------------------------------------------------------------
   15. 404
   ------------------------------------------------------------------------- */
.pg-404 { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--pg-bg-alt); text-align: center; padding: 40px 20px; }
.pg-404 .code { font-family: var(--pg-font-display); font-size: clamp(90px, 16vw, 160px); color: var(--pg-primary); line-height: 1; margin-bottom: 8px; }
.pg-404 h2 { max-width: 480px; margin: 0 auto 28px; }
.pg-404-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* -------------------------------------------------------------------------
   16. Notice / event detail pages
   ------------------------------------------------------------------------- */
.pg-detail-card { background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: var(--pg-radius-lg); padding: 40px; box-shadow: var(--pg-shadow-sm); }
.pg-detail-card h1 { margin-bottom: 10px; }
.pg-detail-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13.5px; color: var(--pg-muted); margin-bottom: 26px; }
.pg-detail-meta span { display: inline-flex; align-items: center; gap: 6px; }

.pg-event-detail-media { border-radius: var(--pg-radius); overflow: hidden; margin-bottom: 26px; }
.pg-event-detail-media img { width: 100%; max-height: 420px; object-fit: cover; }

.pg-sidebar-list { display: flex; flex-direction: column; gap: 16px; }
.pg-sidebar-event { display: flex; gap: 12px; background: var(--pg-surface); border: 1px solid var(--pg-line); border-radius: var(--pg-radius-sm); padding: 12px; align-items: center; }
.pg-sidebar-event img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.pg-sidebar-event h4 { font-size: 14px; margin: 0 0 4px; }
.pg-sidebar-event span { font-size: 12.5px; color: var(--pg-muted); }

/* -------------------------------------------------------------------------
   17. Misc
   ------------------------------------------------------------------------- */
.pg-scroll-top {
    position: fixed; right: 24px; bottom: 24px; z-index: 150;
    width: 46px; height: 46px; border-radius: 50%;
    background: var(--pg-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    box-shadow: var(--pg-shadow-sm);
    opacity: 0; visibility: hidden; transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    cursor: pointer; border: 0;
}
.pg-scroll-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

.text-center { text-align: center; }
.pg-badge {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--pg-primary-tint); color: var(--pg-primary-deep);
    font-size: 12px; font-weight: 700; padding: 5px 12px; border-radius: 999px;
}

/* -------------------------------------------------------------------------
   18. Announcement popup
   ------------------------------------------------------------------------- */
.pg-announce-overlay {
    position: fixed; inset: 0; z-index: 400;
    background: rgba(10, 23, 21, 0.55);
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    opacity: 0; visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
}
.pg-announce-overlay.is-open { opacity: 1; visibility: visible; }
.pg-announce-modal {
    position: relative;
    width: 100%; max-width: 440px;
    background: var(--pg-surface);
    border-radius: var(--pg-radius-lg);
    box-shadow: var(--pg-shadow-lg);
    overflow: hidden;
    transform: scale(0.92) translateY(12px);
    transition: transform .25s ease;
}
.pg-announce-overlay.is-open .pg-announce-modal { transform: scale(1) translateY(0); }
.pg-announce-close {
    position: absolute; top: 14px; right: 14px; z-index: 2;
    width: 34px; height: 34px; border-radius: 50%; border: 0;
    background: rgba(15,23,42,0.55); color: #fff;
    display: flex; align-items: center; justify-content: center; cursor: pointer;
    transition: background .15s ease;
}
.pg-announce-close:hover { background: rgba(15,23,42,0.8); }
.pg-announce-media img { width: 100%; height: 220px; object-fit: cover; }
.pg-announce-body { padding: 28px; text-align: center; }
.pg-announce-body h3 { font-size: 22px; margin-bottom: 10px; }
.pg-announce-body p { color: var(--pg-muted); font-size: 15px; margin-bottom: 22px; }
.pg-announce-ctas { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Image-only announcement: just the picture, close button floats on top of it */
.pg-announce-modal--image-only { max-width: 480px; background: transparent; box-shadow: none; }
.pg-announce-modal--image-only .pg-announce-media {
    display: block; border-radius: var(--pg-radius-lg); overflow: hidden; box-shadow: var(--pg-shadow-lg);
    line-height: 0;
}
.pg-announce-modal--image-only .pg-announce-media img { width: 100%; height: auto; max-height: 82vh; object-fit: contain; background: var(--pg-surface); }
.pg-announce-modal--image-only .pg-announce-close { top: 10px; right: 10px; }

@media (max-width: 480px) {
    .pg-announce-media img { height: 160px; }
    .pg-announce-body { padding: 22px; }
}
