/* RESPONSIVE STYLE
	----------------------------- */
@media screen and (max-width: 1920px) {}

@media screen and (max-width: 1850px) {
    .team-activities .gallery-wrapper .modular-gallery-ul {
        height: 70vw;
    }
}

@media screen and (max-width:1720px) {
    .team-activities .gallery-wrapper .modular-gallery-ul {
        height: 66vw;
    }
    .gallery-wrapper.dual-slider .dual-row img{
        max-height: 70px;
    }
    .bottom-footer-wrap {
    grid-template-columns: 1.6fr 1.25fr;
}
}

@media screen and (max-width: 1536px) {
    .team-activities .gallery-wrapper .modular-gallery-ul {
        height: 62vw;
    }
}


@media screen and (max-width: 1440px) {}

@media screen and (max-width: 1366px) {}


@media screen and (max-width: 1280px) {
    .team-activities .gallery-wrapper .modular-gallery-ul {
        height: 68vw;
    }
}


@media screen and (max-width: 1024px) {
    .header-menu {
        display: none;
    }

    .team-activities .gallery-wrapper .modular-gallery-ul {
        height: 140vw;
    }

    .services-posts .swifty-card .post-details {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto auto;
        gap: 30px;
    }

    .services-posts .swifty-card .post-img-wrap {
        grid-column: 1 / -1;
        grid-row: 2;
        width: 100%;
        max-width: 100%;
        aspect-ratio: 16 / 9;
    }

    .services-posts .swifty-card .post-title-wrap {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .services-posts .swifty-card .post-info {
        grid-column: 1 / -1;
        grid-row: 3;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto;   /* ADDED — matches the desktop fix, prevents row inheritance */
        padding: 0;
    }

    .services-posts .swifty-card .service-left {   /* NEW — replaces the old bare .service-heading/.service-information placement */
        grid-column: 1;
        grid-row: 1;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .services-posts .swifty-card .what-we-do {
        grid-column: 2;
        grid-row: 1;   /* CHANGED from "1 / span 2" — no longer spans, so it can't force row-height coupling */
    }

    .amp-form-section .form-embed-wrap .ep-wrapper iframe {
        height: 820px !important;
        min-height: 820px !important;
    }

    .services-posts .swifty-cards .swifty-cards-wrapper {
        grid-template-columns: repeat(var(--posts-per-row, 3), 1fr);
    }
}


@media screen and (max-width: 992px) {
    :root {
        --site-header-height: 72px;
    }

    a.btn{
        padding: clamp(10px, 1.2vw, 14px) /* top */ clamp(45px, 5.5vw, 80px) /* right */ clamp(10px, 1.2vw, 16px) /* bottom */ clamp(15px, 3.1vw, 45px);
    }

    a.btn::before{
        right: clamp(15px, 2vw, 45px);
    }

    .post-nav-wrap.more-options .nav-more {
        grid-template-columns: 1fr;
    }

    .post-nav-wrap.more-options .nav-more .nav-box::after {
        bottom: 18px;
        right: 18px;
    }

    .inner-hero-block.hero-type-inner1 .hero-container .hero-content .hero-content-outer {
        width: calc(100% - 40px);
    }

    body .swifty-grid {
        padding: 50px 0;
    }

    body.blog .swifty-card .post-img-wrap {
        width: 100%;
    }

    .mac-intro-section .img-text-block-img {
        min-height: auto !important;
    }

    .block-type-image-text .image-size-edge .img-outer-wrapper {
        position: relative;
    }

    body .block-type-image-text .mac-intro-section .mac-intro-content h2.block-title,
    body .block-type-image-text .mac-intro-section .mac-intro-content .block-subtitle,
    body .block-type-image-text .mac-intro-section .mac-intro-content .block-paragraphs {
        margin-bottom: 30px;
    }

    .down-arrow {
        display: none;
    }

    .home-intro-img .full-width-image {
        height: 90vw;
        max-height: 380px;
    }

    .home-intro-img .full-width-image .full-width-img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* =========== Home About Section  =========== */
    .home-about-section .mac-intro-section .img-text-block-img {
        position: relative;
        margin-bottom: 80px;
    }

    .home-about-section .section-patterns-wrapper {
        position: relative;
    }

    .home-about-section .section-patterns-wrapper .section-pattern-1 {
        position: absolute;
        bottom: 0px;
        left: 100%;
        top: 24px;
        transform: rotate(90deg);
        height: 100%;
        width: 64px;
    }

    .block-type-image-text.home-about-section .image-position-left .mac-intro-content {
        padding: 20px 20px 50px;
    }

    footer .section-patterns-wrapper {
        display: none;
    }

    .cta-left h2.block-title {
        text-align: left;
        margin-bottom: 15px;
    }

    .cta-left .cta-btns {
        text-align: left;
    }

    .services-posts .block-paragraphs,
    .services-posts .posts-carousel {
        width: 100%;
    }

    .content-block.home-about-section {
        width: 100%;
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:first-child{
        padding-top: 0;
        width: 90%;
        gap: 0px;
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:first-child {
        padding-top: 0;
        padding-left: 0;
        width: 100% !important;
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:nth-child(2n) .block-paragraphs {
        transform: none !important;
        margin-left: 0;
    }

    body .swifty-grid{
        padding: 30px 0px;
    }

    .content-block.service-intro-section .text-block .flex-container{
        grid-template-columns: repeat(var(--posts-per-row, 1), 1fr);
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:nth-child(2n){
        flex-direction: column;
        gap: 30px;
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:nth-child(2n) .flexi-media-video {
        max-height: unset;
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:first-child .block-paragraphs {
        transform: none !important;
        max-width: 100%;
    }

    .content-block.service-intro-section .text-block .flex-container{
        width: 90%;
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:first-child .flexi-img-txt-img{
        max-height: max-content;
    }

    body .filters-posts-contaner .mobile-category-dropdown{
        background-color: var(--primary-color);
        max-width: 100%;
        border-radius: 0;
    }
    
    body .swifty-resources .swifty-grid{
        padding: 0;
    }

    body.single-post .post-content-inner {
        padding-left: 0;
    }

    .post-content-inner{
        grid-template-columns: 1fr;
    }

    .social-share{
        width: 100%;
        position: relative;
    }

    body.single-post .social-share a.social-share__link{
        display: inline-block;
        width: 40px;
        height: 40px;
        line-height: 40px;
    }

    .mobile-only {
        display: block;
    }

    .post-content-inner .post-sidebar{
        width: 100%;
    }

    body.single-post .post-content-inner{
        padding-top: 10px;
    }

    .services-posts .posts-block .blogs-listing .single-post{
        padding-bottom: 20px;
    }

    .block-title span{
        display: inline;
    }

    body .gallery-wrapper.dual-slider .dual-row img{
        height: 50px;
    }

     footer .footer-right {
        grid-area: left;
    }

    footer .footer-wrap {
        display: flex;
        flex-direction: column;
    }

    footer .footer-wrap .footer-left {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        text-align: left;
        align-items: flex-start;
        gap: 0;
    }

    footer .footer-wrap .footer-left .footer-middle {
        margin-bottom: 0;
        gap: 0;
    }

    .footer-left .footer-links,
    footer .footer-wrap .footer-left .footer-middle {
        width: 100%;
        text-align: left;
        justify-content: start;
        margin-bottom: 0;
    }

    .bottom-footer-wrap {
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    .footer-bottom {
        padding-top: 0;
    }

    .footer-bottom .copyright-section {
        width: 100%;
    }

    .footer-middle .footer-social {
        display: flex;
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        padding: 30px 0 0;
    }

    .cta-left h2.block-title span{
       display: block;
    }

    .footer-left .footer-links ul.menu li{
        padding: 7px 0;
    }

    .footer-middle .footer-social a.social-icon img {
        width: 28px;
    }

    .content-block.home-hero{
        margin-top: 0;
    }

    .amp-form-section .form-media-wrap{
        flex-direction: column;
    }
    
    .amp-form-section .form-embed-wrap{
        padding: 0 30px;
    }

    .mobile-menu-wrapper .header-ctas {
        display: flex !important;
        flex-direction: column;
        gap: 12px;
        padding: 20px;
        visibility: visible !important;
        opacity: 1 !important;
    }

    .mobile-menu-wrapper .header-ctas .btn {
        display: inline-flex !important;
        width: 100%;
        justify-content: center;
    }

    .mobile-menu-wrapper .modile-menu{
        margin-bottom: 50px;
    }

    .single-service-info .post-info{
        display: flex !important;
        flex-direction: column;
    }

    .single-service-info .post-info .service-left{
        row-gap: 20px;
    }

    .single-service-info .what-we-do{
        margin-top: 30px;
        width: 100%;
    }

    .gallery-wrapper .modular-image-container{
        padding: 10px 0px;
    }
    
    .work-posts.amp-themes .swifty-cards .swifty-card{
        flex: 0 0 calc(50% - 40px);
        max-width: calc(50% - 40px);
        flex-basis: calc(50% - 40px);
    }

    .amp-form-section .form-embed-wrap .ep-wrapper iframe {
        height: 780px !important;
    }

    .amp-theme-popup .amp-theme-thumbnails .slick-slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .amp-theme-popup .amp-theme-thumbnails .slick-track {
    gap: 8px;
    display: flex;
}

}




@media screen and (max-width: 767px) {
    .team-activities .gallery-wrapper .modular-gallery-ul {
        height: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 40px;
        position: static;
    }

    .team-activities .gallery-wrapper .gallery-item {
        position: static;
        width: 100%;
        height: auto;
    }

    .team-activities .gallery-wrapper .gallery-item img {
        height: auto;
    }

    .team-member-outer {
        grid-template-columns: 1fr;
        gap: 40px;
        margin: 60px auto;
        padding: 0 20px;
    }

    .team-member-content {
        padding-left: 0;
        transform: translateY(0px);
    }

    .work-gallery .gallery-block .gallery-wrapper .modular-gallery-ul {
        grid-template-columns: 1fr !important;
        gap: 25px;
        width: 100%;
    }

    /* every item full width stack */
    .work-gallery .gallery-block .gallery-wrapper .gallery-item {
        grid-column: 1 / -1 !important;
    }

    /* remove edge-to-edge effect for mobile */
    .work-gallery .gallery-block .gallery-wrapper .gallery-item:nth-child(7n+4) img {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
    }

    .blogs-listing {
        flex-direction: column;
    }

    /* Default */
    .work-posts .posts-col-2 .blogs-listing .single-post {
        flex: 0 0 100%;
    }

    /* Pattern repeats every 4 posts */
    .work-posts .posts-col-2 .blogs-listing .single-post:nth-child(4n+1),
    .work-posts .posts-col-2 .blogs-listing .single-post:nth-child(4n+2),
    .work-posts .posts-col-2 .blogs-listing .single-post:nth-child(4n+3),
    .work-posts .posts-col-2 .blogs-listing .single-post:nth-child(4n+4) {
        flex-basis: 100%;
        width: 100%;
    }

    .posts-col-2 .blogs-listing .single-post {
        width: 100%;
    }

    .services-posts .posts-block .blogs-listing .single-post {
        flex: 100%;
        width: 100%;
    }

    .team-member-content {
        transform: translateY(-10px);
    }

    .work-posts .swifty-card.is-wide,
    .work-posts .swifty-card.is-narrow {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .work-posts .swifty-cards .swifty-cards-wrapper {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .work-posts .swifty-cards .swifty-card {
        grid-column: 1 / -1 !important;
    }

    .content-block.team-top-img .section-patterns-wrapper .section-pattern {
        display: none;
    }

    .content-block.founder-intro .mac-intro-section .img-text-block-img {
        max-width: 70%;
    }

    .team-activities .gallery-wrapper .gallery-item:nth-child(2),
    .team-activities .gallery-wrapper .gallery-item:nth-child(3),
    .team-activities .gallery-wrapper .gallery-item:nth-child(4) {
        display: none;
    }

    .team-activities .gallery-wrapper .gallery-item:nth-child(1),
    .team-activities .gallery-wrapper .gallery-item:nth-child(5) {
        width: 100%;
        height: auto;
        padding: 0;
    }

    .team-activities .gallery-wrapper .gallery-item:nth-child(1) a.modular_gallery_image {
        width: 75vw;
    }

    .team-activities .gallery-wrapper .gallery-item:nth-child(5) a.modular_gallery_image {
        width: 80vw;
        float: right;
    }

    .content-block.four-pillars .tiles-block {
        grid-template-columns: 1fr;
    }

    .content-block.four-pillars .tiles-block .title-container .block-paragraphs {
        margin-bottom: 0;
    }

    .content-block.service-intro-section .text-block .flex-container {
        grid-template-columns: unset;
    }

    .content-block.service-intro-section .text-block .flex-container .text-column:first-child .block-paragraphs,
    .content-block.service-intro-section .text-block .flex-container .text-column .block-paragraphs {
        transform: none !important;
        max-width: 100%;
        margin-bottom: 0;
    }

    .services-posts .swifty-card .post-details {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto;
        gap: 24px;
        padding-top: 20px;
    }

    .services-posts .swifty-card .post-title-wrap {
        grid-column: 1;
        grid-row: 1;
    }

    .services-posts .swifty-card .post-img-wrap {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        aspect-ratio: 4 / 3;
    }

    .services-posts .swifty-card .post-info {
        grid-column: 1;
        grid-row: 3;
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0;
    }

    .services-posts .swifty-card .service-left {   /* NEW — was previously handled implicitly; now explicit since it's a real wrapper */
        grid-column: 1;
        grid-row: 1;
        gap: 20px;
    }

    .services-posts .swifty-card .what-we-do {
        grid-column: 1;
        grid-row: 2;   /* CHANGED from "auto" to explicit 2 — keeps it directly under service-left instead of relying on auto-placement guesswork */
    }

    .services-posts .swifty-card .service-heading p {
        font-size: 18px;
    }

    .content-block.contact-address .container.flex-container{
        flex-direction: column;
    }

    .content-block.contact-address .container.flex-container .text-column {
        width: 100% !important;
    }

    .work-gallery.gallery-style-1 .gallery-block .gallery-wrapper .gallery-item:nth-child(7n+3), 
    .work-gallery.gallery-style-1 .gallery-block .gallery-wrapper .gallery-item:nth-child(7n+4) {
        width: 100vw;
        max-width: none;
        margin-left: calc(50% - 50vw);
        padding: 0;
    }

    .work-gallery.gallery-style-1 .gallery-block .gallery-wrapper .gallery-item:nth-child(7n+4) a.modular_gallery_image img {
        object-fit: contain;
        width: 130%;
        margin-left: -22%;
    }

    .work-gallery.gallery-style-1 .gallery-block .gallery-wrapper .modular-gallery-ul{
        padding-bottom: 0;
    }

    #test-home-video,
    #test-home-video .text-block,
    #test-home-video .flex-container,
    #test-home-video .full-width-video {
        height: 300px !important;
    }

    #test-home-video video {
        width: 100%;
        height: 300px !important;
        object-fit: cover;
        display: block;
    }

    .work-posts .swifty-cards .swifty-card.is-wide,
    .work-posts .swifty-cards .swifty-card.is-narrow {
        grid-column: span 10;
    }

    .amp-form-section .form-embed-wrap .ep-wrapper iframe {
        height: 850px !important;
        min-height: 850px !important;
    }

    .work-posts.amp-themes .swifty-cards .swifty-card{
        flex: 0 0 calc(100% - 20px);
        max-width: calc(100% - 20px);
        flex-basis: calc(100% - 20px);
    }

}
