/*
Theme Name: HCCY Custom Theme
Theme URI: https://hccy.ca/
Author: Stephen Graetz
Description: Custom homepage theme inspired by the HCCY site layout.
Version: 1.3
Text Domain: hccy-custom
*/

:root {
    --hccy-blue: #1f4e9d;
    --hccy-navy: #12305b;
    --hccy-gold: #d9a441;
    --hccy-light: #f5f7fa;
    --hccy-text: #334155;
    --hccy-white: #ffffff;
    --hccy-border: #dbe3ec;
    --hccy-heading: #173b73;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Open Sans", Arial, sans-serif;
    color: var(--hccy-text);
    background: var(--hccy-white);
    line-height: 1.65;
}

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

a {
    color: var(--hccy-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-family: "Montserrat", Arial, sans-serif;
    color: var(--hccy-heading);
    line-height: 1.2;
}

p {
    margin-top: 0;
}

ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
}

.hccy-container {
    width: min(1200px, calc(100% - 48px));
    margin: 0 auto;
}

.hccy-topbar {
    background: var(--hccy-navy);
    color: var(--hccy-white);
    font-size: 14px;
}

.hccy-topbar a {
    color: var(--hccy-white);
}

.hccy-topbar-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.hccy-topbar-left,
.hccy-topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.hccy-header {
    background: var(--hccy-white);
    border-bottom: 1px solid var(--hccy-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.hccy-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding: 18px 0;
}

.hccy-logo-wrap {
    flex: 0 0 auto;
}

.hccy-logo-text {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--hccy-blue);
    letter-spacing: 1px;
}

.custom-logo {
    max-height: 78px;
    width: auto;
}

.hccy-main-nav {
    flex: 1 1 auto;
    display: flex;
    justify-content: flex-end;
}

.hccy-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--hccy-border);
    border-radius: 8px;
    background: var(--hccy-white);
    cursor: pointer;
}

.hccy-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--hccy-heading);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

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

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

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

.hccy-menu {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.hccy-menu li a {
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--hccy-heading);
    transition: color 0.2s ease;
}

.hccy-menu li a:hover {
    color: var(--hccy-gold);
}

.hccy-hero {
    position: relative;
}

.hccy-hero-slide {
    min-height: 580px;
    position: relative;
    display: flex;
    align-items: center;
    background:
        linear-gradient(rgba(18, 48, 91, 0.35), rgba(18, 48, 91, 0.35)),
        linear-gradient(135deg, #2a5fb7 0%, #12305b 100%);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hccy-hero-slide.has-hero-image {
    background-image:
        linear-gradient(rgba(18, 48, 91, 0.35), rgba(18, 48, 91, 0.35)),
        var(--hero-image);
}

.hccy-hero-content {
    position: relative;
    z-index: 2;
    max-width: 760px;
    color: var(--hccy-white);
    padding: 80px 0;
}

.hccy-hero-content h1 {
    color: var(--hccy-white);
    font-size: clamp(38px, 5vw, 56px);
    margin-bottom: 18px;
}

.hccy-hero-content p {
    font-size: 18px;
    margin-bottom: 28px;
    color: rgba(255, 255, 255, 0.94);
}

.hccy-hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hccy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 24px;
    border-radius: 8px;
    font-family: "Montserrat", Arial, sans-serif;
    font-size: 15px;
    font-weight: 700;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.hccy-btn-primary {
    background: var(--hccy-blue);
    color: var(--hccy-white);
}

.hccy-btn-primary:hover {
    background: var(--hccy-navy);
    color: var(--hccy-white);
}

.hccy-btn-secondary {
    background: transparent;
    border-color: var(--hccy-white);
    color: var(--hccy-white);
}

.hccy-btn-secondary:hover {
    background: var(--hccy-white);
    color: var(--hccy-navy);
}

.hccy-btn-outline {
    background: transparent;
    border-color: var(--hccy-blue);
    color: var(--hccy-blue);
}

.hccy-btn-outline:hover {
    background: var(--hccy-blue);
    color: var(--hccy-white);
}

.hccy-btn-gold {
    background: var(--hccy-gold);
    color: var(--hccy-navy);
}

.hccy-btn-gold:hover {
    background: #c8912f;
    color: var(--hccy-navy);
}

.hccy-btn-outline-light {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.8);
    color: var(--hccy-white);
}

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

.hccy-intro {
    padding: 80px 0;
    background: var(--hccy-white);
}

.hccy-intro-inner {
    max-width: 980px;
    text-align: center;
}

