/*
    =============================================================================================
    refresh.css - optional "contemporary look" for a public website                       2026-11-12

    How it is loaded: _Layout.cshtml adds this file (and refresh.js, if present) ONLY when
    wwwroot/Site{id}/refresh.css exists. Every other site is untouched. To turn the new look
    off, delete or rename this file - nothing else changes.

    Why a separate file: Site1147.css is regenerated by the admin app (Generate CSS / Apply
    theme), so anything put there would be overwritten. The admin app never touches this file.

    Rules:
      - CSS only. No database changes, no changes to the HTML the C# services build.
      - The generated HTML carries some inline styles (info-box images, contact form widths,
        document category headers). Those can only be beaten with !important; each use is marked.
      - Colors come from the site's own Site{id}.css: Generate CSS writes --site-* variables
        (SiteCSSTemplate.txt, 2026-11-12), so this file follows each site's colors and any theme
        applied to it. The SAME file works for every site - copy it unchanged. The values after
        the commas below are only fallbacks for a site whose CSS has not been regenerated yet.
      - The darker/lighter navbar shades are mixed from the navbar color (color-mix).
    =============================================================================================
*/

@import url("https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --pha-primary: var(--site-navbar, #1F3A5F);           /* navbar, headings, footer (navbar color)  */
    --pha-primary-deep: color-mix(in srgb, var(--pha-primary) 72%, #000);   /* darker: gradient end, hover */
    --pha-primary-light: color-mix(in srgb, var(--pha-primary) 85%, #fff);  /* lighter: gradient start      */
    --pha-accent: var(--site-accent, #A0521D);            /* icons, links, small highlights (card icon) */
    --pha-highlight: var(--site-highlight, #F2C14E);      /* nav hover / focus ring (nav hover color)  */
    --pha-tint: var(--site-tint, #E8EEF5);                /* light background bands (login bar color)  */
    --pha-tint-2: var(--site-tint-2, #F3F6FA);            /* lighter band (staff odd row)              */
    --pha-text: #26303d;
    --pha-muted: #5b6676;
    --pha-border: color-mix(in srgb, var(--pha-primary) 12%, transparent);
    --pha-radius: 14px;
    --pha-radius-sm: 10px;
    --pha-shadow-sm: 0 1px 2px rgba(16, 30, 54, 0.06), 0 2px 8px rgba(16, 30, 54, 0.06);
    --pha-shadow-md: 0 4px 12px rgba(16, 30, 54, 0.08), 0 12px 32px rgba(16, 30, 54, 0.10);
    --pha-font: "Public Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ------------------------------------------------------------------------------------------
   1. TYPE AND PAGE BASICS
   ------------------------------------------------------------------------------------------ */

/* "html body" outranks the layout's inline <style> body rule (padding-bottom:120px was there
   only to clear the old fixed footer, which is no longer fixed - see section 9). */
html body {
    font-family: var(--pha-font);
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--pha-text);
    background: #fff;
    padding-bottom: 0;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-anchor: none;  /* prevent scroll-anchor compensation fighting the navbar height transition */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--pha-font);
    color: var(--pha-primary);
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

a {
    color: var(--pha-accent);
    transition: color .15s ease;
}

a:hover {
    color: var(--pha-primary);
}

/* Visible keyboard focus everywhere (WCAG 2.1 AA, 2.4.7) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--pha-highlight);
    outline-offset: 2px;
    border-radius: 6px;
}

/* Inner-page titles ("Documents", "Staff", ...) - bigger, with a short accent bar */
.text-Title {
    font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--pha-primary);
    padding: 2.5rem 0 0;
    margin-bottom: 1.75rem;
}

.text-Title::after {
    content: "";
    display: block;
    width: 56px;
    height: 4px;
    margin-top: .75rem;
    border-radius: 4px;
    background: var(--pha-accent);
}

/* ------------------------------------------------------------------------------------------
   2. TOP BAR (BHA Login / translator / Tenants Login)
   ------------------------------------------------------------------------------------------ */

.dashboard-login-prompt-bar {
    background: var(--pha-tint);
    font-size: .875rem;
}

.dashboard-login-prompt strong {
    font-weight: 600;
}

/* ------------------------------------------------------------------------------------------
   3. MAIN NAVBAR - slimmer, and shrinks once the page scrolls (refresh.js adds .is-scrolled)
   ------------------------------------------------------------------------------------------ */

.navbar-custom {
    /* Flat bar unless the site's "Gradient navbar" setting is on (admin: Choose a Theme page), which adds
       .navbar-gradient below. The gradient needs a logo with a TRANSPARENT background - a logo on a solid
       navbar-colored background shows up as a box. */
    background: var(--pha-primary);
    padding-top: .5rem;
    padding-bottom: .5rem;
    transition: box-shadow .25s ease, padding .25s ease;
}

.navbar-custom.navbar-gradient {
    background: linear-gradient(120deg, var(--pha-primary-light) 0%, var(--pha-primary) 45%, var(--pha-primary-deep) 100%);
}

.navbar-custom.is-scrolled {
    padding-top: .25rem;
    padding-bottom: .25rem;
    box-shadow: 0 6px 20px rgba(10, 22, 40, 0.25);
}

/* Site1147.css sets the logo to 150px; that sticky bar used a quarter of a laptop screen */
.navbar-custom .navbar-brand img {
    height: 110px !important;           /* !important: inline height from LogoHeightPixels */
    width: auto;
    transition: height .25s ease;
    will-change: height;
}

.navbar-custom.is-scrolled .navbar-brand img {
    height: 60px !important;
}

.navbar-custom .navbar-nav .nav-link {
    font-weight: 500;
    font-size: .975rem;
    padding: .5rem .9rem;
    border-radius: 999px;
    transition: background-color .15s ease, color .15s ease;
}

/* A site with many menu items (1219 has 9) and a wide logo ran off the right edge of a laptop screen.
   Let the menu wrap onto a second row instead, right-aligned. Desktop menu only: below 576px the
   menu is the hamburger list and must keep Bootstrap's own layout. */
@media (min-width: 576px) {
    .navbar-custom .navbar-collapse {
        min-width: 0;
        flex: 1 1 0%;
    }

    .navbar-custom .navbar-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

/* Laptop widths: slightly tighter pills so more items fit on one row */
@media (max-width: 1399.98px) {
    .navbar-custom .navbar-nav .nav-link {
        padding: .45rem .6rem;
        font-size: .925rem;
    }
}

.navbar-custom .navbar-nav .nav-link:hover,
.navbar-custom .navbar-nav .nav-link:focus,
.navbar-custom .navbar-nav .show > .nav-link {
    background-color: rgba(255, 255, 255, 0.12);
    color: var(--pha-highlight);
}

/* Dropdowns: white floating panels instead of navy boxes */
.navbar-custom .dropdown-menu {
    background: #fff;
    border: 1px solid var(--pha-border);
    border-radius: var(--pha-radius-sm);
    box-shadow: var(--pha-shadow-md);
    padding: .4rem;
    margin-top: .4rem;
    min-width: 14rem;
}

.navbar-custom .dropdown-item {
    color: var(--pha-text);
    border-radius: 8px;
    padding: .5rem .85rem;
    font-size: .95rem;
}

.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
    background: var(--pha-tint);
    color: var(--pha-primary);
}

/* ------------------------------------------------------------------------------------------
   4. HOME PAGE SECTION LINKS (About / Messages / Map / Contact)
   ------------------------------------------------------------------------------------------ */

.sub-nav {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(160%) blur(8px);
    backdrop-filter: saturate(160%) blur(8px);
    border-bottom: 1px solid var(--pha-border);
}

.sub-nav .nav-link {
    font-weight: 600;
    font-size: .9rem;
    color: var(--pha-primary);
    border-radius: 999px;
    padding: .35rem .95rem;
    margin-right: .25rem;
}

.sub-nav .nav-link:hover {
    background: var(--pha-tint);
    color: var(--pha-primary);
}

/* The home page puts <div>&nbsp;</div> pairs between sections as spacers. Section padding
   below replaces them. Scoped to the home page: only it has .sub-nav. */
.sub-nav ~ div:not([class]):not([id]) {
    display: none;
}

/* ------------------------------------------------------------------------------------------
   5. HOME: ABOUT / WELCOME PANEL
   ------------------------------------------------------------------------------------------ */

#section-about .container {
    margin-top: 3rem !important;
    margin-bottom: 3rem !important;
}

#section-about .bg-light {
    background: linear-gradient(135deg, var(--pha-tint-2) 0%, #fff 70%) !important;
    border: 1px solid var(--pha-border);
    border-left: 6px solid var(--pha-accent);
    border-radius: var(--pha-radius) !important;
    box-shadow: var(--pha-shadow-sm) !important;
}

#section-about h2 {
    font-size: clamp(1.75rem, 1.2rem + 1.8vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

#section-about p {
    max-width: 72ch;                    /* comfortable reading line length */
    font-size: 1.075rem;
    color: var(--pha-text);
}

/* ------------------------------------------------------------------------------------------
   6. HOME: CAROUSEL AS A HERO IMAGE
   ------------------------------------------------------------------------------------------ */

#phaCarousel {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--pha-shadow-md);
    margin-bottom: 3.5rem;
}

#phaCarousel .carousel-item img {
    height: clamp(240px, 42vw, 520px);
    object-fit: cover;
}

/* Darkened band so a caption is readable over any photo */
#phaCarousel .carousel-item::after {
    content: "";
    position: absolute;
    inset: auto 0 0 0;
    height: 45%;
    background: linear-gradient(180deg, rgba(10, 20, 35, 0) 0%, rgba(10, 20, 35, .55) 100%);
    pointer-events: none;
}

#phaCarousel .carousel-caption {
    z-index: 2;
    text-align: left;
    left: 2.5rem;
    right: 2.5rem;
    bottom: 1.75rem;
}

