/* ===== RESPONSIVE BREAKPOINTS ===== */

@media (max-width: 360px) {

    #home.hero-section {
        padding-top: 72px;
    }

    #home .row.min-vh-100 {
        min-height: auto !important;
        padding-top: 0.5rem !important;
        padding-bottom: 1.25rem !important;
    }

    #home .hero-content {
        margin-bottom: 1rem;
    }

    #home .trust-badge {
        margin-top: 0 !important;
        margin-bottom: 0.5rem !important;
       font-size: 0.6rem;
        white-space: nowrap;
    }

    #home .hero-title {
        font-size: 2.25rem;
        margin-bottom: 0.85rem !important;
    }

    #home p.hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 1rem !important;
    }

    p.hero-subtitle{
    font-size: 1.125rem;
    }

    #home .hero-buttons {
        margin-bottom: 1rem !important;
    }

    #home .hero-buttons .btn {
        font-size: 0.95rem;
        padding: 0.55rem 1.1rem !important;
        min-height: 2.875rem;
    }

    /* .container [class*="col-"] {
        padding-left: 5px;
        padding-right: 5px;
    } */

    .hero-title {
        font-size: 2.375rem;
        /* text-4xl */
    }

    .section-title {
        font-size: 2rem;
        /* text-3xl */
    }

    .cta-title {
        font-size: 2.25rem;
        /* text-4xl */
    }

    .btn-phone .phone-number {
        display: none;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        margin-bottom: 0.75rem;
    }

    .trust-points {
        text-align: center;
    }

    .navbar-brand .brand-logo {
        height: 36px;
    }

    /* Contact info - extra compact */
    .contact-info-item {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .contact-info-item>div {
        display: flex;
        flex-direction: column;
        align-items: center !important;
        text-align: center !important;
    }

    .contact-info-list .contact-info-item .h4 {
        font-size: 1.1rem !important;
        text-align: center !important;
    }

    .contact-info-list .contact-info-item .h5 {
        font-size: 1rem !important;
        text-align: center !important;
    }

    .contact-info-item p {
        text-align: center !important;
    }

    .promise-panel h4 {
        font-size: 1.1rem !important;
    }


    .contact-icon {
        width: 2.5rem !important;
        height: 2.5rem !important;
        margin: 0 auto 0.75rem auto !important;
    }

    /* Override mr-4 class on small mobile */
    .contact-icon.mr-4 {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .contact-icon i {
        font-size: 1.25rem !important;
    }

    /* Software section - very compact */
    .software-icon-large {
        width: 4rem !important;
        height: 4rem !important;
    }

    .software-icon-large i {
        font-size: 1.75rem !important;
    }

    div.feature-badge {
        font-size: 0.875rem;
        padding: 0.4rem 0.6rem;
    }

    .d-flex.flex-column.flex-md-row h3 {
        font-size: 1.25rem;
    }
}

/* Large Mobile: 412x790 */
@media (min-width: 361px) and (max-width: 767px) {
    .hero-title {
        font-size: 2.625rem;
        /* text-4xl+ */
    }

    .section-title {
        font-size: 2.25rem;
        /* text-4xl */
    }

    .cta-title {
        font-size: 2.25rem;
        /* text-4xl */
    }

    .hero-form-container {
        margin-top: 3rem;
    }

    .feature-card {
        margin-bottom: 1.5rem;
    }

    .contact-info-item {
        margin-bottom: 2rem;
    }

    /* Contact info - better sizing */
    .contact-info-item {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    .contact-info-item>div {
        display: flex;
        flex-direction: column;
        align-items: center !important;
        text-align: center !important;
        width: 100%;
        max-width: 100%;
    }

    .contact-info-item p {
        text-align: center !important;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
    }

    .contact-info-item .h4,
    .contact-info-item .h5 {
        text-align: center !important;
        width: 100%;
        max-width: 100%;
        word-wrap: break-word;
    }

    .contact-icon {
        width: 3rem !important;
        height: 3rem !important;
        margin: 0 auto 1rem auto !important;
    }

    /* Override mr-4 class on mobile */
    .contact-icon.mr-4 {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .contact-icon i {
        font-size: 1.35rem !important;
    }

    /* Contact glass panel padding */
    .glass-panel {
        padding: 1rem !important;
    }

    /* Contact info list */
    .contact-info-list {
        width: 100%;
        max-width: 100%;
    }

    /* Software section */
    .software-icon-large {
        width: 4.5rem !important;
        height: 4.5rem !important;
    }

    .software-icon-large i {
        font-size: 1.85rem !important;
    }

    .d-flex.flex-column.flex-md-row h3 {
        font-size: 1.4rem;
    }
}

@media media and (max-width: 767px) {
    .software-products {
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Small Tablet: 768x1024 */
@media (min-width: 481px) and (max-width: 767px) {
    .hero-title {
        font-size: 2.625rem;
        /* text-5xl */
    }

    .section-title {
        font-size: 2.5rem;
        /* text-4xl */
    }

    .cta-title {
        font-size: 2.25rem;
        /* text-4xl */
    }

    .hero-content {
        text-align: center;
        margin-bottom: 3rem;
    }

    .hero-form-container {
        max-width: 500px;
        margin: 0 auto;
    }

    .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        border-radius: 1rem;
        margin-top: 1rem;
        padding: 1rem;
    }

    .navbar-nav .nav-item {
        margin: 0.5rem 0;
    }

    .btn-phone {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }
}

/* Large Tablet: 1024x1366 */
@media (min-width: 768px) and (max-width: 1023px) {
    .hero-title {
        font-size: 3rem;
        /* text-5xl */
    }

    .section-title {
        font-size: 2.75rem;
        /* text-4xl+ */
    }

    .cta-title {
        font-size: 2.25rem;
        /* text-4xl */
    }

    .hero-section {
        padding-top: 120px;
    }

    .feature-card {
        height: 100%;
    }

    .agent-quote {
        position: static;
        margin-top: 1rem;
        display: inline-block;
    }

    .contact-content .row>div {
        margin-bottom: 2rem;
    }

    .software-icon-large {
        width: 8rem;
        /* 128px - matches md:w-32 */
        height: 8rem;
    }
}

/* Desktop Breakpoints */

/* Small Desktop: 992px */
@media (min-width: 992px) and (max-width: 1199px) {
    .hero-title {
        font-size: 3rem;
        /* text-5xl */
    }

    .cta-title {
        font-size: 2.25rem;
        /* text-4xl */
    }

    .container {
        max-width: 100% !important;
    }

    .hero-form-container {
        padding-left: 2rem;
    }

    .cta-bg::after {
        display: block;
    }

    .hero-decorative-image {
        display: block !important;
        width: 14rem;
        height: 14rem;
    }
}

/* Medium Desktop: 1200px */
@media (min-width: 1200px) and (max-width: 1399px) {
    .hero-title {
        font-size: 4rem;
        /* text-6xl */
    }

    .section-title {
        font-size: 3rem;
        /* text-5xl */
    }

    .cta-title {
        font-size: 2.75rem;
        /* text-4xl+ */
    }

    .container {
        max-width: 80rem;
        /* 1280px */
    }

    .hero-content {
        padding-right: 2rem;
    }

    .hero-decorative-image {
        display: block !important;
    }
}

/* Large Desktop: 1400px */
@media (min-width: 1400px) and (max-width: 1499px) {
    .hero-title {
        font-size: 4.5rem;
        /* text-7xl */
    }

    .section-title {
        font-size: 3.25rem;
        /* text-5xl+ */
    }

    .cta-title {
        font-size: 3rem;
        /* text-5xl - MAX */
    }

    .container {
        max-width: 80rem;
        /* 1280px */
    }

    .hero-section {
        padding-top: 140px;
    }

    .hero-decorative-image {
        display: block !important;
    }
}

/* Extra Large Desktop: 1500px */
@media (min-width: 1500px) and (max-width: 1919px) {
    .hero-title {
        font-size: 4.5rem;
        /* text-7xl */
    }

    .section-title {
        font-size: 3.5rem;
        /* text-6xl */
    }

    .cta-title {
        font-size: 3rem;
        /* text-5xl - MAX */
    }

    .container {
        max-width: 80rem;
        /* 1280px */
    }

    .hero-subtitle {
        font-size: 1.375rem;
        /* text-xl */
    }

    .section-subtitle {
        font-size: 1.25rem;
        /* text-xl */
    }

    .hero-decorative-image {
        display: block !important;
    }
}

/* Ultra Wide: 1920px */
@media (min-width: 1920px) and (max-width: 1999px) {
    .hero-title {
        font-size: 4.5rem;
        /* text-7xl */
    }

    .section-title {
        font-size: 4rem;
        /* text-6xl */
    }

    .cta-title {
        font-size: 3rem;
        /* text-5xl - MAX */
    }

    .container {
        max-width: 80rem;
        /* 1280px */
    }

    .hero-section {
        padding-top: 160px;
    }

    .hero-decorative-image {
        display: block !important;
    }
}

/* Super Ultra Wide: 2000px+ */
@media (min-width: 2000px) and (max-width: 2199px) {
    .hero-title {
        font-size: 4.5rem;
        /* text-7xl */
    }

    .section-title {
        font-size: 4.5rem;
        /* text-7xl */
    }

    .cta-title {
        font-size: 3rem;
        /* text-5xl - MAX */
    }

    .container {
        max-width: 80rem;
        /* 1280px */
    }

    .hero-subtitle {
        font-size: 1.5rem;
        /* text-2xl */
    }

    .section-subtitle {
        font-size: 1.375rem;
        /* text-xl */
    }

    .hero-decorative-image {
        display: block !important;
    }
}

/* Extreme Wide: 2200px+ */
@media (min-width: 2200px) {
    .hero-title {
        font-size: 4.5rem;
        /* text-7xl */
    }

    .section-title {
        font-size: 5rem;
        /* text-8xl */
    }

    .cta-title {
        font-size: 3rem;
        /* text-5xl - MAX */
    }

    .container {
        max-width: 80rem;
        /* 1280px */
    }

    .hero-section {
        padding-top: 180px;
    }

    .hero-subtitle {
        font-size: 1.625rem;
        /* text-2xl+ */
    }

    .section-subtitle {
        font-size: 1.5rem;
        /* text-2xl */
    }

    .hero-decorative-image {
        display: block !important;
    }
}

/* ===== MOBILE-SPECIFIC ADJUSTMENTS ===== */
@media (max-width: 767px) {
    .btn-primary {
        padding: 0.75rem 1rem !important;
    }

    .cta-phone-btn {
        padding: 1rem 2rem !important;
    }
        
    /* Navigation */
    .navbar-toggler {
        border: none;
        padding: 0.5rem;
    }

    .navbar-toggler:focus {
        box-shadow: none;
    }

    .navbar-collapse {
        background: rgba(15, 23, 42, 0.95);
        backdrop-filter: blur(12px);
        border-radius: 1rem;
        margin-top: 1rem;
        padding: 1.25rem;
        border: 1px solid rgba(156, 163, 175, 0.2);
    }

    .navbar-nav .nav-link {
        padding: 0.5rem 0;
        border-bottom: 1px solid rgba(156, 163, 175, 0.1);
        text-align: center;
    }

    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }

    .btn-phone {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
        padding: 1rem !important;
    }

    /* Hero Section */
    .hero-section {
        padding-top: 100px;
    }

    .hero-content {
        text-align: center;
        margin-bottom: 3rem;
    }

    .trust-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
    }

    .trust-points {
        justify-content: center;
        text-align: center;
    }

    .trust-points .col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    /* Trust Bar */
    .trust-bar .row>div {
        margin-bottom: 1rem;
    }

    .trust-bar .row>div:last-child {
        margin-bottom: 0;
    }

    /* Feature Cards */
    .feature-card {
        margin-bottom: 2rem;
    }

    .feature-icon {
        width: 3rem;
        height: 3rem;
    }

    .feature-icon i {
        font-size: 1.5rem;
    }

    /* Agent Image */
    .agent-image-container {
        text-align: center;
        margin-top: 2rem;
    }

    .agent-quote {
        position: static;
        display: inline-block;
        margin-top: 1rem;
    }

    /* Frustrations */
    .frustration-item {
        text-align: left;
    }

    .frustration-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    /* CTA Section */
    .cta-bg::after {
        display: none;
    }

    .cta-title {
        text-align: center;
    }

    .cta-subtitle {
        text-align: center;
        margin: 0 auto;
    }

    .cta-buttons {
        text-align: center;
    }

    .cta-hours {
        text-align: center;
    }

    /* Contact Page */
    .contact-hero {
        padding-top: 100px;
    }

    .contact-info-item {
        margin-bottom: 2rem;
        flex-direction: column !important;
        text-align: center;
        align-items: center !important;
    }

    .contact-icon {
        margin: 0 auto 1rem auto !important;
    }

    /* Override mr-4 class on mobile */
    .contact-icon.mr-4 {
        margin-right: auto !important;
        margin-left: auto !important;
    }

    .contact-info-item>div {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        width: 100%;
    }

    .contact-info-item .h4,
    .contact-info-item .h5 {
        font-size: 1.25rem !important;
        text-align: center;
        width: 100%;
    }

    .contact-info-item .small {
        font-size: 0.875rem !important;
        text-align: center;
    }

    .contact-info-item p {
        text-align: center;
        width: 100%;
    }

    .promise-panel {
        margin-top: 2rem;
    }

    .promise-panel h4 {
        font-size: 1.25rem;
    }

    .promise-list li {
        font-size: 0.9rem;
    }

    /* Software Section */
    .software-icon-large {
        width: 5rem !important;
        height: 5rem !important;
        margin: 0 auto 1.5rem auto;
    }

    .software-icon-large i {
        font-size: 2rem !important;
    }

    /* Software content adjustments */
    .col-lg-2.col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .col-lg-10.col-md-9 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Software header - stack on mobile */
    .d-flex.flex-column.flex-md-row {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center;
    }

    .d-flex.flex-column.flex-md-row h3 {
        font-size: 1.5rem;
    }

    .d-flex.flex-column.flex-md-row .btn {
        width: 100%;
        max-width: 200px;
        margin-top: 1rem;
    }

    /* Feature badges - 2 columns on mobile */
    .feature-badge {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .feature-badge .badge-dot {
        width: 0.25rem;
        height: 0.25rem;
    }

    /* Footer */
    footer .row>div {
        text-align: center;
        margin-bottom: 2rem;
    }

    footer .row>div:last-child {
        margin-bottom: 0;
    }

    .social-links {
        text-align: center;
        margin-top: 1rem;
    }
}

/* ===== TABLET-SPECIFIC ADJUSTMENTS ===== */
@media (min-width: 768px) and (max-width: 1023px) {

    /* Navigation */
    .navbar-nav {
        align-items: center;
    }

    .btn-phone {
        margin-left: 1rem;
    }

    /* Hero adjustments */
    .hero-form-container {
        margin-top: 2rem;
    }

    /* Feature cards in 2 columns on tablet */
    .feature-card {
        height: 100%;
    }

    /* Contact page adjustments */
    .contact-content .col-lg-6:first-child {
        margin-bottom: 3rem;
    }

    .contact-info-item {
        flex-direction: row !important;
        text-align: left;
    }

    .contact-icon {
        margin: 0 1rem 0 0 !important;
    }

    /* Software section - better spacing on tablet */
    .software-icon-large {
        width: 6rem !important;
        height: 6rem !important;
    }

    .software-icon-large i {
        font-size: 2.25rem !important;
    }

    .feature-badge {
        font-size: 0.8rem;
    }
}

/* ===== TARGETED DEFENDERCARE HERO/UI FIXES ===== */
@media (max-width: 767px) {
    .navbar {
        padding: 0.45rem 0.75rem;
    }

    .navbar-nav .nav-link {
        padding-top: 0.3125rem;
        padding-bottom: 0.3125rem;
    }

    .navbar-collapse {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    #home.hero-section {
        padding-top: 84px;
    }

    #home .row.min-vh-100 {
        min-height: auto !important;
        padding-top: 0.5rem !important;
        padding-bottom: 1.75rem !important;
    }

    #home .hero-content {
        margin-top: -0.5rem;
        margin-bottom: 1.75rem;
    }

    #home .trust-badge {
        margin-top: 0 !important;
        margin-bottom: 0.75rem !important;
    }

    #home .trust-badge span {
        white-space: nowrap;
    }

    #home .hero-subtitle {
        font-size: 1.1875rem;
        margin-bottom: 1.25rem !important;
    }

    #home .hero-buttons {
        gap: 0.75rem;
        margin-bottom: 1.25rem !important;
    }

    #home .hero-buttons .btn {
        font-size: 0.9375rem;
        line-height: 1.2;
        padding: 0.5625rem 1.125rem !important;
        min-height: 2.875rem;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    #home .hero-content {
        text-align: center;
    }

    #home .trust-badge {
        margin-left: auto;
        margin-right: auto;
        display: inline-flex;
    }

    #home .hero-title {
        text-align: center;
    }

    #home .hero-buttons {
        justify-content: center;
    }

    #home .trust-points {
        justify-content: center;
        text-align: center;
        display: flex;
        flex-wrap: nowrap;
        gap: 1.5rem;
    }
}

