/* Global Font and Style Settings */
html,
body {
    font-family: 'Lato', sans-serif;
    font-style: italic;
    max-width: 100%;
    overflow-x: hidden;
}

.home-page {
    position: relative;
}

.home-page::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url('../images/iStock-901134626.jpg');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    z-index: 0;
    pointer-events: none;
}

.home-page>* {
    position: relative;
    z-index: 1;
}

/* Apply italic to all text elements */
* {
    font-family: 'Lato', sans-serif !important;
    font-style: italic !important;
}

.fa,
.fa-classic,
.fa-sharp,
.fa-solid,
.fas,
.fa-regular,
.far {
    font-family: "Font Awesome 6 Free" !important;
    font-style: normal !important;
}

.fa-brands,
.fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-style: normal !important;
}

/* CSS Custom Properties - Only Colors Actually Used in Custom CSS */
:root {
    /* Custom Background Colors */
    --blue-tint-bg: #f8fbfe;
    /* Very subtle blue tint derived from color-4 */
    --section-bg: #fafafa;
    /* Back to very light neutral */
    --white-bg: #ffffff;

    /* matt colors */
    --color-1: #366BA1;
    --color-2: #6699CC;
    --color-3: #88B0D7;
    --color-4: #ABC7E3;

    /* Shadow & Overlay Colors for Hero Effects */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.8);
    --shadow-black: rgba(0, 0, 0, 0.9);
    --overlay-dark: rgba(0, 0, 0, 0.5);
    --overlay-light: rgba(255, 255, 255, 0.1);
    --text-glow: rgba(255, 255, 255, 0.3);

    /* Footer Colors */
    --footer-bg: #363636;
    --footer-border: #e0e0e0;

    /* Optional: Primary Colors (only if using custom classes) */
    --primary-color: #366BA1;
    /* Keep color-1 for buttons only */
    --primary-dark: #6699CC;
    /* Keep color-2 for hover states */
    --text-white: #ffffff;
}

/* Custom Component Classes Using Color Variables */
.navbar-custom {
    background-color: var(--primary-color) !important;
}

.navbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 1000 !important;
}

.site-navbar {
    backdrop-filter: blur(14px);
    box-shadow: 0 8px 24px rgba(17, 24, 39, 0.08);
}

.site-navbar-dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    cursor: pointer;
}

.site-navbar-submenu {
    transform-origin: top right;
}

.mobile-nav-scrim,
.mobile-bottom-nav,
.mobile-nav-sheet {
    display: none;
}

.btn-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--text-white);
}

.btn-custom:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-white);
}

/* Override Bulma's primary button styling with Matt's blue colors */
.button.is-primary {
    background-color: #366BA1 !important;
    /* color-1 - main blue */
    border-color: #366BA1 !important;
    color: white !important;
}

.button.is-primary:hover,
.button.is-primary.is-hovered {
    background-color: #6699CC !important;
    /* color-2 - hover blue */
    border-color: #6699CC !important;
    color: white !important;
}

.button.is-primary:active,
.button.is-primary.is-active {
    background-color: #366BA1 !important;
    border-color: #366BA1 !important;
    color: white !important;
}

/* Style primary tags (star ratings) */
.tag.is-primary {
    background-color: #366BA1 !important;
    /* color-1 - main blue */
    color: white !important;
}

.hero-custom {
    background-color: var(--primary-color) !important;
}

.tag-custom {
    background-color: var(--primary-color);
    color: var(--text-white);
}

.red {
    color: red;
    font-size: 0.9em;
    margin-top: 0.5rem;
    font-weight: bolder;
}

.hero-with-overlay {
    overflow: hidden;
    background-image: linear-gradient(var(--overlay-dark), var(--overlay-dark)), url('/images/Matt\ Hemsley.JPG');
    background-size: 100%;
    background-position: center 20%;
    animation: ken-burns 30s ease-in-out infinite alternate;
}

.hero-with-overlay .hero-body .title {
    text-shadow: 3px 3px 6px var(--shadow-black);
    animation: text-glow 3s ease-in-out infinite alternate;
    color: var(--text-white) !important;
}

.hero-with-overlay .hero-body .subtitle {
    text-shadow: 2px 2px 4px var(--shadow-dark);
    color: var(--text-white) !important;
}


