/* ==========================================================
   HICAP SERVICES - GLOBAL INNER PAGE DESIGN
   Shared styles for WordPress internal pages
========================================================== */

body.hicap-standard-page {
    --hicap-navy: #123b4a;
    --hicap-teal: #087f83;
    --hicap-text: #344b59;
    --hicap-border: #dce7ec;
    --hicap-soft: #f3f8fa;
}

/* PAGE WIDTH AND SPACING */

body.hicap-standard-page .wp-site-blocks main {
    margin-block-start: 0 !important;
    padding-block-start: 0 !important;
}

body.hicap-standard-page .wp-block-post-content {
    width: min(1100px, calc(100% - 40px));
    max-width: none;
    margin-inline: auto;
    padding: 0 0 30px;
    color: var(--hicap-text);
    font-size: 16px;
    line-height: 1.5;
    box-sizing: border-box;
}

body.hicap-standard-page .wp-block-post-content > * {
    max-width: 100%;
}

body.hicap-standard-page .wp-block-post-content > * + * {
    margin-block-start: 12px;
}

/* PAGE TITLE */

body.hicap-standard-page .wp-block-post-title {
    width: min(1100px, calc(100% - 40px));
    max-width: none;
    margin: 0 auto !important;
    padding: 24px 0 12px;
    color: var(--hicap-navy);
    font-size: clamp(2rem, 3vw, 2.6rem);
    font-weight: 750;
    line-height: 1.2;
    box-sizing: border-box;
}

/* HEADINGS */

body.hicap-standard-page .wp-block-post-content h2 {
    color: var(--hicap-navy);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
    line-height: 1.25;
    margin: 18px 0 8px;
}

body.hicap-standard-page .wp-block-post-content h3 {
    color: var(--hicap-navy);
    font-size: 1.25rem;
    line-height: 1.3;
    margin: 14px 0 7px;
}

body.hicap-standard-page .wp-block-post-content p {
    margin: 0 0 10px;
}

/* LISTS */

body.hicap-standard-page .wp-block-post-content ul,
body.hicap-standard-page .wp-block-post-content ol {
    margin: 8px 0 12px;
    padding-left: 24px;
}

body.hicap-standard-page .wp-block-post-content li {
    margin-bottom: 4px;
}

/* LINKS */

body.hicap-standard-page .wp-block-post-content a {
    color: #08767c;
    text-underline-offset: 3px;
}

body.hicap-standard-page .wp-block-post-content a:hover {
    color: var(--hicap-navy);
}

/* CONTENT GROUPS */

body.hicap-standard-page .wp-block-post-content .wp-block-group {
    margin-block: 12px;
}

body.hicap-standard-page .wp-block-post-content .wp-block-columns {
    gap: 20px;
    margin-block: 14px;
}

/* BUTTONS */

body.hicap-standard-page .wp-block-post-content
:is(.wp-block-button__link, .hicap-btn) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 12px 22px;
    border: 0;
    border-radius: 9px;
    background: var(--hicap-teal);
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    text-decoration: none;
}

body.hicap-standard-page .wp-block-post-content
:is(.wp-block-button__link, .hicap-btn):hover {
    background: var(--hicap-navy);
    color: #fff;
}

/* CARDS */

body.hicap-standard-page
:is(.hicap-info-card, .hicap-content-card) {
    padding: 22px 25px;
    border: 1px solid var(--hicap-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(18,59,74,.05);
}

/* TABLES */

body.hicap-standard-page .wp-block-post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0;
}

body.hicap-standard-page .wp-block-post-content th,
body.hicap-standard-page .wp-block-post-content td {
    padding: 10px 13px;
    border: 1px solid var(--hicap-border);
    text-align: left;
}

body.hicap-standard-page .wp-block-post-content th {
    background: var(--hicap-soft);
    color: var(--hicap-navy);
}

/* FORM CONTROLS */

body.hicap-standard-page .wp-block-post-content
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
body.hicap-standard-page .wp-block-post-content select,
body.hicap-standard-page .wp-block-post-content textarea {
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #bdcfd7;
    border-radius: 8px;
    background: #fff;
    color: #243b48;
    font: inherit;
    box-sizing: border-box;
}

