/* styles.css */

/* Espacio porque el navbar es fijo */
body {
    padding-top: 70px;
    font-family: 'Inter', sans-serif;
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url("recursos/FondoWeb.png");
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
}

.logo {
    width: 180px;
    margin-bottom: 20px;
    animation: zoom 3s infinite;
}

@keyframes zoom {
    0% { transform: scale(1); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1); }
}

.hero h1 {
    font-size: 45px;
    font-weight: bold;
}

.hero-botones {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
}

.btn-ley {
    background: #2a7de1;
    padding: 15px 30px;
    font-size: 20px;
    color: white;
    border-radius: 40px;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

.btn-ley:hover {
    background: #1c5fb3;
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

.btn-whatsapp {
    background: #25D366;
    padding: 15px 30px;
    font-size: 20px;
    color: white;
    border-radius: 40px;
    text-decoration: none;
    transition: 0.3s;
    display: inline-block;
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    transform: scale(1.1);
    color: white;
    text-decoration: none;
}

/* Tarjetas Misión/Visión */
.card-mv {
    border: none;
    border-radius: 12px;
    padding: 35px;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    transition: all 0.3s ease;
}

.card-mv:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.18);
}

.card-mv::before {
    content: "";
    display: block;
    width: 70px;
    height: 4px;
    background: #2a7de1;
    margin: 0 auto 20px auto;
    border-radius: 3px;
}

.titulo {
    font-weight: bold;
    font-size: 26px;
    margin-bottom: 20px;
}

.card-mv p {
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}

/* Botón flotante whatsapp */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    font-size: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
    z-index: 100;
    transition: 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #1ebe5d;
    color: white;
    text-decoration: none;
}

/* Sección Beneficios */
.container-beneficios {
    padding: 80px 20px;
    background: #f8fafc;
    text-align: center;
}

.titulo-beneficios h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a2b4c;
    margin-bottom: 15px;
    letter-spacing: -0.02em;
}

.titulo-beneficios p {
    font-size: 1.2rem;
    color: #4a5b6e;
    margin-bottom: 60px;
    font-weight: 300;
}

.cards-beneficios {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.card-beneficio {
    background: white;
    width: 260px;
    padding: 40px 25px 35px 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px -5px rgba(0, 20, 40, 0.1);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-bottom: 4px solid transparent;
    text-align: center;
}

.card-beneficio:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px -8px rgba(42, 125, 225, 0.2);
    border-bottom-color: #2a7de1;
}

.card-beneficio i {
    font-size: 3.2rem;
    color: #2a7de1;
    margin-bottom: 20px;
    display: inline-block;
    transition: transform 0.2s ease;
}

.card-beneficio:hover i {
    transform: scale(1.05);
}

.card-beneficio h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1a2b4c;
    margin-bottom: 12px;
}

.card-beneficio p {
    font-size: 0.95rem;
    color: #5d6e85;
    line-height: 1.6;
}

