/* ========================================
   MOBILE RESPONSIVE OPTIMIZATION
   Optimized for 360x740 mobile devices
   ======================================== */

/* ========================================
   GLOBAL MOBILE SETTINGS
   ======================================== */

/* Prevent horizontal scrolling and set base styles */
html, body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    font-size: 14px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile viewport optimization */
@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    body {
        font-size: 16px;
        line-height: 1.5;
    }
}

/* ========================================
   HEADER & NAVIGATION MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    .header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 60px;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
        padding: 0;
        margin: 0;
        border: none;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.8rem 1rem;
        max-width: 100%;
        margin: 0;
        height: 60px;
        gap: 1rem;
        min-width: 0;
    }

    .logo-overhang {
        display: flex;
        align-items: center;
        height: 60px;
        flex-shrink: 0;
        min-width: 0;
    }

    .logo-image-overhang {
        height: 40px;
        width: auto;
        max-width: 100%;
        object-fit: contain;
        transform: none;
    }

    .mobile-menu-btn {
        display: flex;
        background: linear-gradient(180deg, #2361a0 0%, #3883c2 100%);
        width: 40px;
        height: 40px;
        border-radius: 8px;
        border: none;
        cursor: pointer;
        justify-content: center;
        align-items: center;
        padding: 0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        z-index: 1001;
        flex-shrink: 0;
    }

    .mobile-menu-btn span {
        display: block;
        width: 20px;
        height: 2px;
        background: #fff;
        margin: 3px auto;
        border-radius: 2px;
        transition: all 0.3s ease;
    }

                .nav-links {
                position: fixed;
                top: 0;
                right: -100%;
                width: 85%;
                max-width: 280px;
                height: 100vh;
                background: #fff;
                flex-direction: column;
                padding: 4rem 1.5rem 2rem;
                transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
                box-shadow: -4px 0 20px rgba(0,0,0,0.15);
                z-index: 1001;
                gap: 1.5rem;
                overflow-y: auto;
                pointer-events: auto;
            }

    .nav-links.active {
        right: 0;
    }

                .nav-links a {
                color: #1a4b84 !important;
                text-decoration: none !important;
                font-weight: 600;
                font-size: 1rem;
                padding: 0.8rem 1rem;
                border-bottom: 1px solid #f0f0f0;
                transition: color 0.3s ease;
                display: block !important;
                width: 100%;
                min-height: 44px;
                display: flex !important;
                align-items: center;
                cursor: pointer !important;
                position: relative;
                z-index: 1002;
                pointer-events: auto !important;
                background: transparent;
                border: none;
                outline: none;
            }

                .nav-links a:hover {
                color: #D13838 !important;
                background-color: rgba(209, 56, 56, 0.1);
            }

            .nav-links a:active {
                color: #D13838 !important;
                background-color: rgba(209, 56, 56, 0.2);
                transform: scale(0.98);
            }

    .mobile-menu-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s;
    }

    .mobile-menu-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    /* Mobile menu button animation */
    .mobile-menu-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .mobile-menu-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -5px);
    }
}

