/*
 Theme Name:   The Boulding Foundation Child
 Description:  A child theme for safe customisations.
 Author:       James Stevenson
 Template:     hello-elementor
 Version:      1.0.0
*/

/* You can add your custom CSS here later */
/*HIDE OLD HEADER*/

/*ALIGNMENT*/
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    /* Dimensions */
    --header-height: 180px;
    --header-max-width: 1540px;
    --logo-size: 95.33px;
    --hamburger-size: 50px;

    /* Colors */
    --bg-color-solid: rgba(8, 36, 29, 1);
    --bg-color-transparent: rgba(8, 36, 29, 0.8);
    --border-color: #38504a;
    --primary-accent: #B6924B;
    --button-bg: #E6C58B;
    --button-text-color: #08241D;
    --text-color-light: #ffffff;

    /* Typography */
    --font-primary: "Libre Baskerville", Sans-serif;
    --font-size-site-name: 24px;
    --font-size-menu: 20px;
    --font-size-button: 16px;

    /* Spacing & Layout */
    --padding-horizontal: 20px;
    --menu-gap-desktop: 40px;
    --menu-gap-mobile: 20px;
    --button-padding-horizontal: 37px;

    /* Transitions & Effects */
    --transition-speed-slow: 0.3s;
    --transition-speed-fast: 0.15s;
    --blur-amount: 50px;
}

.site-header, .site-footer{
    display: none !important;
}

/* --- SUBMENU FIX --- */

/* 1. Set parent to relative so submenu positions against it */
.desktop-menu .menu-item-has-children {
    position: relative;
}

/* 2. Style and hide the submenu by default */
.desktop-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 50%; /* Centers it relative to parent */
    transform: translateX(-50%) translateY(15px); /* Centers horizontally, pushes down slightly */
    flex-direction: column; /* Stack items vertically */
    gap: 15px;
    background-color: var(--bg-color-transparent);
    backdrop-filter: blur(var(--blur-amount));
    padding: 20px;
    min-width: 200px;
    border: 1px solid var(--border-color);
    border-top: 3px solid var(--primary-accent);
    
    /* Hide smoothly */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--transition-speed-slow);
}

/* 3. Reveal submenu on hover */
.desktop-menu .menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* 4. Prevent the submenu items from scaling on hover like the main menu items */
.desktop-menu .sub-menu li:hover {
    transform: none;
}

/* --- MOBILE SUBMENU FIX --- */
.mobile-menu .menu-item-has-children {
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

/* Add chevron indicator */
.mobile-menu .menu-item-has-children > a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.mobile-menu .menu-item-has-children > a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid var(--text-color-light);
    transition: transform var(--transition-speed-fast) ease-in-out;
}

/* Rotate chevron when open */
.mobile-menu .menu-item-has-children > a.dropdown-open::after {
    transform: rotate(180deg);
}

.mobile-menu .sub-menu {
    display: none; 
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 15px 0 0 0;
    margin: 0;
    width: 100%;
    border-top: 1px solid var(--border-color);
}

.mobile-menu .sub-menu.active-submenu {
    display: flex;
}

.mobile-menu .sub-menu a {
    font-size: calc(var(--font-size-menu) - 4px);
    color: var(--button-bg); 
}

.mobile-menu .sub-menu li:hover {
    transform: none;
}

.header-wrapper{
    min-height: var(--header-height);
}

.custom-header{
    height: var(--header-height);
}

.header-wrapper{
    display: flex;
    justify-content: center;
    align-items: start;
    background-color: var(--bg-color-solid);
}

.custom-header {
    position: fixed;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-width: 100%;
    background-color: var(--bg-color-solid);
    z-index: 50;
    border: solid var(--border-color);
    border-width: 0px 0px 4px 0px;
    transition: all var(--transition-speed-slow);
}

.custom-header .content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: var(--header-max-width);
    padding: 0px var(--padding-horizontal) 0px var(--padding-horizontal);
}

/*HEADER SCROLL*/
.header-wrapper.active .custom-header {
    height: calc(var(--header-height) - 30px);
    background-color: var(--bg-color-transparent);
    backdrop-filter: blur(var(--blur-amount));
}

/*LOGO*/
.logo-container {
    display: flex;
    flex-direction: row;
    justify-content: start;
    align-items: center;
    gap: var(--padding-horizontal);
}

