@media(max-width:1200px){
    .navigation{
        gap:36px;
        margin-right:35px;
    }

    .experience-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:992px){
    .navbar,
    .navbar .container{
        height:90px;
    }

    .logo img{
        height:66px;
    }

    .navigation{
        position:fixed;
        top:90px;
        left:-100%;
        width:100%;
        height:calc(100vh - 90px);
        background:var(--nav);
        flex-direction:column;
        justify-content:flex-start;
        align-items:center;
        gap:34px;
        padding-top:60px;
        margin:0;
        transition:.35s ease;
        border-top:1px solid var(--border);
    }

    .navigation.active{
        left:0;
    }

    .mobile-menu{
        display:block;
    }

    .hero{
        min-height:650px;
    }

    .hero-content{
        align-items:center;
        text-align:center;
    }

    .hero-overlay{
        background:rgba(0,0,0,.58);
    }

    .hero-prev,
    .hero-next{
        display:none;
    }
}

@media(max-width:768px){
    .container{
        width:90%;
    }

    .hero{
        min-height:620px;
    }

    .hero h1{
        font-size:42px;
    }

    .hero p{
        font-size:15px;
        line-height:1.8;
    }

    .hero-buttons{
        width:100%;
        flex-direction:column;
    }

    .btn-primary,
    .btn-secondary{
        width:100%;
    }

    .experience{
        padding:70px 0;
    }

    .experience-grid{
        grid-template-columns:1fr;
    }
}

@media(max-width:480px){
    .navbar,
    .navbar .container{
        height:82px;
    }

    .navigation{
        top:82px;
        height:calc(100vh - 82px);
    }

    .logo img{
        height:58px;
    }

    .hero{
        min-height:590px;
    }

    .hero h1{
        font-size:34px;
    }

    .hero-subtitle{
        font-size:11px;
        letter-spacing:2px;
    }
}

@media(max-width:992px){
    .about-grid{
        grid-template-columns:1fr;
        gap:45px;
    }

    .about-image{
        min-height:auto;
    }

    .about-image img{
        width:100%;
        height:460px;
    }

    .about-image::after{
        display:none;
    }
}

@media(max-width:768px){
    .about-section{
        padding:75px 0;
    }

    .about-image img{
        height:360px;
    }
}

@media(max-width:480px){
    .about-image img{
        height:300px;
    }
}

@media(max-width:1200px){
    .services-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:768px){
    .services-section{
        padding:75px 0;
    }

    .services-grid{
        grid-template-columns:1fr;
    }

    .service-card img{
        height:250px;
    }
}

@media(max-width:992px){
    .inner-page{
        padding-top:90px;
    }

    .portfolio-grid,
    .plans-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:768px){
    .page-hero{
        padding:80px 0 55px;
    }

    .portfolio-section,
    .plans-section{
        padding:75px 0;
    }

    .portfolio-grid,
    .plans-grid{
        grid-template-columns:1fr;
    }
}

@media(max-width:1200px){
    .portfolio-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:900px){
    .preview-box{
        grid-template-columns:1fr;
        overflow-y:auto;
    }

    .preview-main{
        min-height:420px;
    }

    .preview-main img{
        max-height:420px;
    }
}

@media(max-width:768px){
    .portfolio-section{
        padding:75px 0;
    }

    .portfolio-grid{
        grid-template-columns:1fr;
    }

    .portfolio-card-image{
        height:320px;
    }

    .project-preview{
        padding:15px;
    }

    .preview-details{
        padding:24px;
    }

    .preview-thumbs{
        grid-template-columns:repeat(3,1fr);
    }
}

@media(max-width:1200px){
    .plans-grid{
        grid-template-columns:repeat(2,1fr);
    }
}

@media(max-width:768px){
    .plans-section{
        padding:75px 0;
    }

    .plans-grid{
        grid-template-columns:1fr;
    }

    .plan-card-image{
        height:320px;
    }

    .plan-modal-box{
        padding:26px;
    }
}

@media(max-width:1200px){

.gallery-grid{

grid-template-columns:repeat(2,1fr);

}

}

