/* ==================================================================
   TRI-COUNTY RESCUE - MAIN STYLES
   ==================================================================

   Organization:
       1. Reset / base
       2. Reusable layout helpers
       3. Buttons / typography
       4. Header / navigation
       5. Hero
       6. About
       7. Services
       8. Mission
       9. Join
      10. News
      11. Donation strip
      12. Footer
      13. Responsive styles

   For colors and global sizes, edit css/theme.css first.
   ================================================================== */


/* ==================================================================
   1. RESET / BASE
   ================================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
}

body.menu-open {
    overflow: hidden;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}


/* ==================================================================
   2. REUSABLE LAYOUT HELPERS
   ================================================================== */

.container {
    width: min(var(--site-width), calc(100% - (var(--page-gutter) * 2)));
    margin-inline: auto;
}

.section {
    padding-block: var(--section-space);
}

.section--compact {
    padding-block: var(--section-space-small);
}

.section--white {
    background: var(--color-white);
}

.section--muted {
    background: var(--color-background-muted);
    border-top: 1px solid var(--color-border-light);
    border-bottom: 1px solid var(--color-border-light);
}

.section--soft {
    background: var(--color-background-soft);
}

.section-heading {
    margin-bottom: 30px;
}

.section-heading--center {
    text-align: center;
}


/* ==================================================================
   3. TYPOGRAPHY / BUTTONS
   ================================================================== */

.eyebrow {
    margin: 0 0 7px;
    color: var(--color-primary);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: var(--color-white);
    opacity: 0.82;
}

.section-title {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.7rem);
    font-weight: 800;
    letter-spacing: 0.01em;
    line-height: 0.98;
    text-transform: uppercase;
}

.section-title--small {
    font-size: clamp(1.8rem, 3vw, 2.2rem);
}

.section-title--light {
    color: var(--color-white);
}

.button-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: var(--radius-small);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.035em;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition:
        background-color 160ms ease,
        border-color 160ms ease,
        color 160ms ease,
        transform 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.button--primary:hover {
    background: var(--color-primary-dark);
}

.button--outline-light {
    border-color: var(--color-white);
    background: transparent;
    color: var(--color-white);
}

.button--outline-light:hover {
    background: var(--color-white);
    color: var(--color-navy);
}

.button--light {
    background: var(--color-white);
    color: var(--color-primary);
}

.button--light:hover {
    background: #f7f7f7;
}

.text-link {
    color: var(--color-primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
    text-transform: uppercase;
}

.text-link:hover {
    text-decoration: underline;
}


/* ==================================================================
   4. HEADER / NAVIGATION
   ================================================================== */

.site-header {
    position: relative;
    z-index: 1000;
    background: var(--color-white);
    box-shadow: var(--shadow-header);
}

/* Top contact bar -------------------------------------------------- */

.top-bar {
    min-height: 36px;
    display: flex;
    align-items: center;
    background: var(--color-navy);
    color: var(--color-white);
}

.top-bar__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.top-bar__group {
    display: flex;
    align-items: center;
    gap: 18px;
}

.top-bar__group a {
    color: var(--color-white);
    font-size: 0.74rem;
    text-decoration: none;
    white-space: nowrap;
    opacity: 0.94;
}

.top-bar__group a:hover {
    opacity: 1;
    text-decoration: underline;
}

/* Main navigation bar --------------------------------------------- */

.nav-bar {
    background: var(--color-white);
}

.nav-bar__inner {
    min-height: 82px;
    display: flex;
    align-items: center;
    gap: 26px;
}

.brand {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 12px;
    color: var(--color-text);
    text-decoration: none;
}

.brand__logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
}

.brand__name {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: 0.025em;
    line-height: 0.84;
}

.brand__name-top,
.brand__name-bottom {
    display: block;
}

.brand__name-top {
    font-size: 1.42rem;
}

.brand__name-bottom {
    color: var(--color-primary);
    font-size: 2rem;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: stretch;
    gap: 24px;
}

.main-nav a {
    position: relative;
    display: flex;
    align-items: center;
    padding-block: 29px;
    color: var(--color-text);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.015em;
    text-decoration: none;
    text-transform: uppercase;
}

.main-nav a::after {
    position: absolute;
    right: 0;
    bottom: 18px;
    left: 0;
    height: 2px;
    background: transparent;
    content: "";
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--color-primary);
}

.main-nav a.is-active::after {
    background: var(--color-primary);
}

.nav-donate {
    flex: 0 0 auto;
}

/* Mobile hamburger button ----------------------------------------- */

