@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
}

/* Estilo para imagen de fondo hero */
.hero-gradient {
    background: linear-gradient(90deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
}

.hero-section img {
    object-position: center center;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion.active .accordion-content {
    max-height: 200px;
}

.accordion.active .accordion-icon {
    transform: rotate(180deg);
}

.slide {
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
}

.slide.active {
    opacity: 1;
    z-index: 5;
}

input:invalid, select:invalid {
    border-color: #f87171;
}

input:valid, select:valid {
    border-color: #4ade80;
}

/* Scroll suave para todo el documento */
html {
    scroll-behavior: smooth;
}

/* Ajuste de scroll para secciones con navbar fijo */
section {
    scroll-margin-top: 120px; /* Altura del navbar con margen extra */
}

.form-section {
    scroll-margin-top: 120px;
}

/* Estilos para la sección fusionada motos-precios */
#motos-precios .moto-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#motos-precios .moto-card:hover {
    transform: translateY(-5px);
}

#motos-precios .price-item {
    transition: background-color 0.2s ease;
}

#motos-precios .price-item:hover {
    background-color: #f8fafc;
}

/* Estilos para imágenes de motos */
#motos-precios img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

#motos-precios .image-container {
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Estilos para el logo */
.navbar-logo {
    width: 10rem;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    transition: transform 0.3s ease;
    padding: 0.5rem 0;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

/* Estilos para slogan */
.navbar-slogan {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    transition: color 0.2s ease;
    color: #4a5568;
    font-style: italic;
    font-size: 0.95rem;
}

/* Estilos para navbar menu */
.navbar-menu {
    margin-left: 2rem;
}

/* Estilos para opción activa del menú */
.nav-link.active {
    color: #dd6b20; /* Naranja */
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background-color: #dd6b20; /* Naranja */
    border-radius: 2px;
}

/* Navbar ajustada */
nav {
    min-height: 5.5rem;
    display: flex;
    align-items: center;
}

/* Estilos específicos para el menú de navegación */

/* Menú de escritorio */
.desktop-navbar-menu {
    display: none; /* Oculto por defecto */
}

/* Mostrar el menú de escritorio solo en pantallas medianas y grandes */
@media (min-width: 768px) {
    .desktop-navbar-menu {
        display: flex;
    }

    /* Ocultar el botón de menú móvil en escritorio */
    .md\:hidden {
        display: none !important;
    }
}

/* Asegurar que el menú móvil esté oculto hasta que se haga clic en el botón */
#mobile-menu {
    display: none;
    overflow-y: auto;
    max-height: 80vh; /* Limitar altura para evitar que se salga de la pantalla */
    z-index: 50;
}

/* Cuando se quita la clase hidden del menú móvil (al hacer clic), mostrarlo */
#mobile-menu:not(.hidden) {
    display: block;
}

/* Ajustes de espaciado navbar */
.navbar-container {
    padding: 1rem 0;
    justify-content: space-between;
}

.navbar-brand-container {
    margin-right: auto;
    padding-left: 1rem;
}

@media (min-width: 1024px) {
    .navbar-brand-container {
        padding-left: 2rem;
    }
}

@media (max-width: 768px) {
    nav {
        min-height: 4.5rem;
    }
    .navbar-slogan {
        display: block;
        font-size: 0.85rem;
        margin-top: 0.25rem;
    }
    /* Reorganize logo and slogan for mobile */
    .navbar-logo-container {
        flex-direction: column;
        align-items: center;
    }
    /* Adjust hero section padding for mobile */
    #inicio {
        padding-top: 9rem;
    }
    #mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 50;
        background-color: white;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
        padding: 1rem;
    }
    #mobile-menu a {
        margin: 0;
    }
}

/* Ajustes para resoluciones específicas */
@media (max-width: 1400px) and (max-height: 800px) {
    #inicio {
        min-height: 100vh;
        height: auto !important;
        padding-top: 120px;
        padding-bottom: 40px;
    }
}

/* Ajustes adicionales para el menú móvil */
.mobile-menu-open {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    bottom: auto;
    background-color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Estilo para menú móvil horizontal */
#mobile-menu .px-2 {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
}

#mobile-menu a {
    display: inline-block;
    margin: 0;
    white-space: nowrap;
}

/* Asegurar que la clase hidden funcione correctamente */
.hidden {
    display: none !important;
}

/* Estilos para los selectores de idioma */
.language-flag, .language-flag-mobile {
    opacity: 0.6;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    padding: 0;
}

.language-flag:hover, .language-flag-mobile:hover {
    opacity: 1;
}

.language-flag.active, .language-flag-mobile.active {
    opacity: 1;
}

.language-flag img, .language-flag-mobile img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    object-fit: cover;
    display: block;
}

.language-flag.active img, .language-flag-mobile.active img {
    border-color: #ea580c; /* orange-600 */
    transform: scale(1.1);
}

/* Estilos para el selector de idioma en móvil */
.language-selector-mobile {
    display: flex;
    align-items: center;
    padding-top: 8px;
    padding-bottom: 8px;
}

/* Centrar las banderas de idioma en la versión móvil */
@media (max-width: 768px) {
    .mobile-language-selector {
        justify-content: center;
        width: 100%;
        margin-top: 0.75rem;
        margin-bottom: 0.25rem;
    }

    .language-flag-mobile {
        margin: 0 8px;
    }

    .language-flag-mobile img {
        width: 30px;
        height: 30px;
    }
}
