/* ==========================================================================
   RESPONSIVE STYLES - Mobile First Approach
   ========================================================================== */

/* Base styles are for mobile (320px and up) */

/* Extra Small Devices (phones, 320px and up) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    /* Header adjustments */
    .logo {
        width: 180px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        gap: 1rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    /* Hero section mobile */
    .hero {
        margin-top: 15px;
        padding: 40px 0;
        border-radius: 15px;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-text {
        margin-left: 0;
        padding: 0 10px;
    }
    
    .hero-text h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .quote-input-group {
        max-width: 100%;
    }
    
    .quote-input {
        padding: 12px 100px 12px 15px;
        font-size: 0.9rem;
    }
    
    .quote-submit {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    .hero-features {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .hero-feature {
        display: flex;
        align-items: center;
        gap: 15px;
        text-align: left;
    }
    
    .feature-icon-circle {
        width: 50px;
        height: 50px;
        margin: 0;
    }
    
    .hero-feature-text {
        font-size: 0.9rem;
    }
    
    .hero-image {
        margin-right: 0;
        order: -1;
    }
    
    .hero-image img {
        max-width: 280px;
        margin: 0 auto;
        display: block;
    }
    
    .family-testimonial {
        left: 10px;
        top: 5px;
        font-size: 0.65rem;
        padding: 6px 12px;
    }
    
    .family-label {
        right: 10px;
        bottom: 10px;
        font-size: 0.4rem;
        padding: 4px 8px;
    }
    
    /* Categories mobile */
    .categories {
        padding: 40px 0;
    }
    
    .categories-icons {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* Changed to 3 columns for better spacing on very small screens */
        gap: 1rem;
        margin-bottom: 40px;
    }
    
    .category-icon-img {
        width: 35px;
        height: 35px;
    }
    
    .category-icon-label {
        font-size: 0.75rem;
    }
    
    .categories-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .category-card {
        padding: 1.5rem;
        padding-top: 15rem;
        background-size: cover;
        background-position: center;
    }
    
    .category-title {
        font-size: 1.1rem;
    }
    
    .category-subtitle {
        font-size: 0.75rem;
    }
    
    /* Mobile app section */
    .mobile-app {
        padding: 40px 0;
    }
    
    .mobile-app-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .phone-mockup {
        order: -1;
    }
    
    .phone-mockup img {
        max-width: 220px;
    }
    
    .app-info h2 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .app-features {
        text-align: left;
        max-width: 300px;
        margin: 0 auto 2rem;
    }
    
    .app-buttons {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .app-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    /* Business section mobile */
    .business-section {
        padding: 40px 0;
    }
    
    .business-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .business-text h2 {
        font-size: 1.6rem;
    }
    
    .business-text p {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .liability-quote-btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }
    
    /* FAQ mobile */
    .faq-section {
        padding: 40px 0;
    }
    
    .faq-section h2 {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .faq-question {
        padding: 15px;
        font-size: 0.9rem;
    }
    
    .faq-answer {
        padding: 0 15px;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 15px 15px;
    }
    
    /* Footer mobile */
    footer {
        padding: 30px 0 15px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-logo img {
        width: 100px;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 0.8rem;
    }
}

/* Small Devices (landscape phones, 481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
    .container {
        padding: 0 20px;
    }
    
    .logo {
        width: 200px;
    }
    
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        position: fixed;
        top: 75px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        gap: 1.2rem;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero {
        padding: 50px 0;
        border-radius: 20px;
    }
    
    .hero-content {
        flex-direction: column;
        gap: 3rem;
    }
    
    .hero-text {
        margin-left: 0;
        text-align: center;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-features {
        flex-direction: row;
        justify-content: space-around;
        gap: 1rem;
    }
    
    .hero-image {
        margin-right: 0;
        order: -1;
    }
    
    .hero-image img {
        max-width: 350px;
        margin: 0 auto;
    }
    
    .family-testimonial {
        left: 20px;
        top: 10px;
        font-size: 0.7rem;
        padding: 6px 12px;
    }
    
    .family-label {
        right: 15px;
        bottom: 15px;
        font-size: 0.45rem;
        padding: 6px 12px;
    }
    
    .categories-icons {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .categories-cards {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .category-card {
        padding-top: 18rem;
        background-size: cover;
        background-position: center;
    }
    
    .mobile-app-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .phone-mockup {
        order: -1;
    }
    
    .business-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Medium Devices (tablets, 768px to 991px) */
@media (min-width: 768px) and (max-width: 991px) {
    .container {
        padding: 0 30px;
    }
    
    .logo {
        width: 220px;
    }
    
    .nav-menu {
        gap: 1.5rem;
    }
    
    .nav-menu a {
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero-content {
        flex-direction: row; /* Keep row but adjust margins to prevent disruption */
        gap: 2rem;
    }
    
    .hero-text {
        margin-left: 20px;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-text p {
        font-size: 0.9rem;
    }
    
    .hero-features {
        gap: 1.5rem;
    }
    
    .hero-image {
        margin-right: 0; /* Remove negative margin to avoid overflow */
    }
    
    .hero-image img {
        max-width: 300px;
    }
    
    .family-testimonial {
        left: 25px;
        top: 15px;
        font-size: 0.7rem;
        padding: 8px 14px;
    }
    
    .family-label {
        right: 15px;
        bottom: 15px;
        font-size: 0.45rem;
        padding: 6px 12px;
    }
    
    .categories-icons {
        gap: 3rem;
    }
    
    .categories-cards {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .category-card {
        padding: 1.5rem;
        padding-top: 20rem;
        background-size: cover;
        background-position: center;
    }
    
    .mobile-app-content {
        gap: 3rem;
    }
    
    .app-info h2 {
        font-size: 2.2rem;
    }
    
    .business-content {
        gap: 3rem;
    }
    
    .business-text h2 {
        font-size: 1.8rem;
    }
}

/* Large Devices (desktops, 992px to 1199px) */
@media (min-width: 992px) and (max-width: 1199px) {
    .container {
        max-width: 960px;
        padding: 0 20px;
    }
    
    .hero-text {
        margin-left: 40px;
    }
    
    .hero-content {
        gap: 3rem;
    }
    
    .hero-image {
        margin-right: -20px; /* Slight negative for large but not too much */
    }
    
    .family-testimonial {
        left: 30px;
        font-size: 0.75rem;
    }
    
    .family-label {
        right: 20px;
        bottom: 20px;
        font-size: 0.5rem;
    }
    
    .categories-icons {
        gap: 3rem;
    }
    
    .mobile-app-content {
        gap: 3rem;
    }
    
    .business-content {
        gap: 3rem;
    }
}

/* Extra Large Devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
    
    .hero-image {
        margin-right: -40px;
    }
    
    .family-testimonial {
        left: 40px;
        font-size: 0.75rem;
    }
    
    .family-label {
        right: 20px;
        bottom: 20px;
        font-size: 0.5rem;
    }
}

/* Ultra Wide Screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
}

/* Landscape orientation adjustments for tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .hero {
        padding: 40px 0;
    }
    
    .hero-content {
        gap: 2rem;
    }
    
    .hero-text h1 {
        font-size: 1.8rem;
    }
    
    .hero-image {
        margin-right: 0;
    }
    
    .categories {
        padding: 50px 0;
    }
    
    .mobile-app {
        padding: 50px 0;
    }
    
    .business-section {
        padding: 50px 0;
    }
    
    .faq-section {
        padding: 40px 0;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .category-icon-img,
    .feature-icon-circle img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Accessibility - Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    .hamburger,
    .nav-menu,
    .hero-features,
    .mobile-app,
    .faq-section {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero {
        background: none;
        color: #000;
    }
    
    .business-section {
        background: none;
        color: #000;
    }
}