html,
body {
    min-width: var(--site-min-width);
    overflow-y: auto;
}

body {
    color: #0e0e0e;
    hyphens: none;
    -webkit-hyphens: none;
    -ms-hyphens: none;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding-top: 2rem; /* Adjust based on your header height */
    font-weight: 400;
    overflow-x: hidden;
}

body.landing .box {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
}

body.landing #main {
    margin-top: 0;
    padding-top: 0;
}

.box,
.row,
.col-12 {
    overflow-x: visible;
}

.box {
    padding-top: 0;
}

#header {
    position: fixed;
    top: 0; 
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(14, 14, 14, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

#header.alt {
    position: fixed;
    background: rgba(14, 14, 14, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#header:not(.alt) {
    background: rgba(14, 14, 14, 1);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

#banner {
    display: none; /* Hide the old banner */
}

/* Position the new banner section at the top */
/* #bannernew {
    position: relative;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    height: 500px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 2rem;
} */

/* #bannernew video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
}*/

/* not full width was causing horizontal scroll issues */
#bannernew {
    position: relative;
    width: 100%;        /* Changed from 100vw */
    margin-left: 0 !important;     /* Remove the negative margin */
    height: 100vh;
    overflow: visible;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
    background: transparent;
}


#bannernew video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100% !important;        /* Changed from 100vw */
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

#bannernew h1,
#bannernew h3 {
    position: relative;
    z-index: 1;
    color: white;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    margin: 0.5rem 0;
}

#bannernew h1 {
    font-size: 3rem;
    font-weight: bold;
}

#bannernew h3 {
    font-size: 1.5rem;
    font-weight: 300;
}


#page-wrapper {
    background: transparent;
}  

.widget-image {
    text-align: center;
}

span.image.image--with-link.image {
    display: inline-block;
    max-width: 50%;    
}

