/* =========================================
   Responsive Styles - Leak Detect Theme
   ========================================= */

/* Large Desktop */
@media (max-width: 1400px) {
    .ld-container {
        max-width: 1140px;
    }
}

/* Desktop */
@media (max-width: 1200px) {
    :root {
        --ld-section-padding: 80px;
    }

    .ld-container {
        max-width: 960px;
    }

    .ld-hero__title {
        font-size: 3rem;
    }

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

    .ld-footer__grid {
        grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
        gap: 30px;
    }
}

/* Tablet Landscape */
@media (max-width: 992px) {
    :root {
        --ld-section-padding: 70px;
    }

    .ld-container {
        width: 100%;
        max-width: 100%;
        padding: 0 20px;
    }

    .ld-section-header .ld-subtitle::before,
    .ld-section-header .ld-subtitle::after {
        display: none !important;
    }

    .ld-about__decor--dots,
    .ld-about__decor--circle {
        display: none !important;
    }

    h1 { font-size: 2.25rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }

    .ld-section-header h2 {
        font-size: 2rem;
    }

    /* Header */
    .ld-header__toggle {
        display: flex;
    }

    .ld-header__nav {
        position: fixed;
        top: 0;
        right: -320px;
        width: 300px;
        height: 100vh;
        background: var(--ld-white);
        z-index: 1001;
        padding: 24px;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.2);
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        overflow-y: auto;
    }

    .ld-header__nav.is-open {
        right: 0;
    }

    .ld-mobile-nav__header {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        padding-bottom: 16px;
        margin-bottom: 15px;
        border-bottom: 1px solid var(--ld-gray-200);
    }

    .ld-mobile-nav__title {
        font-size: 1.15rem;
        font-weight: 800;
        color: var(--ld-secondary);
    }

    .ld-mobile-nav__close {
        background: var(--ld-gray-100);
        border: 1px solid var(--ld-gray-300);
        border-radius: var(--ld-radius-sm);
        width: 34px;
        height: 34px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: var(--ld-secondary);
        cursor: pointer;
        font-size: 0.95rem;
    }

    .ld-mobile-nav__close:hover {
        background: var(--ld-primary);
        color: var(--ld-white);
        border-color: var(--ld-primary);
    }

    .ld-mobile-nav__footer {
        display: block !important;
        margin-top: auto;
        padding-top: 20px;
    }

    .ld-header__menu {
        flex-direction: column;
        gap: 4px;
        width: 100%;
        margin-top: 10px;
    }

    .ld-header__menu li {
        width: 100%;
    }

    .ld-header__menu li a {
        padding: 12px 16px;
        border-radius: var(--ld-radius-md);
        width: 100%;
        font-size: 1rem;
        border-bottom: 1px solid var(--ld-gray-100);
        justify-content: flex-start;
    }

    .ld-header__menu li a::after {
        display: none;
    }

    .ld-header__menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0 15px;
        background: var(--ld-gray-100);
        border: none;
        margin-top: 4px;
    }

    /* Complete Animation Deactivation on Mobile */
    .ld-animate,
    [data-animation],
    .ld-hero__slide .ld-hero__badge,
    .ld-hero__slide .ld-hero__title,
    .ld-hero__slide .ld-hero__desc,
    .ld-hero__slide .ld-hero__buttons,
    .ld-hero__slide .ld-hero__trust {
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        transition: none !important;
        animation: none !important;
        transition-delay: 0s !important;
        animation-delay: 0s !important;
    }

    .ld-float,
    .ld-pulse,
    .ld-shine::after,
    .ld-hero__particle,
    .ld-hero__particle--1,
    .ld-hero__particle--2,
    .ld-hero__particle--3 {
        animation: none !important;
        transform: none !important;
    }

    .ld-hero__particles {
        display: none !important;
    }

    /* Disable hover displacement on touch screens */
    .ld-services__card:hover,
    .ld-features__item:hover,
    .ld-pricing__card:hover,
    .ld-pricing__card--featured,
    .ld-pricing__card--featured:hover,
    .ld-testimonials__card:hover,
    .ld-contact__form-card:hover {
        transform: none !important;
    }

    /* Hero Slider on Mobile/Tablet */
    .ld-hero {
        min-height: auto;
        overflow: hidden;
    }

    .ld-hero__slider {
        min-height: auto;
        position: relative;
    }

    .ld-hero__slide {
        min-height: auto;
    }

    .ld-hero__slide:not(.is-active) {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }

    .ld-hero__slide.is-active {
        position: relative !important;
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .ld-hero__grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 35px 0 45px;
        text-align: center;
    }

    .ld-hero__content {
        text-align: center;
        margin: 0 auto;
        padding: 0 !important;
    }

    .ld-hero__title {
        font-size: 2.1rem;
        line-height: 1.35;
    }

    .ld-hero__desc {
        font-size: 1.05rem;
        margin: 0 auto 22px;
    }

    .ld-hero__buttons {
        justify-content: center;
    }

    .ld-hero__call-btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
        margin: 0 auto;
    }

    .ld-hero__image-col {
        margin-top: 10px;
    }

    .ld-hero__image-wrap {
        border-radius: 20px;
        padding: 6px;
        max-width: 92%;
        margin: 0 auto;
    }

    .ld-hero__img {
        max-height: 260px;
        border-radius: 16px;
    }

    .ld-hero__nav-btn {
        display: none;
    }

    /* About */
    .ld-about__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    /* Services */
    .ld-services__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .ld-contact__grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .ld-footer__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Action Bar (Mobile Grid Layout) */
    .ld-action-bar__info {
        display: none !important;
    }

    .ld-action-bar__container {
        min-height: 0;
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
    }

    .ld-action-bar__buttons {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(65px, 1fr));
        gap: 6px;
    }

    .ld-action-bar__btn {
        flex-direction: column;
        min-height: 48px;
        padding: 6px 4px;
        gap: 4px;
        font-size: 0.72rem;
        border-radius: 8px;
        text-align: center;
        justify-content: center;
    }

    .ld-action-bar__btn i {
        font-size: 1.15rem;
    }

    /* Page Content */
    .ld-page-content .ld-container {
        display: block;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    :root {
        --ld-section-padding: 60px;
    }

    .ld-container {
        width: 100%;
        max-width: 100%;
        padding: 0 16px;
    }

    .ld-section-header {
        margin-bottom: 40px;
    }

    .ld-section-header h2 {
        font-size: 1.75rem;
    }

    .ld-section-header .ld-subtitle::before,
    .ld-section-header .ld-subtitle::after {
        display: none !important;
    }

    /* Top Bar */
    .ld-topbar__social {
        display: none;
    }

    /* Hero */
    .ld-hero__title {
        font-size: 1.85rem;
    }

    .ld-hero__desc {
        font-size: 0.95rem;
    }

    .ld-hero__buttons {
        flex-direction: column;
    }

    .ld-hero__buttons .ld-btn {
        width: 100%;
        justify-content: center;
    }

    .ld-hero__trust {
        flex-direction: column;
        gap: 12px;
    }

    .ld-hero__scroll {
        display: none;
    }

    /* About */
    .ld-about__content .ld-section-header {
        text-align: center !important;
    }

    .ld-about__cta {
        justify-content: center;
    }

    .ld-about__decor--dots,
    .ld-about__decor--circle {
        display: none;
    }

    /* Features */
    .ld-features__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .ld-features__item {
        padding: 30px 20px;
    }

    .ld-features__banner {
        flex-direction: column;
        text-align: center;
        padding: 30px;
        gap: 20px;
    }

    /* Testimonials */
    .ld-testimonials__card {
        min-width: calc(100% - 0px);
    }

    /* Pricing */
    .ld-pricing__grid {
        grid-template-columns: 1fr;
        max-width: 450px;
        margin: 0 auto;
    }

    /* Contact */
    .ld-contact__field-group {
        grid-template-columns: 1fr;
    }

    .ld-contact__form-card {
        padding: 30px 20px;
    }

    /* Footer */
    .ld-footer__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .ld-footer__bottom-inner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    /* Services CTA */
    .ld-services__cta {
        flex-direction: column;
        gap: 15px;
    }
}