@media (max-width: 991px) {
    .cta-image-slot {
        max-width: 26rem;
        margin: 2rem auto 0;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .navbar,
    .btn,
    .cta-section,
    footer {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .glass-panel {
        background: white !important;
        border: 1px solid #ccc !important;
    }

    .text-gradient {
        color: black !important;
        -webkit-text-fill-color: black !important;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .glass-panel {
        background: rgba(0, 0, 0, 0.9) !important;
        border: 2px solid white !important;
    }

    .btn-primary {
        background: yellow !important;
        color: black !important;
        border: 2px solid black !important;
    }

    .text-gradient {
        color: yellow !important;
        -webkit-text-fill-color: yellow !important;
    }
}

/* ===== FIX HORIZONTAL SCROLL ON MOBILE ===== */
@media (max-width: 767px) {

    /* Prevent overflow */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    /* Fix container overflow */
    .container,
    .container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
        max-width: 100%;
    }

    /* Fix row overflow */
    .row {
        margin-left: -15px;
        margin-right: -15px;
        max-width: 100%;
        overflow-x: hidden;
    }

    .software-products .text-muted.mb-4{
        padding-left: 15px;
    }

    #contactForm .col-md-6 {
        padding: 0
    }

    /* Fix column padding */
    [class*="col-"] {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Prevent elements from extending beyond viewport */
    section,
    .hero-section,
    .why-choose-us,
    .frustrations-section,
    .cta-section,
    footer {
        overflow-x: hidden;
        max-width: 100vw;
        width: 100%;
    }

    /* Fix hero decorative image overflow */
    .hero-decorative-image {
        display: none !important;
    }

    /* Fix hero background effects */
    .hero-bg::before,
    .hero-bg::after {
        display: none;
    }

    /* Fix form container overflow */
    .hero-form-container::before,
    .hero-form-container::after {
        display: none;
    }

    /* Ensure glass panels don't overflow */
    .glass-panel {
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }

    /* Fix images */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Fix any absolute positioned elements */
    .agent-quote {
        position: static;
        margin: 1rem 0;
    }

    /* Fix CTA background */
    .cta-bg::after {
        display: none;
    }

    /* Ensure buttons don't overflow */
    .btn {
        max-width: 100%;
        word-wrap: break-word;
    }

    /* Fix contact hero background */
    .contact-hero::before {
        display: none;
    }

    /* Fix margin utilities that might cause overflow */
    .mr-3,
    .mx-3 {
        margin-right: 0.5rem;
    }

    .mr-4,
    .mx-4 {
        margin-right: 0.75rem;
    }

    .ml-3,
    .mx-3 {
        margin-left: 0.5rem ;
    }

    .ml-4,
    .mx-4 {
        margin-left: 0.75rem ;
    }

    /* Fix padding utilities */
    .p-4 {
        padding: 1rem;
    }

    .p-5 {
        padding: 1.5rem;
    }

 /* Fix margin utilities that might cause overflow */
    .mr-3,
    .mx-3 {
        margin-right: 0.5rem !important;
    }

    .mr-4,
    .mx-4 {
        margin-right: 0.75rem !important;
    }

    .ml-3,
    .mx-3 {
        margin-left: 0.5rem !important;
    }

    .ml-4,
    .mx-4 {
        margin-left: 0.75rem !important;
    }

    /* Fix padding utilities */
    .p-4 {
        padding: 1rem !important;
    }

    .p-5 {
        padding: 1.5rem !important;
    }

    /* Fix hero buttons container */
    .hero-buttons {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-buttons .btn {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* Ensure all sections have proper width */
    * {
        max-width: 100%;
    }

    /* Fix any negative margins */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ===== PREVENT ORPHAN WORDS ON MOBILE ===== */
@media (max-width: 767px) {
    /* Add padding to prevent single-word last lines */
    .hero-subtitle,
    .section-subtitle,
    .cta-subtitle,
    .text-muted {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Specific adjustments for key paragraphs */
    #home .hero-subtitle {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .why-choose-us .section-subtitle {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .frustrations-section .section-subtitle {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .services-hero .hero-subtitle {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
    
    .software-products .text-muted {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .cta-section .cta-subtitle {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 360px) and (max-width: 480px) {
    /* Additional padding for larger small mobiles */
    .hero-subtitle,
    .section-subtitle {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}
