/*
Theme Name:  Astra Child (HCHS)
Theme URI:   https://dev.huntingdonhistory.org
Description: Astra child theme for the Huntingdon County Historical Society. Carries the site-wide custom CSS (palette, header banners, navigation, The Events Calendar overrides) that previously lived in the WordPress Customizer "Additional CSS" (post ID 2339 in junr_posts). This child theme is now the canonical home for that CSS so it survives Astra parent-theme updates. Post 2339 is preserved in the database for reference only.
Author:      Glenn (HCHS WordPress)
Template:    astra
Version:     1.0.0
Text Domain: astra-child
*/

/* ============================================================
   HCHS SITE-WIDE CSS
   Ported 2026-06-05 from Customizer post ID 2339 (junr_posts).
   Palette:  bg #f3f3f3  |  text #303030  |  gold #be9656
   The parent Astra stylesheet is enqueued first (see functions.php),
   then this file, so these rules win on equal specificity.
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:ital@1&display=swap");

.site-title, .site-title a {
    font-family: "Playfair Display", Georgia, serif !important;
    font-size: clamp(1rem, 4.5vw, 52px) !important;
    line-height: 1.2 !important;
}

.site-description {
    font-family: "Lato", sans-serif !important;
    font-style: italic !important;
    font-size: clamp(1rem, 1.5vw, 18px) !important;
}

.hchs-header-banner {
    display: none !important;
}

body:not(.home) .ast-above-header-bar {
    background-image: url("https://dev.huntingdonhistory.org/wp-content/uploads/2017/03/Site-HeaderSm.jpg");
    background-size: cover;
    background-position: center;
}

body.home .hchs-header-banner { display: none !important; }
body.home .ast-above-header-wrap { padding-top: 0; }
body.home .site-header .site-description { display: block !important; }

/* Strip all top spacing between menu and banner */
body.home #page,
body.home #content,
body.home #primary,
body.home .site-main,
body.home .ast-container,
body.home .ast-separate-container,
body.home article.page,
body.home .entry-content,
body.home .entry-content > *:first-child,
body.home figure.wp-block-image {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Homepage banner: edge-to-edge, top/bottom border, text overlay */
body.home .entry-content .hchs-banner-wrap {
    position: relative;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    border-top: 20px solid black !important;
    border-bottom: 20px solid black !important;
    box-sizing: border-box !important;
    display: block;
}

body.home .entry-content .hchs-banner-wrap img {
    width: 100% !important;
    display: block !important;
}

body.home .hchs-banner-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.30);
    text-align: center;
    width: 33%;
    height: 40%;
    padding-left: 5%;
    padding-right: 5%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    container-type: inline-size;
    overflow: hidden;
}

body.home .hchs-tagline-serif {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    color: #ffffff !important;
    font-size: 12cqw;
    margin: 0 0 4px 0;
    line-height: 1.2;
    white-space: nowrap;
}

body.home .hchs-tagline-sans {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-style: normal;
    color: #ffdd00 !important;
    font-size: 7.2cqw;
    text-transform: uppercase;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
}

body:not(.home) .ast-site-identity { display: none !important; }
body:not(.home) .ast-above-header-wrap,
body:not(.home) .ast-above-header-bar,
body:not(.home) .site-above-header-wrap,
body:not(.home) .ast-above-header-wrap .ast-builder-grid-row,
body:not(.home) .ast-above-header-wrap .ast-container,
body:not(.home) .ast-above-header-wrap .site-header-above-section-center,
body:not(.home) .ast-above-header-wrap .ast-builder-layout-element,
body:not(.home) .ast-above-header-wrap .ast-header-html-1,
body:not(.home) .ast-above-header-wrap .ast-builder-html {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}
body:not(.home) .ast-above-header-bar {
    height: 100px !important;
    overflow: hidden !important;
}

body.home .entry-header { display: none !important; }