/* Mobile */
@media (max-width: 576px) {
    :root {
        --ld-section-padding: 50px;
    }

    .ld-container {
        padding: 0 15px;
    }

    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }

    .ld-section-header h2 {
        font-size: 1.5rem;
    }

    .ld-btn {
        padding: 12px 28px;
        font-size: 0.875rem;
    }

    .ld-btn--lg {
        padding: 14px 36px;
        font-size: 1rem;
    }

    /* Hero */
    .ld-hero__title {
        font-size: 1.6rem;
    }

    /* About */
    .ld-about__stats {
        grid-template-columns: repeat(2, 1fr);
        padding: 25px;
        gap: 20px;
    }

    .ld-about__stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.125rem;
    }

    .ld-about__stat-number {
        font-size: 1.75rem;
    }

    /* Services */
    .ld-services__grid {
        grid-template-columns: 1fr;
    }

    .ld-services__card-inner {
        padding: 30px 20px;
    }

    /* Features */
    .ld-features__grid {
        grid-template-columns: 1fr;
    }

    /* Scroll to Top */
    .ld-scroll-top {
        bottom: 20px;
        left: 20px;
        width: 44px;
        height: 44px;
    }

    .ld-whatsapp-float {
        bottom: 75px;
        left: 20px;
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
    }

    /* Mobile Bottom Action Bar */
    .ld-mobile-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        background: rgba(10, 25, 47, 0.95);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        padding: 8px 12px;
        display: grid;
        grid-template-columns: 1.2fr 1fr 1.2fr;
        gap: 8px;
        z-index: 999;
        box-shadow: 0 -6px 25px rgba(0, 0, 0, 0.3);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    .ld-mobile-bar__btn {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 9px 8px;
        border-radius: var(--ld-radius-md);
        color: var(--ld-white);
        font-size: 0.8125rem;
        font-weight: 800;
        text-decoration: none;
        text-align: center;
        transition: transform 0.2s ease;
    }

    .ld-mobile-bar__btn:active {
        transform: scale(0.96);
    }

    .ld-mobile-bar__btn--call {
        background: linear-gradient(135deg, var(--ld-primary) 0%, #0284c7 100%);
        box-shadow: 0 2px 10px rgba(8, 145, 178, 0.4);
    }

    .ld-mobile-bar__btn--wa {
        background: #25d366;
        box-shadow: 0 2px 10px rgba(37, 211, 102, 0.4);
    }

    .ld-mobile-bar__btn--book {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
    }

    /* Adjust page bottom padding for mobile bar */
    body {
        padding-bottom: 72px;
    }

    .ld-scroll-top {
        bottom: 70px;
        left: 15px;
    }

    .ld-whatsapp-float {
        display: none; /* Handled by bottom mobile bar */
    }

    /* Top Bar Mobile */
    .ld-topbar__status {
        font-size: 0.72rem;
    }

    .ld-topbar__contact {
        display: none;
    }
}