@media(max-width:768px){

.gallery-section{

padding:75px 0;

}

.gallery-grid{

grid-template-columns:1fr;

}

.gallery-card img{

height:280px;

}

.gallery-arrow{

display:none;

}

}


@media(max-width:992px){
    .contact-grid{
        grid-template-columns:1fr;
        gap:40px;
    }

    .contact-cta-box{
        flex-direction:column;
        align-items:flex-start;
    }
}

@media(max-width:768px){
    .contact-section{
        padding:75px 0;
    }

    .contact-form{
        padding:24px;
    }

    .contact-cta{
        padding:70px 0;
    }

    .contact-cta-box{
        padding:30px;
    }
}

@media(max-width:768px){
    .map-box{
        height:340px;
    }

    .contact-socials{
        grid-template-columns:1fr;
    }
}

@media(max-width:992px){

.contact-grid{

grid-template-columns:1fr;

}

.map-box,
.contact-form{

min-height:450px;

height:auto;

}

}


@media(max-width:992px){

.contact-grid{

grid-template-columns:1fr;

}

.map-box,
.contact-form{

min-height:450px;

height:auto;

}

}


@media(max-width:1100px){

.footer-grid{

grid-template-columns:repeat(2,1fr);

}

}

@media(max-width:768px){

.footer{

margin-top:70px;

}

.footer-grid{

grid-template-columns:1fr;

padding:60px 0 35px;

}

.footer-bottom-content{

flex-direction:column;

text-align:center;

}

}


@media(max-width:768px){
    .clients-section{
        padding:70px 0;
    }

    .client-logo-card{
        width:150px;
        height:90px;
    }
}


/* ==========================================================
   TMK FINAL ALL-DEVICE RESPONSIVE LAYER
   2026
   ========================================================== */

/* ---------- GLOBAL SAFETY ---------- */

html{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
    -webkit-text-size-adjust:100%;
}

body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}

*,
*::before,
*::after{
    box-sizing:border-box;
}

img,
video,
svg,
canvas,
iframe{
    max-width:100%;
}

img{
    height:auto;
}

button,
a,
input,
select,
textarea{
    -webkit-tap-highlight-color:transparent;
}

.container{
    width:min(100% - 40px, 1760px);
    margin-left:auto;
    margin-right:auto;
}


/* ==========================================================
   NAVBAR
   ========================================================== */

.navbar,
.navbar .container{
    max-width:100%;
}

.logo{
    flex:0 0 auto;
}

.logo img{
    display:block;
    max-width:100%;
}

.navigation{
    min-width:0;
}

.navigation a{
    white-space:nowrap;
}

.nav-right{
    flex:0 0 auto;
}


/* ==========================================================
   HOMEPAGE HERO
   ========================================================== */

.hero{
    width:100%;
    min-height:min(720px, 100svh);
}

.hero-slider,
.hero-slider .slide{
    width:100%;
}

.hero-slider img{
    width:100%;
    height:100%;
    object-fit:cover;
}

.hero-content{
    width:min(100% - 40px, 1760px);
}

.hero h1{
    overflow-wrap:break-word;
}

.hero p{
    max-width:650px;
}


/* ==========================================================
   INNER PAGE INTRO
   ========================================================== */

.page-hero{
    height:auto !important;
    min-height:0 !important;
    padding:36px 0 26px !important;
    margin:0 !important;
}

.page-hero .container{
    height:auto !important;
    min-height:0 !important;
}

.page-hero .section-label{
    margin:0 0 10px !important;
}

.page-hero h1{
    margin:0 0 14px !important;
    line-height:1.03 !important;
    overflow-wrap:break-word;
}

.page-hero p{
    margin:0 !important;
    max-width:900px;
    line-height:1.55 !important;
}


/* ==========================================================
   COMPACT SECTION RHYTHM
   ========================================================== */

.about-section,
.services-section,
.portfolio-section,
.plans-section,
.gallery-section,
.clients-section,
.contact-section{
    height:auto !important;
    min-height:0 !important;
}

.portfolio-section,
.plans-section,
.gallery-section,
.services-section,
.contact-section{
    padding-top:26px !important;
}