#phaCarousel .carousel-caption h3 {
    color: #fff;
    font-weight: 700;
    font-size: clamp(1.25rem, 1rem + 1vw, 2rem);
    text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

/* ------------------------------------------------------------------------------------------
   7. HOME: INFO BOXES (News / Public Notices / Calendar) AS CARDS
   ------------------------------------------------------------------------------------------ */

#section-notes {
    padding-bottom: 3rem;
}

#section-notes .row > [class*="col-"] {
    margin-bottom: 1.5rem;
}

/* Some sites render a .card wrapper, this one renders .card-body directly - style both */
#section-notes .card,
#section-notes .col-xl-4 > .card-body {
    height: 100%;
    background: #fff;
    border: 1px solid var(--pha-border);
    border-radius: var(--pha-radius);
    box-shadow: var(--pha-shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

#section-notes .card .card-body {
    border: 0;
    box-shadow: none;
}

#section-notes .col-xl-4 > .card-body {
    padding: 1.5rem 1.5rem 1.25rem;
}

#section-notes .card:hover,
#section-notes .col-xl-4 > .card-body:hover {
    transform: translateY(-3px);
    box-shadow: var(--pha-shadow-md);
}

#section-notes .card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--pha-primary);
    margin-bottom: .75rem;
}

/* Icon becomes a round "chip" */
#section-notes .card-title i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    border-radius: 50%;
    background: var(--pha-tint);
    color: var(--pha-accent);
    font-size: 1rem;
    vertical-align: middle;
}