/* Force primary nav bar to exactly 35px */
.ast-primary-header-bar .site-primary-header-wrap {
    min-height: 35px !important;
    max-height: 35px !important;
}
.ast-primary-header-bar .main-header-menu > .menu-item {
    line-height: 35px !important;
}
.ast-primary-header-bar .main-header-menu > .menu-item > .menu-link {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

@media (max-width: 600px) {
    body.home .hchs-banner-overlay {
        width: 80%;
        height: 70%;
    }
    body.home .hchs-tagline-serif {
        font-size: 8cqw;
    }
    body.home .hchs-tagline-sans {
        font-size: 4.8cqw;
    }
    body.home .site-title,
    body.home .site-title a {
        font-size: 5.2vw !important;
    }
}

/* ====================================================
   COLOR PALETTE: #f3f3f3 bg | #303030 text | #be9656 gold
   ==================================================== */

body {
    background-color: #f3f3f3;
    color: #303030;
}

a, a:visited { color: #be9656; }
a:hover { color: #303030; }

h1, h2, h3, h4, h5, h6 { color: #303030; }

/* Buttons site-wide */
.ast-button,
.ast-custom-button,
.wp-block-button__link,
input[type="submit"],
button[type="submit"],
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.ast-on-card-button {
    background-color: #be9656 !important;
    border-color: #be9656 !important;
    color: #ffffff !important;
}
.ast-button:hover,
.ast-custom-button:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.ast-on-card-button:hover {
    background-color: #303030 !important;
    border-color: #303030 !important;
    color: #ffffff !important;
}

/* Nav bar */
.ast-primary-header-bar,
.ast-primary-header-bar .main-header-bar {
    background-color: #303030;
}
.ast-primary-header-bar a,
.ast-primary-header-bar .menu-link {
    color: #ffffff !important;
}
.ast-primary-header-bar a:hover,
.ast-primary-header-bar .menu-link:hover {
    color: #be9656 !important;
}
.ast-primary-header-bar .sub-menu {
    background-color: #303030;
}
.ast-primary-header-bar .sub-menu a { color: #ffffff !important; }
.ast-primary-header-bar .sub-menu a:hover { color: #be9656 !important; }

/* =====================
   THE EVENTS CALENDAR
   ===================== */

/* Override TEC's default blue at root so ALL TEC elements get gold */
:root {
    --tec-color-accent-primary: #be9656;
    --tec-color-accent-primary-hover: #303030;
    --tec-color-accent-primary-active: #303030;
    --tec-color-accent-primary-background: rgba(190, 150, 86, 0.07);
    --tec-color-accent-primary-background-datepicker: rgba(190, 150, 86, 0.12);
    --tec-color-background-primary-multiday: rgba(190, 150, 86, 0.24);
    --tec-color-background-primary-multiday-hover: rgba(190, 150, 86, 0.34);
    --tec-color-event-icon-hover: #be9656;
    --tec-color-icon-focus: #be9656;
    --tec-color-link-accent: #be9656;
    --tec-color-link-accent-hover: #303030;
}

/* Events view background: use site gray instead of TEC white */
.tribe-events-view,
.tribe-events-header,
.tribe-events-header__events-bar {
    background-color: #f3f3f3 !important;
}

/* Find Events button: explicit gold override */
.tribe-events .tribe-events-c-search__button,
.tribe-events button.tribe-events-c-search__button {
    background-color: #be9656 !important;
    border-color: #be9656 !important;
    color: #ffffff !important;
}
.tribe-events .tribe-events-c-search__button:hover,
.tribe-events button.tribe-events-c-search__button:hover {
    background-color: #303030 !important;
    border-color: #303030 !important;
}

/* Nav arrows and border buttons */
.tribe-events-c-nav__list-item-link,
.tribe-common-c-btn-border {
    color: #be9656;
    border-color: #be9656;
}
.tribe-common-c-btn-border:hover {
    background-color: #be9656;
    color: #ffffff;
}

/* NOTE: A Sugar Calendar (#sc_*) override block existed in post 2339.
   Sugar Calendar is permanently deactivated for this site, so those
   selectors never render and were intentionally NOT ported here.
   Do not re-add them; do not re-enable Sugar Calendar. */