.mobile-menu-button {
    width: 44px;
    height: 44px;
    display: none;
    margin-left: auto;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.mobile-menu-button span {
    width: 100%;
    height: 2px;
    display: block;
    margin: 5px 0;
    background: var(--color-navy);
    transition: transform 160ms ease, opacity 160ms ease;
}

.mobile-menu-button.is-open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mobile-menu-button.is-open span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-button.is-open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* ==================================================================
   5. HERO
   ================================================================== */

.hero {
    position: relative;
    min-height: 470px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background:
        var(--color-navy)
        url("../assets/images/hero.jpg")
        center right / cover
        no-repeat;
}

.hero::before {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(10, 24, 36, 0.97) 0%,
        rgba(10, 24, 36, 0.90) 32%,
        rgba(10, 24, 36, 0.52) 64%,
        rgba(10, 24, 36, 0.18) 100%
    );
    content: "";
}

.hero__content {
    position: relative;
    z-index: 1;
    padding-block: 68px;
    color: var(--color-white);
}

.hero h1 {
    max-width: 650px;
    margin: 0 0 20px;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: clamp(3rem, 7vw, 5.2rem);
    font-weight: 800;
    letter-spacing: 0.005em;
    line-height: 0.87;
    text-transform: uppercase;
}

.hero__description {
    max-width: 700px;
    margin: 0 0 28px;
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.7;
}


/* ==================================================================
   6. ABOUT
   ================================================================== */

.about-grid {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    align-items: center;
    gap: 60px;
}

.about-content p:not(.eyebrow) {
    max-width: 520px;
    margin: 18px 0 24px;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.about-photo {
    min-height: 250px;
    border-radius: var(--radius-medium);
    background:
        url("../assets/images/about.jpg")
        center / cover
        no-repeat;
    box-shadow: var(--shadow-small);
}


/* ==================================================================
   7. SERVICES
   ================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.service-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-white);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.service-card__image {
    width: 100%;
    height: 142px;
    object-fit: cover;
}

.service-card__icon {
    width: 56px;
    height: 56px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: -28px auto 0;
    border: 1px solid var(--color-border-light);
    border-radius: 50%;
    background: var(--color-white);
}

.service-card__icon svg {
    width: 31px;
    height: 31px;
    fill: none;
    stroke: var(--color-primary);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 3;
}

.service-card__body {
    padding: 10px 18px 20px;
    text-align: center;
}

.service-card__body h3 {
    margin: 0 0 8px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.service-card__body p {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
}


/* ==================================================================
   8. MISSION STRIP
   ================================================================== */

.mission-strip {
    padding-block: 38px;
    border-top: 3px solid var(--color-navy-light);
    background: var(--color-navy);
    color: var(--color-white);
}

.mission-strip__grid {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 28px;
}

.mission-strip__logo {
    width: 90px;
    height: 90px;
    object-fit: contain;
}

.mission-strip p:not(.eyebrow) {
    max-width: 940px;
    margin: 9px 0 0;
    color: #e9edf0;
    font-size: 0.88rem;
}


/* ==================================================================
   9. JOIN / VOLUNTEER
   ================================================================== */

.join-grid {
    display: grid;
    grid-template-columns: 1.2fr 1.25fr auto;
    align-items: center;
    gap: 42px;
}

.join-heading {
    display: flex;
    align-items: center;
    gap: 18px;
}

.join-heading__icon {
    color: var(--color-primary);
    font-size: 3.2rem;
    line-height: 1;
}

.join-description {
    margin: 0;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}


/* ==================================================================
   10. NEWS
   ================================================================== */

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.news-card {
    display: grid;
    grid-template-columns: 42% 58%;
    overflow: hidden;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-medium);
    background: var(--color-white);
}

.news-card__image {
    width: 100%;
    height: 100%;
    min-height: 190px;
    object-fit: cover;
}

.news-card__body {
    padding: 18px;
}

.news-card__category {
    color: var(--color-primary);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.news-card h3 {
    margin: 7px 0 9px;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.02;
}

.news-card p {
    margin: 0 0 14px;
    color: var(--color-text-muted);
    font-size: 0.78rem;
    line-height: 1.55;
}


/* ==================================================================
   11. DONATION / SUPPORT STRIP
   ================================================================== */

.support-strip {
    padding-block: 28px;
    background: var(--color-primary);
    color: var(--color-white);
}

.support-strip__inner,
.support-strip__copy {
    display: flex;
    align-items: center;
}

.support-strip__inner {
    justify-content: space-between;
    gap: 30px;
}

.support-strip__copy {
    gap: 20px;
}

.support-strip__icon {
    font-size: 2.8rem;
    line-height: 1;
}

.support-strip h2 {
    margin: 0;
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 2rem;
    line-height: 1;
    text-transform: uppercase;
}

.support-strip p {
    margin: 5px 0 0;
    font-size: 0.84rem;
}


/* ==================================================================
   12. FOOTER
   ================================================================== */

.site-footer {
    padding: 42px 0 16px;
    background: var(--color-navy);
    color: var(--color-white);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 0.8fr 1fr 0.75fr;
    gap: 30px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
}

.footer-brand img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.footer-brand__name {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 0.84;
}

.footer-brand__name span,
.footer-brand__name strong {
    display: block;
}

.footer-brand__name span {
    font-size: 1.35rem;
}

.footer-brand__name strong {
    color: #e0262d;
    font-size: 2rem;
}

.footer-brand-column > p {
    margin: 0;
    color: #eef2f5;
    font-size: 0.76rem;
}

.footer-ein {
    margin-top: 12px !important;
}

.footer-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    padding-left: 22px;
    border-left: 1px solid rgba(255, 255, 255, 0.22);
}

