/**
 * TMHS Cheer Booster Theme — Front-End Styles
 *
 * Styles for the block theme shell: sticky header, navigation,
 * footer, page layout, and integration with plugin shortcodes.
 *
 * Colors: Navy #162A50 · Silver #B8BBC2
 * Fonts: DM Sans (headings) · Plus Jakarta Sans (body)
 */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  CSS CUSTOM PROPERTIES (shared with plugin)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */
:root {
    --tmhs-nav-height: 60px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  GLOBAL RESETS & OVERRIDES
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Ensure the body uses our off-white bg */
body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    background-color: #F5F6F8;
    color: #111827;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Smooth scrolling with header offset */
html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--tmhs-nav-height);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  STICKY HEADER
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tmhs-site-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 999;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* When WP admin bar is showing */
.admin-bar .tmhs-site-header {
    top: 32px !important;
}
@media screen and (max-width: 782px) {
    .admin-bar .tmhs-site-header {
        top: 46px !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  SITE LOGO
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tmhs-site-logo img {
    border-radius: 0;
    width: 200px;
    height: auto;
    object-fit: contain;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  SITE TITLE IN HEADER
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tmhs-site-header .wp-block-site-title a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: 'DM Sans', system-ui, sans-serif;
}
.tmhs-site-header .wp-block-site-title a:hover {
    opacity: 0.85;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  NAVIGATION LINKS
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tmhs-main-navigation .wp-block-navigation-item a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease, background-color 0.15s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.tmhs-main-navigation .wp-block-navigation-item a:hover,
.tmhs-main-navigation .wp-block-navigation-item a:focus {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.1);
}

/* Current / active page highlight */
.tmhs-main-navigation .wp-block-navigation-item.current-menu-item a,
.tmhs-main-navigation .wp-block-navigation-item--current a {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.12);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  MOBILE NAVIGATION OVERLAY
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tmhs-main-navigation .wp-block-navigation__responsive-container.is-menu-open {
    background-color: #162A50 !important;
    padding: 2rem 1.5rem;
}

.tmhs-main-navigation .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item a {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1.125rem;
    padding: 0.75rem 1rem;
    display: block;
}

.tmhs-main-navigation .wp-block-navigation__responsive-container.is-menu-open
    .wp-block-navigation-item a:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08);
}