/* Intro/chairman section — transparent so video shows through */
.widget-row:nth-of-type(n+2) {
    background: #fff;
    position: relative;
    z-index: 1;
    padding: 2.5rem;
    border-radius: 10px;    
    margin: 2.5rem 0;
    box-shadow: 0 10px 30px rgba(110, 51, 87, 0.8), 0 4px 8px rgba(110, 51, 87, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.widget-row:nth-of-type(2) .editor h2,
.widget-row:nth-of-type(2) .editor p,
.widget-row:nth-of-type(2) .editor a {
    color: #0e0e0e;
    /* text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.9);*/
}

/* Style Chair of Board image differently */
.widget-row:nth-of-type(2) .widget-image img {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

/* Rows 3 onwards sit on top of the video */
.widget-row:nth-of-type(n+3) {
    position: relative;
    z-index: 1;
    background: white;
}

/* Make the second widget-row pop with card-like styling */
/* .widget-row:nth-of-type(n+3) { */
/*     background: white; */
/*     border-radius: 12px; */
/*     box-shadow: 0 10px 30px rgba(110, 51, 87, 0.8), 0 4px 8px rgba(110, 51, 87, 0.8); */
/*     padding: 2.5rem; */
/*     margin: 4rem 0 5rem 0; */
/*     border: 1px solid rgba(0, 0, 0, 0.05); */
    /* transition: transform 0.3s ease, box-shadow 0.3s ease; 
} */

/*.widget-row:nth-of-type(3):hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 6px 12px rgba(0, 0, 0, 0.1);
}*/

/* Style the call to action buttons */
ul.calltoaction {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
    font-size: 0;
}

ul.calltoaction .list__item {
    display: inline-block;
    width: calc(50% - 0.5rem);
    margin-right: 1rem;
    margin-bottom: 1rem;
    vertical-align: top;
    font-size: 1rem;
}

ul.calltoaction .list__item:nth-child(2n) {
    margin-right: 0;
}

ul.calltoaction .list__link {
    display: block;
    padding: 1rem 2rem;
    background-color: #6e3357;
    color: white !important;
    text-align: center;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
}

ul.calltoaction .list__link:hover {
    background-color: #1e4580;
    box-shadow: 0 4px 8px rgba(41, 92, 168, 0.3);
    transform: translateY(-2px);
}

/* Felt pen underline effect for h2 in widget-row 4 (Our Priorities and Our Ambitions) */
.widget-row:nth-of-type(4) .editor h2 {
    position: relative;
    padding-bottom: 0.5rem;
    display: inline-block;
    width: fit-content;
}

.widget-row:nth-of-type(4) .editor h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, 
        #6e335780 0%, 
        #6e3357 10%, 
        #6e3357 90%, 
        #6e335780 100%);
    border-radius: 50%;
    transform: scaleY(0.8) rotate(-0.5deg);
}



/* Make "Mansfield is a place where we" stand out with card styling */
.placeTitle {
    font-size: 2rem;
    font-weight: 700;
    color: #6e3357;
    text-align: center;
    padding: 2rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(110, 51, 87, 0.15), 0 4px 8px rgba(110, 51, 87, 0.1);
    border: 1px solid rgba(110, 51, 87, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}



.theme-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Add hover effect to show it's clickable */
.theme-card-link:hover .build-section h2,
.theme-card-link:hover .create-section h2,
.theme-card-link:hover .grow-section h2,
.theme-card-link:hover .enjoy-section h2 {
    text-decoration: underline;
}

/* Focus state for accessibility */
.theme-card-link:focus {
    outline: 3px solid #6e3357;
    outline-offset: 4px;
    border-radius: 12px;
}

/* Enhance existing card hover with cursor */
.theme-card-link {
    cursor: pointer;
}

/* Make the Build widget-row pop with card-like styling using blue shadow */
.widget-row:nth-of-type(6) {
    /* background: white; */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(41, 92, 168, 0.15), 0 4px 8px rgba(41, 92, 168, 0.1);
    /* padding: 2.5rem; */
    /* margin: 2rem 0; */
    border: 1px solid rgba(41, 92, 168, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-row:nth-of-type(6):hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(41, 92, 168, 0.5), 0 6px 12px rgba(41, 92, 168, 0.5);
}

.widget-row:nth-of-type(7) {
    /* background: white; */
    /* border-radius: 12px; */
    box-shadow: 0 10px 30px rgba(198, 32, 98, 0.15), 0 4px 8px rgba(198, 32, 98, 0.1);
    /* padding: 2.5rem; */
    /* margin: 2rem 0; */
    border: 1px solid rgba(198, 32, 98, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-row:nth-of-type(7):hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(198, 32, 98, 0.5), 0 6px 12px rgba(198, 32, 98, 0.5);
}

/* Make the Grow widget-row pop with card-like styling using green shadow */
.widget-row:nth-of-type(8) {
    /* background: white; */
    /* border-radius: 12px; */
    box-shadow: 0 10px 30px rgba(52, 169, 54, 0.15), 0 4px 8px rgba(52, 169, 54, 0.1);
    padding: 2.5rem;
    /* margin: 2rem 0; */
    border: 1px solid rgba(52, 169, 54, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-row:nth-of-type(8):hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(52, 169, 54, 0.5), 0 6px 12px rgba(52, 169, 54, 0.5);
}

/* Make the Enjoy widget-row pop with card-like styling using orange shadow */
.widget-row:nth-of-type(9) {
    /* background: white; */
    /* border-radius: 12px; */
    box-shadow: 0 10px 30px rgba(254, 114, 61, 0.15), 0 4px 8px rgba(254, 114, 61, 0.1);
    /* padding: 2.5rem; */
    /* margin: 2rem 0; */
    border: 1px solid rgba(254, 114, 61, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.widget-row:nth-of-type(9):hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(254, 114, 61, 0.5), 0 6px 12px rgba(254, 114, 61, 0.5);
}

/* Align Build logo and h2 on same level */
.build-section {
    display: block;
    height: 100%;
    position: relative;
}

.build-section .imageCaption {
    display: inline-block;
    vertical-align: middle;
    margin-right: 1rem;
    margin-bottom: 0;
}

.build-section .imageCaption img {
    display: block;
    margin: 0;
    max-height: 5rem;
}

.build-section h2 {
    display: inline-block;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    padding-bottom: 0.5rem;
}

.build-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    border-radius: 50%;
    transform: scaleY(0.8) rotate(-0.5deg);
}

.build-section .section-description {
    display: block;
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 2rem;
}

/* Theme-specific felt pen underlines */
.build-section h2.theme-build::after {
    background: linear-gradient(to right, 
        rgba(41, 92, 168, 0.5) 0%, 
        #295ca8 10%, 
        #295ca8 90%, 
        rgba(41, 92, 168, 0.5) 100%);
}

/* Theme-specific felt pen underlines for Create */
.create-section h2.theme-create::after {
    background: linear-gradient(to right, 
        rgba(198, 32, 98, 0.5) 0%, 
        #c62062 10%, 
        #c62062 90%, 
        rgba(198, 32, 98, 0.5) 100%);
}

/* Theme-specific felt pen underlines for Grow */
.grow-section h2.theme-grow::after {
    background: linear-gradient(to right, 
        rgba(52, 169, 54, 0.5) 0%, 
        #34a936 10%, 
        #34a936 90%, 
        rgba(52, 169, 54, 0.5) 100%);
}

/* Theme-specific felt pen underlines for Enjoy */
.enjoy-section h2.theme-enjoy::after {
    background: linear-gradient(to right, 
        rgba(254, 114, 61, 0.5) 0%, 
        #fe723d 10%, 
        #fe723d 90%, 
        rgba(254, 114, 61, 0.5) 100%);
}

.create-section {
    display: block;
    height: 100%;
    position: relative;
}

.create-section .imageCaption {
    display: inline-block;
    vertical-align: middle;
    margin-right: 1rem;
    margin-bottom: 0;
}

.create-section .imageCaption img {
    display: block;
    margin: 0;
    max-height: 5rem;
}

.create-section h2 {
    display: inline-block;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    padding-bottom: 0.5rem;
}

.create-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    border-radius: 50%;
    transform: scaleY(0.8) rotate(-0.5deg);
}

.create-section .section-description {
    display: block;
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 2rem;
}

/* Align Grow logo and h2 on same level */
.grow-section {
    display: block;
    height: 100%;
    position: relative;
}

.grow-section .imageCaption {
    display: inline-block;
    vertical-align: middle;
    margin-right: 1rem;
    margin-bottom: 0;
}

.grow-section .imageCaption img {
    display: block;
    margin: 0;
    max-height: 5rem;
}

.grow-section h2 {
    display: inline-block;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    padding-bottom: 0.5rem;
}

.grow-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    border-radius: 50%;
    transform: scaleY(0.8) rotate(-0.5deg);
}

.grow-section .section-description {
    display: block;
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 2rem;
}

/* Align Enjoy logo and h2 on same level */
.enjoy-section {
    display: block;
    height: 100%;
    position: relative;
}

.enjoy-section .imageCaption {
    display: inline-block;
    vertical-align: middle;
    margin-right: 1rem;
    margin-bottom: 0;
}

.enjoy-section .imageCaption img {
    display: block;
    margin: 0;
    max-height: 5rem;
}

.enjoy-section h2 {
    display: inline-block;
    vertical-align: middle;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    padding-bottom: 0.5rem;
}

.enjoy-section h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    border-radius: 50%;
    transform: scaleY(0.8) rotate(-0.5deg);
}

.enjoy-section .section-description {
    display: block;
    margin: 0;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    padding-right: 2rem;
}

/* Hide search container */
section.container:has(.site-search--header) {
    display: none;
}

/* Buttons on cards */ 
.build-section,
.create-section,
.grow-section,
.enjoy-section {
    display: flex;    
    align-items: flex-start;
}

.build-section .section-description,
.create-section .section-description,
.grow-section .section-description,
.enjoy-section .section-description {
    width: 100%;
}

.build-section a.btn-theme {
    display: inline-block !important;
    margin-top: 1rem !important;
    order: 99;
}




@media  screen and (max-width: 840px) {
    .build-section .section-description,
    .create-section .section-description,
    .grow-section .section-description,
    .enjoy-section .section-description {
        position: static;
        transform: none;
        padding: 1rem 0 0 0;
    }

    #header {
        display: block;
    }

    #navButton {
        display: none;
    }

    #body {
        padding-top: 0;
    }
    
}