/* ========================================
   HERO SECTION MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    #hero {
        height: calc(100vh - 60px);
        min-height: 400px;
        max-height: 600px;
        margin: 0;
        padding: 0;
        padding-top: 60px;
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        top: 0;
    }

    .hero-bg-video {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center center;
        z-index: 1;
        filter: brightness(0.6) contrast(1.2);
    }

    .hero-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to bottom, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);
        z-index: 2;
    }

    .hero-content {
        position: relative;
        z-index: 3;
        max-width: 100%;
        padding: 1rem 1rem 2rem 1rem;
        text-align: left;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        height: 100%;
        width: 100%;
        padding-top: 1rem;
        margin: 0;
    }

                .hero-title {
                color: #fff;
                font-size: 1.4rem;
                font-weight: 700;
                margin-bottom: 1rem;
                line-height: 1.3;
                text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
                text-align: left;
                word-break: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                -webkit-hyphens: auto;
                max-width: 100%;
                padding-left: 2rem;
                padding-right: 0.8rem;
                box-sizing: border-box;
                overflow: visible;
                white-space: normal;
            }

                .hero-subtitle {
                color: rgba(255,255,255,0.9);
                font-size: 1rem;
                font-weight: 400;
                margin-bottom: 1.8rem;
                text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
                line-height: 1.4;
                text-align: left;
                word-break: break-word;
                overflow-wrap: break-word;
                width: 100%;
                padding-left: 2rem;
                padding-right: 0.8rem;
                box-sizing: border-box;
                overflow: visible;
                white-space: normal;
            }

    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .hero-buttons a {
        display: inline-block;
        padding: 1rem 1.2rem;
        font-size: 0.9rem;
        font-weight: 600;
        border-radius: 8px;
        text-decoration: none;
        transition: all 0.3s ease;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        text-align: center;
        width: 100%;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-buttons .primary-btn {
        background: #D13838;
        color: #fff;
        box-shadow: 0 4px 15px rgba(209,56,56,0.4);
        border: none;
    }

    .hero-buttons .secondary-btn {
        background: rgba(255,255,255,0.95);
        color: #1a4b84;
        border: 2px solid rgba(255,255,255,0.3);
        box-shadow: 0 4px 15px rgba(255,255,255,0.2);
    }

    .hero-rating {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        gap: 0.5rem;
        margin-top: 1rem;
        padding: 0.6rem 0.8rem;
        background: rgba(255,255,255,0.1);
        border-radius: 20px;
        backdrop-filter: blur(10px);
        border: 1px solid rgba(255,255,255,0.2);
        width: fit-content;
    }

    .hero-rating i {
        color: #FFD700;
        font-size: 0.9rem;
    }

    .hero-rating span {
        color: #fff;
        font-size: 0.8rem;
        font-weight: 600;
    }
}

/* ========================================
   SECTIONS MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    .section {
        padding: 2rem 0;
    }

    .container {
        padding: 0 1rem;
        max-width: 100%;
        margin: 0 auto;
    }

    .section-title {
        font-size: 1.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
        text-align: center;
        color: #1a4b84;
        font-weight: 700;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        padding: 0 0.5rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
        margin-bottom: 1.5rem;
        text-align: center;
        color: #666;
        font-weight: 400;
        padding: 0 0.5rem;
    }
}

/* ========================================
   SERVICES SECTION MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    .services-categories {
        padding: 0 1rem;
    }

    .category-title {
        font-size: 1.4rem;
        text-align: center;
        margin-bottom: 1.5rem;
        color: #1a4b84;
        font-weight: 700;
        line-height: 1.2;
    }

    .services-list {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
        max-width: 100%;
        margin: 0;
    }

    .service-item {
        border: 2px solid #1a4b84;
        border-radius: 10px;
        padding: 0.8rem 0.6rem;
        width: 100%;
        height: auto;
        min-height: 100px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: #fff;
        transition: all 0.3s ease;
        cursor: pointer;
        text-decoration: none;
        box-sizing: border-box;
    }

    .service-item:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(26, 75, 132, 0.2);
    }

    .service-icon {
        color: #1a4b84;
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
    }

    .service-item h4 {
        text-align: center;
        color: #1a4b84;
        font-size: 0.8rem;
        line-height: 1.2;
        font-weight: 600;
        margin: 0;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }

    .additional-services {
        display: flex;
        flex-direction: column;
        gap: 0.8rem;
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .additional-service-item {
        background: #1a4b84;
        border: none;
        border-radius: 10px;
        padding: 0.8rem;
        text-align: left;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.8rem;
        box-shadow: 0 4px 15px rgba(26, 75, 132, 0.2);
        transition: all 0.3s ease;
        width: 100%;
    }

    .additional-service-item i {
        color: #fff;
        font-size: 1.3rem;
        margin: 0;
        flex-shrink: 0;
    }

    .additional-service-item p {
        font-size: 0.8rem;
        line-height: 1.3;
        margin: 0;
        text-align: left;
        color: #fff;
        font-weight: 500;
    }
}

/* ========================================
   ABOUT SECTION MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    .about-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .about-content {
        order: 2;
        text-align: left;
    }

    .about-image {
        order: 1;
        text-align: center;
        margin-bottom: 1rem;
    }

    .about-image img {
        max-width: 100%;
        height: auto;
        border-radius: 10px;
    }

    .about-subtitle {
        font-size: 1rem;
        color: #1a4b84;
        font-weight: 600;
        margin-bottom: 1rem;
        text-align: left;
    }

    .about-content p {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 1rem;
        color: #333;
        text-align: left;
    }

    .about-team-title,
    .about-values-title {
        font-size: 1.1rem;
        margin-top: 1.5rem;
        margin-bottom: 0.8rem;
        color: #1a4b84;
        font-weight: 700;
        text-align: left;
    }

    .about-values-list {
        list-style: none;
        padding: 0;
        margin: 0;
        text-align: left;
    }

    .about-values-list li {
        font-size: 0.85rem;
        margin-bottom: 0.8rem;
        line-height: 1.4;
        color: #333;
        text-align: left;
        padding: 0.4rem 0;
    }

    .about-values-list li strong {
        display: block;
        margin-bottom: 0.2rem;
        color: #1a4b84;
    }
}

/* ========================================
   FAQ SECTION MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    .faq-section {
        padding: 2rem 0;
    }

    .faq-container {
        padding: 0 1rem;
    }

    .faq-headline {
        font-size: 1.4rem;
        margin-bottom: 0.8rem;
        color: #1a4b84;
        font-weight: 700;
        text-align: center;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .faq-subheadline {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
        color: #e05a4b;
        font-weight: 600;
        text-align: center;
        text-transform: uppercase;
    }

    .faq-accordion {
        max-width: 100%;
        margin: 0 auto;
    }

    .faq-item {
        background: #fff;
        border: 2px solid #1a4b84;
        border-radius: 12px;
        margin-bottom: 0.8rem;
        overflow: hidden;
        box-shadow: 0 4px 12px rgba(26, 75, 132, 0.15);
        transition: all 0.3s ease;
    }

    .faq-item:hover {
        box-shadow: 0 6px 20px rgba(26, 75, 132, 0.25);
        transform: translateY(-2px);
    }

    .faq-item.active {
        border-color: #D13838;
        box-shadow: 0 6px 20px rgba(209, 56, 56, 0.2);
    }

    .faq-question {
        padding: 1rem;
        font-size: 0.9rem;
        font-weight: 700;
        color: #1a4b84;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        transition: all 0.3s ease;
        background: linear-gradient(135deg, #f8fbff 0%, #e8f2ff 100%);
        border: none;
        width: 100%;
        text-align: left;
        min-height: 44px;
    }

    .faq-question:hover {
        background: linear-gradient(135deg, #e8f2ff 0%, #d1e7ff 100%);
        color: #D13838;
    }

    .faq-question.active {
        background: linear-gradient(135deg, #D13838 0%, #ff4d5a 100%);
        color: #fff;
    }

    .faq-question::after {
        content: '+';
        font-size: 1.3rem;
        font-weight: 700;
        color: #1a4b84;
        transition: all 0.3s ease;
        background: #fff;
        width: 26px;
        height: 26px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .faq-question:hover::after {
        color: #D13838;
        transform: scale(1.1);
    }

    .faq-question.active::after {
        content: '−';
        color: #fff;
        background: rgba(255,255,255,0.2);
        transform: scale(1.1);
    }

    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: all 0.4s ease;
        background: #fff;
        border-top: 1px solid #e8f2ff;
        opacity: 0;
        padding: 0;
    }

    .faq-answer.active {
        max-height: 1500px;
        padding: 0.8rem 1rem 1rem 1rem;
        opacity: 1;
    }

    .faq-answer p {
        font-size: 0.85rem;
        line-height: 1.5;
        color: #333;
        margin: 0;
    }
}

/* ========================================
   CONTACT SECTION MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    .contact-section-darkblue {
        padding: 2rem 0;
        background: #1a4b84;
    }

    .contact-section-darkblue .section-title {
        color: #fff;
        font-size: 1.4rem;
        line-height: 1.2;
        margin-bottom: 0.8rem;
        text-align: center;
    }

    .contact-section-darkblue .section-subtitle {
        color: #fff;
        font-size: 0.9rem;
        line-height: 1.3;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .contact-cta {
        background: linear-gradient(135deg, #D13838 0%, #ff4d5a 100%);
        color: white;
        padding: 1.5rem 1rem;
        border-radius: 12px;
        margin: 1rem;
        text-align: center;
        box-shadow: 0 4px 15px rgba(209, 56, 56, 0.2);
        position: relative;
        overflow: hidden;
    }

    .contact-cta h3 {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
        color: #fff;
        font-weight: 700;
        text-align: center;
    }

    .contact-cta p {
        font-size: 0.85rem;
        line-height: 1.4;
        margin-bottom: 1.2rem;
        color: rgba(255, 255, 255, 0.9);
        text-align: center;
    }

    .contact-grid {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 1.5rem;
        padding: 0 1rem;
    }

    .contact-form {
        order: 2;
        margin-bottom: 1.5rem;
    }

    .contact-info {
        order: 1;
        margin-bottom: 1.5rem;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.8rem;
    }

    .info-item {
        padding: 0.8rem;
        background: rgba(255,255,255,0.05);
        border-radius: 8px;
        text-align: center;
    }

    .info-icon {
        margin-bottom: 0.4rem;
    }

    .info-icon i {
        font-size: 1.3rem;
        color: #D13838;
    }

    .info-content h3 {
        font-size: 0.8rem;
        margin-bottom: 0.2rem;
        color: #fff;
    }

    .info-content p {
        font-size: 0.75rem;
        line-height: 1.2;
        color: #e8f0f8;
    }

    .form-group {
        margin-bottom: 0.8rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px;
        padding: 0.8rem;
        border-radius: 8px;
        margin-bottom: 0.8rem;
        width: 100%;
        box-sizing: border-box;
        min-height: 44px;
    }

    .btn {
        width: 100%;
        padding: 0.8rem;
        font-size: 0.9rem;
        border-radius: 8px;
        font-weight: 600;
        text-align: center;
        min-height: 44px;
    }
}

/* ========================================
   FOOTER MOBILE OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) {
    .footer-dark-custom {
        padding: 2rem 0 1.5rem 0;
    }

    .footer-grid-custom {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-branding,
    .footer-links-col,
    .footer-contact-col,
    .footer-hours-col {
        grid-column: 1;
        grid-row: auto;
    }

    .footer-logo-img {
        width: 120px;
        margin: 0 auto 1rem auto;
    }

    .footer-slogan {
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
        text-align: center;
    }

    .footer-social-custom {
        justify-content: center;
        gap: 0.8rem;
    }

    .footer-social-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .footer-heading {
        font-size: 1rem;
        margin-bottom: 0.8rem;
        text-align: center;
    }

    .footer-heading::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-list li,
    .footer-contact-list li,
    .footer-hours-list li {
        justify-content: center;
        text-align: center;
        font-size: 0.8rem;
        margin-bottom: 0.4rem;
    }

    .footer-bottom-custom {
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }

    .footer-legal-links {
        justify-content: center;
        gap: 1.2rem;
    }
}

/* ========================================
   SMALL MOBILE DEVICES (480px and below)
   ======================================== */