@keyframes text-glow {
    0% {
        text-shadow: 3px 3px 6px var(--shadow-black);
    }

    100% {
        text-shadow: 3px 3px 15px var(--shadow-black), 0 0 25px var(--text-glow);
    }
}

@keyframes ken-burns {
    0% {
        background-size: 100%;
        background-position: center top;
    }

    100% {
        background-size: 110%;
        background-position: center bottom;
    }
}

.equal-height {
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

.equal-height .column {
    display: flex;
    flex-direction: column;
}

.equal-height .column .card,
.equal-height .column .box {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.equal-height .column .card-content,
.equal-height .column .box {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Constrained layout - keep hero full width but limit content sections */
.section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Keep hero containers full width */
.hero .container {
    max-width: none;
    padding: 0 1rem;
}

.home-hero-body {
    display: block !important;
    padding-top: clamp(2.75rem, 5vh, 4.5rem) !important;
    padding-bottom: 4rem;
}

.home-hero-scene {
    position: relative;
    background-image: none !important;
    background-color: transparent !important;
}

.home-hero-scene::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(10, 18, 16, 0.22) 0%, rgba(10, 18, 16, 0.12) 38%, rgba(10, 18, 16, 0.34) 100%);
    pointer-events: none;
}

.home-hero-content {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    text-align: center;
}

.home-hero-intro {
    display: inline-block;
    max-width: min(90vw, 760px);
}

.home-main-section {
    position: relative;
    margin-top: -43rem !important;
    padding-top: 0;
    z-index: 2;
    background: transparent !important;
}

.home-main-container {
    position: relative;
}

.home-main-panel {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(17, 24, 39, 0.12);
    padding: 2.5rem;
    backdrop-filter: blur(6px);
}

@media (min-width: 769px) {
    .home-hero-scene {
        background-position: center top;
    }
}

/* Add subtle backgrounds to content sections */
.section:not(.hero):not(.has-background-light):not(.has-background-warning) {
    background: var(--section-bg);
    margin: 0;
}

.home-page .section:not(.hero):not(.logo-footer):not(.footer-menu) {
    background: transparent !important;
}

.home-overlay-copy {
    display: table;
    margin-left: auto;
    margin-right: auto;
    padding: 1rem 1.5rem;
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.28);
    box-shadow: 0 16px 32px rgba(17, 24, 39, 0.16);
    backdrop-filter: blur(6px);
}

.home-overlay-copy-block {
    max-width: min(100%, 40rem);
    border-radius: 20px;
}

.home-page .home-overlay-copy,
.home-page .home-overlay-copy .title,
.home-page .home-overlay-copy .subtitle,
.home-page .home-overlay-copy p {
    color: var(--text-white) !important;
}

.home-page .home-faq-section .box,
.home-page .home-expectations-section .box,
.home-page .home-testimonials-section .box {
    background: rgba(255, 255, 255, 0.94) !important;
    box-shadow: 0 18px 40px rgba(17, 24, 39, 0.12);
    border: 0;
}

/* Card-based content areas */
.content-card {
    background: var(--white-bg);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 8px var(--shadow-light);
    margin-bottom: 2rem;
}

/* Maintain existing background sections */
.has-background-light,
.has-background-warning {
    background: inherit;
}

/* Logo Footer Styling */
.logo-footer {
    background-color: var(--white-bg);
    border-top: 1px solid var(--footer-border);
    padding: 2rem 0;
}