.footer-column h3 {
    margin: 0 0 9px;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.footer-column p,
.footer-column a {
    margin: 0;
    color: #eef2f5;
    font-size: 0.72rem;
    line-height: 1.55;
    text-decoration: none;
}

.footer-column a:hover {
    color: var(--color-white);
    text-decoration: underline;
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
    color: #bec7ce;
    font-size: 0.68rem;
    text-align: center;
}


/* ==================================================================
   13. RESPONSIVE STYLES
   ================================================================== */

/* Medium desktop / tablet ----------------------------------------- */
@media (max-width: 1100px) {
    .main-nav {
        gap: 16px;
    }

    .main-nav a {
        font-size: 0.7rem;
    }

    .services-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-column {
        padding-left: 0;
        border-left: 0;
    }
}


/* Tablet navigation ------------------------------------------------ */
@media (max-width: 900px) {
    .top-bar__group--right a:not(:first-child) {
        display: none;
    }

    .nav-bar__inner {
        position: relative;
        min-height: 76px;
    }

    .brand__logo {
        width: 52px;
        height: 52px;
    }

    .brand__name-top {
        font-size: 1.2rem;
    }

    .brand__name-bottom {
        font-size: 1.7rem;
    }

    .mobile-menu-button {
        display: block;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        right: calc(var(--page-gutter) * -1);
        left: calc(var(--page-gutter) * -1);
        display: none;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 10px var(--page-gutter) 18px;
        border-top: 1px solid var(--color-border-light);
        background: var(--color-white);
        box-shadow: var(--shadow-small);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav a {
        width: 100%;
        padding: 13px 0;
        border-bottom: 1px solid var(--color-border-light);
        font-size: 0.78rem;
    }

    .main-nav a::after {
        display: none;
    }

    .nav-donate {
        padding-inline: 18px;
    }

    .about-grid {
        grid-template-columns: 1fr 1fr;
        gap: 34px;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .join-grid {
        grid-template-columns: 1fr 1fr;
    }

    .join-grid > .button {
        grid-column: 1 / -1;
        justify-self: start;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card {
        grid-template-columns: 250px 1fr;
    }
}


/* Mobile ----------------------------------------------------------- */
@media (max-width: 700px) {
    :root {
        --page-gutter: 18px;
        --section-space: 48px;
    }

    .top-bar__inner {
        min-height: 36px;
    }

    .top-bar__group {
        gap: 12px;
    }

    .top-bar__group a {
        font-size: 0.68rem;
    }

    .top-bar__group:first-child a:nth-child(2),
    .top-bar__group:first-child a:nth-child(3),
    .top-bar__group--right {
        display: none;
    }

    .nav-bar__inner {
        gap: 12px;
    }

    .brand__name {
        display: none;
    }

    .nav-donate {
        min-height: 40px;
        padding: 10px 14px;
        font-size: 0.7rem;
    }

    .hero {
        min-height: 520px;
        background-position: 63% center;
    }

    .hero::before {
        background: rgba(10, 24, 36, 0.76);
    }

    .hero__content {
        padding-block: 62px;
    }

    .hero h1 {
        max-width: 520px;
        font-size: clamp(3.2rem, 16vw, 4.8rem);
    }

    .about-grid,
    .mission-strip__grid,
    .join-grid {
        grid-template-columns: 1fr;
    }

    .about-photo {
        min-height: 220px;
        order: -1;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .service-card {
        display: grid;
        grid-template-columns: 145px 1fr;
        min-height: 145px;
    }

    .service-card__image {
        width: 145px;
        height: 100%;
        min-height: 145px;
    }

    .service-card__icon {
        display: none;
    }

    .service-card__body {
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 18px;
        text-align: left;
    }

    .mission-strip__logo {
        width: 76px;
        height: 76px;
    }

    .join-heading {
        align-items: flex-start;
    }

    .join-grid {
        gap: 24px;
    }

    .join-grid > .button {
        grid-column: auto;
    }

    .news-card {
        grid-template-columns: 1fr;
    }

    .news-card__image {
        min-height: 190px;
    }

    .support-strip__inner,
    .support-strip__copy {
        align-items: flex-start;
    }

    .support-strip__inner {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}


/* Small mobile ----------------------------------------------------- */
@media (max-width: 480px) {
    .button-group {
        width: 100%;
        flex-direction: column;
    }

    .button-group .button {
        width: 100%;
    }

    .service-card {
        grid-template-columns: 112px 1fr;
    }

    .service-card__image {
        width: 112px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }
}


/* Accessibility: reduce animation when requested ------------------ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