body.hicap-standard-page .wp-block-post-content
:is(input, select, textarea, button, a):focus-visible {
    outline: 2px solid var(--hicap-teal);
    outline-offset: 2px;
}

/* IMAGES AND VIDEO */

body.hicap-standard-page .wp-block-post-content img {
    max-width: 100%;
    height: auto;
}

body.hicap-standard-page .wp-block-post-content
:is(.wp-block-embed, iframe) {
    max-width: 100%;
}

/* MOBILE */

@media (max-width: 700px) {
    body.hicap-standard-page .wp-block-post-title,
    body.hicap-standard-page .wp-block-post-content {
        width: calc(100% - 28px);
    }

    body.hicap-standard-page .wp-block-post-title {
        padding: 18px 0 10px;
    }

    body.hicap-standard-page .wp-block-post-content {
        padding-bottom: 22px;
    }

    body.hicap-standard-page
    :is(.hicap-info-card, .hicap-content-card) {
        padding: 17px;
    }
}

/* HICAP LEGACY PAGE NORMALIZATION START
   ==========================================================
   HICAP - LEGACY CONTENT AND WORDPRESS LAYOUT FIXES
   ========================================================== */

/* Remove restrictive Twenty Twenty-Five content width */
body.hicap-standard-page .wp-block-post-content.is-layout-constrained {
    width: min(1100px, calc(100% - 40px)) !important;
    max-width: none !important;
    margin-inline: auto !important;
    padding-inline: 0 !important;
}

body.hicap-standard-page .wp-block-post-content.is-layout-constrained > :where(
    p, h1, h2, h3, h4, ul, ol, div, section, figure, iframe
) {
    max-width: 100% !important;
}

/* Normalize legacy text */
body.hicap-standard-page .wp-block-post-content {
    font-size: 16px !important;
    line-height: 1.6;
}

body.hicap-standard-page .wp-block-post-content p,
body.hicap-standard-page .wp-block-post-content li,
body.hicap-standard-page .wp-block-post-content div,
body.hicap-standard-page .wp-block-post-content span {
    font-size: inherit;
    line-height: inherit;
}

/* Correct old centered headings */
body.hicap-standard-page .wp-block-post-content h1,
body.hicap-standard-page .wp-block-post-content h2,
body.hicap-standard-page .wp-block-post-content h3,
body.hicap-standard-page .wp-block-post-content h4 {
    color: #123b4a;
    text-align: left !important;
    line-height: 1.3;
}

body.hicap-standard-page .wp-block-post-content h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin: 16px 0 10px;
}

body.hicap-standard-page .wp-block-post-content h3 {
    font-size: 1.3rem;
    margin: 16px 0 8px;
}

body.hicap-standard-page .wp-block-post-content h4 {
    font-size: 1.12rem;
    margin: 14px 0 7px;
}

/* Remove legacy theme text formatting */
body.hicap-standard-page .wp-block-post-content
.theme-text-font-heading1 {
    font-family: inherit;
    font-size: inherit;
    font-weight: inherit;
}

/* Responsive embedded video */
body.hicap-standard-page .wp-block-post-content iframe[src*="youtube.com"],
body.hicap-standard-page .wp-block-post-content iframe[src*="youtu.be"] {
    display: block;
    width: 100%;
    max-width: 780px;
    aspect-ratio: 16 / 9;
    height: auto;
    border: 0;
    border-radius: 12px;
}

/* Consistent spacing */
body.hicap-standard-page .wp-block-post-content p {
    margin: 0 0 12px;
}

body.hicap-standard-page .wp-block-post-content h2,
body.hicap-standard-page .wp-block-post-content h3,
body.hicap-standard-page .wp-block-post-content h4 {
    margin-top: 18px;
    margin-bottom: 8px;
}

/* Mobile */
@media (max-width: 700px) {
    body.hicap-standard-page .wp-block-post-content.is-layout-constrained {
        width: calc(100% - 28px) !important;
    }
}

/* HICAP LEGACY PAGE NORMALIZATION END */

/* ==========================================================
   HICAP VOLUNTEER PAGE
========================================================== */