/* Apply flex layout only on larger screens for image/text section */
@media screen and (min-width: 760px) {
    .widget-row {
        display: flex;
        align-items: stretch;
    }

    .widget-width {
        display: flex;
    }

    .widget {
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .widget-image {
        display: flex;
        justify-content: center;
        margin-right: 2rem;
    }

    .widget-image img {
        max-height: 300px;
        width: auto;
    }

    .widget-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        justify-content: center; /* Add this to vertically center content */
    }

    .editor {
        display: flex;
        flex-direction: column;
        justify-content: flex-start; 
        height: 100%;
    }

    span.image.image--with-link.image {
        max-width: 100%;
    }   

    
}

@media screen and (max-width: 759px) {
    /* bannernew */
    #bannernew { height: 350px; }
    #bannernew h1 { font-size: 2rem; }
    #bannernew h3 { font-size: 1.2rem; }

    /* placeTitle */
    .placeTitle { font-size: 1.5rem; padding: 1.5rem 1rem; }

    /* calltoaction */
    .widget-row:nth-of-type(3) { padding: 1.5rem; margin: 1.5rem 0; }
    ul.calltoaction .list__item { display: block; width: 100%; margin-right: 0; margin-bottom: 1rem; }
    ul.calltoaction .list__item:last-child { margin-bottom: 0; }

    /* card image ordering */
    .widget-row {
        display: flex;
        flex-direction: column;
    }

    .widget-row .widget-width:has(.widget--image) {
        order: 2;
    }

    .widget-row .widget-width:has(.widget--content) {
        order: 1;
    }

     /* Gives Bentinck memorial image space on mobile */
    img[src*="monument"] {
        margin: 3em 0 0 0;
    }
}