/* =====================================================================
   PE Group of Institutions: site footer
   Load this after pe-header.css (it reuses the same colour tokens and
   .pe-btn buttons). Every class is prefixed "pe-footer".
   ===================================================================== */

.pe-footer {
    --pf-bg: var(--pe-forest, #17392c);
    --pf-text: #cddacb;
    --pf-muted: #a3b6a6;
    --pf-line: rgba(255, 255, 255, .12);
    --pf-accent: var(--pe-mustard, #d9a036);
    --pf-arch: clamp(28px, 5vw, 64px);   /* how high the curved top edge rises */

    position: relative;
    margin-top: clamp(20px, 6vw, 25px);
    padding-top: clamp(28px, 6vw, 52px);
    background: var(--pf-bg);
    color: var(--pf-text);
    font-family: var(--pe-font-ui, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
    font-size: .9375rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* one wide, gentle arch across the top, echoing the banner's arched photo */
    border-radius: 50% 50% 0 0 / var(--pf-arch) var(--pf-arch) 0 0;
}
.pe-footer::before {
    /* thin blush line following the arch, like the frame line around the banner photo */
    content: "";
    position: absolute;
    top: -14px;
    right: 0;
    left: 0;
    height: calc(var(--pf-arch) * 2);
    border-top: 1.5px solid rgba(237, 167, 146, .75);
    border-radius: 50% 50% 0 0 / calc(var(--pf-arch) + 14px) calc(var(--pf-arch) + 14px) 0 0;
    pointer-events: none;
}
.pe-footer *,
.pe-footer *::before,
.pe-footer *::after { box-sizing: border-box; }
.pe-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.pe-footer :focus-visible {
    outline: 2px solid var(--pf-accent);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- Admissions call-to-action ---------- */
.pe-footer__cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 24px 40px;
    padding-bottom: clamp(18px, 4vw, 20px);
    border-bottom: 1px solid var(--pf-line);
}
.pe-footer__cta-title {
    margin: 0 0 6px;
    color: #fff;
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.125rem);
    font-weight: 400;
    line-height: 1.15;
}
.pe-footer__cta-text p {
    max-width: 36em;
    margin: 0;
}
.pe-footer__cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

/* ---------- Columns ---------- */
.pe-footer__grid {
    display: grid;
    /* brand | one column per link group | contact */
    grid-template-columns: minmax(0, 1.5fr) repeat(var(--pf-cols, 3), minmax(0, 1fr)) minmax(0, 1.35fr);
    gap: 40px 32px;
    padding-block: clamp(36px, 5vw, 18px);
}

.pe-footer__logo {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: #fff;
    text-decoration: none;
}
.pe-footer__logo-tile {
    display: grid;
    flex: none;
    place-items: center;
    width: 60px;
    height: 60px;
    padding: 6px;
    border-radius: 16px;
    background: #fff;
}
.pe-footer__logo-tile img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.pe-footer__name {
    font-family: var(--pe-font-display, Georgia, "Times New Roman", serif);
    font-size: 1.25rem;
    line-height: 1.2;
}
.pe-footer__about {
    max-width: 34em;
    margin: 18px 0 20px;
}
.pe-footer__social {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pe-footer__social a {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--pf-line);
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: background-color .2s, border-color .2s, color .2s;
}
.pe-footer__social a:hover {
    border-color: var(--pf-accent);
    background: var(--pf-accent);
    color: var(--pe-forest, #17392c);
}

.pe-footer__heading {
    margin: 0 0 14px;
    color: #fff;
    font-family: var(--pe-font-ui, system-ui, sans-serif);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none;
}
.pe-footer__col li + li { margin-top: 8px; }
.pe-footer__col a {
    color: var(--pf-text);
    text-decoration: none;
    transition: color .2s;
}
.pe-footer__col a:hover {
    color: #fff;
    text-decoration: underline;
    text-decoration-color: var(--pf-accent);
    text-underline-offset: 4px;
}

.pe-footer__contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.pe-footer__contact li + li { margin-top: 12px; }
.pe-footer__contact i {
    flex: none;
    margin-top: 2px;
    color: var(--pf-accent);
}
.pe-footer__contact span { overflow-wrap: anywhere; }
.pe-footer .pe-footer__directions {
    display: block;
    margin-top: 4px;
    color: var(--pf-accent);
    font-weight: 600;
}

/* ---------- Bottom bar ---------- */
.pe-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding: 20px 0 calc(20px + env(safe-area-inset-bottom, 0px));
    border-top: 1px solid var(--pf-line);
    color: var(--pf-muted);
    font-size: .8125rem;
}
.pe-footer__bottom p { margin: 0; }
.pe-footer__legal {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}
.pe-footer__legal a,
.pe-footer__top {
    color: var(--pf-muted);
    text-decoration: none;
    transition: color .2s;
}
.pe-footer__legal a:hover,
.pe-footer__top:hover { color: #fff; }
.pe-footer__top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

/* ---------- Laptops and tablets: brand on its own row ---------- */
@media (max-width: 1199.98px) {
    .pe-footer__grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .pe-footer__brand { grid-column: 1 / -1; }
}

/* ---------- Phones ---------- */
@media (max-width: 575.98px) {
    .pe-footer__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 32px 20px;
    }
    .pe-footer__contact { grid-column: 1 / -1; }
    .pe-footer__cta-actions,
    .pe-footer__cta-actions .pe-btn { width: 100%; }
    .pe-footer__bottom {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .pe-footer * { transition-duration: .01ms !important; }
}
