/* Variables de color y fuentes */
:root {
    --primary-color: #FF8C00;
    --secondary-color: #FF8C00;
    --dark-color: #333;
    --light-color: #f4f4f4;
    --font-family: 'Arial', sans-serif;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    background-color: #fff;
    color: var(--dark-color);
    overflow-x: hidden; /* Evita el desbordamiento horizontal */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

#logo img {
    height: 70px;
}

nav ul {
    list-style: none;
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    text-decoration: none;
    color: var(--dark-color);
    font-weight: bold;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}

nav ul li a:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Menú móvil */
#mobile-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

#mobile-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-color);
}

/* Carrusel */
.carousel-container {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    overflow: hidden;
    height: auto;
    max-height: 80vh;
}

.carousel {
    display: flex;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide img {
    width: 100vw;
    height: 100%;
    object-fit: contain;
    object-position: center;
    flex-shrink: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 1rem;
    cursor: pointer;
    z-index: 10;
    font-size: 1.5rem;
}

.carousel-control.prev { left: 0; }
.carousel-control.next { right: 0; }

.carousel-indicators {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.carousel-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
}

.carousel-indicator.active {
    background-color: var(--primary-color);
}

/* Sección de video y mensaje */
#video-message {
    padding: 4rem 0;
    background-color: var(--light-color);
}

.video-message-container {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.video-container {
    flex: 1;
    aspect-ratio: 16 / 9;
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
}

.message-container {
    flex: 1;
}

.message-container h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Sección de cursos */
.courses {
    padding: 4rem 0;
}

.courses header {
    text-align: center;
    margin-bottom: 2rem;
}

.header__title {
    font-size: 2.5rem;
    color: #FF8C00;
}

.courses__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.course-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.course-card__image {
    position: relative;
}

.course-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.course-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--primary-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
}

.course-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.course-card__title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.course-card__description {
    flex-grow: 1;
    margin-bottom: 1rem;
}

.course-card__actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn--primary {
    background-color: var(--primary-color);
    color: white;
}

.btn--whatsapp {
    background-color: #FF8C00;
    color: white;
    font-size: 1.2rem;
}

/* Sección Hero */
#hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/hero-bg.jpg') no-repeat center center/cover;
    color: white;
    padding: 6rem 0;
    text-align: center;
}

#hero h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

#hero .btn {
    background-color: var(--primary-color);
    color: white;
    font-size: 1.2rem;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: var(--light-color);
    padding: 3rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li a {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-container {
    text-align: center;
    margin-bottom: 2rem;
}

.social-title {
    margin-bottom: 1rem;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-icon {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icon:hover {
    color: var(--primary-color);
}

.training-message {
    font-style: italic;
}

.copyright {
    text-align: center;
    border-top: 1px solid #555;
    padding-top: 1rem;
}

/* Iconos flotantes */
.icon-group-left, .icon-group-right {
    position: fixed;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.icon-group-left {
    left: 20px;
}

.icon-group-right {
    right: 20px;
}

.floating-icon {
    background-color: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
    animation: bounce 2s infinite; /* Animación de rebote */
}

.floating-icon:hover {
    background-color: #FF8C00;
    transform: scale(1.1); /* Agrandar en hover */
    animation-play-state: paused; /* Pausar animación en hover */
}

/* Keyframes para la animación de rebote */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive */
@media (max-width: 768px) {
    header .container {
        flex-direction: row; /* Mantener en fila */
        justify-content: space-between; /* Espacio entre logo y menú */
        align-items: center;
        padding: 1rem 20px;
    }

    nav {
        display: none; /* Oculto por defecto */
        position: absolute;
        top: 70px; /* Debajo del header */
        left: 0;
        width: 100%;
        background-color: white;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    nav.active {
        display: block; /* Se muestra con JS */
    }

    nav ul {
        flex-direction: column;
        width: 100%;
        padding: 0;
    }

    nav ul li {
        margin: 0;
        text-align: center;
        border-bottom: 1px solid #f4f4f4;
    }

    nav ul li a {
        display: block;
        padding: 1rem;
    }

    #mobile-menu {
        display: flex;
    }

    .carousel-container { height: auto; max-height: 35vh; }
    .video-message-container { flex-direction: column; }
    #hero h2 { font-size: 2rem; }
    .footer-content { flex-direction: column; text-align: center; }

    .courses__container {
        grid-template-columns: 1fr; /* Una columna en móvil */
    }

    .floating-icon-group {
        bottom: 15px;
        right: 15px;
        gap: 10px;
    }

    .floating-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}

/* Estilos para el modal de bienvenida */
.welcome-modal {
    display: none; /* Oculto por defecto, se mostrará con JS */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
}

.welcome-modal-content {
    position: relative;
    background-color: #fff;
    padding: 15px;
    border-radius: 10px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {opacity: 0; transform: scale(0.9);}
    to {opacity: 1; transform: scale(1);}
}

.welcome-modal-content img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.welcome-modal-close {
    color: #fff;
    background-color: #333;
    border-radius: 50%;
    position: absolute;
    top: -15px;
    right: -15px;
    font-size: 25px;
    font-weight: bold;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transition: background-color 0.3s;
}

.welcome-modal-close:hover,
.welcome-modal-close:focus {
    background-color: #ff0000;
    text-decoration: none;
}