/* ============================================
   MOBILE STYLESHEET - MK Veasey Electrical
   Version: 1.0
   
   This stylesheet contains ONLY mobile overrides.
   It should be loaded AFTER mkveasey.css and blog.css
   All styles are wrapped in media queries to
   ensure zero impact on desktop (1024px+)
   
   Breakpoints:
   - Tablets: 768px - 1023px
   - Mobile: up to 767px
   - Small Mobile: up to 480px
   - Extra Small: up to 375px
   - Foldable Devices: Special queries
   ============================================ */

/* ============================================
   DESKTOP OVERRIDES (1024px+)
   Ensure desktop styles are not affected by mobile rules
   ============================================ */
@media (min-width: 1024px) {
    /* Restore desktop service card image behavior */
    .service-card-image img {
        object-fit: cover !important;
        height: 100%;
        max-height: none;
    }
    
    /* Restore desktop card image behavior */
    .card img,
    .service-card img,
    .blog-card img,
    .testimonial-card img,
    .location-card img {
        object-fit: cover !important;
    }
}

/* ============================================
   TABLET STYLES (768px - 1023px)
   ============================================ */
@media (max-width: 1023px) and (min-width: 768px) {
    /* Container - Better padding for tablets */
    .container {
        padding: 0 32px;
    }
    
    /* Sections - Adjust spacing */
    .section {
        padding: 60px 0;
    }
    
    /* Hero sections */
    .hero {
        min-height: 500px;
    }
    
    .hero-home {
        min-height: 65vh;
    }
    
    /* Service cards - 2 column on tablets */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    /* Trust stats - Keep 4 column */
    .trust-stats {
        gap: 24px;
    }
    
    /* Location cards - 3 column */
    .locations-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* Footer - 2x2 grid */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }
}

/* ============================================
   MOBILE STYLES (up to 767px)
   ============================================ */
@media (max-width: 1023px) {
    /* ========== HIDE DESKTOP HEADER ON MOBILE ========== */
    .site-header {
        display: none !important;
    }
}