/* Info-box picture: same shape on every card, cropped to fill */
#section-notes .card-title img,
#section-notes .card-body img {
    display: block;
    width: 100% !important;             /* !important: inline style from HomePageService */
    aspect-ratio: 16 / 10;
    object-fit: cover !important;
    border-radius: var(--pha-radius-sm) !important;
    margin: 1rem 0 .25rem !important;
}

#section-notes .card-text {
    padding-left: 0;
    color: var(--pha-muted);
    font-size: 1rem;
}

#section-notes .card-body h5:empty {
    display: none;
}

/* Upcoming events list */
.calendar-Heading h4 {
    font-size: 1.5rem;
    font-weight: 700;
    padding-top: 1rem;
}

/* ------------------------------------------------------------------------------------------
   8. HOME: MAP, CONTACT DETAILS AND CONTACT FORM
   ------------------------------------------------------------------------------------------ */

#section-map {
    background: var(--pha-tint-2);
    padding: 3.5rem 0 2.5rem;
}

.contact-Map iframe {
    border: 0 !important;
    border-radius: var(--pha-radius);
    box-shadow: var(--pha-shadow-sm);
    min-height: 340px;
}

/* Address block was .75em (about 12px) - now normal reading size */
.contactInfo {
    font-size: 1.05rem !important;
    color: var(--pha-text) !important;
    margin-top: 1.5rem;
}

.contactInfo strong {
    color: var(--pha-primary);
    font-size: 1.15rem;
}

#section-map .social-icons {
    font-size: 1.9rem;
}

#section-map .social-icons a {
    margin: 0 .3rem;
}

#section-contact {
    background: #fff;
    border: 1px solid var(--pha-border);
    border-radius: 18px;
    box-shadow: var(--pha-shadow-md);
    padding: 2.5rem 2.25rem 2rem;
    margin-top: 3.5rem;
    margin-bottom: 3.5rem;
}

#section-contact h2 {
    font-weight: 800;
    font-size: clamp(1.6rem, 1.2rem + 1.2vw, 2.2rem);
    margin-bottom: 1.5rem;
}

/* Google Maps embed code pasted into Options has inline width:600px, which overflows phones */
.mapouter,
.gmap_canvas,
.gmap_canvas iframe {
    max-width: 100% !important;          /* !important: inline width from the pasted embed code */
}

/* The form fields have inline width:450px, which overflows phones */
#section-contact .form-control {
    width: 100% !important;
    max-width: 100%;
}

#section-contact label {
    font-weight: 600;
    font-size: .95rem;
    color: var(--pha-primary);
    margin-bottom: .35rem;
}

/* Form controls site-wide */
.form-control {
    height: auto;
    padding: .7rem .9rem;
    border: 1px solid #c9d3e0;
    border-radius: var(--pha-radius-sm);
    font-size: 1rem;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:focus {
    border-color: var(--pha-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--pha-primary) 15%, transparent);
}

