/* Minimal custom styles for Tailwind CSS */

/* Hero background image styles - performance optimized */
.hero-bg {
    background: url('../img/backgroundhero.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Performance optimizations */
    will-change: transform;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
    contain: layout style paint;
}

/* Aggressive mobile optimizations for 85+ score */
@media (max-width: 767px) {
    .hero-bg {
        min-height: 75vh !important; /* Slightly reduced but keep visual impact */
        background-attachment: scroll !important;
        background-size: cover;
        transform: translateZ(0); /* Force GPU acceleration */
        /* Keep background image but optimize loading */
    }
    
    /* Mobile-specific hero gradient - darker for better text readability */
    .hero-bg::before {
        background: linear-gradient(135deg, rgba(0,0,0,0.75), rgba(0,0,0,0.95)) !important;
    }
    
    /* Aggressive mobile hero padding reduction for LCP */
    .hero-bg .max-w-6xl {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
    }
    
    /* Mobile typography - optimized but readable */
    .text-4xl, .md\\:text-5xl, .lg\\:text-6xl {
        font-size: 2rem !important;
        line-height: 1.1 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .text-xl, .md\\:text-2xl, .lg\\:text-2xl {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    /* Optimize mobile images */
    img {
        image-rendering: auto;
        will-change: auto;
        /* Remove max-height restriction */
    }
    
    /* More aggressive mobile deferrals */
    .mobile-defer {
        content-visibility: auto;
        contain-intrinsic-size: 300px;
    }
    
    /* Hide non-critical elements initially on mobile */
    .mobile-hide-initial {
        display: none !important;
    }
    
    /* Show them after interaction */
    .mobile-show-after-load {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .mobile-show-after-load.loaded {
        opacity: 1;
    }
    
    /* Reasonably sized mobile badges */
    .hero-bg .inline-flex {
        padding: 0.5rem 1rem !important;
        font-size: 0.875rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* Reasonable mobile CTA */
    .hero-bg button {
        padding: 1rem 2rem !important;
        font-size: 1.25rem !important;
    }
    
    /* Keep testimonial visible on mobile */
    .hero-bg .bg-white.bg-opacity-10 {
        padding: 0.75rem 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    /* Readable social proof cards on mobile */
    .hero-bg .grid > div {
        padding: 1rem !important;
        font-size: 0.9rem !important;
    }
    
    .hero-bg .grid > div .text-3xl {
        font-size: 2rem !important;
    }
    
    .hero-bg .grid > div .text-lg {
        font-size: 1rem !important;
    }
}

/* Landing-ads page specific styles */

/* Remove spacing between CTA text and button on landing-ads page */
body.landing-ads-page .hero-bg .mb-6 .text-white.text-sm.mt-3 {
    margin-top: 0.5rem !important; /* Reduced from mt-3 (0.75rem) */
}

/* Make testimonial text 2px bigger on landing-ads page */
body.landing-ads-page .bg-white.bg-opacity-10 p.italic {
    font-size: calc(1rem + 4px) !important; /* Base size + 2px */
}

@media (min-width: 768px) {
    body.landing-ads-page .bg-white.bg-opacity-10 p.italic {
        font-size: calc(1.125rem) !important; /* md:text-lg + 2px */
    }
}

/* Restore proper hero overlay gradient */
.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.7), rgba(0,0,0,0.93));
    z-index: 1;
    pointer-events: none;
}

.hero-bg > * {
    position: relative;
    z-index: 2;
}

/* Desktop hero height optimizations for above-the-fold CTA */
@media (min-width: 1024px) {
    .hero-bg {
        min-height: 85vh;
        display: flex;
        align-items: center;
    }
    
    /* Ensure CTA is prominently positioned above the fold */
    .hero-bg .max-w-6xl {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

@media (min-width: 1280px) {
    .hero-bg {
        min-height: 80vh;
    }
    
    .hero-bg .max-w-6xl {
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Landing-ads page specific optimizations for above-the-fold CTA */
body.landing-ads-page .hero-bg {
    min-height: 100vh;
}

/* Badge height consistency on landing-ads page */
body.landing-ads-page .hero-bg .inline-flex.items-center {
    min-height: 44px;
    display: inline-flex !important;
    align-items: center;
    padding: 0.6rem 1.5rem !important;
    box-sizing: border-box;
}



@media (min-width: 1024px) {
    /* Compact hero section on landing-ads page */
    body.landing-ads-page .hero-bg {
        min-height: 85vh;
        display: flex;
        align-items: center;
    }
    
    /* Slightly increase headline font size but keep compact */
    body.landing-ads-page h1 {
        font-size: 2.75rem !important;
        line-height: 1.1 !important;
        margin-bottom: 0.75rem !important;
    }
    
    body.landing-ads-page .hero-bg p {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    /* More compact CTA button */
    body.landing-ads-page .hero-bg button {
        padding: 1rem 2rem !important;
        font-size: 1.5rem !important;
        margin-bottom: 0rem !important;
    }
    
    /* Much more compact testimonial section for desktop */
    body.landing-ads-page .hero-bg .bg-white {
        padding: 0.5rem 1rem !important;
        margin-bottom: 0.75rem !important;
        max-width: 500px !important;
    }
    
    body.landing-ads-page .hero-bg .bg-white p {
        font-size: 1.1rem !important;
        margin-bottom: 0.25rem !important;
        line-height: 1.3 !important;
    }
    
    body.landing-ads-page .hero-bg .bg-white .text-accent {
        font-size: 0.85rem !important;
    }
    
    /* More compact badges and elements */
    body.landing-ads-page .hero-bg .inline-flex {
        margin-bottom: 0.75rem !important;
        padding: 0.5rem 1rem !important;
    }
    
    /* Compact social proof section */
    body.landing-ads-page .hero-bg .grid > div {
        padding: 1rem 1.5rem !important;
    }
    
    /* Reduce overall hero padding */
    body.landing-ads-page .hero-bg .max-w-6xl {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }
}

@media (min-width: 1280px) {
    /* Even more compact on larger screens */
    body.landing-ads-page h1 {
        font-size: 3.25rem !important;
    }
    
    body.landing-ads-page .hero-bg {
        min-height: 75vh;
    }
    
    body.landing-ads-page .hero-bg button {
        padding: 1.25rem 2.5rem !important;
        font-size: 1.75rem !important;
    }
    
    /* Even smaller testimonial on large screens */
    body.landing-ads-page .hero-bg .bg-white {
        padding: 0.4rem 0.8rem !important;
        margin-bottom: 0.5rem !important;
        max-width: 450px !important;
    }
    
    body.landing-ads-page .hero-bg .bg-white p {
        font-size: 0.85rem !important;
    }
}

/* Hero contact section styling */
.hero-phone {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.hero-areas {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

/* Location banner mobile responsiveness */
@media (max-width: 767px) {
    .location-banner {
        padding: 12px 0;
    }
    
    .location-text {
        font-size: 14px;
        line-height: 1.4;
        padding: 0 8px;
    }
    
    .location-divider {
        display: block;
        margin: 8px 0 4px 0;
        font-size: 0;
        height: 0;
        overflow: hidden;
    }
    
    .location-areas {
        display: block;
        margin-top: 4px;
        font-size: 13px;
        font-weight: normal;
    }
}

@media (max-width: 480px) {
    .location-banner {
        padding: 10px 0;
    }
    
    .location-text {
        font-size: 13px;
        padding: 0 12px;
    }
    
    .location-areas {
        font-size: 12px;
        margin-top: 6px;
    }
}

/* Enhanced mobile styling for very small screens */
@media (max-width: 360px) {
    .location-text {
        font-size: 12px;
        padding: 0 8px;
    }
    
    .location-areas {
        font-size: 11px;
    }
}

/* Global image optimization */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: optimize-contrast;
}

/* Lazy loading enhancement */
img[loading="lazy"] {
    content-visibility: auto;
}

/* Testimonial carousel mobile enhancements */
@media (max-width: 768px) {
    /* Make slide indicators larger on mobile */
    [data-indicator] {
        width: 12px !important;
        height: 12px !important;
        margin: 0 4px !important;
    }
    
    /* Ensure navigation buttons are properly sized */
    .absolute.left-4, .absolute.right-4 {
        width: 40px !important;
        height: 40px !important;
        font-size: 14px !important;
    }
    
    .absolute.left-4 {
        left: 8px !important;
    }
    
    .absolute.right-4 {
        right: 8px !important;
    }
}

@media (max-width: 480px) {
    /* Even larger indicators for very small screens */
    [data-indicator] {
        width: 14px !important;
        height: 14px !important;
        margin: 0 6px !important;
    }
    
    /* Adjust testimonial padding for smaller screens */
    .testimonial .bg-white {
        padding: 24px 16px !important;
    }
}

/* Quote Modal Styles */
.modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #fefefe;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100vw - 20px);
    max-width: 600px;
    height: 90vh;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    z-index: 10000;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

/* Desktop modal width - 600px exactly */
@media (min-width: 641px) {
    .modal-content {
        width: 600px !important;
    }
}

.close {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    font-weight: bold;
    z-index: 10001;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.close:hover,
.close:focus {
    color: #000;
    background: rgba(255,255,255,1);
    transform: scale(1.1);
}

#quoteFrame,
#quoteInlineMount {
    width: 100%;
    height: 100%;
    border: none;
    min-height: 500px;
}

/* Responsive modal adjustments */
@media (max-width: 640px) {
    .modal-content {
        width: calc(100vw - 20px);
        max-width: none;
        height: 85vh;
        border-radius: 8px;
    }
    
    .close {
        top: 12px;
        right: 15px;
        width: 30px;
        height: 30px;
        font-size: 20px;
    }
    
    #quoteFrame,
    #quoteInlineMount {
        min-height: 500px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: calc(100vw - 16px);
        height: 90vh;
        border-radius: 4px;
    }
    
    .close {
        top: 8px;
        right: 10px;
        width: 28px;
        height: 28px;
        font-size: 18px;
    }
    
    #quoteFrame,
    #quoteInlineMount {
        min-height: 400px;
    }
} 