.logo-footer .logos-container {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.logo-footer .logo-item,
.logo-footer .logo-item-small {
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.8;
}

.logo-footer .logo-item:hover,
.logo-footer .logo-item-small:hover {
    transform: scale(1.05);
    opacity: 1;
}

.logo-footer .logo-item img {
    height: 100px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 100px !important;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.logo-footer .logo-item-small img {
    height: 50px !important;
    width: auto !important;
    max-width: none !important;
    max-height: 50px !important;
    object-fit: contain;
    filter: grayscale(20%);
    transition: filter 0.3s ease;
}

.logo-footer .logo-item:hover img,
.logo-footer .logo-item-small:hover img {
    filter: grayscale(0%);
}

@media (max-width: 768px) {
    :root {
        --mobile-nav-bottom-offset: calc(2.9rem + env(safe-area-inset-bottom));
    }

    .footer-menu {
        display: none;
    }

    html,
    body {
        overflow-x: hidden;
    }

    .section .container {
        padding: 0 1rem;
        max-width: 100%;
    }

    .has-mobile-bottom-nav {
        padding-bottom: calc(9.25rem + env(safe-area-inset-bottom));
    }

    .site-navbar {
        padding: 0.4rem 0 !important;
        background: rgba(255, 255, 255, 0.96) !important;
    }

    .site-navbar>.container {
        align-items: center;
        justify-content: center;
        padding: 0 1rem;
    }

    .site-navbar .navbar-brand {
        width: 100%;
        justify-content: center;
    }

    .site-navbar .navbar-brand .navbar-item {
        justify-content: center;
        width: 100%;
        padding: 0.2rem 0 !important;
    }

    .site-navbar .navbar-brand img {
        width: 52px !important;
        margin-right: 0.6rem !important;
    }

    .site-navbar .navbar-brand .navbar-item>div {
        text-align: center !important;
    }

    .site-navbar .navbar-brand strong:first-child {
        font-size: 1rem !important;
    }

    .site-navbar .navbar-brand strong:last-child {
        font-size: 0.82rem !important;
    }

    .site-navbar .site-navbar-menu {
        display: none !important;
    }

    .mobile-nav-scrim {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(10, 18, 16, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.24s ease;
        z-index: 1190;
    }

    .mobile-nav-scrim.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        left: 0.85rem;
        right: 0.85rem;
        bottom: var(--mobile-nav-bottom-offset);
        padding: 0.45rem;
        gap: 0.25rem;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(6, 95, 70, 0.12);
        border-radius: 22px;
        box-shadow: 0 18px 40px rgba(17, 24, 39, 0.18);
        backdrop-filter: blur(16px);
        z-index: 1200;
    }

    .mobile-bottom-nav__item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.28rem;
        min-height: 3.55rem;
        padding: 0.45rem 0.2rem;
        border: 0;
        border-radius: 16px;
        background: transparent;
        color: #325346;
        text-decoration: none;
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.03em;
        text-transform: uppercase;
        cursor: pointer;
        touch-action: manipulation;
    }

    .mobile-bottom-nav__item i {
        font-size: 1.05rem;
    }

    .mobile-bottom-nav__item.is-active,
    .mobile-bottom-nav__item[aria-expanded="true"] {
        background: rgba(6, 95, 70, 0.12);
        color: #065f46;
    }

    .mobile-nav-sheet {
        display: block;
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        padding: 0.6rem 1rem calc(9.35rem + env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.98);
        border-radius: 28px 28px 0 0;
        box-shadow: 0 -18px 40px rgba(17, 24, 39, 0.18);
        transform: translateY(calc(100% + 2rem));
        transition: transform 0.28s ease;
        z-index: 1210;
    }

    .mobile-nav-sheet.is-open {
        transform: translateY(0);
    }

    .mobile-nav-sheet__handle {
        width: 3rem;
        height: 0.3rem;
        margin: 0 auto 1rem;
        border-radius: 999px;
        background: rgba(17, 24, 39, 0.18);
    }

    .mobile-nav-sheet__header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 1rem;
        margin-bottom: 1rem;
    }

    .mobile-nav-sheet__eyebrow {
        margin: 0 0 0.15rem;
        color: #6a8177;
        font-size: 0.72rem;
        font-style: normal !important;
        font-weight: 700;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .mobile-nav-sheet__title {
        margin: 0;
        color: #1f3b30;
        font-size: 1.4rem;
        line-height: 1.1;
    }

    .mobile-nav-sheet__close {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border: 0;
        border-radius: 999px;
        background: rgba(6, 95, 70, 0.08);
        color: #1f3b30;
        cursor: pointer;
        touch-action: manipulation;
    }

    .mobile-nav-sheet__links {
        display: grid;
        gap: 0.55rem;
    }

    .mobile-nav-sheet__links a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1rem 1rem;
        border-radius: 18px;
        background: rgba(6, 95, 70, 0.05);
        color: #1f3b30;
        font-size: 1rem;
        font-style: normal !important;
        font-weight: 700;
        text-decoration: none;
        touch-action: manipulation;
    }

    .mobile-nav-sheet__links a.is-active {
        background: rgba(6, 95, 70, 0.12);
        color: #065f46;
    }

    .mobile-nav-sheet__links a::after {
        content: "\f054";
        font-family: "Font Awesome 6 Free" !important;
        font-style: normal !important;
        font-weight: 900;
        color: #6a8177;
    }

    .site-hero-body {
        align-items: flex-start !important;
        padding-top: 1.75rem !important;
        padding-bottom: 5rem;
    }

    .site-hero-card {
        margin-top: 0;
        transform: translateY(-0.5rem);
    }

    .home-page {
        padding-bottom: calc(9.25rem + env(safe-area-inset-bottom));
    }

    .home-hero-body {
        min-height: calc(100svh - 10rem);
        padding-top: 1.5rem !important;
        padding-bottom: 5rem;
    }

    .home-hero-intro {
        width: min(100%, 34rem);
        padding: 1.5rem 1.25rem !important;
    }

    .site-hero-card .subtitle.is-3 {
        font-size: clamp(1.25rem, 5.8vw, 1.8rem) !important;
        line-height: 1.2;
    }

    .home-hero-intro .title {
        font-size: clamp(2.35rem, 11vw, 3rem) !important;
        margin-bottom: 0.75rem !important;
    }

    .home-hero-intro .subtitle {
        font-size: clamp(1.45rem, 7vw, 2rem) !important;
        line-height: 1.2;
    }

    .home-main-section {
        margin-top: -3.5rem !important;
    }

    .home-main-panel {
        padding: 1.75rem;
        border-radius: 18px;
        backdrop-filter: none;
    }

    .home-main-panel .columns {
        margin-top: 0;
    }

    .home-main-panel .column,
    .home-faq-section .column,
    .home-testimonials-section .column,
    .home-expectations-section .column {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }

    .equal-height {
        display: block;
    }

    .equal-height .column {
        display: block;
    }

    .home-overlay-copy {
        max-width: 100%;
        padding: 0.85rem 1rem;
    }

    .home-overlay-copy-block {
        width: 100%;
    }

    .title.is-2 {
        font-size: 2rem;
    }

    .title.is-4 {
        font-size: 1.35rem;
    }

    .button.is-large,
    .button.is-medium {
        max-width: 100%;
        white-space: normal;
        height: auto;
        line-height: 1.35;
        text-align: center;
    }

    .button.is-large span:last-child,
    .button.is-medium span:last-child {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .home-main-panel .button.is-medium,
    .home-faq-section .button.is-large {
        width: 100%;
    }

    .logo-footer .logos-container {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: center;
        justify-items: center;
        gap: 1rem;
    }

    .logo-footer .logos-container .logo-item-small:nth-child(-n+2) {
        grid-column: 1 / -1;
    }

    .logo-footer .logos-container .logo-item,
    .logo-footer .logos-container .logo-item-small {
        max-width: 100%;
    }

    .logo-footer .logo-item img,
    .logo-footer .logo-item-small img {
        height: 72px !important;
        width: auto !important;
        max-width: 100% !important;
        max-height: 72px !important;
    }
}

/* Footer Menu Styling */
.footer-menu {
    background-color: var(--footer-bg);
    padding: 1.5rem 0;
}

.footer-menu .menu-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-menu .menu-links a {
    color: var(--text-white);
    font-weight: 500;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.footer-menu .menu-links a:hover {
    background-color: rgba(6, 95, 70, 0.15);
    color: var(--text-white);
}

.footer-menu .menu-links a.is-active {
    background-color: rgba(6, 95, 70, 0.12);
    color: var(--text-white);
    font-weight: 600;
}

.footer-menu .menu-links a.is-active:hover {
    background-color: rgba(6, 95, 70, 0.18);
    color: var(--text-white);
}

.footer {
    background-color: var(--white-bg);
    padding: 1rem 1.5rem 1.25rem;
}

.footer p {
    margin: 0;
}

@media (max-width: 768px) {
    .footer-menu .menu-links {
        gap: 1.5rem;
        flex-direction: column;
    }
}

/* Custom Background Colors */
.bg-blue-tint {
    background-color: var(--blue-tint-bg) !important;
}

.bg-light {
    background-color: var(--light-bg) !important;
}

.bg-white {
    background-color: var(--white-bg) !important;
}