/* ========================================
   MOBILE OPTIMIZATIONS & RESPONSIVE DESIGN
   Makes site 1000% responsive on all devices
   ======================================== */

/* Global reset to prevent Bootstrap fixed-top navbar body padding */
html,
body {
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   HERO SECTION — NO TOP PADDING (prevents white gap)
   The fixed-top navbar floats OVER the hero; hero needs no padding-top.
   ======================================== */
.hero-section {
    padding-top: 0 !important;
    margin-top: 0 !important;
    background: #1a1a2e !important;
}

.hero-bg-wrapper {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* ========================================
   BREAKPOINT SYSTEM
   ======================================== */
:root {
    --mobile: 480px;
    --tablet: 768px;
    --desktop: 1024px;
    --large-desktop: 1200px;
    --xl-desktop: 1400px;
}

/* ========================================
   GLOBAL RESPONSIVE UTILITIES
   ======================================== */
@media (max-width: 1199px) {
    .custom-wide-container {
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}

@media (max-width: 991px) {
    .custom-wide-container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }
}

@media (max-width: 767px) {
    .custom-wide-container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .custom-wide-container {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }
}

/* ========================================
   NAVIGATION RESPONSIVENESS
   ======================================== */
@media (max-width: 991px) {
    .navbar-nav {
        text-align: center;
        margin: 1rem 0;
    }

    .navbar-nav .nav-link {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .navbar-right-group {
        margin-top: 1rem;
        justify-content: center;
    }

    .phone-box {
        font-size: 0.9rem !important;
        padding: 6px 14px !important;
    }
}

@media (max-width: 767px) {
    .navbar-brand {
        font-size: 1.2rem;
    }

    .navbar-toggler {
        border: 1px solid rgba(255, 255, 255, 0.5);
        padding: 0.25rem 0.5rem;
    }

    .phone-box {
        font-size: 0.8rem !important;
        padding: 5px 12px !important;
    }
}

/* ========================================
   HERO SECTION RESPONSIVENESS
   ======================================== */
@media (max-width: 1199px) {
    .hero-section {
        min-height: 500px;
    }

    .hero-bg-wrapper {
        min-height: 500px;
    }
}

@media (max-width: 991px) {
    .hero-section {
        min-height: 450px;
    }

    .hero-bg-wrapper {
        min-height: 450px;
    }

    .hero-content h1 {
        font-size: 2.5rem !important;
    }

    .hero-content .lead {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 767px) {
    .hero-section {
        min-height: 400px;
        padding-top: 0 !important;
    }

    .hero-bg-wrapper {
        min-height: 400px;
    }

    .hero-content h1 {
        font-size: 2rem !important;
        margin-bottom: 1rem !important;
    }

    .hero-content .lead {
        font-size: 1rem !important;
        margin-bottom: 1.5rem !important;
    }

    .hero-content .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }

    /* Why Choose Us: disable the large negative overlap on mobile */
    .why-choose-overlap-row {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 350px;
        padding-top: 0 !important;
    }

    .hero-bg-wrapper {
        min-height: 350px;
    }

    .hero-content h1 {
        font-size: 1.8rem !important;
    }

    .hero-content .lead {
        font-size: 0.9rem !important;
    }
}

/* Pull Why Choose US section up to close gray gap after CTA */
.new-why-choose-us-section {
    margin-top: -220px !important;
}

/* Cards sit at the bottom half of the dark background section */
/* margin-bottom: -140px means only the white info boxes (~140px) cross into the white spacer */
.why-choose-overlap-row {
    margin-top: 0 !important;
    margin-bottom: -140px !important;
}

@media (max-width: 991px) {
    .why-choose-overlap-row {
        margin-top: 0 !important;
    }
}

@media (max-width: 767px) {
    .why-choose-overlap-row {
        margin-top: 0 !important;
    }

    /* no pull-up on mobile */
}

/* ========================================
   WHY CHOOSE US OVERLAP SPACER
   White bg section that catches the overflowing cards.
   Must be tall on desktop, hidden on mobile (cards stack there).
   ======================================== */
.why-choose-spacer {
    background: #fff;
    height: 300px;
}

@media (max-width: 991px) {
    .why-choose-spacer {
        height: 200px;
    }
}

@media (max-width: 767px) {
    .why-choose-spacer {
        height: 0 !important;
        display: none !important;
    }
}

/* ========================================
   QUOTE FORM RESPONSIVENESS
   ======================================== */
@media (max-width: 991px) {
    .quote-form-card-modern {
        max-width: 100%;
        margin: 0 auto;
        padding: 2rem 1.5rem;
    }

    .form-control-modern {
        font-size: 1rem !important;
        padding: 0.75rem 1rem 0.75rem 2.5rem !important;
    }
}

@media (max-width: 767px) {
    .quote-form-card-modern {
        padding: 1.5rem 1rem;
        margin: 1rem;
    }

    .form-control-modern {
        font-size: 0.9rem !important;
        padding: 0.7rem 0.8rem 0.7rem 2.2rem !important;
        min-height: 44px;
    }

    .form-icon-modern {
        font-size: 0.9rem;
        left: 0.8rem;
    }
}

@media (max-width: 480px) {
    .quote-form-card-modern {
        padding: 1rem 0.8rem;
        margin: 0.5rem;
    }

    .form-control-modern {
        font-size: 0.85rem !important;
        padding: 0.6rem 0.7rem 0.6rem 2rem !important;
    }
}

/* ========================================
   SEARCH FILTER RESPONSIVENESS
   ======================================== */
@media (max-width: 991px) {
    .search-filter-section {
        margin-top: -40px;
    }

    .search-filter-card {
        padding: 2rem !important;
    }

    .form-select-lg {
        font-size: 1rem;
        padding: 0.75rem 1rem;
    }
}

@media (max-width: 767px) {
    .search-filter-section {
        margin-top: -30px;
    }

    .search-filter-card {
        padding: 1.5rem !important;
        margin: 0 1rem;
    }

    .form-select-lg {
        font-size: 0.9rem;
        padding: 0.7rem 0.8rem;
    }

    .btn-go-cut {
        font-size: 0.9rem;
        padding: 0.7rem 1rem;
    }
}

@media (max-width: 480px) {
    .search-filter-card {
        padding: 1rem !important;
        margin: 0 0.5rem;
    }

    .form-select-lg {
        font-size: 0.85rem;
        padding: 0.6rem 0.7rem;
    }
}

/* ========================================
   ABOUT IMAGE LAYOUT — BASE STYLES
   Replaces old hardcoded inline px styles in HTML
   ======================================== */
.about-image-wrapper {
    position: relative;
    min-height: 500px;
    overflow: hidden;
}

.about-bg-img {
    position: absolute;
    top: -30px;
    left: 0;
    width: 100%;
    max-width: 560px;
    height: 560px;
    object-fit: cover;
    z-index: 1;
    clip-path: polygon(0 0, 92% 0, 100% 8%, 100% 100%, 8% 100%, 0 92%);
    box-shadow: 0 8px 32px rgba(30, 144, 255, 0.10);
}

.about-foreground-border {
    position: absolute;
    top: 40px;
    left: 120px;
    width: 80%;
    max-width: 520px;
    height: 430px;
    z-index: 2;
    background: #fff;
    clip-path: polygon(0 0, 92% 0, 100% 8%, 100% 100%, 8% 100%, 0 92%);
}

.about-foreground-img {
    position: absolute;
    top: 60px;
    left: 140px;
    width: 80%;
    max-width: 520px;
    height: 400px;
    object-fit: cover;
    z-index: 3;
    background: #fff;
    clip-path: polygon(0 0, 92% 0, 100% 8%, 100% 100%, 8% 100%, 0 92%);
    box-shadow: 0 8px 32px rgba(30, 144, 255, 0.18);
}

@media (max-width: 1199px) {
    .about-image-wrapper {
        min-height: 430px;
    }

    .about-bg-img {
        max-width: 480px;
        height: 480px;
    }

    .about-foreground-border {
        left: 100px;
        max-width: 440px;
        height: 370px;
    }

    .about-foreground-img {
        left: 120px;
        max-width: 440px;
        height: 350px;
    }
}

@media (max-width: 991px) {
    .about-section {
        padding: 3rem 0;
    }

    .about-image-wrapper {
        min-height: 380px;
        margin-bottom: 2rem;
    }

    .about-bg-img {
        top: 0;
        max-width: 90%;
        height: 360px;
    }

    .about-foreground-border {
        top: 30px;
        left: 15%;
        width: 75%;
        max-width: 100%;
        height: 310px;
    }

    .about-foreground-img {
        top: 50px;
        left: 18%;
        width: 75%;
        max-width: 100%;
        height: 290px;
    }

    .about-content {
        margin-top: 0 !important;
        padding-left: 0 !important;
    }

    .about-content h2 {
        font-size: 1.8rem !important;
    }
}

@media (max-width: 767px) {
    .about-section {
        padding: 2rem 0;
    }

    /* On small screens, stack images simply — no complex layering */
    .about-image-wrapper {
        min-height: 0;
        overflow: visible;
        padding-bottom: 0;
        margin-bottom: 1.5rem;
    }

    .about-bg-img {
        position: relative;
        top: auto;
        left: auto;
        width: 100%;
        max-width: 100%;
        height: 250px;
        clip-path: polygon(0 0, 95% 0, 100% 5%, 100% 100%, 5% 100%, 0 95%);
    }

    /* Hide the layered border + foreground image on mobile — bg image alone is enough */
    .about-foreground-border,
    .about-foreground-img {
        display: none;
    }

    .about-content h2 {
        font-size: 1.6rem !important;
    }

    .about-content .lead {
        font-size: 1rem !important;
    }
}

@media (max-width: 480px) {
    .about-bg-img {
        height: 200px;
    }

    .about-content h2 {
        font-size: 1.4rem !important;
    }
}

/* ========================================
   SERVICES SECTION RESPONSIVENESS
   ======================================== */
@media (max-width: 1199px) {
    .services-section-updated {
        padding: 3rem 0;
    }
}

@media (max-width: 991px) {
    .services-section-updated {
        padding: 2.5rem 0;
    }

    .services-section-updated h2 {
        font-size: 2.5rem !important;
    }

    .services-section-updated .lead {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 767px) {
    .services-section-updated {
        padding: 2rem 0;
    }

    .services-section-updated h2 {
        font-size: 2rem !important;
    }

    .services-section-updated .lead {
        font-size: 1rem !important;
    }

    .service-card-v2 {
        width: 100%;
        height: 400px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .services-section-updated h2 {
        font-size: 1.8rem !important;
    }

    .service-card-v2 {
        height: 350px;
        margin-bottom: 1rem;
    }
}

/* ========================================
   CTA SECTION RESPONSIVENESS
   ======================================== */
@media (max-width: 991px) {
    .plumbing-problems-cta {
        padding: 3rem 0;
    }

    .plumbing-problems-cta h2 {
        font-size: 2.5rem !important;
    }

    .plumbing-problems-cta .lead {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 767px) {
    .plumbing-problems-cta {
        padding: 2rem 0;
    }

    .plumbing-problems-cta h2 {
        font-size: 2rem !important;
    }

    .plumbing-problems-cta .lead {
        font-size: 1rem !important;
    }

    .plumbing-problems-cta .btn {
        font-size: 0.9rem;
        padding: 0.75rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .plumbing-problems-cta h2 {
        font-size: 1.8rem !important;
    }

    .plumbing-problems-cta .btn {
        font-size: 0.85rem;
        padding: 0.7rem 1.2rem;
    }
}

/* ========================================
   WHY CHOOSE US SECTION RESPONSIVENESS
   ======================================== */
@media (max-width: 1199px) {
    .new-why-choose-us-section {
        padding: 3rem 0 2rem;
    }

    .why-choose-overlap-row {
        margin-bottom: 0 !important;
        position: relative;
        z-index: 10;
    }
}

@media (max-width: 991px) {
    .new-why-choose-us-section {
        padding: 2.5rem 0 1.5rem;
    }

    .new-why-choose-us-section h2 {
        font-size: 2rem !important;
    }

    .new-why-choose-us-section .lead {
        font-size: 1.1rem !important;
    }

    .why-choose-overlap-row {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 767px) {
    .new-why-choose-us-section {
        padding: 2rem 0 1rem;
    }

    .new-why-choose-us-section h2 {
        font-size: 1.8rem !important;
    }

    .new-why-choose-us-section .lead {
        font-size: 1rem !important;
    }

    .why-choose-overlap-row {
        margin-bottom: 0 !important;
    }

    .service-card-v2 {
        min-height: 280px !important;
    }
}

@media (max-width: 480px) {
    .new-why-choose-us-section h2 {
        font-size: 1.6rem !important;
    }

    .why-choose-overlap-row {
        margin-bottom: 0 !important;
    }

    .service-card-v2 {
        min-height: 250px !important;
    }
}

/* ========================================
   STATES SECTION RESPONSIVENESS
   ======================================== */
@media (max-width: 991px) {
    .states-section {
        padding: 3rem 0;
    }

    .states-section h2 {
        font-size: 2.5rem !important;
    }

    .states-section .section-description {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 767px) {
    .states-section {
        padding: 2rem 0;
    }

    .states-section h2 {
        font-size: 2rem !important;
    }

    .states-section .section-description {
        font-size: 1rem !important;
    }

    .row-cols-2 {
        --bs-rows-cols: 2;
    }
}

@media (max-width: 480px) {
    .states-section h2 {
        font-size: 1.8rem !important;
    }

    .row-cols-2 {
        --bs-rows-cols: 1;
    }
}

/* ========================================
   TESTIMONIALS SECTION RESPONSIVENESS
   ======================================== */
@media (max-width: 1199px) {
    .new-testimonial-section {
        padding: 3rem 0;
    }

    .testimonial-cards-row {
        width: 95vw;
        max-width: 100%;
        gap: 1.5rem;
    }
}

@media (max-width: 991px) {
    .new-testimonial-section {
        padding: 2.5rem 0;
    }

    .new-testimonial-section h2 {
        font-size: 2rem !important;
    }

    .new-testimonial-section .lead {
        font-size: 1.1rem !important;
    }

    /* Stack testimonial cards vertically on tablet/mobile */
    .testimonial-cards-row {
        width: 100% !important;
        max-width: 100% !important;
        gap: 1rem;
        flex-direction: column;
        align-items: center;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .testimonial-card-new {
        flex: 0 0 100% !important;
        width: 100% !important;
        max-width: 600px !important;
        min-width: 0 !important;
        margin-bottom: 1rem;
    }

    .testimonial-arrow-between {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .new-testimonial-section {
        padding: 2rem 0;
    }

    .new-testimonial-section h2 {
        font-size: 1.8rem !important;
    }

    .new-testimonial-section .lead {
        font-size: 1rem !important;
    }

    .testimonial-cards-row {
        width: 100% !important;
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .testimonial-card-new {
        max-width: 100% !important;
    }
}

@media (max-width: 480px) {
    .new-testimonial-section h2 {
        font-size: 1.6rem !important;
    }

    .testimonial-cards-row {
        width: 100% !important;
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* ========================================
   FAQS SECTION RESPONSIVENESS
   ======================================== */
@media (max-width: 991px) {
    .faqs-section {
        padding: 3rem 0;
    }

    .faqs-section h2 {
        font-size: 2.5rem !important;
    }

    .faqs-section .section-subtitle {
        font-size: 1.1rem !important;
    }
}

@media (max-width: 767px) {
    .faqs-section {
        padding: 2rem 0;
    }

    .faqs-section h2 {
        font-size: 2rem !important;
    }

    .faqs-section .section-subtitle {
        font-size: 1rem !important;
    }

    .accordion-button {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .accordion-body {
        font-size: 0.9rem;
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .faqs-section h2 {
        font-size: 1.8rem !important;
    }

    .accordion-button {
        font-size: 0.85rem;
        padding: 0.7rem 0.8rem;
    }

    .accordion-body {
        font-size: 0.85rem;
        padding: 0.8rem;
    }
}

/* ========================================
   FOOTER RESPONSIVENESS
   ======================================== */
@media (max-width: 991px) {
    .new-footer {
        padding: 3rem 0 2rem 0;
    }

    .new-footer h3 {
        font-size: 1.5rem;
    }

    .new-footer p {
        font-size: 1rem;
    }
}

@media (max-width: 767px) {
    .new-footer {
        padding: 2rem 0 1.5rem 0;
    }

    .new-footer h3 {
        font-size: 1.3rem;
    }

    .new-footer p {
        font-size: 0.9rem;
    }

    .new-footer ul {
        justify-content: center !important;
        gap: 2rem !important;
    }

    .social-icon {
        width: 35px !important;
        height: 35px !important;
    }
}

@media (max-width: 480px) {
    .new-footer {
        padding: 1.5rem 0 1rem 0;
    }

    .new-footer h3 {
        font-size: 1.2rem;
    }

    .new-footer p {
        font-size: 0.85rem;
    }

    .new-footer ul {
        gap: 1.5rem !important;
    }

    .social-icon {
        width: 30px !important;
        height: 30px !important;
    }
}

/* ========================================
   SCROLL TO TOP BUTTON RESPONSIVENESS
   ======================================== */
@media (max-width: 767px) {
    .scroll-to-top {
        width: 70px !important;
        height: 70px !important;
        top: -35px !important;
        right: 20px !important;
        font-size: 28px !important;
        border-width: 8px !important;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        width: 60px !important;
        height: 60px !important;
        top: -30px !important;
        right: 15px !important;
        font-size: 24px !important;
        border-width: 6px !important;
    }
}

/* ========================================
   FORM RESPONSIVENESS
   ======================================== */
@media (max-width: 767px) {

    .form-control,
    .form-select {
        font-size: 0.9rem;
        padding: 0.7rem 0.8rem;
    }

    .form-label {
        font-size: 0.9rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.7rem 1.2rem;
    }
}

@media (max-width: 480px) {

    .form-control,
    .form-select {
        font-size: 0.85rem;
        padding: 0.6rem 0.7rem;
    }

    .form-label {
        font-size: 0.85rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
}

/* ========================================
   CARD RESPONSIVENESS
   ======================================== */
@media (max-width: 767px) {
    .card {
        margin-bottom: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .card-text {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .card-body {
        padding: 0.8rem;
    }

    .card-title {
        font-size: 1rem;
    }

    .card-text {
        font-size: 0.85rem;
    }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATIONS
   ======================================== */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none !important;
    }

    .service-card-new:hover {
        transform: none !important;
    }

    .service-card-v2:hover {
        transform: none !important;
    }

    .btn-get-quote-cut:hover {
        transform: none !important;
    }

    /* Increase touch targets */
    .btn {
        min-height: 44px;
        min-width: 44px;
    }

    .form-control,
    .form-select {
        min-height: 44px;
    }

    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   FOCUS VISIBILITY IMPROVEMENTS
   ======================================== */
.btn:focus,
.form-control:focus,
.form-select:focus,
.nav-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ========================================
   END OF MOBILE OPTIMIZATIONS
   ======================================== */

/* ========================================
   GLOBAL NAVBAR PHONE-BOX RESPONSIVE
   ======================================== */
@media (max-width: 767px) {
    .phone-box {
        font-size: 0.9rem !important;
        padding: 5px 12px !important;
    }
}

@media (max-width: 575px) {

    /* Hide phone number text, keep phone icon visible */
    .phone-box .phone-text {
        display: none !important;
    }

    .phone-box {
        padding: 5px 10px !important;
        border-radius: 8px !important;
    }
}

@media (max-width: 480px) {

    /* On very small screens, hide the phone box entirely */
    .navbar-right-group {
        display: none !important;
    }
}