/* Header & Footer base styles (must come before media queries) */

#header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999;
    background-color: #fff;
}

#header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#header > .container > a > img {
    height: 71px;
    width: auto;
}

#header .container ul { list-style: none; margin: 0; padding: 0; }
#header .container ul :hover { color: #009ca0; transition: 0.5s; }
#header .container a { color: #4c4c4c; display: table; font-size: 18px; }
#header .container > ul a { transition: 0.3s; }
#header .container > ul a:hover { color: #00acb0; }

#header ul.main {
    display: flex;
    list-style: none;
    height: 94px;
    align-items: stretch;
}

#header ul.main > li {
    position: relative;
}

#header .container > ul { display: flex; }
#header .container > ul > li { position: relative; }
#header .container > ul > li > a { padding: 35px 20px; }
#header .container > ul > li > ul { display: none; }

#header ul.main > li > a {
    display: table;
    height: 94px;
    padding: 35px 20px;
    font-size: 18px;
    color: #4C4C4C;
    font-family: 'open_sauce_sansregular', sans-serif;
    transition: color 0.3s;
}

#header ul.main > li > a:hover {
    color: #00acb0;
}

/* Submenu arrow */
#header .container > ul > li.submenu > a::after {
    color: #4c4c4c;
    content: "\25BC";
    font-size: 10px;
    margin-left: 20px;
    margin-top: -2px;
}

/* Submenu dropdown */
#header .container > ul > li:hover > ul {
    background-color: #fff;
    border-right: 2px solid #e6e6e6;
    border-bottom: 2px solid #e6e6e6;
    border-left: 2px solid #e6e6e6;
    border-top: none;
    column-count: 2;
    display: inline-block;
    left: -50%;
    padding: 15px 8px;
    position: absolute;
}

#header .container > ul > li:hover > ul > li {
    display: inline-block;
    height: 55px;
    width: 100%;
}

#header .container > ul > li:hover > ul > li > a {
    padding: 15px 25px;
    white-space: nowrap;
}

#header ul.featured {
    display: flex;
    list-style: none;
    align-items: center;
    height: 94px;
}

#header .container > ul.featured li:not(:first-child) { margin-left: 25px; }
#header .container > ul.featured li a { border-radius: 8px; display: table; padding: 15px 20px; }

#header ul.featured .btn {
    font-family: 'Open Sauce Sans Light', 'open_sauce_sansregular', sans-serif;
    font-size: 22px;
    font-weight: 200;
    padding: 15px 20px;
    border-radius: 8px;
}

#header ul.featured .btn.green {
    background-color: #007C7E;
}

@keyframes SHOW-BOX {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Body offset for fixed header */
#page-header {
    min-height: 94px;
}

/* Mobile hamburger (hidden on desktop by default) */
#header .btn-mobile {
    display: none;
}

#header ul.main-mobile {
    display: none !important;
    background: #fff;
    flex-direction: column;
    height: 100vh;
    left: 0;
    position: absolute;
    right: 0;
    top: 91px;
}

/* Footer */
footer {
    background: #4c4c4c;
    color: #FFFFFF;
    padding: 80px 0;
    margin-top: 0;
}

footer img.footer-logo {
    height: 35px;
    filter: brightness(0) invert(1);
}

footer ul {
    list-style: none;
}

footer ul li {
    margin-bottom: 10px;
}

footer ul a {
    color: #6f6f6f;
    font-size: 24px;
    transition: color 0.3s;
}

footer ul a:hover {
    color: #4c4c4c;
}

footer .d-flex {
    margin-top: 50px;
}

footer .d-flex a {
    background: #6f6f6f;
    border-radius: 100%;
    display: flex;
    height: 45px;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    width: 45px;
}

footer .d-flex a img {
    width: 29px;
    height: auto;
    filter: none;
    opacity: 1;
}

/* Desktop column widths */
@media (min-width: 1025px) {
    .col-sm-3  { flex: 0 0 25%;     max-width: 25%;     }
    .col-sm-4  { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-sm-6  { flex: 0 0 50%;     max-width: 50%;     }
    .col-sm-9  { flex: 0 0 75%;     max-width: 75%;     }
    .col-sm-12 { flex: 0 0 100%;    max-width: 100%;    }
}

/* Responsive - Mobile breakpoint at 1024px */
@media (max-width: 1024px) {
    /* Grid: stack columns */
    .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5,
    .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10,
    .col-md-11, .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .col-sm-3 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-4 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-6 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-9 { flex: 0 0 100%; max-width: 100%; }
    .col-sm-12 { flex: 0 0 100%; max-width: 100%; }

    .row { flex-direction: column; }

    /* Header */
    #header .container {
        position: relative;
    }

    #header ul.main {
        display: none;
    }

    #header ul.featured {
        display: none;
    }

    #header .btn-mobile {
        display: block;
        cursor: pointer;
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
    }

    .row-btn-mobile {
        background: #009ca0;
        height: 4px;
        margin: 6px 0;
        width: 30px;
    }

    #header ul.main-mobile {
        display: none !important;
        width: 100%;
        background: #fff;
        padding: 20px;
        border-top: 1px solid #E8E8E8;
    }

    #header ul.main-mobile li {
        padding: 10px 0;
        border-bottom: 1px solid #F5F5F5;
    }

    #header ul.main-mobile ul {
        padding-left: 20px;
    }

    /* First fold */
    .first-fold {
        min-height: 400px;
    }

    .first-fold .container {
        padding-top: 80px;
        padding-bottom: 40px;
    }

    /* Sections padding */
    .image-text .content,
    .text-image .content,
    .text-video .content,
    .carousel .content,
    .image-bullets,
    .bullets-video,
    .logos-testimonials,
    .section-grid .content,
    .text .content,
    .video .content,
    .accordion,
    .posts .content {
        padding: 30px 0;
    }

    /* Carousel items */
    .carousel .items {
        flex-wrap: nowrap;
    }

    .carousel .item {
        flex: 0 0 160px;
    }

    /* Logos grid */
    .logos-grid .logo {
        flex: 0 0 calc(50% - 20px);
    }

    /* Blog layout */
    .t-desktop { display: none; }
    .t-mobile { display: block; }

    .box-blog-slider img {
        height: 180px;
    }

    /* Forms */
    .proposal .intro {
        padding-right: 0;
        margin-bottom: 30px;
    }

    .col-form {
        margin-top: 20px;
    }

    /* Footer */
    footer .row {
        text-align: center;
    }

    footer .col-md-3,
    footer .col-md-5,
    footer .col-md-4 {
        margin-bottom: 20px;
    }

    footer .d-flex {
        justify-content: center;
    }
}

/* Smaller mobile refinements */
@media screen and (max-width: 768px) {
    #header { padding: 10px 0; }
    #header .container > ul > li a { width: 100%; }
    #header .container > ul > li:hover > ul { position: relative; }

    footer ul { margin-top: 50px; }
}