.logo-container .logo {
    background-image: url('/wp-content/uploads/2026/01/header-logo_cropped_compressed_3-1.webp');
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    width: var(--logo-size);
    height: var(--logo-size);
}

.logo-container .site-name {
    font-family: var(--font-primary);
    font-size: var(--font-size-site-name);
    font-weight: 300;
    line-height: 1em;
    text-transform: uppercase;
    text-align: start;
    color: var(--primary-accent);
    transition: all var(--transition-speed-slow);
}

.logo-container .site-name {
  opacity: 0;
  animation: elegantReveal 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards;
  animation-delay: 0.2s;
}

@keyframes elegantReveal {
  0% {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/*DESKTOP MENU STYLE*/
.desktop-menu ul {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: var(--menu-gap-desktop);
    list-style: none;
    margin: 0px;
    padding: 0px;
}

.desktop-menu ul li {
    display: flex;
    transition: all var(--transition-speed-slow);
}

.desktop-menu ul li:hover {
    transform: scale(1.05);
}

.desktop-menu ul a {
    font-family: var(--font-primary);
    font-size: var(--font-size-menu);
    font-weight: 300 !important;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-color-light);
    transition: all var(--transition-speed-slow);
}

.desktop-menu .current_page_item a {
    color: var(--primary-accent);
    font-weight: 300 !important;
}

.desktop-menu ul a:hover {
    color: var(--primary-accent);
}

/*HAMBURGER*/
.menu {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    user-select: none;
}

.mobile-hamburger, .mobile-hamburger .close, .mobile-hamburger .open{
    width: var(--hamburger-size);
    min-height: var(--hamburger-size);
}

.mobile-hamburger .close{
    background-image: url('/wp-content/uploads/2026/02/close-icon.svg');
    position: absolute;
}

.mobile-hamburger .open{
    background-image: url('/wp-content/uploads/2026/02/hamburger.svg');
    position: absolute;
}

.mobile-hamburger .open, .mobile-hamburger.active .close{
    opacity: 1;
    transform: rotate(0deg);
    transition: all var(--transition-speed-fast) ease-in-out;
}

.mobile-hamburger.active .open, .mobile-hamburger .close{
    opacity: 0;
    transform: rotate(90deg);
    transition: all var(--transition-speed-fast) ease-in-out;
}

/*MOBILE MENU*/
.mobile-menu-wrapper{
    top: 0;
    left: 0;
    position: fixed;
    display: none;
    height: 100vh;
    width: 100%;
    background-color: var(--bg-color-transparent);
    z-index: 40;
    backdrop-filter: blur(var(--blur-amount));
}

.mobile-menu-wrapper.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--padding-horizontal);
}

/*MOBILE MENU STYLE*/
.mobile-menu ul {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: var(--menu-gap-mobile);
    list-style: none;
    margin: 0px;
    padding: 0px;
}

.mobile-menu ul li {
    display: flex;
    transition: all var(--transition-speed-slow);
}

.mobile-menu ul li:hover {
    transform: scale(1.05);
}

.mobile-menu ul a {
    font-family: var(--font-primary);
    font-size: var(--font-size-menu);
    font-weight: 300;
    text-transform: uppercase;
    text-align: center;
    color: var(--text-color-light);
    transition: all var(--transition-speed-slow);
}

.mobile-menu .current_page_item a {
    color: var(--primary-accent) !important;
    font-weight: 300 !important;
}

.mobile-menu ul a:hover {
    color: var(--primary-accent);
}

/*MOBILE MENU DIVIDER*/
.mobile-menu-wrapper .divide{
    min-width: 200px;
    height: 1px;
    background-color: var(--text-color-light);
}

/*BUTTON*/
.bf-button{
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    background-color: var(--button-bg);
    min-height: 40px;
    padding-left: var(--button-padding-horizontal);
    padding-right: var(--button-padding-horizontal);
    cursor: pointer;
    transition: transform var(--transition-speed-slow) ease-in-out;
}

.bf-button:hover {
    transform: scale(1.05);
    transition: transform var(--transition-speed-slow) ease-in-out;
}

.bf-button .bf-button-text {
    color: var(--button-text-color);
    font-family: var(--font-primary);
    font-size: var(--font-size-button);
    font-weight: 700; 
    margin: 0; 
}

