:root {
    --blue: #0077ce;
    --blue-2: #005a9c;
    --navy: #073f68;
    --ink: #10324e;
    --muted: #647386;
    --lime: #c4df00;
    --line: #d9e6ef;
    --surface: #ffffff;
    --soft: #f4f9fc;
    --shadow: 0 16px 38px rgba(10, 55, 92, .14);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    font-family: "Instrument Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #fff;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

.page-loader {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    gap: 22px;
    background: #fff;
    transition: opacity .45s ease, visibility .45s ease;
}

.page-loader img {
    width: min(260px, 70vw);
    animation: loaderPulse 1.15s ease-in-out infinite alternate;
}

.page-loader span {
    width: 72px;
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #d9e6ef;
}

.page-loader span::before {
    content: "";
    display: block;
    width: 44%;
    height: 100%;
    border-radius: inherit;
    background: var(--lime);
    animation: loaderLine 1s ease-in-out infinite;
}

.page-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

@keyframes loaderPulse {
    from { transform: translateY(0); opacity: .78; }
    to { transform: translateY(-4px); opacity: 1; }
}

@keyframes loaderLine {
    0% { transform: translateX(-105%); }
    100% { transform: translateX(235%); }
}

[data-reveal],
[data-reveal-item] {
    opacity: 0;
    transform: translateY(26px);
    transition:
        opacity .7s ease,
        transform .7s cubic-bezier(.2, .8, .2, 1);
    transition-delay: var(--reveal-delay, 0ms);
}

[data-reveal].is-visible,
[data-reveal-item].is-visible {
    opacity: 1;
    transform: translateY(0);
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid rgba(217, 230, 239, .75);
    backdrop-filter: blur(12px);
    transition: box-shadow .2s ease, background-color .2s ease;
}

.site-header.is-scrolled {
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 12px 28px rgba(10, 55, 92, .08);
}

.header-inner {
    min-height: 92px;
    display: flex;
    align-items: center;
    gap: 34px;
}

.brand img { width: 210px; }

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 34px;
    font-size: 14px;
    font-weight: 700;
    color: var(--navy);
}

.main-nav a {
    position: relative;
    padding: 36px 0 32px;
}

.main-nav a.active::after,
.main-nav a:hover::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 23px;
    height: 3px;
    border-radius: 999px;
    background: var(--lime);
}

.account-btn,
.primary-btn,
.footer-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--blue), #0b8ee8);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(0, 119, 206, .28);
}

.account-btn { min-height: 48px; padding: 0 20px; }
.account-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; }

.nav-toggle,
.nav-toggle-btn { display: none; }

.hero {
    position: relative;
    min-height: 570px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(180deg, #fff 0%, #eaf7ff 100%);
}

.hero::after {
    content: "";
    position: absolute;
    left: -5%;
    right: -5%;
    bottom: -72px;
    height: 150px;
    border-radius: 50% 50% 0 0;
    background: #fff;
    border-top: 20px solid var(--lime);
    z-index: -1;
}

.hero-photo {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(0, 119, 206, .88) 0%, rgba(0, 119, 206, .12) 42%, rgba(0, 119, 206, .02) 100%),
        url("../images/hero-bayamon.jpg") center / cover no-repeat;
    z-index: -2;
}

.hero-inner {
    min-height: 570px;
    display: flex;
    align-items: center;
}

.hero-card {
    width: min(430px, 100%);
    padding: 44px 40px;
    border-radius: 22px 78px 22px 22px;
    background: rgba(255, 255, 255, .95);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.eyebrow,
.section-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.eyebrow {
    margin: 0 0 24px;
    color: #7fb400;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.eyebrow span,
.section-heading span {
    width: 30px;
    height: 4px;
    border-radius: 999px;
    background: var(--lime);
}

.hero h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(46px, 6vw, 72px);
    line-height: .92;
    letter-spacing: 0;
}

.hero p:not(.eyebrow) {
    margin: 28px 0 0;
    color: #5a6879;
    font-size: 20px;
    line-height: 1.55;
}

.hero-actions {
    display: grid;
    gap: 16px;
    margin-top: 30px;
}

.primary-btn { width: fit-content; min-height: 48px; padding: 0 24px; }

.text-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: var(--blue);
    font-weight: 800;
}