.about-section{
    padding-top:32px !important;
}

.section-header{
    margin-bottom:24px !important;
}

.portfolio-grid,
.gallery-grid,
.plans-grid,
.services-grid{
    margin-top:0 !important;
}


/* ==========================================================
   PORTFOLIO + GALLERY
   5 desktop / 4 laptop / 3 tablet / 2 phone / 1 tiny
   ========================================================== */

.portfolio-grid,
.gallery-grid{
    display:grid !important;
    grid-template-columns:repeat(5,minmax(0,1fr)) !important;
    gap:18px !important;
    width:100%;
}

.portfolio-card,
.gallery-card{
    min-width:0 !important;
    width:100% !important;
}

.portfolio-card-image,
.gallery-card{
    overflow:hidden;
}

.portfolio-card-image img,
.gallery-card img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}

.portfolio-card-content{
    position:relative;
    z-index:20;
}

.view-project-btn{
    position:relative !important;
    z-index:50 !important;
    pointer-events:auto !important;
    touch-action:manipulation;
}


/* ==========================================================
   PLANS + SERVICES
   ========================================================== */

.plans-grid,
.services-grid{
    width:100%;
}

.plan-card,
.service-card{
    min-width:0;
    width:100%;
}

.plan-card img,
.service-card img{
    max-width:100%;
    object-fit:cover;
}


/* ==========================================================
   ABOUT
   ========================================================== */

.about-grid{
    height:auto !important;
    min-height:0 !important;
    align-items:center;
}

.about-grid > *{
    min-width:0;
}

.about-image{
    height:auto !important;
    min-height:0 !important;
}

.about-image img{
    display:block;
    width:100%;
    height:auto;
    object-fit:cover;
}


/* ==========================================================
   CLIENT CAROUSEL
   ========================================================== */

.clients-section{
    overflow:hidden;
}

.clients-carousel{
    max-width:100%;
}

.client-logo-card{
    flex-shrink:0;
}

.client-logo-card img{
    max-width:100%;
    object-fit:contain;
}


/* ==========================================================
   CONTACT
   ========================================================== */

.contact-grid{
    width:100%;
}

.contact-grid > *{
    min-width:0;
}

.contact-section iframe{
    width:100% !important;
    max-width:100%;
}


/* ==========================================================
   PROJECT PREVIEW / PLAN MODAL / GALLERY LIGHTBOX
   ========================================================== */

.project-preview,
.plan-request-modal,
.gallery-lightbox{
    width:100vw !important;
    max-width:100vw !important;
}

.preview-box,
.plan-modal-box{
    max-width:calc(100vw - 32px) !important;
    max-height:calc(100dvh - 32px) !important;
}

.preview-main,
.preview-details{
    min-width:0;
}

.preview-main img,
.gallery-lightbox img{
    max-width:100% !important;
    max-height:calc(100dvh - 110px) !important;
    object-fit:contain !important;
}

.preview-thumbs{
    max-width:100%;
    overflow-x:auto;
    overscroll-behavior-inline:contain;
    -webkit-overflow-scrolling:touch;
}

.preview-arrow,
.gallery-prev,
.gallery-next,
.preview-close,
.plan-modal-close{
    touch-action:manipulation;
}


/* ==========================================================
   LARGE DESKTOP
   ========================================================== */

@media (min-width:1600px){

    .container{
        width:min(100% - 80px,1760px);
    }

    .portfolio-grid,
    .gallery-grid{
        gap:22px !important;
    }
}


/* ==========================================================
   LAPTOP
   ========================================================== */

@media (max-width:1300px){

    .container{
        width:min(100% - 40px,1200px);
    }

    .portfolio-grid,
    .gallery-grid{
        grid-template-columns:repeat(4,minmax(0,1fr)) !important;
    }

    .navigation{
        gap:30px;
    }
}


/* ==========================================================
   SMALL LAPTOP / LARGE TABLET
   ========================================================== */

@media (max-width:1100px){

    .navigation{
        gap:20px;
    }

    .navigation a{
        font-size:14px;
    }

    .portfolio-grid,
    .gallery-grid{
        grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    }
}