/* Mobile hamburger / close button color */
.tmhs-main-navigation .wp-block-navigation__responsive-container-open,
.tmhs-main-navigation .wp-block-navigation__responsive-container-close {
    color: #ffffff !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  "BECOME A SPONSOR" NAV LINK  (pill style)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Desktop: white pill with navy text — always visible, stands out from other links.
   Both selectors use .tmhs-main-navigation prefix to beat the general
   .tmhs-main-navigation .wp-block-navigation-item a rule on specificity. */
.tmhs-main-navigation .wp-block-navigation-item.tmhs-nav-sponsor-link > a,
.tmhs-main-navigation .wp-block-navigation-item:has(> a[href*="/sponsorship"]) > a {
    background-color: #ffffff !important;
    color: #162A50 !important;
    font-weight: 700 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1.25rem !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease !important;
}

/* Hover: subtle lift + shadow */
.tmhs-main-navigation .wp-block-navigation-item.tmhs-nav-sponsor-link > a:hover,
.tmhs-main-navigation .wp-block-navigation-item.tmhs-nav-sponsor-link > a:focus,
.tmhs-main-navigation .wp-block-navigation-item:has(> a[href*="/sponsorship"]) > a:hover,
.tmhs-main-navigation .wp-block-navigation-item:has(> a[href*="/sponsorship"]) > a:focus {
    background-color: #ffffff !important;
    color: #162A50 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 42, 80, 0.25);
}

/* Mobile overlay: revert to normal link style so it blends with the other menu items */
.tmhs-main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.tmhs-nav-sponsor-link > a,
.tmhs-main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:has(> a[href*="/sponsorship"]) > a {
    background-color: transparent !important;
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500 !important;
    border-radius: 0.375rem !important;
    padding: 0.75rem 1rem !important;
    transform: none;
    box-shadow: none;
}
.tmhs-main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item.tmhs-nav-sponsor-link > a:hover,
.tmhs-main-navigation .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:has(> a[href*="/sponsorship"]) > a:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Prevent the desktop nav row from ever wrapping to a second line */
.tmhs-desktop-nav {
    flex-wrap: nowrap !important;
    align-items: center;
}
.tmhs-desktop-nav .wp-block-navigation__container {
    flex-wrap: nowrap !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  LOGIN / LOGOUT LINK
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tmhs-login-link a {
    color: rgba(255, 255, 255, 0.75) !important;
    text-decoration: none !important;
    font-size: 0.875rem;
    padding: 0.375rem 0.625rem;
    border-radius: 0.375rem;
    transition: color 0.15s ease;
}
.tmhs-login-link a:hover {
    color: #ffffff !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  FOOTER
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.tmhs-site-footer {
    margin-top: auto;
}

/* ━━━━━━━━━━━━━━━━━━ FOOTER LAYOUT ━━━━━━━━━━━━━━━━━━ */

.tmhs-footer-layout {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.tmhs-footer-mascot {
    flex-shrink: 0;
}

.tmhs-footer-mascot__img--wally {
    width: 110px;
    height: 170px;
    object-fit: contain;
    object-position: bottom;
}

.tmhs-footer-mascot__img--wilma {
    width: 90px;
    height: 140px;
    object-fit: contain;
    object-position: bottom;
}

.tmhs-footer-center {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    margin: 0 2rem;
}

.tmhs-footer-heading {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem;
}

.tmhs-footer-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.tmhs-footer-social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid #ffffff;
    color: #ffffff;
    background: transparent;
    text-decoration: none;
    transition: background-color 0.15s ease, transform 0.15s ease;
}

.tmhs-footer-social__link:hover {
    background: rgba(255,255,255,0.15);
    transform: scale(1.1);
    color: #ffffff;
}

.tmhs-footer-social__link svg {
    width: 20px;
    height: 20px;
}

.tmhs-footer-tax {
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1.8;
}

.tmhs-footer-tax p {
    margin: 0;
}

/* Hide mascots on small screens */
@media screen and (max-width: 640px) {
    .tmhs-footer-mascot {
        display: none;
    }
    .tmhs-footer-center {
        margin: 0;
    }
}

/* Smaller mascots on tablet */
@media screen and (min-width: 641px) and (max-width: 768px) {
    .tmhs-footer-mascot__img--wally {
        width: 80px;
        height: 120px;
    }
    .tmhs-footer-mascot__img--wilma {
        width: 65px;
        height: 100px;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  BUTTONS (global overrides)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.wp-element-button,
.wp-block-button__link {
    font-family: 'DM Sans', system-ui, sans-serif;
    font-weight: 700;
    text-decoration: none !important;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    letter-spacing: 0.01em;
}

.wp-element-button:hover,
.wp-block-button__link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(22, 42, 80, 0.15);
}

/* Outline button style */
.wp-block-button.is-style-outline .wp-block-button__link {
    border: 2px solid currentColor;
    background: transparent !important;
}
.wp-block-button.is-style-outline .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  CARDS (white cards with subtle border/shadow)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

.wp-block-group.has-white-background-color.has-border-color {
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.wp-block-group.has-white-background-color.has-border-color:hover {
    box-shadow: 0 6px 20px rgba(22, 42, 80, 0.08);
    transform: translateY(-2px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  HEADINGS (global)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

h1, h2, h3, h4, h5, h6 {
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  SHORTCODE INTEGRATION
 *  Ensure plugin shortcode output looks right
 *  inside the block theme's constrained layout.
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Full-bleed heroes should break out of content container */
.tmhs-hero {
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

/* Remove gap between sticky header and hero */
.wp-block-group > main.wp-block-group {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ensure hero sits flush against header */
.tmhs-hero:first-child {
    margin-top: 0 !important;
}

/* Mission / donate sections: full-width background, centered content */
.tmhs-mission-section,
.tmhs-donate-cta,
.tmhs-sponsor-cta-section,
.tmhs-spirit-wear-section {
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
}

/* Sections that should respect the 1200px content width */
.tmhs-section {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  PAGE LAYOUT
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Ensure min-height for main content area */
.wp-block-group > main.wp-block-group {
    min-height: calc(100vh - var(--tmhs-nav-height) - 200px);
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  RESPONSIVE ADJUSTMENTS
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Desktop: show nav + CTA, hide on mobile via WP's overlay menu */
@media screen and (max-width: 768px) {
    .tmhs-header-cta {
        display: none !important;
    }
    .tmhs-login-link {
        display: none !important;
    }
    .tmhs-header-tagline {
        display: none !important;
    }
}

/* Large screens: generous spacing */
@media screen and (min-width: 1024px) {
    .tmhs-main-navigation .wp-block-navigation-item a {
        padding: 0.5rem 1rem;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  SELECTION COLOR
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

::selection {
    background-color: #162A50;
    color: #ffffff;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  FOCUS STATES (accessibility)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

:focus-visible {
    outline: 2px solid #162A50;
    outline-offset: 2px;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  SCROLLBAR (optional polish)
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F6F8;
}
::-webkit-scrollbar-thumb {
    background: #B8BBC2;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9a9da4;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 *  PRINT STYLES
 * ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

@media print {
    .tmhs-site-header,
    .tmhs-site-footer,
    .tmhs-login-link {
        display: none !important;
    }
    body {
        background: #ffffff;
    }
}
