/* --- Ajustes Generales --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f9f9f9;
    color: #333;
    text-align: center;
    overflow-x: hidden;
}

/* --- Encabezado (Header) --- */
header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    background-color: #ffffff;
    border-bottom: 2px solid #333;
    width: 100%;
}

.logo img {
    max-width: 150px;
}

nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    gap: 20px;
    margin-top: 10px;
    flex-wrap: wrap;
}

nav ul li a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #ff5722;
}

/* --- Mensaje CTA --- */
.mensaje-cta {
    background-color: #f7f7f7;
    color: #333;
    padding: 20px 30px;
    border-radius: 10px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    max-width: 600px;
    margin: 0 auto 25px;
}

.mensaje-cta p {
    font-size: 1.1em;
    line-height: 1.6;
    margin: 0;
}

.mensaje-cta p strong {
    color: #ff5722;
    font-size: 1.2em;
}

.mensaje-cta:hover {
    background-color: #fff;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* --- Sección Hero --- */
.hero {
    padding: 40px 20px;
    background-color: #ffe0b2;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.hero button {
    background-color: #ff5722;
    color: #fff;
    padding: 15px 30px;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    transition: background-color 0.3s;
    border-radius: 5px;
}

.hero button:hover {
    background-color: #e64a19;
}

/* --- Catálogo (Modificado) --- */
.catalogo {
    padding: 40px 20px;
    background-color: #f5f5f5;
    width: 100%;
    border-top: 2px solid #333;
    border-bottom: 2px solid #333;
}

.catalogo h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #ff5722;
}

.graficas-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    padding: 20px;
}

.grafica {
    background: #fff;
    border-radius: 15px;
    padding: 15px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.grafica:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.grafica img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
}

.info-mix {
    position: absolute;
    bottom: -100%;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.9);
    color: white;
    padding: 20px;
    transition: bottom 0.4s;
}

.grafica:hover .info-mix {
    bottom: 0;
}

.info-mix h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
}

.info-mix p {
    font-size: 0.95em;
    margin: 8px 0;
}

.etiquetas {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.etiquetas span {
    background: #ff5722;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85em;
}

/* --- Modal --- */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
}
.modal-contenido {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    object-fit: contain;
}

.cerrar {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

/* --- Botón WhatsApp (Modificado) --- */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 100px; /* Más grande */
    height: 100px; /* Más grande */
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    animation: salto 1.5s infinite;
    transition: 0.3s;
}
.whatsapp-float img {
    width: 60px; /* Más grande */
    height: 60px; /* Más grande */
}

.texto-whatsapp {
    position: absolute;
    top: -60px; /* Ajustado para más espacio */
    left: 50%;
    transform: translateX(-50%);
    background: #ff0000; /* Fondo rojo brillante */
    color: white; /* Texto blanco */
    font-weight: bold;
    text-align: center;
    font-size: 16px; /* Más grande */
    padding: 8px 12px; /* Espaciado interno */
    border-radius: 8px; /* Bordes redondeados */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5); /* Sombra para relieve */
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5); /* Relieve negro */
    white-space: nowrap;
}

@keyframes salto {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/* --- Sección YouTube --- */
.seccion {
    padding: 40px 20px;
    background-color: #ffe0b2;
    border-top: 2px solid #333;
}

.seccion h2 {
    font-size: 2em;
    margin-bottom: 25px;
    color: #ff5722;
}

.texto-youtube {
    margin-bottom: 30px;
}

.btn-youtube {
    display: inline-flex;
    align-items: center;
    background: #ff0000;
    color: #fff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: bold;
    gap: 10px;
    transition: background 0.3s, transform 0.3s;
    margin-top: 20px; /* Añadido para separar del texto */
}

.btn-youtube:hover {
    background: #cc0000;
    transform: translateY(-3px);
}

.btn-youtube img {
    width: 28px;
    height: 28px;
}

/* --- Footer --- */
footer {
    background: #333;
    color: #fff;
    padding: 30px 20px;
}

.redes-sociales {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.social-icon img {
    width: 45px;
    height: 45px;
    transition: transform 0.3s;
}

.social-icon:hover img {
    transform: scale(1.1);
}

.copy {
    font-size: 0.9em;
    color: #ccc;
    margin-top: 15px;
}

/* Formulario estilizado */
.form-estilizado {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.input-group {
    position: relative;
    margin-bottom: 25px;
}

.input-group input, 
.input-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.input-group label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    padding: 0 5px;
    color: #666;
    transition: 0.3s;
    pointer-events: none;
}

.input-group input:focus,
.input-group textarea:focus {
    border-color: #ff5722;
    outline: none;
}

.input-group input:focus + label,
.input-group textarea:focus + label,
.input-group input:valid + label,
.input-group textarea:valid + label {
    top: 0;
    font-size: 0.9em;
    color: #ff5722;
}

.btn-enviar {
    background: #ff5722;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: transform 0.3s;
}

.btn-enviar:hover {
    transform: translateY(-3px);
}



/* --- Responsive --- */
@media (max-width: 768px) {
    .graficas-container {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    nav ul {
        flex-direction: column;
        gap: 12px;
    }
    
    .logo img {
        max-width: 130px;
    }
    
    .modal-contenido {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .whatsapp-float {
        width: 70px;
        height: 70px;
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float img {
        width: 40px;
        height: 40px;
    }
    
    .texto-whatsapp {
        font-size: 12px;
        top: -40px;
    }
}

/* Añade al final de styles.css */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff5722;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Añade al final de styles.css */
@media (max-width: 480px) {
    .hero button {
        padding: 12px 20px;
        font-size: 1em;
    }

    .btn-youtube {
        padding: 12px 20px;
        font-size: 1em;
    }

    .grafica img {
        height: 200px; /* Ajusta la altura de las imágenes en móviles */
    }

    .whatsapp-float {
        width: 80px;
        height: 80px;
    }

    .whatsapp-float img {
        width: 50px;
        height: 50px;
    }

    .texto-whatsapp {
        font-size: 14px;
        top: -50px;
    }
}