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

body {
    background-image: url('../img/fondo.svg');
    background-size: 256px;
    background-position: center;
    background-repeat: repeat;
    background-color: #75CEFF;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1.5rem;
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Contenedor principal */
#cuerpo {
    background-color: white;
    padding: 2.5rem;
    width: 45rem;
    max-width: 100%;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    margin: 0 auto;
    transition: all 0.3s ease;
}
.titulo h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    text-align: center;
}
.texto-justificado {
    text-align: justify;
}
.titulo {
    margin-bottom: 2rem;
}
/* ========== BLOQUES DE TEXTO ========== */
.bloque-texto {
    margin-bottom: 2rem;
}

.bloque-texto h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.bloque-texto h2 {
    font-size: 1.6rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.bloque-texto p {
    color: #34495e;
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.texto-destacado {
    font-size: 1.1rem;
    /*font-weight: 500;*/
    color: #2c3e50;
    background: #f0f8ff;
    padding: 1rem;
    border-radius: 8px;
    border-left: 2px solid #75CEFF;
    border-right: 2px solid #75CEFF;
}

.texto-pequeno {
    font-size: 0.9rem;
    color: #7f8c8d;
}

.enlace-mail {
    /*color: #75CEFF;*/
    color: #0095DB;
    text-decoration: none;
    font-weight: 600;
}

.enlace-mail:hover {
    text-decoration: underline;
}

/* ========== SEPARADORES ========== */
.separador {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.separador-linea {
    flex: 1;
    height: 2px;
    background: linear-gradient(to right, transparent, #75CEFF, transparent);
}

.separador-icono {
    color: #75CEFF;
    font-size: 1.2rem;
    font-weight: bold;
}

.separador-pequeno {
    margin: 1rem 0;
}

.separador-pequeno .separador-linea {
    background: linear-gradient(to right, transparent, #bdc3c7, transparent);
    height: 1px;
}

/* ========== CURSOS - ESTILO GENERAL ========== */
.curso-item {
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.curso-item:hover {
    border-color: #75CEFF;
    box-shadow: 0 2px 8px rgba(117, 206, 255, 0.1);
}

.curso-item.comunes {
    border-left: 4px solid #0095DB;
}

.curso-item.autogestionado {
    /*border-left: 4px solid #f39c12;*/
    border-left: 4px solid #0095DB;
}

.curso-item .curso-header {
    padding: 1rem 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.2s ease;
    user-select: none;
    gap: 0.5rem;
    flex-direction: row;
    flex-wrap: nowrap;
}

.curso-item .curso-header:hover {
    background: #f0f8ff;
}

.curso-titulo {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    max-width: max-content;
    flex-direction: column;
}

.curso-titulo h3 {
    font-size: 1.1rem;
    color: #2c3e50;
}

.curso-info-basica {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.fecha-inicio {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    background: #ecf0f1;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    width: max-content;
}

.fecha-inicio i {
    color: #75CEFF;
}

.flecha-toggle {
    transition: transform 0.3s ease;
    color: #75CEFF;
    font-size: 0.9rem;
}

.curso-item.activo .flecha-toggle {
    transform: rotate(180deg);
}

/* Estados de cursos */
.estado {
    /*background: #e74c3c;*/
    /*background: #3D00E1;*/
    background: #0095DB;
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    white-space: nowrap;
}

.estado.autogestionado-badge {
    /*background: #f39c12;#00E1CD;*/
    background: #0095DB;
}

/* ========== DETALLE DEL CURSO (DESPLEGABLE) ========== */
.curso-detalle {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, padding 0.3s ease;
    padding: 0 1.2rem;
    background: white;
}

.curso-item.activo .curso-detalle {
    max-height: 800px;
    padding: 0 1.2rem 1.2rem 1.2rem;
}

.detalle-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid #ecf0f1;
}

.detalle-columna p, .detalle-columna li {
    margin: 0.5rem 0;
    color: #34495e;
    line-height: 1.6;
    font-size: 0.95rem;
}

.detalle-columna li {
    margin-left: 1rem;
    margin-bottom: 0;
    margin-top: 0;
}

.detalle-columna strong {
    color: #2c3e50;
}

/* Cajita destacada dentro del detalle */
.cajita-destacada {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    border-left: 4px solid #f39c12;
}

.cajita-destacada i {
    font-size: 1.5rem;
    color: #f39c12;
    margin-top: 0.2rem;
}

.cajita-destacada strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 0.2rem;
}

.cajita-destacada p {
    margin: 0;
    color: #34495e;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Acciones del detalle */
.detalle-acciones {
    display: flex;
    gap: 0.8rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.btn-cerrar {
    padding: 0.6rem 1.5rem;
    background: #ecf0f1;
    color: #2c3e50;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-cerrar:hover {
    background: #d5dbdb;
}

.btn-inscribir {
    padding: 0.6rem 1.5rem;
    /*background: #75CEFF;*/
    background: #0095DB;
    /*color: #2c3e50;*/
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-inscribir:hover {
    /*background: #5bb8e6;*/
    transform: scale(1.03);
}

/* ========== FILTROS DE CURSOS ========== */
.filtros-cursos {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.filtro-btn {
    padding: 0.4rem 1.2rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: #7f8c8d;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filtro-btn:hover {
    /*border-color: #75CEFF;*/
    border-color: #0095DB;
    color: #2c3e50;
    background: #f0f8ff;
}

.filtro-btn.activo {
    /*background: #75CEFF;
    color: #2c3e50;
    border-color: #75CEFF;*/
    font-weight: 600;
    background: #0095DB;
    color: white;
    border-color: #0095DB;
}

.filtro-btn i {
    font-size: 0.85rem;
}

/* ========== BOTÓN FAQ EN INDEX ========== */
.centrar-boton {
    display: flex;
    justify-content: center;
    margin: 1.5rem 0 0.5rem 0;
}

.btn-faq {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    /*background: #75CEFF;*/
    background: #0095DB;
    /*color: #2c3e50;*/
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.05rem;
    transition: all 0.3s ease;
    /*border: 2px solid #75CEFF;*/
    box-shadow: 0 4px 15px rgba(117, 206, 255, 0.3);
}

.btn-faq:hover {
    background: #5bb8e6;
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(117, 206, 255, 0.3);
}

.btn-faq i {
    font-size: 1.2rem;
}

/* ========== REDES SOCIALES ========== */
/*
.redes-sociales {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    justify-content: center;
    gap: 1rem;
    margin: 1.5rem 0 2rem 0;
    height: 2.5rem;
}*/

.redes-sociales {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 2rem; /* Aumentado para desktop */
    margin: 1.5rem 0 2rem 0;
    height: 2.5rem;
}

.red-social {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    /*padding: 0.7rem 1.5rem;*/
    /*background: #f8f9fa;
    color: #2c3e50;*/
    text-decoration: none;
    /*border-radius: 50px;*/
    font-weight: 500;
    /*font-size: 0.95rem;*/
    transition: all 0.3s ease;
    border: 2px solid transparent;
    
}

.red-social.instagram {
    color: #e4405f;
}

.red-social.youtube {
    color: #ff0000;
}

.red-social.email {
    color: #4CAF50;
}

.red-social.sitio-web {
    color: #3498db;
}


/* Para tablets y móviles */
@media (max-width: 768px) {
    .redes-sociales {
        gap: 1.5rem; /* Distancia intermedia para tablets */
    }
}

/* Para móviles pequeños */
@media (max-width: 480px) {
    .redes-sociales {
        gap: 1.2rem; /* Distancia más reducida para móviles */
        /*flex-wrap: wrap;  Permite que los iconos se envuelvan si es necesario */
        height: auto; /* Altura automática para que se adapte */
    }
}

/* Tu código existente de los iconos */
.red-social i {
    font-size: 2.2rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.red-social i:hover {
    transform: scale(1.2);
}

/*
.red-social.instagram:hover {
    background: #e4405f;
    color: white;
    border-color: #e4405f;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(228, 64, 95, 0.3);
    zoom: 1.2;
}

.red-social.youtube:hover {
    background: #ff0000;
    color: white;
    border-color: #ff0000;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 0, 0, 0.3);
}

.red-social.email:hover {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
}

.red-social.sitio-web:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}*/



/* ========== FOOTER ========== */
.footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #ecf0f1;
}

.footer p {
    color: #95a5a6;
    font-size: 0.85rem;
}

/* ========== ESTILOS PARA VOLVER (usado en FAQ) ========== */
.volver-container {
    margin-bottom: 2rem;
}

.btn-volver {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
    padding: 0.5rem 0;
}

.btn-volver:hover {
    /*color: #75CEFF;*/
    color: #0095DB;
}

/* ========== ESTILOS PARA FAQ ========== */
.faq-container {
    margin: 1.5rem 0;
}

.faq-item {
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: #75CEFF;
    box-shadow: 0 2px 8px rgba(117, 206, 255, 0.1);
}

.faq-pregunta {
    padding: 1rem 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    transition: background 0.2s ease;
    user-select: none;
}

.faq-pregunta:hover {
    background: #f0f8ff;
}

.faq-pregunta i {
    transition: transform 0.3s ease;
    color: #75CEFF;
    font-size: 0.9rem;
}

.faq-item.activo .faq-pregunta i {
    transform: rotate(180deg);
}

.faq-respuesta {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    padding: 0 1.2rem;
    background: white;
}

.faq-item.activo .faq-respuesta {
    max-height: 500px;
    padding: 0 1.2rem 1rem 1.2rem;
}

.faq-respuesta p {
    color: #34495e;
    line-height: 1.6;
    margin: 0.5rem 0;
}

.faq-respuesta > p:first-of-type {
    padding-top: 0.5rem;
    border-top: 1px solid #ecf0f1;
}

.faq-lista {
    list-style: none;
    padding: 0.5rem 0;
}

.faq-lista li {
    padding: 0.4rem 0;
    color: #34495e;
    line-height: 1.6;
}

.faq-acciones {
    margin-top: 0.8rem;
}

.btn-info-pequeno {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    /*background: #75CEFF;
    color: #2c3e50;*/
    background: #0095DB;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-info-pequeno:hover {
    /*background: #5bb8e6;*/
    transform: scale(1.02);
}

/* ========== CATEGORÍAS DE FAQ ========== */
.faq-categorias {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0 1.5rem 0;
    justify-content: center;
}

.categoria-btn {
    padding: 0.5rem 1.2rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #7f8c8d;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.categoria-btn:hover {
    /*border-color: #75CEFF;*/
    border-color: #0095DB;
    color: #2c3e50;
    background: #f0f8ff;
}

.categoria-btn.activo {
    /*background: #75CEFF;
    color: #2c3e50;
    border-color: #75CEFF;*/
    background: #0095DB;
    color: white;
    border-color: #0095DB;
    font-weight: 600;
}

.categoria-btn i {
    font-size: 0.9rem;
}

/* ========== CONTACTO EN FAQ ========== */
.contacto-faq {
    text-align: center;
}

.contacto-opciones {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.contacto-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 12px;
    text-decoration: none;
    color: #2c3e50;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    min-width: 200px;
    /*flex: 1;*/

    max-width: 300px;
    border: 1px solid #e9ecef;
}

.contacto-item:hover {
    border-color: #75CEFF;
    background: #f0f8ff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.contacto-item i {
    font-size: 1.8rem;
    /*color: #75CEFF;*/
    color: #0095DB;
}

.contacto-item div {
    display: flex;
    flex-direction: column;
}

.contacto-item strong {
    font-size: 0.9rem;
}

.contacto-item span {
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* ========== RESPONSIVE ========== */
@media screen and (max-width: 768px) {
    body {
        padding: 0.8rem;
    }

    #cuerpo {
        width: 100%;
        padding: 1.5rem;
        border-radius: 12px;
        margin: 0;
    }

    .titulo h1 {
        font-size: 2rem;
    }

    .bloque-texto h1 {
        font-size: 1.5rem;
    }

    .bloque-texto h2 {
        font-size: 1.3rem;
    }

    .curso-item .curso-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .curso-titulo {
        width: 100%;
        justify-content: space-between;
    }

    .curso-info-basica {
        width: 100%;
        justify-content: space-between;
    }

    .detalle-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .detalle-acciones {
        flex-direction: column;
    }

    .detalle-acciones .btn-cerrar,
    .detalle-acciones .btn-inscribir {
        width: 100%;
        justify-content: center;
        padding: 0.8rem;
    }

    .filtros-cursos {
        gap: 0.4rem;
    }

    .filtro-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.75rem;
    }

    .cajita-destacada {
        flex-direction: column;
        align-items: flex-start;
    }

    .redes-sociales {
        gap: 0.7rem;
    }

    .red-social {
        padding: 0.6rem 1.2rem;
        font-size: 0.85rem;
        flex: 1 1 calc(50% - 0.7rem);
        justify-content: center;
    }

    /* FAQ responsive */
    .faq-categorias {
        gap: 0.4rem;
    }

    .categoria-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        gap: 0.3rem;
    }

    .categoria-btn i {
        font-size: 0.8rem;
    }

    .contacto-opciones {
        flex-direction: column;
        align-items: center;
    }

    .contacto-item {
        max-width: 100%;
        width: 100%;
        justify-content: center;
    }

    .btn-faq {
        width: 100%;
        justify-content: center;
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 480px) {
    #cuerpo {
        padding: 1rem;
        border-radius: 8px;
    }
    .titulo h1 {
        font-size: 1.7rem;
    }
    .bloque-texto h1 {
        font-size: 1.2rem;
    }

    .bloque-texto h2 {
        font-size: 1.1rem;
    }

    .curso-titulo h3 {
        font-size: 0.95rem;
    }

    .fecha-inicio {
        font-size: 0.7rem;
        padding: 0.15rem 0.6rem;
    }

    .estado {
        font-size: 0.6rem;
        padding: 0.15rem 0.6rem;
    }

    .curso-detalle {
        font-size: 0.9rem;
    }

    .red-social {
        flex: 1 1 100%;
        padding: 0.7rem;
    }

    /* FAQ responsive extra */
    .faq-pregunta {
        font-size: 0.9rem;
        padding: 0.8rem 1rem;
    }

    .faq-respuesta {
        font-size: 0.9rem;
    }

    .faq-categorias {
        gap: 0.3rem;
    }

    .categoria-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

@media screen and (min-width: 1200px) {
    #cuerpo {
        width: 55rem;
        padding: 3rem;
    }
}


/* LOGO */ 

/* ========== LOGO ========== */
.logo-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
}

.logo {
    max-width: 200px;
    height: auto;
}

/* Para que se vea bien en móvil */
@media screen and (max-width: 480px) {
    .logo {
        max-width: 150px;
    }
}