/* PMT — site-wide responsive enhancements (all frontend pages & shared components) */

/* ── Foundation ─────────────────────────────────────────────── */
html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    overflow-x: clip;
    min-width: 0;
}

main,
section,
.container,
.container-fluid {
    min-width: 0;
}

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

img,
video {
    height: auto;
}

/* Rich text / CMS content */
.pmt-home .about-text img,
.pmt-about .about-text img,
.pmt-news .details-content img,
.pmt-news .news-content img,
.pmt-contact .contact-us-content img,
.news-details-wrapper .details-content table,
.news-standard-wrapper .news-content table {
    max-width: 100%;
    height: auto;
}

.news-details-wrapper .details-content table,
.news-standard-wrapper .news-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Long strings (email, phone, URLs) */
.pmt-footer-value,
.pmt-footer-value a,
.contact-us-box .content h5,
.contact-us-box .content h5 a,
.header-top-wrapper .contact-list li a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Touch devices — disable custom cursor */
@media (hover: none), (pointer: coarse) {
    .mouse-cursor {
        display: none !important;
    }
}

/* ── Containers & spacing ───────────────────────────────────── */
@media (max-width: 575px) {
    .header-1 .container-fluid,
    .header-top-section .container-fluid {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    .section-padding {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .offcanvas__wrapper {
        padding: 24px 20px 40px;
    }
}

@media (max-width: 767px) {
    .section-padding {
        padding-top: 70px !important;
        padding-bottom: 70px !important;
    }
}

/* ── Header ─────────────────────────────────────────────────── */
@media (max-width: 1199px) {
    .header-main .main-menu {
        display: none !important;
    }
}

@media (min-width: 1200px) {
    .header-main .main-menu {
        display: block;
    }
}

.header-main .logo img {
    max-width: min(200px, 42vw);
    height: auto;
    object-fit: contain;
}

@media (max-width: 575px) {
    .header-main .logo img {
        max-width: min(160px, 48vw);
    }

    .header-main .pmt-header-actions {
        gap: 10px !important;
    }

    .header-main .pmt-header-actions .theme-btn {
        display: none;
    }
}

/* ── Hero ───────────────────────────────────────────────────── */
@media (max-width: 575px) {
    .hero-1 .hero-banner-prev,
    .hero-1 .hero-banner-next {
        width: 42px;
        height: 42px;
    }

    .hero-1 .hero-banner-prev {
        left: 12px;
    }

    .hero-1 .hero-banner-next {
        right: 12px;
    }

    .hero-1 .hero-content .hero-button {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .hero-1 .hero-content .hero-button .theme-btn,
    .hero-1 .hero-content .hero-button .text-btn {
        width: 100%;
        justify-content: center;
        text-align: center;
    }
}

/* ── Feature strip (home) ───────────────────────────────────── */
@media (max-width: 991px) {
    .feature-wrapper {
        flex-wrap: wrap;
        justify-content: center;
        gap: 24px;
    }

    .feature-wrapper .feature-icon-item {
        flex: 1 1 calc(50% - 12px);
        min-width: 140px;
        max-width: 100%;
    }
}

@media (max-width: 575px) {
    .feature-wrapper .feature-icon-item {
        flex: 1 1 100%;
    }
}

/* ── Client info / CEO quote ────────────────────────────────── */
@media (max-width: 767px) {
    .client-info-wrapper .client-info-image {
        flex-wrap: wrap;
        justify-content: center;
    }

    .client-info-wrapper .client-info-image .pmt-image,
    .client-info-wrapper .client-info-image .client-image {
        width: clamp(120px, 36vw, 160px) !important;
        height: clamp(120px, 36vw, 160px) !important;
        margin-left: 0 !important;
    }

    .client-info-wrapper .client-info-image .client-image {
        margin-left: -24px !important;
    }

    .client-info-wrapper .content h5.pmt-author-meta {
        padding-left: 0;
        text-align: center;
    }

    .client-info-wrapper .content h5.pmt-author-meta::before {
        display: none;
    }
}

/* ── Contact page ───────────────────────────────────────────── */
@media (min-width: 1200px) {
    .pmt-contact .contact-us-wrapper .contact-image {
        max-width: 100%;
    }
}

@media (max-width: 1199px) {
    .contact-us-wrapper .contact-image {
        max-width: 100%;
    }

    .contact-us-wrapper .contact-image img,
    .contact-us-wrapper .contact-image__video {
        padding-right: 0 !important;
        left: 0 !important;
        position: static !important;
    }
}

@media (max-width: 767px) {
    .contact-us-wrapper .contact-us-content .contact-us-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        padding: 24px 20px;
    }

    .contact-box-items {
        padding: 28px 20px;
    }

    .map-items .googpemap iframe {
        height: clamp(280px, 55vw, 420px);
    }
}

/* ── Breadcrumb heroes ──────────────────────────────────────── */
@media (max-width: 767px) {
    .breadcrumb-wrapper .page-heading,
    .breadcrumb-wrapper .page-heading.style-2 {
        padding: 110px 0 70px !important;
    }

    .breadcrumb-wrapper .page-heading h1,
    .breadcrumb-wrapper .page-heading.style-2 h1 {
        font-size: clamp(26px, 7vw, 36px) !important;
        line-height: 1.2;
    }
}

@media (max-width: 575px) {
    .breadcrumb-wrapper .page-heading,
    .breadcrumb-wrapper .page-heading.style-2 {
        padding: 96px 0 60px !important;
    }
}

/* ── About page ─────────────────────────────────────────────── */
@media (max-width: 575px) {
    .pmt-commissioners-section__watermark {
        white-space: normal;
        letter-spacing: 0.08em;
        font-size: clamp(2rem, 12vw, 3rem);
        line-height: 1.1;
    }

    .pmt-commissioner-modal {
        padding: 12px;
        align-items: flex-end;
    }

    .pmt-commissioner-modal__dialog {
        border-radius: 14px 14px 0 0;
        max-height: 92vh;
        overflow-y: auto;
    }

    .pmt-commissioner-modal__body {
        padding: 16px 18px 24px !important;
    }
}

/* ── News ───────────────────────────────────────────────────── */
@media (max-width: 991px) {
    .pmt-news .main-sideber {
        margin-top: 40px;
    }

    .pmt-news .pmt-news-categories-widget.single-sidebar-widget.style-2 {
        padding: 24px 20px 20px;
    }
}

@media (max-width: 767px) {
    .pmt-news .news-standard-wrapper .news-post-item {
        flex-direction: column;
    }

    .pmt-news .news-standard-wrapper .news-post-item .news-image {
        max-height: 280px;
    }

    .pmt-news .page-nav-wrap ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px;
    }

    .pmt-news .news-details-wrapper .news-client-box .client-area {
        flex-direction: column;
        gap: 20px;
    }

    .pmt-news .news-details-wrapper .news-client-box .client-area .client-item {
        max-width: 100% !important;
        width: 100%;
    }
}

/* ── Footer ───────────────────────────────────────────────── */
@media (max-width: 767px) {
    .footer-section .footer-widget-wrapper .single-footer-widget {
        text-align: center;
    }

    .footer-section .footer-widget-wrapper .widget-head h4::after {
        margin-left: auto;
        margin-right: auto;
    }

    .footer-section .footer-logo img {
        margin-left: auto;
        margin-right: auto;
        object-position: center center !important;
    }

    .footer-middle-wrapper .footer-middle-item {
        flex-direction: column;
        text-align: center;
        gap: 24px;
    }

    .footer-middle-wrapper .footer-middle-item .footer-contact {
        align-items: center;
    }

    .footer-section-2 .footer-logo img {
        object-position: center center !important;
    }
}

/* ── Forms (home quote + contact) ───────────────────────────── */
.contact-form-items .form-clt input,
.contact-form-items .form-clt textarea,
.contact-form-items .form-clt select,
.feature-contact-box .form-clt input,
.feature-contact-box .form-clt textarea,
.feature-contact-box .form-clt select {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 575px) {
    .feature-contact-box {
        padding: 24px 18px !important;
    }
}

/* ── Shop / cart / checkout (template pages) ────────────────── */
@media (max-width: 991px) {
    .shop-sidebar,
    .main-sidebar,
    .shop-details-wrapper .product-details-content {
        margin-top: 30px;
    }
}

@media (max-width: 767px) {
    .cart-table,
    .shop-cart-wrapper table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .shop-section .shop-box-items,
    .product-box-items {
        margin-bottom: 24px;
    }
}

/* ── Service / team / project pages ─────────────────────────── */
@media (max-width: 767px) {
    .pmt-home .service-box-items .accordion-single.active .service-image {
        padding: 0 20px 24px;
    }

    .pmt-home .service-box-items .accordion-single .service-image img {
        height: auto;
    }

    .service-box-items .accordion-single {
        flex-direction: column;
    }

    .team-card-item,
    .project-card-item {
        margin-bottom: 24px;
    }

    .faq-wrapper .accordion-item {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* ── Decorative assets — prevent overflow ───────────────────── */
.pmt-home .feature-section-3 .world-image,
.feature-section-3 > img {
    max-width: min(100%, 520px);
    height: auto;
}

/* ── Pagination ─────────────────────────────────────────────── */
.page-nav-wrap ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

/* ── 404 / FAQ ──────────────────────────────────────────────── */
@media (max-width: 767px) {
    .error-wrapper h1,
    .error-content h1 {
        font-size: clamp(80px, 22vw, 140px);
    }

    .error-wrapper .theme-btn,
    .error-content .theme-btn {
        width: 100%;
        max-width: 320px;
    }
}

/* ── Utility: safe area (notched phones) ────────────────────── */
@supports (padding: max(0px)) {
    .header-section,
    .footer-section,
    .footer-section-2 {
        padding-left: max(0px, env(safe-area-inset-left));
        padding-right: max(0px, env(safe-area-inset-right));
    }

    .back-to-top {
        bottom: max(24px, env(safe-area-inset-bottom));
        right: max(24px, env(safe-area-inset-right));
    }
}