/* Buttons - Bootstrap's default bright blue replaced by the site color */
.btn {
    border-radius: 999px;
    font-weight: 600;
    padding: .6rem 1.5rem;
}

.btn-primary {
    background: var(--pha-primary);
    border-color: var(--pha-primary);
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--pha-primary-deep);
    border-color: var(--pha-primary-deep);
}

/* ------------------------------------------------------------------------------------------
   9. FOOTER - normal footer at the end of the page instead of a bar fixed over the content
   ------------------------------------------------------------------------------------------ */

.copyright {
    position: static !important;        /* Site1147.css makes it position:fixed */
    background: var(--pha-primary-deep) !important;
    color: rgba(255, 255, 255, .85) !important;
    padding: 2.5rem 1rem 2rem;
    margin-top: 3rem;
    font-size: .9rem;
    line-height: 1.8;
}

.copyright a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.copyright a:hover {
    color: var(--pha-highlight);
}

.copyright .footer-social-icons {
    font-size: 1.75rem;
    margin: .75rem 0;
}

/* Brand-colored icons look harsh on the dark footer: show them white, brand color on hover */
.copyright .footer-social-icons i {
    color: #fff !important;
    opacity: .9;
    transition: opacity .15s ease, transform .15s ease;
}

.copyright .footer-social-icons a:hover i {
    opacity: 1;
    transform: translateY(-2px);
}

/* The extra empty spacer container the layout puts above the footer */
.copyright {
    box-shadow: 0 -1px 0 rgba(255, 255, 255, .06) inset;
}

/* ------------------------------------------------------------------------------------------
   10. DOCUMENTS PAGE - categories as clean expandable rows
   ------------------------------------------------------------------------------------------ */

.documents-container .category-header {
    display: flex;
    align-items: center;
    background: #fff !important;                       /* !important: inline styles from */
    border: 1px solid var(--pha-border) !important;    /* DocumentsController             */
    border-radius: var(--pha-radius-sm);
    padding: .95rem 1.15rem !important;
    margin: 0 0 .65rem !important;
    box-shadow: var(--pha-shadow-sm);
    transition: background-color .15s ease, box-shadow .15s ease;
}

.documents-container .category-header:hover {
    background: var(--pha-tint-2) !important;
    box-shadow: var(--pha-shadow-md);
}

.documents-container .category-header strong {
    color: var(--pha-primary);
    font-weight: 700;
    font-size: 1.05rem;
}

/* "+" / "-" text becomes a round badge */
.documents-container .toggle-icon {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.75rem !important;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--pha-tint);
    color: var(--pha-accent);
    margin-right: .85rem !important;
    font-size: 1.05rem;
    line-height: 1;
}

.documents-container .category-content {
    margin: -.25rem 0 1rem 0 !important;
    padding: .25rem 0 .5rem;
}

.list-documents {
    padding-left: 0;
    margin: 0;
}

.list-documents li {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Each document as a row with a PDF icon (the old icon used the Font Awesome 4 font name,
   which no longer exists with Font Awesome 6 loaded) */
.list-documents li:before {
    content: none !important;
}

.list-documents li a {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: 1rem !important;         /* !important: inline font-size:12pt */
    color: var(--pha-text) !important;
    padding: .65rem 1rem;
    border-radius: var(--pha-radius-sm);
    text-decoration: none;
}

.list-documents li a::before {
    content: "\f1c1";                   /* file-pdf */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #c0392b;
    font-size: 1.15rem;
}

.list-documents li a:hover {
    background: var(--pha-tint-2);
    color: var(--pha-primary) !important;
}

/* ------------------------------------------------------------------------------------------
   11. SMALL THINGS
   ------------------------------------------------------------------------------------------ */

#back-to-top {
    background-color: var(--pha-primary);
    box-shadow: var(--pha-shadow-md);
    bottom: 2rem;
}

#back-to-top:hover {
    background-color: var(--pha-accent);
}

/* Cards on inner pages (properties, programs, staff ...) */
.card {
    border-radius: var(--pha-radius);
    border-color: var(--pha-border);
}

/* Phones */
@media (max-width: 575.98px) {
    html body {
        font-size: 1rem;
    }

    .navbar-custom .navbar-brand img {
        height: 64px !important;
    }

    #section-contact {
        padding: 1.75rem 1.25rem 1.5rem;
        border-radius: var(--pha-radius);
        margin-left: 12px;
        margin-right: 12px;
        width: auto;            /* col-md-8 is width:100%; with the side margins it ran 12px off a phone */
    }

    #phaCarousel {
        border-radius: var(--pha-radius);
    }
}

/* Respect "reduce motion" settings */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition: none !important;
    }
}