@media screen and (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 0.8rem;
    }

    .section {
        padding: 1.5rem 0;
    }

    .section-title {
        font-size: 1.3rem;
        line-height: 1.1;
    }

    .section-subtitle {
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 1.4rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .services-list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .service-item {
        min-height: 90px;
        padding: 0.6rem 0.5rem;
    }

    .service-icon {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .service-item h4 {
        font-size: 0.75rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .info-item {
        padding: 0.6rem;
    }

    .info-icon i {
        font-size: 1.2rem;
    }

    .info-content h3 {
        font-size: 0.75rem;
    }

    .info-content p {
        font-size: 0.7rem;
    }

    .faq-question {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .faq-answer p {
        font-size: 0.8rem;
    }
}

/* ========================================
   SMALL PHONE OPTIMIZATION (Samsung S8, iPhone 12 Pro, etc.)
   ======================================== */

@media screen and (max-width: 390px) {
    html {
        font-size: 13px;
    }

    .container {
        padding: 0 0.8rem;
    }

    .section {
        padding: 1.5rem 0;
    }

    .section-title {
        font-size: 1.4rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }

    .section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }

    /* Hero section specific fixes for small phones */
    #hero {
        min-height: 450px;
        max-height: 600px;
        margin: 0;
        padding: 0;
        padding-top: 60px;
        top: 0;
    }

    .hero-content {
        padding: 1rem 0.8rem 1.5rem 0.8rem;
        justify-content: flex-start;
        padding-top: 1rem;
    }

                .hero-title {
                font-size: 1.2rem;
                line-height: 1.3;
                margin-bottom: 0.8rem;
                word-break: break-word;
                overflow-wrap: break-word;
                hyphens: auto;
                white-space: normal;
                max-width: 100%;
                box-sizing: border-box;
                padding-left: 2rem;
                padding-right: 0.5rem;
                text-align: left;
                overflow: visible;
            }

                .hero-subtitle {
                font-size: 0.95rem;
                line-height: 1.3;
                margin-bottom: 1.5rem;
                word-break: break-word;
                overflow-wrap: break-word;
                white-space: normal;
                max-width: 100%;
                box-sizing: border-box;
                padding-left: 2rem;
                padding-right: 0.5rem;
                text-align: left;
                overflow: visible;
            }

    .hero-buttons {
        gap: 0.8rem;
        margin-top: 0.5rem;
    }

    .hero-buttons a {
        padding: 0.9rem 1rem;
        font-size: 0.85rem;
        min-height: 46px;
        letter-spacing: 0.02em;
    }

    .hero-rating {
        margin-top: 1rem;
        padding: 0.6rem 0.8rem;
    }

    .hero-rating i {
        font-size: 0.9rem;
    }

    .hero-rating span {
        font-size: 0.8rem;
    }

    /* Services section fixes */
    .services-list {
        gap: 0.6rem;
    }

    .service-item {
        min-height: 90px;
        padding: 0.6rem 0.5rem;
    }

    .service-icon {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .service-item h4 {
        font-size: 0.75rem;
        line-height: 1.2;
    }

    /* Contact section fixes */
    .contact-info {
        gap: 0.6rem;
    }

    .info-item {
        padding: 0.6rem;
    }

    .info-icon i {
        font-size: 1.2rem;
    }

    .info-content h3 {
        font-size: 0.75rem;
    }

    .info-content p {
        font-size: 0.7rem;
    }

    /* FAQ section fixes */
    .faq-question {
        padding: 0.8rem;
        font-size: 0.85rem;
    }

    .faq-answer p {
        font-size: 0.8rem;
    }

    /* Header fixes for small phones */
    .header {
        height: 60px;
    }

    .navbar {
        padding: 0.6rem 0.8rem;
        height: 60px;
    }

    .logo-image-overhang {
        height: 40px;
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-btn span {
        width: 20px;
        height: 2px;
    }
}

/* ========================================
   VERY SMALL MOBILE DEVICES (360px and below)
   ======================================== */

@media screen and (max-width: 360px) {
    html {
        font-size: 12px;
    }

    .container {
        padding: 0 0.6rem;
    }

    .section {
        padding: 1.2rem 0;
    }

    .section-title {
        font-size: 1.2rem;
        line-height: 1.1;
        margin-bottom: 0.8rem;
    }

    .section-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.2rem;
    }

    /* Hero section specific fixes for very small screens */
    #hero {
        min-height: 350px;
        max-height: 500px;
        margin: 0;
        padding: 0;
        padding-top: 60px;
        top: 0;
    }

    .hero-content {
        padding: 0.3rem 0.6rem 1rem 0.6rem;
        justify-content: flex-start;
        padding-top: 0.3rem;
    }

    .hero-title {
        font-size: 1.2rem;
        line-height: 1.1;
        margin-bottom: 0.6rem;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        white-space: normal;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
        text-align: left;
        overflow: visible;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        line-height: 1.2;
        margin-bottom: 1.2rem;
        word-break: break-word;
        overflow-wrap: break-word;
        white-space: normal;
        max-width: 100%;
        box-sizing: border-box;
        padding-left: 0.2rem;
        padding-right: 0.2rem;
        text-align: left;
        overflow: visible;
    }

    .hero-buttons {
        gap: 0.6rem;
        margin-top: 0.3rem;
    }

    .hero-buttons a {
        padding: 0.7rem 0.8rem;
        font-size: 0.75rem;
        min-height: 40px;
        letter-spacing: 0.01em;
    }

    .hero-rating {
        margin-top: 0.8rem;
        padding: 0.5rem 0.6rem;
    }

    .hero-rating i {
        font-size: 0.8rem;
    }

    .hero-rating span {
        font-size: 0.75rem;
    }

    /* Services section fixes */
    .services-list {
        gap: 0.5rem;
    }

    .service-item {
        min-height: 80px;
        padding: 0.5rem 0.4rem;
    }

    .service-icon {
        font-size: 1.1rem;
        margin-bottom: 0.4rem;
    }

    .service-item h4 {
        font-size: 0.7rem;
        line-height: 1.1;
    }

    /* Contact section fixes */
    .contact-info {
        gap: 0.5rem;
    }

    .info-item {
        padding: 0.5rem;
    }

    .info-icon i {
        font-size: 1.1rem;
    }

    .info-content h3 {
        font-size: 0.7rem;
    }

    .info-content p {
        font-size: 0.65rem;
    }

    /* FAQ section fixes */
    .faq-question {
        padding: 0.7rem;
        font-size: 0.8rem;
    }

    .faq-answer p {
        font-size: 0.75rem;
    }

    /* Header fixes for very small screens */
    .header {
        height: 55px;
    }

    .navbar {
        padding: 0.5rem 0.6rem;
        height: 55px;
    }

    .logo-image-overhang {
        height: 35px;
    }

    .mobile-menu-btn {
        width: 35px;
        height: 35px;
    }

    .mobile-menu-btn span {
        width: 18px;
        height: 2px;
    }
}

/* ========================================
   LANDSCAPE ORIENTATION OPTIMIZATION
   ======================================== */

@media screen and (max-width: 768px) and (orientation: landscape) {
    #hero {
        height: calc(100vh - 55px);
        min-height: 300px;
    }

    .hero-content {
        padding: 0.5rem 1rem;
    }

    .hero-title {
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
        margin-bottom: 1.2rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 0.6rem;
        max-width: 350px;
    }

    .hero-buttons a {
        flex: 1;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    .section {
        padding: 1.5rem 0;
    }
}

/* ========================================
   TOUCH DEVICE OPTIMIZATION
   ======================================== */

@media (pointer: coarse) {
    .btn,
    .service-item,
    .faq-question,
    .mobile-menu-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 44px;
        font-size: 16px;
    }

    .nav-links a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ========================================
   HIGH DPI DISPLAY OPTIMIZATION
   ======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-image-overhang,
    .footer-logo-img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */

@media screen and (max-width: 768px) {
    /* Focus indicators for better accessibility */
    .btn:focus,
    .service-item:focus,
    .faq-question:focus,
    .nav-links a:focus {
        outline: 2px solid #D13838;
        outline-offset: 2px;
    }

    /* High contrast mode support */
    @media (prefers-contrast: high) {
        .btn,
        .service-item,
        .faq-question {
            border: 2px solid currentColor;
        }
    }

    /* Reduced motion support */
    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms;
            animation-iteration-count: 1;
            transition-duration: 0.01ms;
        }
    }
}

/* ========================================
   PERFORMANCE OPTIMIZATIONS
   ======================================== */

@media screen and (max-width: 768px) {
    /* Optimize animations for mobile */
    .service-item,
    .faq-item,
    .btn {
        will-change: transform;
        transform: translateZ(0);
        backface-visibility: hidden;
    }

    /* Reduce box-shadow complexity on mobile */
    .service-item:hover,
    .faq-item:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
} 