/* ==========================================================
   TABLET + MOBILE NAVIGATION
   ========================================================== */

@media (max-width:992px){

    .container{
        width:calc(100% - 32px);
    }

    .navbar,
    .navbar .container{
        height:84px;
    }

    .logo img{
        max-height:64px;
        width:auto;
    }

    .mobile-menu{
        display:flex;
        position:relative;
        z-index:1002;
        width:44px;
        height:44px;
        align-items:center;
        justify-content:center;
        flex-direction:column;
        gap:5px;
        cursor:pointer;
    }

    .navigation{
        position:fixed;
        top:84px;
        left:-100%;
        width:100%;
        height:calc(100dvh - 84px);
        padding:24px 20px 40px;
        display:flex;
        flex-direction:column;
        align-items:stretch;
        justify-content:flex-start;
        gap:4px;
        overflow-y:auto;
        overscroll-behavior:contain;
        z-index:1000;
    }

    .navigation.active{
        left:0;
    }

    .navigation a{
        width:100%;
        min-height:52px;
        display:flex;
        align-items:center;
        padding:10px 6px;
        font-size:16px;
        white-space:normal;
    }

    .navigation a::after{
        bottom:5px;
    }

    .hero{
        min-height:650px;
    }

    .hero-content{
        width:calc(100% - 32px);
    }

    .about-grid,
    .contact-grid{
        grid-template-columns:1fr !important;
    }

    .preview-box{
        grid-template-columns:1fr !important;
        overflow-y:auto !important;
    }

    .preview-main{
        min-height:340px !important;
    }
}


/* ==========================================================
   PHONE
   ========================================================== */

@media (max-width:700px){

    .container{
        width:calc(100% - 24px);
    }

    .navbar,
    .navbar .container{
        height:76px;
    }

    .logo img{
        max-height:56px;
    }

    .navigation{
        top:76px;
        height:calc(100dvh - 76px);
    }

    .theme-toggle{
        transform:scale(.9);
        transform-origin:center;
    }

    .page-hero{
        padding:24px 0 18px !important;
    }

    .page-hero .section-label{
        margin-bottom:8px !important;
    }

    .page-hero h1{
        font-size:clamp(34px,11vw,52px) !important;
        margin-bottom:10px !important;
    }

    .page-hero p{
        font-size:15px !important;
    }

    .portfolio-section,
    .plans-section,
    .gallery-section,
    .services-section,
    .contact-section{
        padding-top:18px !important;
    }

    .about-section{
        padding-top:22px !important;
    }

    .section-header{
        margin-bottom:18px !important;
    }

    .hero{
        min-height:590px;
        height:100svh;
    }

    .hero-content{
        width:calc(100% - 24px);
    }

    .hero h1{
        font-size:clamp(38px,11vw,54px);
        line-height:1.03;
    }

    .hero p{
        font-size:16px;
        line-height:1.55;
    }

    .hero-buttons{
        display:flex;
        flex-direction:column;
        align-items:stretch;
        width:100%;
        max-width:360px;
    }

    .hero-buttons a{
        width:100%;
        min-width:0;
    }

    .portfolio-grid,
    .gallery-grid{
        grid-template-columns:repeat(2,minmax(0,1fr)) !important;
        gap:12px !important;
    }

    .portfolio-card-content{
        padding:14px !important;
    }

    .portfolio-card-content h3{
        font-size:16px !important;
        line-height:1.25;
    }

    .portfolio-card-content p{
        font-size:13px !important;
        line-height:1.45;
    }

    .view-project-btn{
        min-height:44px;
        width:100%;
        display:flex;
        align-items:center;
        justify-content:center;
    }

    .plans-grid,
    .services-grid{
        grid-template-columns:1fr !important;
    }

    .preview-box,
    .plan-modal-box{
        width:calc(100vw - 16px) !important;
        max-width:calc(100vw - 16px) !important;
        max-height:calc(100dvh - 16px) !important;
    }

    .preview-main{
        min-height:250px !important;
    }

    .preview-details{
        padding:18px !important;
    }

    .preview-arrow,
    .gallery-prev,
    .gallery-next{
        width:44px !important;
        height:44px !important;
    }

    .contact-section iframe{
        min-height:300px;
    }
}