.hccy-intro h2 {
    font-size: clamp(30px, 4vw, 40px);
    margin-bottom: 20px;
}

.hccy-intro p {
    font-size: 17px;
    color: var(--hccy-text);
}

.hccy-cta-section {
    padding: 70px 0;
    background: var(--hccy-light);
}

.hccy-cta-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.hccy-card {
    background: var(--hccy-white);
    border-radius: 10px;
    padding: 32px 28px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.hccy-card h3 {
    font-size: 24px;
    margin-bottom: 14px;
}

.hccy-card p {
    margin-bottom: 22px;
}

.hccy-membership-band {
    padding: 85px 0;
    background: linear-gradient(135deg, var(--hccy-blue), var(--hccy-navy));
    color: var(--hccy-white);
    text-align: center;
}

.hccy-membership-inner {
    max-width: 860px;
}

.hccy-membership-band h2 {
    color: var(--hccy-white);
    font-size: clamp(32px, 4vw, 46px);
    margin-bottom: 12px;
}

.hccy-membership-band p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 26px;
}

.hccy-newsletter {
    padding: 80px 0;
    background: var(--hccy-white);
}

.hccy-newsletter-inner {
    max-width: 840px;
    text-align: center;
}

.hccy-newsletter h2 {
    font-size: clamp(30px, 4vw, 40px);
    margin-bottom: 14px;
}

.hccy-newsletter p {
    margin-bottom: 28px;
}

.hccy-newsletter-form {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}

.hccy-newsletter-form input[type="email"] {
    flex: 1 1 360px;
    max-width: 480px;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid var(--hccy-border);
    border-radius: 8px;
    font-size: 16px;
    outline: none;
}

.hccy-newsletter-form input[type="email"]:focus {
    border-color: var(--hccy-blue);
}

.hccy-footer {
    background: var(--hccy-navy);
    color: rgba(255, 255, 255, 0.88);
}

.hccy-footer a {
    color: rgba(255, 255, 255, 0.88);
}

.hccy-footer a:hover {
    color: var(--hccy-gold);
}

.hccy-footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr 1fr;
    gap: 36px;
    padding: 70px 0 50px;
}

.hccy-footer-col h3 {
    color: var(--hccy-white);
    font-size: 22px;
    margin-bottom: 20px;
}

.hccy-footer-col p,
.hccy-footer-col li {
    font-size: 15px;
    margin-bottom: 10px;
}

.hccy-footer-col ul li {
    margin-bottom: 10px;
}

.hccy-footer-menu {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hccy-social-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hccy-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 18px 0;
}

.hccy-footer-bottom-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.hccy-footer-bottom p {
    margin: 0;
    font-size: 14px;
}