.text-btn svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
}

.quick-section {
    position: relative;
    padding: 42px 0 50px;
    background: linear-gradient(180deg, #fff 0%, var(--soft) 100%);
}

.section-heading h2 {
    margin: 0;
    color: var(--navy);
    font-size: 26px;
    line-height: 1.2;
}

.quick-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 22px;
}

.quick-card {
    position: relative;
    min-height: 210px;
    padding: 26px 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(10, 55, 92, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.quick-card:hover,
.service-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.quick-card svg {
    width: 42px;
    height: 42px;
    fill: none;
    stroke: var(--blue);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.quick-card strong {
    display: block;
    margin-top: 20px;
    color: var(--navy);
    font-size: 20px;
    line-height: 1.08;
}

.quick-card small {
    display: block;
    margin-top: 14px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.quick-card b {
    position: absolute;
    right: 22px;
    bottom: 20px;
    color: var(--blue);
    font-size: 26px;
}

.content-band {
    padding: 52px 0 34px;
    background: #fff;
}

.section-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.link-more {
    color: var(--blue);
    font-weight: 800;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.service-card {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(10, 55, 92, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.service-media {
    position: relative;
    height: 104px;
    background: url("../images/hero-bayamon.jpg") center / cover no-repeat;
}

.service-media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 78, 135, .22);
}

.service-media span {
    position: absolute;
    left: 22px;
    bottom: -24px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0, 119, 206, .25);
}

.service-media svg {
    width: 30px;
    height: 30px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.service-body { padding: 42px 22px 24px; }
.service-body h3 { margin: 0; color: var(--navy); font-size: 19px; }
.service-body p { margin: 12px 0 18px; color: var(--muted); line-height: 1.5; }
.service-body a { color: var(--blue); font-weight: 800; }

.split-section {
    padding: 34px 0 58px;
    background: linear-gradient(180deg, #fff 0%, var(--soft) 100%);
}

.split-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr;
    gap: 42px;
}

.news-list { margin-top: 22px; }

.news-item {
    display: grid;
    grid-template-columns: 96px 1fr auto;
    align-items: center;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.news-item img {
    width: 96px;
    height: 58px;
    object-fit: cover;
    border-radius: 6px;
}

.news-item strong {
    display: block;
    color: var(--navy);
    font-size: 15px;
    line-height: 1.35;
}

.news-item small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
}

.news-item b { color: var(--blue); font-size: 26px; }

.follow-panel {
    padding-left: 34px;
    border-left: 1px solid var(--line);
}

.follow-panel p {
    margin: 18px 0;
    color: var(--muted);
    line-height: 1.5;
}

.social-row {
    display: flex;
    gap: 13px;
}

.social-row a {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--blue);
    color: #fff;
    font-weight: 900;
    text-transform: uppercase;
}

.social-row a:nth-child(2) { background: #d83a83; }
.social-row a:nth-child(3) { background: #111; }
.social-row a:nth-child(4) { background: #df1f1f; }

.app-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 26px;
    padding: 22px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--blue), var(--navy));
    color: #fff;
}

.app-banner strong,
.app-banner span { display: block; }
.app-banner strong { font-size: 20px; }
.app-banner span { margin-top: 7px; line-height: 1.45; }
.app-banner a {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 6px;
    font-weight: 800;
}

.site-footer {
    padding: 42px 0 24px;
    background: linear-gradient(135deg, #00487f, #0070bf);
    color: #fff;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr .8fr 1.15fr 1fr;
    gap: 58px;
}

.footer-logo {
    width: 190px;
    filter: brightness(0) invert(1);
}

.site-footer h3 {
    margin: 0 0 18px;
    font-size: 16px;
}

.site-footer p,
.site-footer a {
    display: block;
    color: rgba(255, 255, 255, .86);
    line-height: 1.65;
    font-size: 14px;
}

.footer-btn {
    width: fit-content;
    min-height: 38px;
    margin-top: 16px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, .55);
    box-shadow: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    color: rgba(255, 255, 255, .86);
    font-size: 13px;
}

.back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 30;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 119, 206, .94);
    color: #fff;
    box-shadow: 0 14px 28px rgba(0, 72, 127, .28);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
    stroke-linejoin: round;
}

@media (max-width: 980px) {
    .header-inner { min-height: 78px; gap: 18px; }
    .brand img { width: 178px; }
    .nav-toggle-btn {
        display: grid;
        gap: 5px;
        margin-left: auto;
        padding: 10px;
        cursor: pointer;
    }
    .nav-toggle-btn span {
        width: 24px;
        height: 2px;
        background: var(--navy);
    }
    .main-nav {
        position: absolute;
        top: 78px;
        left: 14px;
        right: 14px;
        display: flex;
        flex-direction: column;
        gap: 0;
        padding: 10px 18px 18px;
        background: #fff;
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px);
        transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
    }
    .main-nav a { padding: 14px 0; }
    .main-nav a::after { display: none; }
    .nav-toggle:checked ~ .main-nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    .account-btn { min-height: 42px; padding: 0 14px; }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .service-grid { grid-template-columns: repeat(2, 1fr); }
    .split-grid,
    .footer-grid { grid-template-columns: 1fr; }
    .follow-panel { padding-left: 0; border-left: 0; }
    .footer-bottom { flex-wrap: wrap; justify-content: flex-start; }
}

@media (max-width: 640px) {
    .container { width: min(100% - 22px, 1120px); }
    .brand img { width: 150px; }
    .account-btn { font-size: 0; width: 42px; padding: 0; }
    .hero,
    .hero-inner { min-height: 612px; }
    .hero-photo {
        background:
            linear-gradient(180deg, rgba(0, 119, 206, .08) 0%, rgba(0, 119, 206, .4) 48%, rgba(0, 119, 206, .1) 100%),
            url("../images/hero-bayamon.jpg") center top / cover no-repeat;
    }
    .hero-inner { align-items: flex-end; padding-bottom: 58px; }
    .hero-card {
        padding: 30px 24px 28px;
        border-radius: 18px 48px 18px 18px;
    }
    .hero h1 { font-size: 44px; }
    .hero p:not(.eyebrow) { font-size: 17px; }
    .primary-btn { width: 100%; }
    .text-btn { margin: 0 auto; }
    .quick-grid,
    .service-grid { grid-template-columns: 1fr; }
    .quick-section { padding-top: 34px; }
    .quick-card { min-height: 166px; padding: 22px; }
    .section-row { align-items: flex-start; flex-direction: column; }
    .news-item { grid-template-columns: 82px 1fr auto; gap: 12px; }
    .news-item img { width: 82px; }
    .app-banner { align-items: flex-start; flex-direction: column; }
    .back-to-top { right: 16px; bottom: 16px; }
    [data-reveal],
    [data-reveal-item] { transform: translateY(18px); }
}

@media (max-width: 390px) {
    .header-inner { gap: 10px; }
    .brand img { width: 136px; }
    .hero,
    .hero-inner { min-height: 590px; }
    .hero-card { padding: 26px 20px; }
    .hero h1 { font-size: 39px; }
    .hero p:not(.eyebrow) { font-size: 16px; }
    .section-heading h2 { font-size: 23px; }
    .quick-card strong { font-size: 18px; }
    .news-item {
        grid-template-columns: 1fr auto;
    }
    .news-item img { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }

    [data-reveal],
    [data-reveal-item] {
        opacity: 1;
        transform: none;
    }
}