/* ==========================================================
   SMALL PHONE
   ========================================================== */

@media (max-width:480px){

    .container{
        width:calc(100% - 20px);
    }

    .hero h1{
        font-size:clamp(34px,10.5vw,46px);
    }

    .page-hero h1{
        font-size:clamp(32px,10vw,44px) !important;
    }

    .portfolio-grid,
    .gallery-grid{
        gap:10px !important;
    }

    .portfolio-card-content{
        padding:12px !important;
    }
}


/* ==========================================================
   VERY NARROW DEVICES
   ========================================================== */

@media (max-width:360px){

    .portfolio-grid,
    .gallery-grid{
        grid-template-columns:1fr !important;
    }

    .hero-buttons{
        max-width:none;
    }
}


/* ==========================================================
   TOUCH DEVICES
   ========================================================== */

@media (hover:none), (pointer:coarse){

    .view-project-btn,
    .portfolio-card,
    .gallery-card,
    .plan-card,
    .client-logo-card{
        cursor:pointer;
    }

    .view-project-btn,
    .navigation a,
    button{
        min-height:44px;
    }

    .tmk-project-name-overlay,
    .tmk-project-title-overlay{
        pointer-events:none !important;
    }
}


/* ==========================================================
   REDUCED MOTION
   ========================================================== */

@media (prefers-reduced-motion:reduce){

    html{
        scroll-behavior:auto !important;
    }

    *,
    *::before,
    *::after{
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:.01ms !important;
    }
}



/* ==========================================================
   TMK MOBILE HAMBURGER — EXPLICIT LIGHT/DARK VISIBILITY
   ========================================================== */

@media (max-width:992px){

    .mobile-menu{
        display:flex !important;
        position:relative !important;
        width:46px !important;
        height:46px !important;
        min-width:46px !important;
        min-height:46px !important;
        padding:10px !important;
        margin:0 !important;

        flex-direction:column !important;
        align-items:center !important;
        justify-content:center !important;
        gap:5px !important;

        background:transparent !important;
        border:0 !important;
        border-radius:8px !important;

        opacity:1 !important;
        visibility:visible !important;
        pointer-events:auto !important;

        z-index:10050 !important;
        cursor:pointer !important;
    }

    /*
     * Actual hamburger bars.
     * Explicit black in light mode.
     */
    .mobile-menu span{
        display:block !important;
        position:relative !important;

        width:25px !important;
        height:3px !important;
        min-height:3px !important;

        margin:0 !important;
        padding:0 !important;

        background:#111 !important;
        border:0 !important;
        border-radius:999px !important;

        opacity:1 !important;
        visibility:visible !important;

        transform-origin:center !important;
        transition:
            transform .22s ease,
            opacity .22s ease,
            background-color .22s ease !important;
    }

    /*
     * Dark mode — force white bars.
     * Covers the common theme selectors used by TMK.
     */
    body.dark-mode .mobile-menu span,
    html.dark-mode .mobile-menu span,
    [data-theme="dark"] .mobile-menu span{
        background:#fff !important;
    }

    /*
     * Menu opened:
     * turn hamburger into a clean X.
     */
    .mobile-menu.active span:nth-child(1){
        transform:translateY(8px) rotate(45deg) !important;
    }

    .mobile-menu.active span:nth-child(2){
        opacity:0 !important;
        transform:scaleX(0) !important;
    }

    .mobile-menu.active span:nth-child(3){
        transform:translateY(-8px) rotate(-45deg) !important;
    }

    /*
     * Ensure surrounding navbar elements cannot cover it.
     */
    .navbar .container{
        position:relative !important;
    }

    .nav-right{
        position:relative !important;
        z-index:10040 !important;
        display:flex !important;
        align-items:center !important;
        gap:8px !important;
    }

    .theme-toggle{
        position:relative !important;
        z-index:10041 !important;
    }
}

