/*
 Theme Name:   Kadence Harrington Child
 Theme URI:    https://harrington.city/
 Description:  Child theme for Harrington.city
 Author:       Roo
 Template:     kadence
 Version:      1.8.0
*/

:root {
    /* Force 4:3 aspect ratio scaling for perfect continuity across containers */
    --hero-bg-size: 100vw 75vw;
    /* Precise VW offset ensures city aligns exactly regardless of container height */
    --hero-bg-pos: center calc(-33vw);
}

/* -------------------------------------------------------------------------
 * 1. Absolute Full-Bleed Header
 * ------------------------------------------------------------------------- */
html, body, #wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

#masthead, 
.site-header, 
.site-main-header-wrap, 
.site-header-row-container-inner, 
.site-main-header-inner-wrap,
#masthead .site-container {
    max-width: 100vw !important;
    width: 100% !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

#masthead {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
}

/* -------------------------------------------------------------------------
 * 2. Permanent Fuzzed City Background (Perfect Continuity)
 * ------------------------------------------------------------------------- */
/* The image sits at the back of the masthead */
#masthead::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('https://www.harrington.city/wp-content/uploads/2024/01/Image-1.jpg') !important;
    background-size: var(--hero-bg-size) !important;
    background-position: var(--hero-bg-pos) !important;
    background-repeat: no-repeat !important;
    z-index: -1;
}

/* The glassmorphism layer sits OVER the image, blurring it */
.site-main-header-inner-wrap {
    position: relative;
    background-color: rgba(15, 23, 42, 0.25) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    padding: 10px 4% !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: background-color 0.4s ease;
    z-index: 10;
}

body.is-scrolled .site-main-header-inner-wrap {
    background-color: rgba(15, 23, 42, 0.7) !important; 
}

/* -------------------------------------------------------------------------
 * 3. Logo Style
 * ------------------------------------------------------------------------- */
img.custom-logo {
    background-color: #ffffff !important;
    padding: 8px !important;
    border-radius: 50% !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.4) !important;
    max-height: 80px !important;
    width: 80px !important;
    object-fit: contain;
    display: block !important;
    transition: all 0.4s ease;
}

body.is-scrolled img.custom-logo {
    max-height: 50px !important;
    width: 50px !important;
    padding: 4px !important;
}

/* -------------------------------------------------------------------------
 * 4. Hero Section - Short, Seamless, Jank-Free
 * ------------------------------------------------------------------------- */

/* Make hero container full width */
.entry-hero .site-container {
    max-width: 100vw !important;
    width: 100% !important;
    padding: 0 !important;
}

.entry-hero.page-hero-section {
    position: relative;
    z-index: 1;
    min-height: 200px !important; 
    width: 100% !important;
    margin: 0 !important;
    background: #0f172a;
}

/* Hero scrolls normally. Background matches masthead perfectly. */
.entry-header.page-title {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 200px !important;
    width: 100% !important;
    background-image: url('https://www.harrington.city/wp-content/uploads/2024/01/Image-1.jpg') !important;
    background-size: var(--hero-bg-size) !important;
    background-position: var(--hero-bg-pos) !important; 
    background-repeat: no-repeat !important;
    background-attachment: scroll !important; 
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    padding-bottom: 20px !important; 
    position: relative;
    overflow: hidden;
}

/* Remove all dimming overlays */
.entry-header::before { display: none !important; }

.entry-title {
    color: #ffffff !important;
    text-shadow: 0 2px 10px rgba(0,0,0,0.8);
    font-size: 3rem !important;
    font-weight: 800 !important;
    z-index: 2;
    transition: all 0.3s ease;
    text-align: center;
}

body.is-scrolled .entry-title {
    opacity: 0;
    transform: translateY(-10px);
}

/* Ensure content section has normal width */
#primary.content-area > .site-container {
    max-width: 1290px !important;
    margin: 0 auto !important;
}

/* -------------------------------------------------------------------------
 * 5. Header Title Replacement
 * ------------------------------------------------------------------------- */
.dynamic-page-title {
    display: block;
    position: absolute;
    left: 110px;
    top: 50%;
    transform: translateY(20px);
    opacity: 0;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    transition: all 0.4s ease;
    pointer-events: none;
}

body.is-scrolled .site-title {
    opacity: 0;
    transform: translateY(-20px);
}

body.is-scrolled .dynamic-page-title {
    opacity: 1;
    transform: translateY(-50%);
}

@media (max-width: 991px) {
    .dynamic-page-title { left: 70px; font-size: 1.2rem; }
}

/* -------------------------------------------------------------------------
 * Global Typography & Links
 * ------------------------------------------------------------------------- */
.site-header .main-navigation a, 
.site-header .header-navigation a {
    color: #ffffff !important;
    font-weight: 600 !important;
}

body {
    background-color: #f8fafc;
    color: #334155;
    font-size: 18px;
    font-family: 'Inter', sans-serif;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
}