/* Carrusel de imágenes */
.carousel-container {
    width: 100%;
    max-width: 1200px;
    margin: 50px auto;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.carousel-track {
    display: flex;
    width: calc(400px * 12);
    animation: scroll 40s linear infinite;
}

.carousel-track img {
    width: 400px;
    height: 250px;
    object-fit: cover;
    transition: 0.4s;
}

.carousel-track img:hover {
    transform: scale(1.05);
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.boton-galeria {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 30px;
}

.boton-galeria a {
    background: #2a7de1;
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    font-size: 18px;
    font-weight: 500;
    border-radius: 25px;
    transition: 0.3s;
    display: inline-block;
}

.boton-galeria a:hover {
    background: #1c5fb3;
    color: white;
    text-decoration: none;
}

/* Sección Cursos */
.cursos-section {
    padding: 80px 20px;
    background: #f7f7f7;
    text-align: center;
}

.titulo-cursos h2 {
    font-size: 38px;
    color: #222;
    margin-bottom: 10px;
}

.titulo-cursos p {
    color: #666;
    margin-bottom: 50px;
}

.contenedor-cursos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.card-curso {
    background: white;
    width: 300px;
    padding: 35px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.card-curso:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.icono-curso {
    font-size: 40px;
    color: #2a7de1;
    margin-bottom: 15px;
}

.card-curso h3 {
    margin-bottom: 15px;
    color: #222;
}

.card-curso ul {
    list-style: none;
    padding: 0;
}

.card-curso li {
    margin: 8px 0;
    color: #555;
}

.nota-cursos {
    margin-top: 40px;
    color: #666;
    font-size: 15px;
}

/* Sección Videos */
.seccion-videos {
    padding: 80px 20px;
    background: #f5f7fb;
}

.titulo-videos {
    text-align: center;
    margin-bottom: 40px;
}

.videos-wrapper {
    display: flex;
    align-items: center;
    max-width: 1100px;
    margin: auto;
}

.contenedor-videos {
    display: flex;
    gap: 25px;
    overflow: hidden;
    scroll-behavior: smooth;
}

.video-item {
    width: 260px;
    height: 460px;
    flex-shrink: 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.video-item iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.video-btn {
    background: #2a7de1;
    color: white;
    border: none;
    font-size: 22px;
    padding: 10px 16px;
    cursor: pointer;
    border-radius: 50%;
    margin: 0 10px;
    transition: 0.3s;
}

.video-btn:hover {
    background: #1c5fb3;
}

/* Sección Ubicación */
.ubicacion {
    padding: 80px 20px;
    background: #f7f7f7;
    text-align: center;
}

.titulo-ubicacion h2 {
    font-size: 36px;
    margin-bottom: 10px;
}

.titulo-ubicacion p {
    color: #666;
    margin-bottom: 40px;
}

.contenedor-ubicacion {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: auto;
}

.mapa-container {
    flex: 1;
    min-width: 350px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.tiktok-container {
    flex: 1;
    min-width: 350px;
    display: flex;
    justify-content: center;
}

/* Footer */
.footer {
    background: #111;
    color: #fff;
    padding-top: 50px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: auto;
    padding: 0 20px;
}

.footer-col {
    width: 250px;
    margin-bottom: 30px;
}

.footer-col h3 {
    margin-bottom: 15px;
    font-size: 20px;
    color: #2a7de1;
}

.footer-col p {
    margin: 8px 0;
    color: #ccc;
    font-size: 15px;
}

.footer-col i {
    margin-right: 8px;
    color: #2a7de1;
}

.redes {
    margin-top: 10px;
}

.redes a {
    display: inline-block;
    width: 40px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    background: #222;
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: 0.3s;
}

.redes a:hover {
    background: #df3f0e;
    transform: translateY(-3px);
    color: white;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    margin-top: 30px;
    padding: 15px;
    font-size: 14px;
    color: #aaa;
}

/* LOADER */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-box {
    text-align: center;
}

.loader-logo {
    width: 110px;
    margin-bottom: 20px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #ddd;
    border-top: 4px solid #2a7de1;
    border-radius: 50%;
    margin: auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loader p {
    margin-top: 10px;
    font-size: 14px;
    color: #555;
}

/* Responsive */
@media (max-width: 768px) {
    .titulo-beneficios h2 {
        font-size: 2rem;
    }
    .titulo-beneficios p {
        font-size: 1rem;
    }
    .card-beneficio {
        width: 100%;
        max-width: 350px;
    }
    .hero h1 {
        font-size: 35px;
    }
}

/* CHATBOT - VERSIÓN COMPACTA */
.chatbot-section {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.loaded .chatbot-section {
    opacity: 1;
    visibility: visible;
}

.chatbot-container {
    position: relative;
}

.chatbot-toggle {
    width: 50px; /* Reducido de 60px */
    height: 50px; /* Reducido de 60px */
    border-radius: 50%;
    background: #2a7de1;
    border: none;
    color: white;
    font-size: 20px; /* Reducido de 24px */
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(42, 125, 225, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.chatbot-toggle:hover {
    transform: scale(1.05);
    background: #1c5fb3;
}

.chatbot-toggle .fa-times {
    display: none;
}

.chatbot-toggle.active .fa-robot {
    display: none;
}

.chatbot-toggle.active .fa-times {
    display: block;
}

.chatbot-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 280px; /* Reducido de 400px */
    background: white;
    border-radius: 12px; /* Reducido de 15px */
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: none;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    z-index: 9999;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chatbot-panel.active {
    display: block;
}

.chatbot-header {
    background: #2a7de1;
    color: white;
    padding: 10px 12px; /* Reducido de 15px 20px */
}

.chatbot-header h3 {
    margin: 0;
    font-size: 14px; /* Reducido de 18px */
    font-weight: 600;
}

.chatbot-header h3 i {
    margin-right: 6px;
    font-size: 12px;
}

.chatbot-header p {
    margin: 3px 0 0;
    font-size: 10px; /* Reducido de 12px */
    opacity: 0.9;
}

.chatbot-messages {
    height: 200px; /* Reducido de 350px */
    overflow-y: auto;
    padding: 10px; /* Reducido de 15px */
    background: #f8f9fa;
    display: flex;
    flex-direction: column;
    gap: 5px; /* Reducido de 10px */
}

.message {
    margin-bottom: 5px; /* Reducido de 10px */
    display: flex;
    width: 100%;
}

.message.bot {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-content {
    max-width: 85%;
    padding: 8px 12px; /* Reducido de 12px 18px */
    border-radius: 15px; /* Reducido de 18px */
    font-size: 12px; /* Reducido de 14px */
    line-height: 1.4;
    white-space: pre-line;
    word-wrap: break-word;
}

.bot .message-content {
    background: #e9ecef;
    color: #333;
    border-bottom-left-radius: 4px;
}

.user .message-content {
    background: #2a7de1;
    color: white;
    border-bottom-right-radius: 4px;
}

.chatbot-input {
    display: flex;
    padding: 10px; /* Reducido de 15px */
    background: white;
    border-top: 1px solid #dee2e6;
}

.chatbot-input input {
    flex: 1;
    padding: 8px 12px; /* Reducido de 12px 15px */
    border: 1px solid #dee2e6;
    border-radius: 20px; /* Reducido de 25px */
    margin-right: 8px; /* Reducido de 10px */
    outline: none;
    font-size: 12px; /* Reducido de 14px */
}

.chatbot-input input:focus {
    border-color: #2a7de1;
    box-shadow: 0 0 0 2px rgba(42, 125, 225, 0.1);
}

.chatbot-input button {
    width: 35px; /* Reducido de 45px */
    height: 35px; /* Reducido de 45px */
    border-radius: 50%;
    background: #2a7de1;
    border: none;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px; /* Añadido */
}

.chatbot-input button:hover {
    background: #1c5fb3;
    transform: scale(1.05);
}

.chatbot-suggestions {
    padding: 8px 10px 10px; /* Reducido de 12px 15px 15px */
    display: flex;
    gap: 6px; /* Reducido de 10px */
    flex-wrap: wrap;
    border-top: 1px solid #dee2e6;
}

.suggestion-btn {
    padding: 5px 10px; /* Reducido de 8px 14px */
    background: #f0f2f5;
    border: none;
    border-radius: 20px; /* Reducido de 25px */
    font-size: 11px; /* Reducido de 13px */
    color: #333;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px; /* Reducido de 6px */
    font-weight: 500;
}

.suggestion-btn:hover {
    background: #2a7de1;
    color: white;
    transform: translateY(-1px);
}

/* Ajuste para el botón de WhatsApp flotante */
.whatsapp-float {
    width: 50px; /* Reducido para que coincida */
    height: 50px;
    font-size: 24px;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

body.loaded .whatsapp-float {
    opacity: 1;
    visibility: visible;
}

/* Responsive para móviles */
@media (max-width: 480px) {
    .chatbot-panel {
        width: 260px; /* Aún más pequeño en móvil */
        right: -5px;
        bottom: 55px;
    }
    
    .chatbot-section {
        bottom: 75px;
        right: 15px;
    }
    
    .chatbot-toggle {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .whatsapp-float {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .message-content {
        max-width: 90%;
        font-size: 11px;
        padding: 6px 10px;
    }
}