.hicap-volunteer-page {
    --volunteer-navy: #123b4a;
    --volunteer-teal: #087f83;
    --volunteer-border: #dce7ec;
    color: #344b59;
    font-size: 16px;
    line-height: 1.55;
}

.hicap-volunteer-page *,
.hicap-volunteer-page *::before,
.hicap-volunteer-page *::after {
    box-sizing: border-box;
}

.hicap-volunteer-page .hicap-volunteer-hero {
    padding: 30px 35px;
    margin-bottom: 25px;
    background: linear-gradient(110deg, #123b4a, #176269);
    border-radius: 12px;
    color: white;
}

.hicap-volunteer-page .hicap-volunteer-eyebrow {
    margin: 0 0 6px;
    color: #a7e9dc;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
}

.hicap-volunteer-page .hicap-volunteer-hero h2 {
    margin: 0 0 10px !important;
    color: white !important;
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.hicap-volunteer-page .hicap-volunteer-hero p {
    max-width: 780px;
    margin: 0;
    color: #e7f2f3;
}

.hicap-volunteer-page .hicap-volunteer-content {
    display: grid;
    gap: 25px;
}

.hicap-volunteer-page .hicap-volunteer-intro {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
    align-items: center;
    gap: 30px;
}

.hicap-volunteer-page h2 {
    margin: 0 0 12px !important;
    color: var(--volunteer-navy);
    font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

.hicap-volunteer-page h3 {
    margin: 0 0 8px !important;
    color: var(--volunteer-navy);
    font-size: 1.15rem;
}

.hicap-volunteer-page p {
    margin: 0 0 10px;
}

.hicap-volunteer-page .hicap-volunteer-video {
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    background: #123b4a;
}

.hicap-volunteer-page .hicap-volunteer-video iframe {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none !important;
    border: 0;
}

.hicap-volunteer-page .hicap-volunteer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
}

.hicap-volunteer-page .hicap-volunteer-card {
    padding: 20px;
    border: 1px solid var(--volunteer-border);
    border-radius: 12px;
    background: #f7fafb;
}

.hicap-volunteer-page .hicap-volunteer-number {
    display: inline-block;
    margin-bottom: 10px;
    color: var(--volunteer-teal);
    font-size: 13px;
    font-weight: 800;
}

.hicap-volunteer-page .hicap-volunteer-requirements {
    padding: 22px 26px;
    border-left: 4px solid var(--volunteer-teal);
    border-radius: 10px;
    background: #edf6f5;
}

.hicap-volunteer-page .hicap-volunteer-apply {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    padding: 26px 30px;
    border-radius: 12px;
    background: var(--volunteer-navy);
    color: white;
}

.hicap-volunteer-page .hicap-volunteer-apply h2 {
    color: white;
}

.hicap-volunteer-page .hicap-volunteer-apply p,
.hicap-volunteer-page .hicap-volunteer-apply address {
    color: #e7f2f3;
}

.hicap-volunteer-page .hicap-volunteer-apply address {
    margin: 12px 0;
    font-style: normal;
}

.hicap-volunteer-page .hicap-volunteer-apply a:not(.hicap-volunteer-button) {
    color: #a7e9dc;
}

.hicap-volunteer-page .hicap-volunteer-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border-radius: 8px;
    background: white;
    color: #123b4a !important;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    white-space: nowrap;
}

.hicap-volunteer-page .hicap-volunteer-button:hover {
    background: #dff5f0;
}

@media (max-width: 800px) {
    .hicap-volunteer-page .hicap-volunteer-intro {
        grid-template-columns: 1fr;
    }

    .hicap-volunteer-page .hicap-volunteer-grid {
        grid-template-columns: 1fr;
    }

    .hicap-volunteer-page .hicap-volunteer-apply {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 600px) {
    .hicap-volunteer-page .hicap-volunteer-hero,
    .hicap-volunteer-page .hicap-volunteer-apply {
        padding: 22px;
    }

    .hicap-volunteer-page .hicap-volunteer-requirements {
        padding: 18px;
    }

    .hicap-volunteer-page .hicap-volunteer-button {
        white-space: normal;
    }
}