@media (max-width: 767px) {
    /* ========== FOUNDATION ========== */
    
    /* Body - Add top padding to prevent header overlap */
    body {
        padding-top: 80px !important;
    }
    
    /* Container - Better mobile padding */
    .container {
        padding: 0 20px;
    }
    
    /* CRITICAL: Ensure all images display properly on mobile */
    img {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    /* Fix for images in cards and containers */
    .card img,
    .service-card img,
    .blog-card img,
    .testimonial-card img,
    .location-card img {
        width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* Sections - Reduce vertical spacing */
    .section {
        padding: 48px 0;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        line-height: 1.2;
    }
    
    h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        line-height: 1.25;
    }
    
    h3 {
        font-size: clamp(1.25rem, 5vw, 1.75rem);
    }
    
    .lead {
        font-size: clamp(1rem, 3vw, 1.125rem);
        line-height: 1.6;
    }
    
    /* ========== HEADER & NAVIGATION ========== */
    
    /* Header top - More compact */
    .header-top {
        padding: 6px 0;
        font-size: 0.75rem;
    }
    
    .header-tagline {
        font-size: 0.75rem;
    }
    
    .header-tagline svg {
        width: 12px;
        height: 12px;
    }
    
    /* Main header */
    .header-main {
        padding: 10px 0;
    }
    
    .site-logo img {
        height: 36px;
    }
    
    /* Mobile menu - Larger touch targets */
    .mobile-menu-toggle {
        width: 48px;
        height: 48px;
        gap: 6px;
    }
    
    .mobile-menu-toggle span {
        width: 24px;
        height: 3px;
    }
    
    /* Navigation menu - CRITICAL FIX for clickability */
    .main-nav {
        width: 320px;
        max-width: 90vw;
        padding: 90px 28px 28px;
        z-index: 1100 !important; /* Ensure nav is above overlay */
    }
    
    /* Fix nav overlay to allow clicks through to nav */
    .nav-overlay {
        z-index: 1050 !important; /* Below nav menu */
    }
    
    /* Ensure nav links are clickable */
    .nav-link {
        padding: 18px 0;
        font-size: 1.0625rem;
        min-height: 48px;
        position: relative;
        z-index: 1;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(247, 181, 0, 0.2);
    }
    
    .nav-dropdown-link {
        padding: 12px 0;
        font-size: 1rem;
        min-height: 44px;
        position: relative;
        z-index: 1;
        cursor: pointer;
        -webkit-tap-highlight-color: rgba(247, 181, 0, 0.2);
    }
    
    /* Ensure dropdown items are visible and clickable */
    .nav-dropdown {
        position: relative;
        z-index: 1;
    }
    
    .nav-cta-mobile .btn {
        min-height: 48px;
        font-size: 1rem;
        position: relative;
        z-index: 1;
    }
    
    /* ========== HERO SECTIONS ========== */
    
    .hero {
        min-height: 450px;
        margin-top: 90px;
        padding-top: 40px !important; /* Extra space for NICEIC badge */
        padding-bottom: 48px !important; /* More bottom spacing */
    }
    
    .hero-home {
        min-height: 60vh;
        padding-top: 48px !important;
        padding-bottom: 56px !important;
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-badge {
        padding: 8px 16px;
        font-size: 0.8125rem;
        margin-bottom: 24px; /* More space below badge */
        margin-top: 8px; /* Space above badge */
    }
    
    .hero-badge svg {
        width: 16px;
        height: 16px;
    }
    
    .hero h1 {
        margin-bottom: 20px;
    }
    
    .hero .lead {
        margin-bottom: 32px; /* More space before buttons */
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 16px; /* More gap between buttons */
        margin-bottom: 24px; /* Space below buttons */
    }
    
    .hero-cta .btn {
        width: 100%;
        justify-content: center;
        min-height: 52px;
        font-size: 1rem;
    }
    
    /* Page hero / page header - Extra margin to prevent header overlap */
    .page-hero,
    .page-header {
        padding: 48px 0 36px;
        margin-top: 40px !important;
    }
    
    .page-hero h1,
    .page-header h1 {
        margin-bottom: 16px;
    }
    
    .page-hero .lead,
    .page-header .lead,
    .page-header p {
        margin-bottom: 20px;
    }

    .section-padding {
        padding: 48px 0;
    }
    
    .breadcrumb {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .breadcrumb-item {
        font-size: 0.8125rem;
    }
    
    /* ========== BUTTONS ========== */
    
    .btn {
        padding: 14px 24px;
        font-size: 0.9375rem;
        min-height: 48px;
    }
    
    .btn-lg {
        padding: 16px 28px;
        font-size: 1rem;
        min-height: 52px;
    }
    
    .btn svg {
        width: 18px;
        height: 18px;
    }
    
    /* ========== TRUST BAR ========== */
    
    .trust-bar {
        padding: 32px 0;
    }
    
    .trust-badges {
        gap: 24px;
    }
    
    .trust-badge img {
        height: 45px;
    }
    
    .trust-badge span {
        font-size: 0.6875rem;
    }
    
    /* ========== TRUST STATS ========== */
    
    .trust-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .trust-stat {
        padding: 24px 16px;
    }
    
    .trust-stat-number {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 8px;
    }
    
    .trust-stat-label {
        font-size: 0.8125rem;
    }
    
    /* ========== SERVICE CARDS ========== */
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }
    
    .service-card {
        max-width: 100%;
    }
    
    /* FIX: Show entire image without any cropping */
    .service-card-image {
        height: auto;
        min-height: 180px;
        margin-bottom: 35px;
        overflow: visible;
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        background: #f8f9fa;
        padding: 20px;
        border-radius: 12px 12px 0 0;
    }
    
    .service-card-image img {
        width: 100%;
        height: auto;
        object-fit: contain !important; /* Show entire image without cropping */
        object-position: center;
        max-height: 200px;
    }
    
    .service-card-icon {
        width: 56px;
        height: 56px;
        bottom: -28px;
        right: 20px;
    }
    
    .service-card-icon svg {
        width: 28px;
        height: 28px;
    }
    
    .service-card-content {
        padding: 24px;
        padding-top: 32px;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 16px;
    }
    
    .service-card p {
        font-size: 0.9375rem;
        margin-bottom: 20px;
    }
    
    .service-card-link {
        font-size: 0.875rem;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* ========== FEATURE BOXES ========== */
    
    .feature-box {
        padding: 32px 20px;
    }
    
    .feature-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }
    
    .feature-icon svg {
        width: 36px;
        height: 36px;
    }
    
    .feature-box h3 {
        font-size: 1.125rem;
        margin-bottom: 12px;
    }
    
    .feature-box p {
        font-size: 0.9375rem;
    }
    
    /* ========== TESTIMONIALS ========== */
    
    .testimonial-card {
        padding: 28px 24px;
    }
    
    .testimonial-card::before {
        font-size: 48px;
        top: 20px;
        left: 24px;
    }
    
    .testimonial-rating {
        margin-bottom: 20px;
    }
    
    .testimonial-rating svg {
        width: 18px;
        height: 18px;
    }
    
    .testimonial-content {
        font-size: 0.9375rem;
        margin-bottom: 24px;
        line-height: 1.65;
    }
    
    .testimonial-author h4 {
        font-size: 0.9375rem;
    }
    
    .testimonial-location {
        font-size: 0.8125rem;
    }
    
    /* ========== LOCATION CARDS ========== */
    
    .locations-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .location-card {
        padding: 16px;
        min-height: 80px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .location-card h4 {
        font-size: 0.9375rem;
        margin-bottom: 4px;
    }
    
    .location-card span {
        font-size: 0.8125rem;
    }
    
    /* ========== FORMS ========== */
    
    /* Quote form */
    .quote-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .quote-form-wrapper {
        padding: 28px 20px;
    }
    
    .form-progress {
        margin-bottom: 32px;
        padding: 0;
    }
    
    .progress-step-number {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .progress-step-label {
        font-size: 0.6875rem;
    }
    
    .form-step-header h2 {
        font-size: clamp(1.5rem, 5vw, 1.75rem);
        margin-bottom: 12px;
    }
    
    .form-step-header p {
        font-size: 0.9375rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 0.9375rem;
        margin-bottom: 8px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 1rem;
        min-height: 48px;
    }
    
    .form-group textarea {
        min-height: 140px;
    }
    
    .checkbox-label {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .checkbox-label input[type="checkbox"] {
        width: 22px;
        height: 22px;
        min-width: 22px;
    }
    
    .checkbox-label span {
        font-size: 0.9375rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
        margin-top: 28px;
        padding-top: 28px;
    }
    
    .form-actions .btn {
        width: 100%;
        min-height: 52px;
    }
    
    /* Form success */
    .form-success {
        padding: 40px 20px;
    }
    
    .success-icon {
        width: 72px;
        height: 72px;
        margin-bottom: 28px;
    }
    
    .form-success h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 20px;
    }
    
    .form-success p {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .form-success ul {
        margin: 28px auto;
    }
    
    .form-success ul li {
        padding: 12px 12px 12px 2.5rem;
        margin-bottom: 12px;
        font-size: 0.9375rem;
    }
    
    /* Sidebar */
    .quote-sidebar {
        gap: 28px;
    }
    
    .sidebar-card {
        padding: 24px 20px;
    }
    
    .sidebar-card h3 {
        font-size: clamp(1.125rem, 4vw, 1.25rem);
        margin-bottom: 20px;
    }
    
    .feature-list li {
        font-size: 0.9375rem;
        margin-bottom: 12px;
        gap: 12px;
    }
    
    .contact-phone {
        padding: 16px;
        font-size: clamp(1rem, 4vw, 1.25rem);
        margin-bottom: 16px;
        min-height: 56px;
    }
    
    .contact-hours {
        font-size: 0.875rem;
        margin-bottom: 16px;
    }
    
    /* Contact form */
    .contact-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .contact-info-card,
    .contact-form-card {
        padding: 28px 20px;
    }
    
    .contact-info-card h2,
    .contact-form-card h2 {
        font-size: clamp(1.5rem, 5vw, 1.75rem);
        margin-bottom: 20px;
    }
    
    .contact-methods {
        gap: 20px;
        margin-bottom: 28px;
    }
    
    .contact-method {
        padding: 20px;
        flex-direction: row;
        align-items: flex-start;
    }
    
    .contact-method-icon {
        width: 52px;
        height: 52px;
        min-width: 52px;
    }
    
    .contact-method-content h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .contact-method-content p {
        font-size: 0.875rem;
    }
    
    .contact-link {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .contact-emergency {
        padding: 24px 20px;
        margin-top: 28px;
    }
    
    .contact-emergency h3 {
        font-size: 1.125rem;
        margin-bottom: 12px;
    }
    
    .contact-emergency p {
        margin-bottom: 20px;
        font-size: 0.9375rem;
    }
    
    .contact-emergency .btn {
        width: 100%;
        min-height: 52px;
    }
    
    /* ========== FOOTER ========== */
    
    .footer-main {
        padding: 48px 0;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-logo {
        height: 45px;
        margin-bottom: 20px;
    }
    
    .footer-brand p {
        font-size: 0.9375rem;
        margin-bottom: 20px;
    }
    
    .footer-accreditations {
        gap: 16px;
    }
    
    .footer-accreditations img {
        height: 40px;
    }
    
    .footer-heading {
        font-size: 1.125rem;
        margin-bottom: 20px;
        padding-bottom: 12px;
    }
    
    .footer-links {
        gap: 12px;
    }
    
    .footer-links a {
        font-size: 0.9375rem;
        min-height: 36px;
        display: flex;
        align-items: center;
    }
    
    .footer-contact-item {
        gap: 12px;
        margin-bottom: 20px;
        font-size: 0.9375rem;
    }
    
    .footer-contact-item svg {
        width: 18px;
        height: 18px;
    }
    
    .footer-social {
        gap: 12px;
        margin-top: 20px;
    }
    
    .footer-social a {
        width: 48px;
        height: 48px;
    }
    
    .footer-social svg {
        width: 22px;
        height: 22px;
    }
    
    .footer-bottom {
        padding: 20px 0;
    }
    
    .footer-bottom .container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-copyright {
        font-size: 0.8125rem;
    }
    
    .footer-legal {
        flex-direction: column;
        gap: 16px;
    }
    
    .footer-legal a {
        font-size: 0.8125rem;
        min-height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .footer-credit {
        width: 100%;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .dev-credit {
        font-size: 0.8125rem;
        padding: 8px 16px;
    }
    
    /* ========== ABOUT PAGE ========== */
    
    .about-intro-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .about-intro-content h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 20px;
    }
    
    .about-intro-content .lead {
        font-size: 1.0625rem;
        margin-bottom: 20px;
    }
    
    .about-intro-content p {
        margin-bottom: 16px;
    }
    
    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        margin-top: 32px;
    }
    
    .stat-item {
        padding: 20px 16px;
    }
    
    .stat-number {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 8px;
    }
    
    .stat-label {
        font-size: 0.8125rem;
    }
    
    .about-intro-image img {
        max-height: 300px;
    }
    
    .about-badge {
        bottom: 16px;
        right: 16px;
        padding: 12px 16px;
    }
    
    .about-badge span {
        font-size: 0.8125rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .feature-card {
        padding: 28px 24px;
    }
    
    .feature-card h3 {
        font-size: 1.125rem;
        margin-bottom: 12px;
    }
    
    .feature-card p {
        font-size: 0.9375rem;
    }
    
    .certifications-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .cert-card {
        padding: 24px 20px;
    }
    
    .cert-card img {
        width: 100px;
        height: 100px;
        margin-bottom: 16px;
    }
    
    .cert-card h3 {
        font-size: 0.9375rem;
        margin-bottom: 12px;
    }
    
    .cert-card p {
        font-size: 0.8125rem;
    }
    
    /* ========== LOCATION PAGES ========== */
    
    .location-hero {
        padding: 48px 0 40px;
        margin-top: 90px;
    }
    
    .location-hero h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 20px;
    }
    
    .location-hero .lead {
        font-size: 1.0625rem;
        margin-bottom: 28px;
    }
    
    .location-features {
        flex-direction: column;
        gap: 16px;
        margin-bottom: 32px;
        align-items: center;
    }
    
    .location-feature {
        gap: 8px;
        font-size: 0.9375rem;
    }
    
    .location-info-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .location-content h2 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 20px;
    }
    
    .location-content h3 {
        font-size: 1.25rem;
        margin-top: 28px;
        margin-bottom: 16px;
    }
    
    .location-content p {
        font-size: 0.9375rem;
        margin-bottom: 16px;
    }
    
    .location-content ul {
        margin: 20px 0;
    }
    
    .location-content ul li {
        padding: 8px 0 8px 1.5rem;
        font-size: 0.9375rem;
    }
    
    .coverage-stats {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-top: 32px;
    }
    
    .coverage-stat {
        padding: 24px 20px;
    }
    
    .regions-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 32px;
    }
    
    .region-card {
        padding: 28px 24px;
    }
    
    .region-card h3 {
        font-size: 1.5rem;
        margin-bottom: 16px;
    }
    
    .region-card p {
        font-size: 0.9375rem;
        margin-bottom: 20px;
    }
    
    .region-count {
        padding: 8px 16px;
        font-size: 0.8125rem;
    }
    
    .nearby-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        margin-top: 28px;
    }
    
    .nearby-card {
        padding: 20px;
        text-align: left;
    }
    
    .nearby-card h3 {
        font-size: 1rem;
        margin-bottom: 4px;
    }
    
    .nearby-card p {
        font-size: 0.875rem;
    }
    
    .cta-contact {
        flex-direction: column;
        gap: 16px;
        margin-top: 28px;
    }
    
    .contact-item {
        gap: 8px;
        font-size: 0.9375rem;
    }
    
    /* ========== CTA SECTIONS ========== */
    
    .cta-section {
        padding: 48px 0;
    }
    
    .cta-content h2 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 20px;
    }
    
    .cta-content p {
        font-size: 1rem;
        margin-bottom: 28px;
    }
    
    .cta-content .btn {
        width: 100%;
        min-height: 52px;
    }
}

/* ============================================
   SMALL MOBILE (up to 480px)
   ============================================ */
@media (max-width: 480px) {
    /* Container - Tighter on very small screens */
    .container {
        padding: 0 16px;
    }
    
    /* Sections */
    .section {
        padding: 40px 0;
    }
    
    /* Typography */
    h1 {
        font-size: clamp(1.5rem, 9vw, 2rem);
    }
    
    h2 {
        font-size: clamp(1.375rem, 7vw, 1.75rem);
    }
    
    h3 {
        font-size: clamp(1.125rem, 6vw, 1.5rem);
    }
    
    /* Hero */
    .hero {
        min-height: 400px;
    }
    
    .hero-home {
        min-height: 55vh;
    }
    
    .hero-badge {
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    
    .hero-cta .btn {
        min-height: 50px;
        font-size: 0.9375rem;
    }
    
    /* Page hero / page header */
    .page-hero,
    .page-header {
        padding: 40px 0 32px;
    }

    .section-padding {
        padding: 40px 0;
    }
    
    /* Trust stats - Single column on very small screens */
    .trust-stats {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Service cards */
    .service-card-image {
        height: 200px;
    }
    
    .service-card-content {
        padding: 20px;
    }
    
    /* Location cards - Single column */
    .locations-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .location-card {
        padding: 20px;
        min-height: 70px;
    }
    
    /* Forms */
    .quote-form-wrapper,
    .contact-info-card,
    .contact-form-card {
        padding: 24px 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-main {
        padding: 40px 0;
    }
    
    .footer-grid {
        gap: 32px;
    }
    
    /* About page */
    .about-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .certifications-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    /* Location pages */
    .coverage-stats,
    .regions-grid,
    .nearby-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   EXTRA SMALL (up to 375px)
   ============================================ */
@media (max-width: 375px) {
    /* Container - Even tighter */
    .container {
        padding: 0 12px;
    }
    
    /* Sections */
    .section {
        padding: 36px 0;
    }
    
    /* Typography */
    h1 {
        font-size: clamp(1.375rem, 10vw, 1.875rem);
    }
    
    h2 {
        font-size: clamp(1.25rem, 8vw, 1.625rem);
    }
    
    /* Hero */
    .hero {
        min-height: 380px;
    }
    
    .hero-home {
        min-height: 50vh;
    }
    
    /* Buttons */
    .btn {
        padding: 12px 20px;
        font-size: 0.875rem;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 0.9375rem;
    }
    
    /* Service cards */
    .service-card-content {
        padding: 16px;
    }
    
    /* Forms */
    .quote-form-wrapper,
    .contact-info-card,
    .contact-form-card {
        padding: 20px 12px;
    }
    
    /* Footer */
    .footer-main {
        padding: 36px 0;
    }
}

/* ============================================
   FOLDABLE DEVICES
   ============================================ */

/* Z Fold 5 Cover Screen (280px - 380px, very tall ~23:9) */
@media (min-width: 280px) and (max-width: 380px) and (min-aspect-ratio: 2/1) {
    /* Ultra-compact layout for narrow cover screen */
    .container {
        padding: 0 12px;
    }
    
    .section {
        padding: 32px 0;
    }
    
    /* Hero - Reduce height for tall narrow screen */
    .hero {
        min-height: 350px;
    }
    
    .hero-home {
        min-height: 45vh;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero .lead {
        font-size: 0.9375rem;
    }
    
    /* Navigation - Narrower menu */
    .main-nav {
        width: 280px;
        max-width: 95vw;
    }
    
    /* Cards - Full width, compact */
    .service-card-content {
        padding: 16px 12px;
    }
    
    /* Forms - Compact */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 0.9375rem;
    }
    
    /* Footer - Compact */
    .footer-main {
        padding: 32px 0;
    }
    
    .footer-grid {
        gap: 28px;
    }
}

/* Z Fold 5 Unfolded (700px - 900px, square-ish ~5:4) */
@media (min-width: 700px) and (max-width: 900px) and (max-aspect-ratio: 5/4) {
    /* Tablet-like layout for unfolded foldable */
    .container {
        padding: 0 28px;
    }
    
    /* Hero - Adjust for square aspect */
    .hero {
        min-height: 450px;
    }
    
    .hero-home {
        min-height: 55vh;
    }
    
    /* Grids - 2 column works well */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    .trust-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .locations-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 28px;
    }
    
    .certifications-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
    
    /* Forms - Can use 2 column */
    .form-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    /* Footer - 2 column */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 36px;
    }
}

/* General tall screens (any device with very tall aspect ratio) */
@media (max-aspect-ratio: 9/16) and (max-width: 767px) {
    /* Reduce vertical spacing for very tall screens */
    .section {
        padding: 36px 0;
    }
    
    .hero {
        min-height: 380px;
    }
    
    .hero-home {
        min-height: 50vh;
    }
    
    .page-hero {
        padding: 36px 0 28px;
    }
}

/* Landscape phones (any phone in landscape) */
@media (max-height: 500px) and (orientation: landscape) and (max-width: 1023px) {
    /* Compact vertical spacing for landscape */
    .section {
        padding: 32px 0;
    }
    
    .hero {
        min-height: 300px;
    }
    
    .hero-home {
        min-height: 85vh;
    }
    
    .page-hero {
        padding: 32px 0 24px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }
    
    .hero .lead {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .hero-cta {
        flex-direction: row;
        gap: 12px;
    }
    
    .hero-cta .btn {
        width: auto;
        min-width: 160px;
    }
    
    /* Forms - Use horizontal layout */
    .form-row {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-actions {
        flex-direction: row;
    }
    
    .form-actions .btn {
        width: auto;
        flex: 1;
    }
}

/* ============================================
   BLOG MOBILE STYLES
   ============================================ */
@media (max-width: 767px) {
    /* Blog header */
    .blog-header {
        padding: 100px 0 40px;
    }
    
    .blog-header h1 {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 16px;
    }
    
    .blog-header p {
        font-size: 1rem;
    }
    
    /* Blog filters */
    .blog-filters {
        padding: 20px 0;
        margin-bottom: 32px;
    }
    
    .filter-tabs {
        gap: 10px;
    }
    
    .filter-tab {
        padding: 8px 18px;
        font-size: 0.875rem;
    }
    
    /* Blog grid */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        margin-bottom: 40px;
    }
    
    /* Blog cards */
    .blog-card-header {
        min-height: 160px;
        padding: 20px;
    }
    
    .blog-card-header-title {
        font-size: 1.125rem;
    }
    
    .blog-card-category {
        padding: 5px 14px;
        font-size: 0.6875rem;
        margin-bottom: 12px;
    }
    
    .blog-card-content {
        padding: 24px 20px;
    }
    
    .blog-card-meta {
        gap: 16px;
        margin-bottom: 12px;
        font-size: 0.8125rem;
    }
    
    .blog-card-title {
        font-size: 1.25rem;
        margin-bottom: 12px;
    }
    
    .blog-card-excerpt {
        font-size: 0.9375rem;
        margin-bottom: 16px;
    }
    
    .blog-card-footer {
        padding-top: 16px;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .blog-card-author-avatar {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
    }
    
    .blog-card-author-name {
        font-size: 0.875rem;
    }
    
    .blog-card-read-more {
        font-size: 0.875rem;
    }
    
    /* Featured post */
    .featured-post {
        grid-template-columns: 1fr;
        margin-bottom: 32px;
    }
    
    .featured-post-header {
        min-height: 300px;
        padding: 32px 24px;
    }
    
    .featured-post-header-title {
        font-size: 1.5rem;
    }
    
    .featured-post-header-excerpt {
        font-size: 1rem;
        margin-top: 12px;
    }
    
    .featured-post-content {
        padding: 32px 24px;
    }
    
    .featured-badge {
        padding: 6px 16px;
        font-size: 0.8125rem;
        margin-bottom: 16px;
    }
    
    .featured-post-title {
        font-size: 1.75rem;
        margin-bottom: 16px;
    }
    
    .featured-post-excerpt {
        font-size: 1rem;
        margin-bottom: 24px;
    }
    
    .featured-post-meta {
        gap: 20px;
        margin-bottom: 24px;
        font-size: 0.8125rem;
    }
    
    /* Blog layout */
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 40px;
    }
    
    .blog-sidebar {
        position: static;
        top: auto;
    }
    
    .sidebar-widget {
        padding: 24px 20px;
        margin-bottom: 24px;
    }
    
    .sidebar-widget-title {
        font-size: 1.125rem;
        margin-bottom: 16px;
        padding-bottom: 12px;
    }
    
    .sidebar-categories li {
        margin-bottom: 10px;
    }
    
    .sidebar-categories a {
        padding: 10px 12px;
        font-size: 0.9375rem;
    }
    
    .sidebar-categories .count {
        padding: 3px 8px;
        font-size: 0.8125rem;
    }
    
    .recent-post-item {
        gap: 12px;
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .recent-post-image {
        width: 70px;
        height: 70px;
    }
    
    .recent-post-title {
        font-size: 0.875rem;
        margin-bottom: 6px;
    }
    
    .recent-post-date {
        font-size: 0.75rem;
    }
    
    /* Blog post content */
    .blog-post-header {
        padding: 100px 0 40px;
    }
    
    .blog-post-title {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
        margin-bottom: 20px;
    }
    
    .blog-post-meta {
        gap: 16px;
        margin-bottom: 24px;
        font-size: 0.875rem;
    }
    
    .blog-post-content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .blog-post-content h2 {
        font-size: 1.5rem;
        margin-top: 32px;
        margin-bottom: 16px;
    }
    
    .blog-post-content h3 {
        font-size: 1.25rem;
        margin-top: 28px;
        margin-bottom: 12px;
    }
    
    .blog-post-content p {
        margin-bottom: 20px;
    }
    
    .blog-post-content ul,
    .blog-post-content ol {
        margin-bottom: 20px;
        padding-left: 24px;
    }
    
    .blog-post-content li {
        margin-bottom: 8px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    /* Hide navigation and non-essential elements */
    .site-header,
    .mobile-menu-toggle,
    .nav-overlay,
    .hero-cta,
    .cta-section,
    .footer-social,
    .whatsapp-float {
        display: none !important;
    }
    
    /* Optimize for print */
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    /* Ensure links are visible */
    a {
        color: #000;
        text-decoration: underline;
    }
    
    /* Page breaks */
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    img {
        max-width: 100%;
        page-break-inside: avoid;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */
@media (max-width: 1023px) {
    /* Ensure focus states are visible on mobile */
    a:focus,
    button:focus,
    input:focus,
    select:focus,
    textarea:focus {
        outline: 3px solid var(--secondary);
        outline-offset: 2px;
    }
    
    /* Improve tap target sizes */
    a,
    button,
    input[type="submit"],
    input[type="button"],
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Ensure text is readable */
    body {
        -webkit-text-size-adjust: 100%;
        -moz-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
    
    /* Improve contrast for better readability */
    ::selection {
        background: var(--secondary);
        color: var(--primary);
    }
}

/* ============================================
   END OF MOBILE STYLESHEET
   ============================================ */  
/* ============================================  
   WHATSAPP BUTTON FIX  
   ============================================ */  
  
/* Ensure WhatsApp floating button stays green */  
.whatsapp-float a {  
    background: #25D366 !important;  
    color: #FFFFFF !important;  
}  
  
.whatsapp-float a:hover {  
    background: #20BA5A !important;  
}  
  
.whatsapp-float svg {  
    fill: #FFFFFF !important;  
} 