/*DESKTOP SPECIFIC*/
@media (min-width: 1024px) {
    .mobile-hamburger {
        display: none;
    }
}

/*TABLET SPECIFIC*/
@media (max-width: 1024px) {
    .site-name {
        display: none;
    }
    .menu .desktop-menu {
        display: none;
    }

    .header-wrapper {
        min-height: calc(var(--header-height) - 20px);
    }

    .custom-header{
        height: calc(var(--header-height) - 20px);
    }

    .header-wrapper.active .custom-header {
        height: calc(var(--header-height) - 30px);
    }

    .logo-container .logo {
        width: calc(var(--logo-size) - 10px);
        height: calc(var(--logo-size) - 10px);
    }
}

/*MOBILE SPECIFIC*/
@media (max-width: 768px) {
    .header-wrapper {
        min-height: calc(var(--header-height) - 40px);
    }
    
    .custom-header{
        height: calc(var(--header-height) - 40px);
    }

    .header-wrapper.active .custom-header {
        height: calc(var(--header-height) - 50px);
    }

    .logo-container .logo {
        width: calc(var(--logo-size) - 20px);
        height: calc(var(--logo-size) - 20px);
    }
}

/*FOOTER STYLING*/

.footer-wrapper {
    min-width: 100%;
    background-color: #1C1C1C;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0px;
    padding: 0px;
    margin: 0px;
}

.footer-wrapper .footer, .ribbon-wrapper .ribbon {
    max-width: 1500px;
    width: 100%;
}

.footer-wrapper .footer {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    min-height: 426px;
    padding: 46px 0px;
}

.footer .logo {
    min-width: 198px;
    min-height: 426px;
    background-image: url('/wp-content/uploads/2026/01/header-logo_cropped_compressed_3-1.webp');
    background-size: contain;
    background-position: center left;
    background-repeat: no-repeat;
}

.footer .footer-column {
    display: flex;
    flex-direction: column;
    justify-content: start;
    align-items: start;
    min-height: 320px;
}

.footer .heading {
    color: #E6C58B;
    font-family: "Libre Baskerville", Sans-serif;
    font-size: 32px;
    font-weight: bold;
}

.footer .footer-item {
    color: white !important;
    font-family: "Lexend", Sans-serif;
    font-size: 16px;
    font-weight: 500;
}

.ribbon-wrapper {
    min-width: 100%;
    background-color: #000000;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-height: 51px;
}

.ribbon-wrapper .ribbon {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.ribbon-wrapper .ribbon .footer-column p {
    color: white !important;
    font-family: "Lexend", Sans-serif;
    font-size: 16px;
    font-weight: 500;
    margin: 0px;
}

.ribbon-wrapper .left-column {
    display: flex;
    flex-direction: row;
    flex-direction: start;
    align-items: center;
    gap: 0px;
}

.ribbon-wrapper .right-column {
    display: flex;
    flex-direction: row;
    flex-direction: end;
    align-items: center;
    gap: 20px;
}

.footer .nav ul, .footer .nav li {
    list-style: none !important;
    padding: 0px !important;
}

.footer .nav ul a, .footer .nav li a{
    color: white !important;
}

.company-num {
    display: none;
}


/* Fix invalid flex properties from original CSS */
.ribbon-wrapper .left-column { justify-content: flex-start; }
.ribbon-wrapper .right-column { justify-content: flex-end; }

/* Tablet (Screens under 1024px) */
@media (max-width: 1024px) {
    .footer-wrapper .footer {
        flex-wrap: wrap;
        justify-content: center;
        gap: 40px;
        padding: 40px 20px;
        min-height: auto;
    }
    
    .footer .logo {
        min-width: 100%;
        min-height: 150px;
        background-position: center;
    }
    
    .footer .footer-column {
        min-height: 200px;
    }

    .ribbon-wrapper .ribbon {
        padding: 0 20px;
    }
}

/* Mobile (Screens under 768px) */
@media (max-width: 768px) {
    .footer-wrapper .footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    
    .footer .footer-column {
        align-items: center; /* Centers the column contents */
        width: 100%;
    }

    .ribbon-wrapper .ribbon {
        flex-direction: column;
        padding: 15px 20px;
        gap: 10px;
    }

    .ribbon-wrapper .left-column, 
    .ribbon-wrapper .right-column {
        justify-content: center;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
}