/*
 Theme Name:   Sundrift
 Theme URI:    https://example.com/sundrift-child
 Description:  Sundrift Child Theme
 Author:       Robb Keele
 Author URI:   https://example.com
 Template:     kadence
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  sundrift
*/

/* HELPER CLASSES */
.sun-margin-zero {
    margin: 0 !important;
}

.sun-margin-bot-16 {
    margin-bottom: 1rem !important;
}

/* HERO */
.sun-hero-columns-container {
    flex-grow: 1;
}

/* MOBILE NAV BUTTON */
#mobile-toggle {
    border-radius: 4px;
}

/* FEATURES */
.sun-feature-heading {
    margin:0 !important
}

/* KADENCE TESTIMONIAL CAROUSEL */
    /* Ensure testimonial images are responsive */
    .wp-block-kadence-testimonials .kt-blocks-testimonial-carousel-item img {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }

    /* Adjust swiper pagination for testimonials */
    .sun-testimonials .swiper-pagination-bullets {
        bottom: 1rem;
    }

    .sun-testimonials .swiper-pagination-bullet {
        width: 10px;
        height: 10px;
        background-color: var(--global-palette7);
    }

    .sun-testimonials .swiper-pagination-bullet-active {
        background-color: var(--global-palette1);
    }

/* CONTACT FORM */
.sun-contact-form {
    width: 100%;
}

/* SITE FOOTER */
    /* Links */
    footer * a {
        color: inherit !important;
    }

    footer * a:hover {
        color: var(--global-palette7) !important;
    }

    footer .widget li:not(.kb-table-of-content-list li) {
        line-height: 1.6;
    }

    /* Logo */
    footer * img {
        width: 125px !important;
    }

    /* Paragraph Margins and Padding Reset */
    footer * p {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Nav Block Container */
    footer .kb-row-layout-id334162-5b > .kt-row-column-wrap {
        padding: 0 !important;
    }

    footer .site-middle-footer-inner-wrap .widget {
        margin: 0 !important;
    }

    /* Nav Menu List to Columns */
    #nav_menu-3 .menu {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem 2rem; /* Adjust spacing between rows and columns */
        list-style: none;
        padding: 0;
        margin: 0;
    }

    /* Nav Menu Item Re-ordering */
    #nav_menu-3 .menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-auto-rows: auto;
        gap: 0.5rem 2rem;
    }

    #nav_menu-3 .menu li:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }

    #nav_menu-3 .menu li:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }

    #nav_menu-3 .menu li:nth-child(3) {
        grid-column: 1;
        grid-row: 3;
    }

    #nav_menu-3 .menu li:nth-child(4) {
        grid-column: 2;
        grid-row: 1;
    }

    #nav_menu-3 .menu li:nth-child(5) {
        grid-column: 2;
        grid-row: 2;
    }

    #nav_menu-3 .menu li:nth-child(6) {
        grid-column: 2;
        grid-row: 3;
    }

@media (max-width: 1199px) {
    /* HELPER CLASSES */
    .sun-row-to-col-1199 {
        flex-direction: column !important;
    }
}

@media (max-width: 1024px) {
    /* HELPER CLASSES */
    .sun-layout-collapse-1024 > .kt-row-column-wrap {
        grid-template-columns: 1fr !important;
        gap: 1rem; /* optional spacing between collapsed items */
    }

    .sun-layout-collapse-1024 .wp-block-kadence-column {
        width: 100% !important;
    }
}

@media screen and (max-width: 719px) {
    .content-style-boxed .content-bg:not(.loop-entry) {
        margin-left: inherit !important;
        margin-right: inherit !important;
    }
}

@media screen and (min-width: 720px) and (max-width: 1024px) {
    /* FOOTER */
        /* Override Kadence Tablet Breakpoint */
        .site-footer-row-container-inner .site-footer-row.site-footer-row-tablet-column-layout-default,
        .site-footer-row-container-inner .site-footer-row.site-footer-row-tablet-column-layout-row {
            grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) !important;
        }
}


/* HOMEPAGE: HERO Section */
@media (min-width: 601px) and (max-width: 781px) {
    .sun-hero {
        background-position: 35% 50% !important;
    }

    .sun-hero-content .sun-col-right {
        flex-shrink: 2;
    }
}

@media (min-width: 600px) {
    .wp-block-columns.sun-hero-columns-container {
        flex-wrap: nowrap !important;
    }
}

@media (max-width: 599px) {
    .sun-hero {
        background-image: url(/wp-demos/sundrift-coffee/wp-content/uploads/2025/08/coffee-pour-small.webp) !important;
        margin-top: 0;
    }

    .sun-hero-content {
        margin-top: -35vh !important;
    }

    .sun-hero-columns-container .sun-col-left * {
        text-align: center !important;
    }

    .sun-hero-columns-container .sun-buttons-container {
        justify-content: center !important;
    }
    
    /* Hide Splide arrows inside Kadence Testimonial carousel */
    .wp-block-kadence-testimonials .splide__arrows {
        display: none !important;
    }

    /* Remove padding for carousel items */
    .wp-block-kadence-testimonials .kt-blocks-carousel .kt-blocks-carousel-init:not(.kt-carousel-arrowstyle-none):not(.tns-slider) {
        padding-left: unset !important;
        padding-right: unset !important;
    }
}

@media (max-width: 386px) {
    .sun-hero-content .kb-button {
        min-width: 80% !important;
    }
}

@media (min-width: 300px) {
    .sun-no-collapse-grid-2col div:first-child {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}