/* --- Estilos Generales --- */
body {
    background-color: #ffffff !important; /* Blanco absoluto */
    color: #1a1a1a; /* Gris casi negro para máxima legibilidad */
    margin: 0;
    padding: 0;
}

/* ELIMINAR EL RECUADRO BLANCO DEFINITIVAMENTE */
.contenedor.grid, 
.contenedor,
section[class*="producto"] {
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

/* Si el fondo blanco está en la sección entera */
.beneficios, .productos {
    background: transparent !important;
}

.hero {
    height: 80vh; 
    background: url('fondo.jpg') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: brightness(1.2) contrast(1.1); 
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 40px;
}

.boton-accion {
    display: inline-block;
    padding: 15px 30px;
    background-color: #e74c3c;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background 0.3s;
}

.boton-accion:hover {
    background-color: #c0392b;
}

/* --- Beneficios --- */
.beneficios {
    padding: 80px 0;
    background-color: #f9f9f9;
}

.grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.beneficio h2 {
    color: #2c3e50;
}

/* --- Formulario --- */
.contacto {
    padding: 80px 0;
    background-color: white;
    text-align: center;
}

form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

input {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.boton-enviar {
    padding: 15px;
    background-color: #2c3e50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.boton-enviar:hover {
    background-color: #1a252f;
}

/* --- Footer --- */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
}

/* Contenedor de productos: oculto por defecto */
.productos-overlay {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    opacity: 0; /* Invisible */
    transition: opacity 0.5s ease; /* Aparece suavemente */
}

/* Cuando ponemos el ratón sobre el HERO, los productos aparecen */
.hero:hover .productos-overlay {
    opacity: 1; /* Visible */
}

/* Estilo de cada producto individual */
.producto-item {
    text-decoration: none;
    font-size: 3rem; /* Tamaño del emoji */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
}

/* Efecto cuando pasas el ratón sobre un emoji específico */
.producto-item:hover {
    transform: scale(1.3); /* Se hace más grande al señalarlo */
}

/* El texto debajo del emoji */
.producto-item span {
    font-size: 1rem;
    margin-top: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
}

/* Para que las fotos de los productos sean iguales y redondas */
.producto-item img {
    width: 100px;  /* Ancho de la miniatura */
    height: 100px; /* Alto de la miniatura */
    object-fit: cover; /* Para que la imagen no se deforme */
    border-radius: 50%; /* Las hace circulares */
    border: 3px solid white; /* Un borde blanco para que resalten */
    margin-bottom: 10px;
}

/* --- ESTILO TESLA FINAL --- */
body {
    font-family: 'Montserrat', sans-serif !important;
    background-color: #ffffff !important;
}

h2, h3 {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2.5px !important;
    color: #000000 !important;
    text-align: center !important;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

p {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 300 !important;
    letter-spacing: 0.5px !important;
    color: #393c41 !important;
    text-align: justify !important;
    text-justify: inter-word;
    line-height: 1.8;
}

.boton-enviar {
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 700 !important;
    letter-spacing: 1.5px !important;
    text-transform: uppercase !important;
}

/* Limpieza total de fondos grises */
.beneficios, 
.contacto, 
.beneficio, 
#contacto {
    background-color: #ffffff !important;
    background: #ffffff !important;
    border: none !important;
    box-shadow: none !important;
}

/* Asegurar que el contenedor también sea blanco */
.contenedor {
    background-color: #ffffff !important;
}

/* Esto quita el rectángulo blanco y deja ver la foto del parking */
.contenedor.grid, 
.productos, 
section.productos,
header .contenedor {
    background-color: transparent !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.grid {
    background: none !important;
}

/* Si usas columnas, esto asegura que el texto no se pegue */
.beneficio, .columna {
    padding: 0 20px;
}

/* Centrar específicamente el texto y el formulario de contacto */
.contacto, 
#contacto {
    text-align: center !important;
}

.contacto p {
    text-align: center !important;
    max-width: 100%; 
}

.contacto form {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.contacto input {
    width: 100%;
    max-width: 400px;
    margin-bottom: 15px;
}

/* Barra de navegación estilo Tesla */
.navbar-tesla {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 50px;
    background-color: transparent;
    position: absolute;
    top: 0;
    width: 100%;
    box-sizing: border-box;
    z-index: 1000;
}

.navbar-tesla .logo a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-size: 1.2rem;
}

.navbar-tesla .menu-derecho a {
    color: #ffffff !important;
    text-decoration: none !important;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 8px 20px;
    border-radius: 5px;
    background: rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

.aceptacion {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #555;
}

.aceptacion label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.aceptacion input {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.aceptacion a {
    color: #1d3557;
    font-weight: bold;
    text-decoration: none;
}

.aceptacion a:hover {
    text-decoration: underline;
}

/* --- MEGA FOOTER --- */
.mega-footer {
    background: #132844;
    color: white !important;
    padding: 70px 10%;
    font-family: 'Montserrat', sans-serif;
}

.mega-footer h3,
.mega-footer p,
.mega-footer a,
.footer-copy {
    color: white !important;
}

.footer-contenido {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-col {
    min-width: 200px;
    text-align: center;
}

.footer-col h3 {
    color: white !important;
    font-size: 20px;
    margin-bottom: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-col a,
.footer-col p {
    color: white !important;
    text-decoration: none;
    display: block;
    margin-bottom: 14px;
    font-size: 17px;
    line-height: 1.7;
}

.footer-col a:hover {
    opacity: 0.7;
}

.footer-copy {
    text-align: center;
    margin-top: 50px;
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 25px;
    font-size: 15px;
}

/* --- FORMULARIOS --- */
form {
    margin-top: 40px;
}

form input,
form textarea {
    width: 100%;
    padding: 18px;
    margin-bottom: 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    box-sizing: border-box;
}

form textarea {
    height: 160px;
    resize: none;
}

form button {
    width: 100%;
    padding: 18px;
    border: none;
    border-radius: 12px;
    background: #081b33;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: 0.3s;
    font-family: 'Montserrat', sans-serif;
}

form button:hover {
    background: #0f2747;
}

img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}

/* --- SECCIÓN ABOUT --- */
.about-section {
    padding: 100px 10%;
    background: #ffffff;
}

.about-container {
    max-width: 1100px;
    margin: auto;
}

.about-container h2 {
    font-size: 42px;
    margin-bottom: 40px;
    color: #0f2747 !important;
    letter-spacing: 3px;
}

.about-container p {
    font-size: 14px;
    line-height: 1.6;
    color: #444 !important;
    margin-bottom: 30px;
    text-align: justify !important;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
    margin-top: 80px;
}

.about-card {
    background: #f5efe4;
    color: #111;
    padding: 50px 35px;
    border-radius: 20px;
    transition: 0.3s;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.about-card:hover {
    transform: translateY(-10px);
}

.about-card h3 {
    font-size: 38px;
    margin-bottom: 25px;
    letter-spacing: 2px;
    line-height: 1.2;
    color: #000 !important;
    word-break: break-word;
}

.about-card p {
    color: #333 !important;
    font-size: 20px;
    line-height: 1.9;
}

/* --- PROYECTOS HERO --- */
.projects-hero h1 {
    font-size: 80px;
    letter-spacing: 8px;
    margin-bottom: 20px;
}

/* --- FEATURE BOX --- */
.feature-box {
    background: #f5efe4;
    padding: 50px;
    border-radius: 25px;
    transition: 0.4s;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 370px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.feature-box:hover {
    transform: translateY(-10px);
}

.feature-text {
    transition: 0.4s;
    z-index: 2;
}

.feature-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: 0.4s;
}

.feature-box.active .feature-image {
    opacity: 1;
}

.feature-box.active .feature-text {
    opacity: 0;
}

/* --- SECCIONES MULTIMEDIA --- */
.video-section {
    position: relative;
    width: 100%;
    height: 520px;
    overflow: hidden;
    border-radius: 25px;
}

.video-section video,
.video-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 120px;
    text-align: center;
    color: white;
}

.country-box h2 {
    font-size: 55px;
    letter-spacing: 4px;
    margin-bottom: 20px;
}

.country-box p {
    font-size: 24px;
    line-height: 1.8;
}

.video-full {
    grid-column: span 2;
}

.video-banner {
    width: 100%;
    height: 700px;
    overflow: hidden;
    margin-top: 40px;
}

.banner-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- EMPRESA VIDEO / AJUSTE GRID CRÍTICO --- */
.empresa-video {
    display: grid;
    grid-template-columns: 35% 65%;
    align-items: center;
    gap: 40px;
    padding: 80px 5%;
    width: 100%;
}

.empresa-texto h2 {
    font-size: 55px;
    letter-spacing: 4px;
    margin-bottom: 30px;
    color: #000 !important;
}

.empresa-texto p {
    font-size: 26px;
    line-height: 1.8;
    color: #555 !important;
}

.empresa-media {
    width: 100%;
    height: 700px;
    overflow: hidden;
    border-radius: 30px;
}

.empresa-gif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- CONTACTO AVANZADO --- */
.contacto-grid {
    display: grid;
    grid-template-columns: 50% 50%;
    align-items: center;
    gap: 60px;
}

.contacto-imagen {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.contacto-imagen img {
    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
    border-radius: 10px;
}

.contacto-formulario {
    background: white;
    padding: 60px;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.08);
}

.contacto-formulario h2 {
    font-size: 60px;
    letter-spacing: 5px;
    margin-bottom: 20px;
    color: #000 !important;
}

.contacto-formulario p {
    font-size: 22px;
    color: #777 !important;
    margin-bottom: 45px;
}

.contacto-formulario form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contacto-formulario input {
    width: 100%;
    padding: 24px;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    font-size: 18px;
    background: #fafafa;
    transition: 0.3s;
    outline: none;
}

.contacto-formulario input:focus {
    border: 1px solid #0f2747;
    background: white;
    box-shadow: 0 0 0 5px rgba(15,39,71,0.08);
}

.contacto-formulario button {
    background: linear-gradient(135deg,#0f2747,#183b68);
    color: white;
    border: none;
    padding: 22px;
    border-radius: 18px;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 10px;
}

.contacto-formulario button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(15,39,71,0.25);
}

.privacidad {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: #666;
    margin-top: 10px;
}

.privacidad input {
    width: 18px;
    height: 18px;
}

.privacidad a {
    color: #0f2747;
    font-weight: 700;
    text-decoration: none;
}

.tecnico-video {
    width: 100%;
    margin-top: 40px;
    border-radius: 30px;
    overflow: hidden;
}

.tecnico-video video {
    width: 100%;
    display: block;
    border-radius: 30px;
}

.intro-image {
    width: 100%;
    height: 900px;
    overflow: hidden;
    border-radius: 30px;
}

.project-card a,
.project-content a {
    text-decoration: none;
    color: inherit;
}

#flash-msg {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    background: #00b894;
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    font-weight: bold;
    z-index: 9999;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: opacity 1s ease;
}


/* ==========================================================================
   📱 🌍 ESCUDO DE ADAPTACIÓN AJUSTADO (SOLUCIÓN PROFESIONAL)
   ========================================================================== */
@media (max-width: 768px) {
    
    body {
        padding: 0 !important;
        background-color: #ffffff !important;
    }

    /* 1. Barra superior sólida */
    .navbar-tesla {
        position: relative !important; 
        padding: 15px 20px !important;
        background-color: #061425 !important; /* Azul oscuro */
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .navbar-tesla .logo a {
        font-size: 0.95rem !important;
        letter-spacing: 2px !important;
        color: #ffffff !important;
    }
    
    .navbar-tesla .menu-derecho a {
        font-size: 0.75rem !important;
        padding: 6px 12px !important;
        color: #ffffff !important;
        border: 1px solid rgba(255,255,255,0.4) !important;
    }

//* CONTENEDOR DEL PARKING SIN RAYAS BLANCAS INFALIBLE */
    .hero {
        height: auto !important;
        min-height: 440px !important; 
        padding: 15px 5px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        
        /* SOLUCIÓN TRUCO: Si la foto se acaba, el fondo se pinta del gris del asfalto del parking */
        background-color: #333941 !important; 
        background-image: url('fondo.jpg') !important;
        background-position: center bottom !important; /* Alineamos la foto abajo para que el suelo conecte limpio */
        background-repeat: no-repeat !important;
        background-size: cover !important; 
    }

    /* Ocultamos textos del hero en el smartphone */
    .hero h1, .hero p {
        display: none !important;
    }

    /* 2. CONTENEDOR FLUIDO: Espacio exacto para forzar la distribución de las burbujas */
    .productos-overlay {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 15px 8px !important; /* Separación vertical y horizontal ajustada */
        width: 100% !important;
        max-width: 270px !important; /* Forzamos a que el bloque limite su espacio al ancho de la simulación */
        margin: 0 auto !important;
        padding: 5px !important;
        background-color: transparent !important;
        background: transparent !important;
        opacity: 1 !important;
        position: relative !important;
    }

    /* Limpieza total de posiciones rígidas de cuadrícula previas */
    .productos-overlay .producto-item:nth-child(4),
    .productos-overlay .producto-item:nth-child(5) {
        grid-column: auto !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    /* 3. BURBUJAS COMPACTAS: Reducimos el ancho para que quepan 3 arriba y 2 abajo obligatoriamente */
    .producto-item {
        width: 78px !important; /* Ancho ajustado para que quepan 3 en 270px ($78 \times 3 = 234\text{px}$) */
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }

    /* Hacer los círculos un pelín más pequeños para que no se pisen */
    .producto-item img {
        width: 54px !important;   
        height: 54px !important;
        border: 2px solid #ffffff !important;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3) !important;
    }

    /* Ajuste del texto de la etiqueta negra */
    .producto-item span {
        font-size: 0.6rem !important; /* Letra compacta ideal para smartphone */
        padding: 3px 5px !important;
        margin-top: 6px !important; 
        background-color: rgba(0, 0, 0, 0.85) !important; 
        color: #ffffff !important;
        border-radius: 4px !important;
        white-space: nowrap !important;
        display: inline-block !important;
    }

    /* Textos inferiores de la web */
    h2 { font-size: 24px !important; letter-spacing: 1.5px !important; text-align: center !important; margin-top: 30px !important; }
    h3 { font-size: 19px !important; text-align: center !important; }
    
    p { 
        font-size: 15px !important; 
        line-height: 1.6 !important; 
        text-align: justify !important; 
        padding: 0 15px !important; 
    }

    /* Pasar las columnas a una sola fila vertical */
    .grid, .about-grid, .contacto-grid, .empresa-video {
        grid-template-columns: 1fr !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 25px !important;
        padding: 30px 15px !important;
    }

    .video-section, .video-banner, .empresa-media, .intro-image {
        height: auto !important;
        min-height: 240px !important;
        border-radius: 15px !important;
    }

    .contacto-imagen img {
        max-width: 100% !important;
        height: auto !important;
    }

    .contacto-formulario {
        padding: 25px 15px !important;
        border-radius: 15px !important;
    }

    form input, form textarea, .contacto-formulario input {
        padding: 14px !important;
        font-size: 15px !important;
    }

    form button, .contacto-formulario button {
        padding: 15px !important;
        font-size: 16px !important;
    }

    .about-card, .feature-box {
        padding: 25px 15px !important;
        min-height: auto !important;
    }

    .video-overlay {
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
    }

    .footer-contenido {
        flex-direction: column !important;
        text-align: center !important;
        gap: 25px !important;
    }
}