/* =====================================================================
   BASE TOKENS
   ---------------------------------------------------------------------
   Every colour in the public site resolves to one of these variables.
   A theme file (/themes/<name>/css/theme.css) is loaded AFTER this file
   and overrides whichever tokens it wants, so nothing here is ever
   "missing" when a theme forgets to declare it.
   Never hard-code a colour in a view - add a token instead.
   ===================================================================== */
:root {
    /* --- core palette (overridden by every theme) --- */
    --gov-primary: #0b5e2b;
    --gov-secondary: #0f7a38;
    --gov-accent: #f4b400;
    --gov-light: #f4f7fb;
    --gov-border: #dce3ea;
    --gov-text: #2d3748;
    --gov-maroon: #7a1f1f;
    --gov-dark: #1c1c1c;
    --mobile-nav-height: 64px;

    /* --- surfaces: cards, panels and the backdrop behind media --- */
    --gov-surface: #ffffff;
    --gov-surface-2: #f6f9fc;
    --gov-media-bg: #eef2f7;

    /* --- typography roles --- */
    --gov-heading: #183b2d;
    --gov-muted: #70808f;
    --gov-on-primary: #ffffff;
    --gov-on-accent: #1c1c1c;

    /* The theme's identity colour, but guaranteed readable as TEXT on
       --gov-surface. Use this for coloured labels/badges/links instead of
       --gov-primary: on a dark theme --gov-primary is the near-black
       navbar fill and would vanish against the card behind it. */
    --gov-brand: #0b5e2b;

    /* --- depth --- */
    --gov-shadow: rgba(15, 23, 42, 0.10);
    --gov-shadow-soft: rgba(15, 23, 42, 0.06);

    /* --- scrolling notice bar --- */
    --gov-notice-bg: #fff8e8;
    --gov-notice-border: #f1dfb0;
    --gov-notice-text: #6b4f00;
    --gov-notice-label: #7a1f1f;

    /* --- shared geometry --- */
    --gov-radius-lg: 24px;
    --gov-radius-md: 18px;
    --gov-radius-sm: 12px;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

#registerSlide {
    transition: opacity 1s ease-in-out;
}

.text-headings-subpages {
    color: var(--gov-primary);
    font-weight: 700 !important;
}

/*Families,FamilyMembers,VillageInfo pages return home style*/

.btn-outline-success-page-btn {
    border-radius: 12px;
    font-weight: 600;
    padding: 10px 16px;
    color: var(--gov-secondary);
    border-color: var(--gov-secondary);
    background: linear-gradient(135deg, #f8fbff, #f0fdf4);
}

/* =====================================================================
   MEDIA FRAME  (shared by home, gallery, news, leader photos)
   ---------------------------------------------------------------------
   The picture is shown WHOLE and at its own shape - never cropped, never
   blown up past its natural size. The frame shrinks to fit the picture,
   so there are no big empty boxes around small photos.
   max-height is what keeps a tall portrait photo from taking over the
   page; the --* variants below just change that cap.
   ===================================================================== */
.vp-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    overflow: hidden;
    border-radius: var(--gov-radius-sm);
    background: var(--gov-media-bg);
}

    .vp-media > img,
    .vp-media > video {
        display: block;
        width: auto;
        height: auto;
        max-width: 100%;
        max-height: 280px;
        object-fit: contain;
    }

/* size caps */
.vp-media--portrait > img,
.vp-media--portrait > video {
    max-height: 200px;
}

.vp-media--stage > img,
.vp-media--stage > video {
    max-height: 420px;
}

.vp-media--thumb > img,
.vp-media--thumb > video {
    max-height: 92px;
}
