/*
Theme Name: Sinatra Child
Template: sinatra
*/

body #main-content {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap;
    gap: 40px;
    align-items: flex-start;
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 16px;
    margin-bottom: 40px;
}

/* Add a visible focus ring to the footer search button */
.search-submit:focus {
    outline: 3px solid #125943 !important;
    outline-offset: 2px;
    background-color: #e6f2e8;
}

body #main-content #secondary.si-sidebar-container {
    flex: 0 0 300px !important; 
    width: 300px !important;
    min-width: 300px;
    display: block !important;
    
    /* The Layout Override */
    order: -1 !important; 
    position: static !important; 
    float: none !important; 
    margin-left: 0 !important; 
    margin-right: 40px !important; 
}

body .page-content-wrapper {
    flex: 1 !important;
    min-width: 0; 
    order: 2 !important;
}


/* --- CUSTOM TEMPLATE OVERRIDES & LAYOUT --- */

/* Kill the global flexbox completely for this specific template */
body #main-content.custom-template-wrapper {
    display: block !important; 
    width: 100% !important;
}

/* Force the 3 main sections to stretch 100% across the container */
body #main-content.custom-template-wrapper > section {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Style the Hero and CTA sections (The Sandwich) */
body #main-content.custom-template-wrapper. hero-section, 
body #main-content.custom-template-wrapper. cta-section {
    background-color: #F2F2F2 !important; 
    padding: 60px 20px !important;
    margin-bottom: 60px !important;
    border-radius: 8px !important;
}

/* Bruteforce center ALL text inside the Hero and CTA */
body #main-content.custom-template-wrapper .hero-section *, 
body #main-content.custom-template-wrapper .cta-section * {
    text-align: center !important;
}

/* Keep the text from stretching too wide on giant screens */
body #main-content.custom-template-wrapper .hero-inner, 
body #main-content.custom-template-wrapper .cta-inner {
    max-width: 800px !important;
    margin: 0 auto !important; 
}

.side-column ul {
    list-style-type: none; 
    padding: 0;
    line-height: 1.8;
}

/* The Two-Column Desktop Layout */
@media (min-width: 769px) {
    body #main-content.custom-template-wrapper .content-inner {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        width: 100% !important;
        gap: 60px !important; 
        align-items: flex-start !important;
    }

    body #main-content.custom-template-wrapper .main-column {
        flex: 1 1 auto !important;
        width: auto !important;
        min-width: 0 !important;
    }

    body #main-content.custom-template-wrapper .side-column {
        flex: 0 0 300px !important;
        width: 300px !important;
        display: block !important;
    }
}



/* --- HEADER & NAV (Desktop) --- */
#masthead {
    display: flex;
    background-color: #F2F2F2;
    flex-direction: column; 
    align-items: center;    
    padding: 8px 8px;
    border-bottom: 1px solid #f0f0f0;
}

.site-logo {
    max-width: 300px;
    height: auto;
    margin-bottom: 25px;
    display: block;
}

.menu-toggle {
    display: none; /* Hidden on desktop */
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav-menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

/* --- SECTION 1: WELCOME --- */
.welcome {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.welcome h2 {
    flex: 0 0 100%;
    margin-bottom: 20px;
}

.welcome p {
    flex: 0 0 60%;
    margin: 0;
    line-height: 1.6;
}

.welcome figure {
    flex: 0 0 25%;
    margin: 0;
}

.welcome img {
    width: 100%;
    height: auto;
    display: block;
}

/* --- FOOTER FLEX LAYOUT --- */
.footer-wireframe-container {
    display: flex;
    flex-direction: row;        
    justify-content: space-between;
    align-items: center;        
    gap: 30px;
    padding: 60px 20px;
    border-top: 1px solid #ddd;
    max-width: 1200px;
    margin: 40px auto 0;
}

.footer-column {
    flex: 1; 
    display: flex;
    justify-content: center;
}

.nav-col form {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

#footer-page-select {
    margin-right: 8px;
    padding: 5px;
    height: auto;
    line-height: 1.5;
}

/* --- PROJECT PAGE STYLES --- */
.project {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 80px;
}

/* Make the H2 take up the full top row */
.project h2 {
    flex: 0 0 100%;
    margin-bottom: 30px;
    text-align: left;
}

/* Paragraph on the left (approx 60%) */
.project p {
    flex: 0 0 60%;
    margin: 0;
    line-height: 1.8;
}

/* Image/Figure on the right (approx 35%) */
.project figure {
    flex: 0 0 35%;
    margin: 0;
}

.project figure img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* --- ANIMATED ACCORDION STYLES --- */

.faq-answer {
    /* Hide the box by making it 0px tall and hiding the overflow */
    max-height: 0;
    overflow: hidden;
    
    /* The animation: slide over 0.3 seconds */
    transition: max-height 0.3s ease-in-out;

    padding-left: 10px;
    padding-right: 10px;
}

/* Use flexbox to push the arrow to the far right side */
.faq-question {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center;
}

/* Automatically insert the arrow */
.faq-question::after {
    content: "▾";
    display: inline-block;
    transition: transform 0.3s ease-in-out;
}

/* Flip the arrow when the JS adds the 'active' class */
.faq-question.active::after {
    transform: rotate(180deg);
}


/* --- RESPONSIVE MEDIA QUERIES (Mobile) --- */
@media (max-width: 768px) {

    /* 1. Header & Hamburger */
    #masthead {
        position: relative; 
        display: flex;
        flex-direction: column;
        align-items: center; 
        padding-top: 40px; 
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 5px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        position: absolute;
        top: 15px;
        right: 15px;
        z-index: 100;
    }

    .menu-toggle .bar {
        width: 25px;
        height: 3px;
        background: #F2F2F2;
        border-radius: 2px;
    }

    .nav-menu {
        display: none; 
        flex-direction: column;
        width: 100%;
        text-align: center;
        gap: 15px;
        padding: 20px 0;
    }

    .nav-menu.active {
        display: flex;
    }

    /* 2. Welcome Section: Image moves above text */
    .welcome {
        display: flex;
        flex-direction: column; 
    }

    .welcome h2 {
        order: 1; 
    }

    .welcome figure {
        order: 2; 
        margin-bottom: 20px;
    }

    .welcome p {
        order: 3; 
    }
    
    /* 3. Footer Stack */
    .footer-wireframe-container {
        flex-direction: column; 
        gap: 40px;  
        text-align: center;
    }

    .footer-column {
        width: 100%;
        display: flex;
        justify-content: center;
    }
    
    /* 4. Projects Section Stack */
    .project {
        display: flex;
        flex-direction: column; 
    }

    .project h2 {
        order: 1; 
        text-align: center;
    }

    .project figure {
        order: 2; 
        flex: 0 0 100%;
        width: 100%;
        margin-bottom: 20px;
    }

    .project p {
        order: 3; 
        flex: 0 0 100%;
        width: 100%;
        text-align: left;
    }

    body #main-content {
        flex-direction: column !important;
    }
    
    body #secondary.si-sidebar-container {
        flex: 0 0 100% !important;
        width: 100% !important;
    }

    /* --- CUSTOM TEMPLATE MOBILE STACKING --- */
    .custom-template-wrapper .content-inner {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .custom-template-wrapper .side-column {
        width: 100% !important;
        flex: 0 0 100% !important;
        order: -1 !important;
    }

} /* End of mobile media query */