@media (max-width: 1024px) {
    .hccy-cta-grid {
        grid-template-columns: 1fr;
    }

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

    .hccy-header-inner {
        gap: 18px;
        padding: 14px 0;
    }

    .custom-logo {
        max-height: 64px;
    }

    .hccy-menu {
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .hccy-container {
        width: min(100% - 28px, 1200px);
    }

    .hccy-topbar {
        display: none;
    }

    .hccy-header {
        position: sticky;
    }

    .hccy-header-inner {
        align-items: center;
        gap: 14px;
        padding: 10px 0;
    }

    .hccy-logo-wrap {
        flex: 1 1 auto;
        min-width: 0;
    }

    .custom-logo {
        max-height: 52px;
    }

    .hccy-menu-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .hccy-main-nav {
        display: none;
        flex: 0 0 100%;
        width: 100%;
        justify-content: flex-start;
        background: var(--hccy-white);
        border-top: 1px solid var(--hccy-border);
        padding-top: 12px;
    }

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

    .hccy-menu {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .hccy-menu li {
        width: 100%;
        border-bottom: 1px solid var(--hccy-border);
    }

    .hccy-menu li:last-child {
        border-bottom: 0;
    }

    .hccy-menu li a {
        display: block;
        width: 100%;
        padding: 12px 0;
    }

    .hccy-hero-slide {
        min-height: 420px;
        align-items: flex-end;
    }

    .hccy-hero-content {
        padding: 42px 0;
    }

    .hccy-hero-content h1 {
        font-size: clamp(30px, 9vw, 40px);
    }

    .hccy-hero-content p {
        font-size: 16px;
    }

    .hccy-hero-actions {
        gap: 12px;
    }

    .hccy-btn {
        width: 100%;
    }

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

    .hccy-footer-bottom-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Generic page content support */
.hccy-page-content {
    padding: 60px 0;
}

.hccy-page-content-inner {
    max-width: 1100px;
}

.hccy-page-entry {
    background: #fff;
}

.hccy-page-header {
    margin-bottom: 30px;
}

.hccy-page-title {
    margin: 0;
}

.hccy-page-body > *:first-child {
    margin-top: 0;
}

.hccy-page-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Editable homepage support
   The Home page content now lives inside WordPress instead of being hard-coded in front-page.php.
   These rules keep WordPress block wrappers from adding unwanted spacing to the imported homepage. */
.hccy-homepage.wp-block-group,
.hccy-homepage .wp-block-group {
    margin-top: 0;
    margin-bottom: 0;
}

.hccy-homepage .wp-block-heading {
    margin-top: 0;
}

.hccy-homepage .wp-block-buttons {
    margin: 0;
}

.hccy-homepage .wp-block-button__link {
    text-decoration: none;
}

/* SRC-inspired visual refresh
   This layer keeps the editable WordPress page setup intact while moving the theme toward a cleaner community-centre style. */
:root {
    --hccy-blue: #2457a6;
    --hccy-navy: #15365f;
    --hccy-gold: #d6a23d;
    --hccy-light: #f4f7fb;
    --hccy-soft-blue: #eaf1fb;
    --hccy-text: #34445a;
    --hccy-white: #ffffff;
    --hccy-border: #dfe8f3;
    --hccy-heading: #15365f;
    --hccy-muted: #69788d;
    --hccy-shadow: 0 20px 55px rgba(21, 54, 95, 0.11);
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

::selection {
    background: rgba(214, 162, 61, 0.28);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.025em;
}

.hccy-container {
    width: min(1180px, calc(100% - 48px));
}

.hccy-topbar {
    background: #102a4b;
    font-size: 13px;
    letter-spacing: 0.01em;
}

.hccy-topbar-inner {
    min-height: 38px;
}

.hccy-header {
    border-bottom: 1px solid rgba(223, 232, 243, 0.95);
    box-shadow: 0 8px 26px rgba(21, 54, 95, 0.06);
}

.hccy-header-inner {
    padding: 14px 0;
}

.custom-logo {
    max-height: 72px;
}

.hccy-menu {
    gap: 10px;
}

.hccy-menu li a {
    display: inline-flex;
    align-items: center;
    min-height: 42px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    color: var(--hccy-heading);
    transition: color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.hccy-menu li a:hover {
    color: var(--hccy-blue);
    background: var(--hccy-soft-blue);
}

/* Makes the last menu item look like the membership/action button if you place Donate or Membership last in Appearance > Menus. */
.hccy-menu li:last-child > a {
    background: var(--hccy-gold);
    color: var(--hccy-navy);
    box-shadow: 0 10px 24px rgba(214, 162, 61, 0.26);
}

.hccy-menu li:last-child > a:hover {
    background: #c9912f;
    color: var(--hccy-navy);
    transform: translateY(-1px);
}

.hccy-hero-slide {
    min-height: 560px;
    overflow: hidden;
    background:
        radial-gradient(circle at 80% 25%, rgba(214, 162, 61, 0.20), transparent 28%),
        linear-gradient(135deg, #f9fbff 0%, #edf4ff 52%, #ffffff 100%);
}

.hccy-hero-slide::after {
    content: "";
    position: absolute;
    inset: auto -12% -42% 52%;
    height: 78%;
    border-radius: 999px;
    background: rgba(36, 87, 166, 0.10);
    transform: rotate(-10deg);
}

.hccy-hero-slide.has-hero-image {
    background-image:
        linear-gradient(90deg, rgba(249, 251, 255, 0.98) 0%, rgba(249, 251, 255, 0.88) 45%, rgba(21, 54, 95, 0.20) 100%),
        var(--hero-image);
}

.hccy-hero-content {
    max-width: 760px;
    color: var(--hccy-text);
    padding: 90px 0;
}

.hccy-hero-content h1 {
    color: var(--hccy-heading);
    font-size: clamp(42px, 6vw, 70px);
    margin-bottom: 20px;
}

.hccy-hero-content p {
    max-width: 720px;
    font-size: clamp(17px, 2vw, 20px);
    color: var(--hccy-text);
}

.hccy-btn {
    min-height: 50px;
    padding: 13px 26px;
    border-radius: 999px;
}

.hccy-btn-primary {
    box-shadow: 0 14px 28px rgba(36, 87, 166, 0.22);
}

.hccy-btn-secondary {
    background: var(--hccy-white);
    border-color: var(--hccy-border);
    color: var(--hccy-navy);
}

.hccy-btn-secondary:hover {
    background: var(--hccy-soft-blue);
    color: var(--hccy-navy);
}

.hccy-intro {
    padding: 84px 0;
}

.hccy-intro h2,
.hccy-newsletter h2 {
    font-size: clamp(32px, 4vw, 48px);
}

.hccy-cta-section {
    padding: 78px 0;
}

.hccy-cta-grid {
    gap: 26px;
}

.hccy-card {
    border: 1px solid var(--hccy-border);
    border-radius: 22px;
    padding: 34px 30px;
    box-shadow: var(--hccy-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hccy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 24px 60px rgba(21, 54, 95, 0.16);
}

.hccy-card img,
.hccy-card .wp-block-image img {
    border-radius: 18px;
    margin-bottom: 22px;
}

.hccy-membership-band {
    padding: 90px 0;
    background:
        radial-gradient(circle at 14% 18%, rgba(214, 162, 61, 0.24), transparent 25%),
        linear-gradient(135deg, var(--hccy-blue), var(--hccy-navy));
}

/* Community-centre homepage sections
   These helper classes make regular WordPress blocks look like the cleaner SRC-style sections without hard-coding page content in the theme. */
.hccy-feature-strip {
    padding: 52px 0;
    background: var(--hccy-white);
}

.hccy-feature-strip .wp-block-columns,
.hccy-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.hccy-feature-strip .wp-block-column,
.hccy-feature-tile {
    min-height: 230px;
    padding: 28px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(244,247,251,0.95));
    border: 1px solid var(--hccy-border);
    box-shadow: var(--hccy-shadow);
}

.hccy-explore {
    padding: 82px 0;
    background: var(--hccy-white);
}

.hccy-explore h2 {
    text-align: center;
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 34px;
}

.hccy-explore-grid,
.hccy-explore .wp-block-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.hccy-explore-card,
.hccy-explore .wp-block-column {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: flex-end;
    padding: 24px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, var(--hccy-blue), var(--hccy-navy));
    color: var(--hccy-white);
    box-shadow: var(--hccy-shadow);
}

.hccy-explore-card h3,
.hccy-explore .wp-block-column h3 {
    color: var(--hccy-white);
    margin: 0;
}

.hccy-split-cta {
    padding: 78px 0;
    background: var(--hccy-light);
}

.hccy-split-cta .wp-block-columns,
.hccy-split-cta-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
}

.hccy-split-cta .wp-block-column,
.hccy-split-cta-card {
    padding: clamp(30px, 4vw, 48px);
    border-radius: 28px;
    background: var(--hccy-white);
    border: 1px solid var(--hccy-border);
    box-shadow: var(--hccy-shadow);
}

.hccy-split-cta .wp-block-column:first-child,
.hccy-split-cta-card:first-child {
    background: linear-gradient(135deg, var(--hccy-blue), var(--hccy-navy));
    color: var(--hccy-white);
}

.hccy-split-cta .wp-block-column:first-child h2,
.hccy-split-cta .wp-block-column:first-child h3,
.hccy-split-cta-card:first-child h2,
.hccy-split-cta-card:first-child h3 {
    color: var(--hccy-white);
}

.hccy-footer {
    background: #102a4b;
}

.hccy-footer-grid {
    padding: 74px 0 52px;
}

@media (max-width: 1024px) {
    .hccy-explore-grid,
    .hccy-explore .wp-block-columns {
        grid-template-columns: repeat(2, 1fr);
    }

    .hccy-feature-strip .wp-block-columns,
    .hccy-feature-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hccy-container {
        width: min(100% - 28px, 1180px);
    }

    .hccy-menu li a {
        border-radius: 0;
    }

    .hccy-menu li:last-child > a {
        border-radius: 999px;
        justify-content: center;
        margin: 12px 0;
    }

    .hccy-hero-slide {
        min-height: 430px;
        align-items: center;
    }

    .hccy-hero-content {
        padding: 48px 0;
    }

    .hccy-feature-strip .wp-block-columns,
    .hccy-feature-grid,
    .hccy-explore-grid,
    .hccy-explore .wp-block-columns,
    .hccy-split-cta .wp-block-columns,
    .hccy-split-cta-grid {
        grid-template-columns: 1fr;
    }
}
