/* Additional optimizations and custom styles */
:root {
    --primary-blue: #1E40AF;
    --primary-red: #DC2626;
    --whatsapp: #25D366;
    --gray-custom: #6B7280;
}

/* Smooth scrolling for all elements */
* {
    scroll-behavior: smooth;
}

/* Optimize font loading */
@font-face {
    font-family: 'Poppins';
    font-display: swap;
    src: local('Poppins');
}

/* Loading animation for images */
img {
    loading: lazy;
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

img[src] {
    opacity: 1;
}

/* Button hover effects */
.btn-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Floating WhatsApp button pulse animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.whatsapp-float {
    animation: pulse 2s infinite;
}

/* Mobile menu styles */
@media (max-width: 768px) {
    .mobile-menu {
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .mobile-menu.active {
        transform: translateX(0);
    }
}

/* Performance optimizations */
.hero-bg {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #1e3a8a 100%);
    background-attachment: fixed;
}

/* Intersection observer fade in */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Dealer Notice Banner Styles */
.dealer-notice {
    background-color: #eff6ff;
    border-left: 4px solid var(--primary-blue);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Hero Slider Styles */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    margin-top: 52px; /* Space for the dealer notice banner */
    padding-top: 0;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Slider Navigation Dots */
.slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

.dot:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.dot.active {
    background-color: #fff;
    width: 14px;
    height: 14px;
}

/* Slider Navigation Arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.slider-arrow:hover {
    background-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

.slider-arrow svg {
    width: 24px;
    height: 24px;
}

/* Responsive adjustments - fit content on mobile */
@media (max-width: 768px) {
    .dealer-notice {
        top: 64px; /* Adjust for mobile header height */
    }

    .dealer-notice p {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .hero-slider-container {
        height: 60vh !important;
        min-height: 60vh !important;
        max-height: 60vh !important;
        margin-top: 48px; /* Adjust for mobile banner height */
        margin-bottom: 0 !important;
        padding-bottom: 0 !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-slider {
        height: 100%;
        display: flex;
        align-items: center;
    }

    .slide {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .slide-image {
        height: 100%;
        width: 100%;
        max-height: 60vh;
        object-fit: cover;
        object-position: center;
    }

    .slider-arrow {
        width: 40px;
        height: 40px;
    }

    .slider-arrow.prev {
        left: 10px;
    }

    .slider-arrow.next {
        right: 10px;
    }

    .slider-arrow svg {
        width: 20px;
        height: 20px;
    }

    .slider-dots {
        bottom: 15px;
        gap: 8px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }

    .dot.active {
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .hero-slider-container {
        height: 50vh !important;
        min-height: 50vh !important;
        max-height: 50vh !important;
        margin-bottom: 0 !important;
    }

    .slide-image {
        max-height: 50vh;
        object-fit: cover;
        object-position: center;
    }

    .slider-dots {
        bottom: 10px;
    }
}

/* Benefits Section Styles */
.benefit-card {
    transform: translateY(0);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.benefit-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.benefit-card:hover .benefit-icon {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Enhanced typography for benefits */
.benefit-card h3 {
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
}

.benefit-card p {
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Responsive grid improvements for benefits */
@media (max-width: 768px) {
    .benefit-card {
        padding: 1.5rem;
    }

    .benefit-icon {
        width: 4rem;
        height: 4rem;
        margin-bottom: 1rem;
    }

    .benefit-icon svg {
        width: 2rem;
        height: 2rem;
    }

    .benefit-card h3 {
        font-size: 1.125rem;
        margin-bottom: 0.75rem;
    }
}

/* Section spacing adjustments - remove gaps between sections */
section {
    margin: 0;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

/* Hero section should not have top padding and override section padding */
.hero-slider-container {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    height: 100vh !important;
    min-height: 100vh;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }

    /* Specific adjustment for plans section to connect smoothly with hero */
    #planes {
        padding-top: 2rem;
        margin-top: 0;
    }

    /* Adjust WhatsApp button size on mobile */
    #contacto .inline-flex {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }

    #contacto .inline-flex svg {
        width: 1.25rem;
        height: 1.25rem;
        margin-right: 0.5rem;
    }
}

/* Contact section full viewport height */
#contacto {
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Extra small screens - WhatsApp button adjustments */
@media (max-width: 349px) {
    #contacto h3.text-2xl {
        font-size: 1.25rem;
        line-height: 1.75rem;
        padding: 0 0.5rem;
    }

    #contacto .inline-flex {
        padding: 0.625rem 1rem !important;
        font-size: 0.875rem !important;
        flex-wrap: nowrap;
        white-space: nowrap;
    }

    #contacto .inline-flex svg {
        width: 1.125rem !important;
        height: 1.125rem !important;
        margin-right: 0.375rem !important;
        flex-shrink: 0;
    }

    #contacto p.text-lg {
        font-size: 0.75rem;
        line-height: 1.25rem;
        padding: 0 0.5rem;
    }

    #contacto .text-4xl {
        font-size: 1.75rem;
    }

    #contacto .text-xl {
        font-size: 1rem;
    }
}

/* Critical CSS inlined in HTML for performance */