/* Estilos Generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.7;
    color: #E2E8F0;
    background-color: #1A2A44;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: #E2E8F0;
    margin-bottom: 0.75em;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

h1 { font-size: 3.6em; }
h2 { font-size: 2.6em; text-align: center; margin-bottom: 40px; }
h3 { font-size: 1.8em; }
h4 { font-size: 1.4em; font-weight: 600; }

p {
    margin-bottom: 1.2em;
}

a {
    text-decoration: none;
    color: #4B6CB7;
    transition: color 0.2s ease-in-out, background 0.3s ease-in-out;
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

.seccion {
    padding: 40px 0;
}

/* Fondos de Secciones */
#comunidad { background-color: #1A2A44; }
#servicios { background-color: #3B4A6B; }
#casos-exito { background-color: #2A4066; }
#proyectos { background-color: #4A4A4A; }
#recursos { background-color: #1A2A44; }
#contacto { background-color: #3B4A6B; }

.subtitulo-seccion {
    font-family: 'Inter', sans-serif;
    font-size: 1.3em;
    color: #94A3B8;
    max-width: 800px;
    margin: -25px auto 50px auto;
    text-align: center;
    font-weight: 400;
}

/* Animación para Hover Multicolor Oscuro */
@keyframes darkMulticolorHover {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 100vh;
    background-color: #2A4066;
    z-index: 1040;
    transition: width 0.3s ease;
}

.sidebar:hover, .sidebar.active {
    width: 200px;
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #E2E8F0;
    font-size: 1.5em;
    padding: 15px;
    cursor: pointer;
    width: 100%;
    text-align: center;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
}

.sidebar-link {
    color: #E2E8F0;
    font-size: 1.8em;
    margin: 20px 0;
    position: relative;
    transition: color 0.2s ease, background 0.3s ease;
}

.sidebar-link:hover {
    color: #E2E8F0;
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
}

.sidebar-link::after {
    content: attr(title);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: #1A2A44;
    color: #E2E8F0;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9em;
    opacity: 0;
    transition: opacity 0.2s ease;
    white-space: nowrap;
}

.sidebar:hover .sidebar-link::after, .sidebar.active .sidebar-link::after {
    opacity: 1;
}

/* Navbar */
.navbar {
    background: linear-gradient(150deg, blue, #4B6CB7, purple, limegreen, blue, cyan, blue);
    background-size: 300% 300%;
    animation: vibrantGradient 12s ease infinite;
    color: #E2E8F0;
    padding: 0.8rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1030;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    backdrop-filter: blur(8px);
}

@keyframes vibrantGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.navbar.scrolled {
    background: linear-gradient(90deg, #3B4A6B, #D53F8C, #2F855A);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 2em;
    font-weight: 700;
    color: #E2E8F0;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #E2E8F0;
    font-size: 1.1em;
    padding-bottom: 5px;
    position: relative;
    transition: color 0.25s ease, background 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: #F472B6;
    transition: width 0.25s ease;
}

.nav-links a:hover {
    color: #E2E8F0;
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    padding-top: 70px;
}

.hero-banner-ia {
    background: linear-gradient(120deg, #1A2A44, #3B4A6B, #2A4066);
    background-size: 200% 200%;
    animation: subtleGradient 15s ease infinite;
    color: #E2E8F0;
    padding: 80px 20px 120px 20px;
    text-align: center;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

@keyframes subtleGradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-banner-ia h1 {
    font-size: 3.6em;
    margin-bottom: 30px;
    letter-spacing: 0.02em;
}

.hero-banner-ia p {
    font-size: 1.4em;
    margin-bottom: 45px;
    max-width: 800px;
    line-height: 1.75;
    color: #94A3B8;
}

.hero-cta-buttons {
    display: flex;
    gap: 25px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Botones Multicolor */
.btn-multicolor-1, .btn-multicolor-2, .btn-multicolor-3, .btn-multicolor-4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    color: #E2E8F0;
    padding: 10px 10px;
    border-radius: 15px;
    margin: 5px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    font-size: 1.0em;
    display: inline-flex;
    align-items: center;
}

.btn-multicolor-1 {
    background: linear-gradient(80deg, #4B6CB7, blue, cyan);
    border: 2px solid #F472B6;
}

.btn-multicolor-2 {
    background: linear-gradient(80deg, orange, #3B4A6B, purple);
    border: 2px solid #34D399;
}

.btn-multicolor-3 {
    background: linear-gradient(45deg, #F472B6, #2A4066);
    border: 2px solid #F472B6;
}

.btn-multicolor-4 {
    background: linear-gradient(45deg, #4B6CB7, #34D399);
    border: 2px solid #34D399;
}

.btn-multicolor-1:hover, .btn-multicolor-2:hover, .btn-multicolor-3:hover, .btn-multicolor-4:hover {
    color: #E2E8F0;
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
    transform: translateY(-4px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

.btn-multicolor-1 i, .btn-multicolor-2 i, .btn-multicolor-3 i, .btn-multicolor-4 i {
    margin-right: 10px;
}

/* Collapsible Items */
.collapsible-item {
    margin-bottom: 15px;
    background: #2A4066;
    border-radius: 8px;
}

.collapsible-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.collapsible-item-header:hover {
    background: #3B4A6B;
}

.collapsible-item-header h3 {
    margin: 0;
    font-size: 1.5em;
    color: #E2E8F0;
}

.collapsible-icon {
    font-size: 1.3em;
    color: #4B6CB7;
    transition: transform 0.3s ease;
}

details[open] .collapsible-icon {
    transform: rotate(180deg);
}

.collapsible-item-content {
    padding: 20px;
    background: #1A2A44;
    border-radius: 0 0 8px 8px;
    animation: fadeIn 0.3s ease;
}

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

/* Grids */
.grid-expertos, .grid-servicios, .grid-casos-exito, .grid-proyectos, .grid-recursos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 35px;
}

.experto-card, .servicio-item, .caso-exito-card, .proyecto-item, .recurso-item {
    background: linear-gradient(135deg, blue, #2A4066, #4B6CB7);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    text-align: center;
    transition: transform 0.25s ease;
}

.caso-exito-card, .proyecto-item {
    background: #1A2A44;
}

.experto-card:hover, .servicio-item:hover, .caso-exito-card:hover, .proyecto-item:hover, .recurso-item:hover {
    transform: translateY(-10px);
}

.experto-card img, .caso-exito-card img, .proyecto-item img, .recurso-item img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 25px auto;
    border: 3px solid #F472B6;
}

.caso-exito-card img, .proyecto-item img {
    width: 100%;
    height: 230px;
    border-radius: 12px 12px 0 0;
}

.servicio-item .servicio-icono {
    color: #34D399;
    margin-bottom: 25px;
    font-size: 3em;
}

.especialidad-experto {
    font-style: italic;
    color: #94A3B8;
    font-size: 1em;
    margin-bottom: 18px;
}

.btn-terciario {
    background: linear-gradient(45deg, royalblue, #4B6CB7, #F472B6);
    color: #E2E8F0;
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 0.95em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.btn-terciario:hover {
    color: #E2E8F0;
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3);
}

/* Formulario de Contacto */
.formulario-contacto-wrapper {
    background-color: #F7FAFC;
    color: #1F2937;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.formulario-contacto-wrapper h2, .formulario-contacto-wrapper h3 {
    color: #1F2937;
}

.formulario-contacto-wrapper p {
    color: #4B5563;
}

.btn-principal-form {
    background: linear-gradient(45deg, #4B6CB7, #F472B6);
    color: #E2E8F0;
    padding: 14px 28px;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    font-size: 1.1em;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
}

.btn-principal-form:hover {
    color: #E2E8F0;
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.4);
}

.campo-formulario {
    margin-bottom: 25px;
}

.campo-formulario label {
    display: block;
    margin-bottom: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #1F2937;
    font-size: 1.05em;
}

.campo-formulario input[type="text"],
.campo-formulario input[type="email"],
.campo-formulario input[type="tel"],
.campo-formulario textarea,
.campo-formulario select {
    font-family: 'Inter', sans-serif;
    width: 100%;
    padding: 14px;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    background: #FFFFFF;
    color: #1F2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.campo-formulario input:focus,
.campo-formulario textarea:focus,
.campo-formulario select:focus {
    border-color: #4B6CB7;
    box-shadow: 0 0 0 0.2rem rgba(75, 108, 183, 0.25);
    outline: none;
}

.campo-formulario textarea {
    resize: vertical;
    min-height: 130px;
}

.campo-formulario select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%231F2937' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

#respuesta-formulario {
    margin-top: 25px;
    padding: 18px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
}

#respuesta-formulario p {
    margin: 0;
    font-size: 1.05em;
}

/* Botón WhatsApp */
.btn-whatsapp-grande {
    display: inline-flex;
    align-items: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    background: linear-gradient(45deg, #34D399, #4B6CB7);
    color: #E2E8F0;
    padding: 16px 32px;
    border-radius: 30px;
    font-size: 1.25em;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease;
    box-shadow: 0 4px 10px rgba(52, 211, 153, 0.3);
}

.btn-whatsapp-grande:hover {
    color: #E2E8F0;
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(30, 58, 138, 0.4);
}

.btn-whatsapp-grande i {
    margin-right: 12px;
    font-size: 1.4em;
}

/* Información de Contacto Adicional */
.info-contacto-adicional {
    margin-top: 60px;
    padding-top: 35px;
    border-top: 1px solid #4A4A4A;
    text-align: center;
}

.info-contacto-adicional h3 {
    font-weight: 600;
    margin-bottom: 25px;
    font-size: 1.6em;
}

.info-contacto-adicional p {
    font-family: 'Inter', sans-serif;
    font-size: 1.15em;
    margin-bottom: 15px;
    color: #94A3B8;
}

.info-contacto-adicional strong {
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    color: #E2E8F0;
}

/* Footer */
footer {
    background-color: #2D3748;
    color: #94A3B8;
    padding: 50px 0 25px 0;
    border-top: 2px solid #F472B6;
}

.footer-contenido {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 35px;
    margin-bottom: 35px;
    text-align: left;
}

.footer-columna {
    flex: 1;
    min-width: 230px;
}

.footer-columna h4 {
    font-weight: 600;
    color: #E2E8F0;
    margin-bottom: 25px;
    font-size: 1.4em;
    border-bottom: 2px solid #4B6CB7;
    padding-bottom: 12px;
    display: inline-block;
}

.footer-columna p {
    font-family: 'Inter', sans-serif;
    font-size: 1em;
    line-height: 1.75;
}

.footer-columna ul {
    list-style: none;
    padding: 0;
}

.footer-columna ul li {
    margin-bottom: 12px;
}

.footer-columna ul li a {
    font-family: 'Inter', sans-serif;
    color: #94A3B8;
    transition: color 0.2s ease, padding-left 0.2s ease, background 0.3s ease;
}

.footer-columna ul li a:hover {
    color: #E2E8F0;
    padding-left: 6px;
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
}

.redes-sociales a {
    color: #94A3B8;
    margin-right: 18px;
    font-size: 1.9em;
    transition: color 0.2s ease, transform 0.2s ease, background 0.3s ease;
    display: inline-block;
}

.redes-sociales a:last-child {
    margin-right: 0;
}

.redes-sociales a:nth-child(1):hover { color: #E2E8F0; }
.redes-sociales a:nth-child(2):hover { color: #E2E8F0; }
.redes-sociales a:nth-child(3):hover { color: #E2E8F0; }
.redes-sociales a:nth-child(4):hover { color: #E2E8F0; }
.redes-sociales a:hover {
    transform: scale(1.25);
    background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
    background-size: 300% 300%;
    animation: darkMulticolorHover 6s ease infinite;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #4A4A4A;
    padding-top: 30px;
    font-size: 0.95em;
    font-family: 'Inter', sans-serif;
}

.footer-bottom p {
    margin: 8px 0;
}

/* Menú Hamburguesa */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}

.menu-toggle .bar {
    height: 3px;
    width: 28px;
    background-color: #E2E8F0;
    margin: 4px 0;
    transition: all 0.25s ease-in-out;
    border-radius: 2px;
}

.menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Media Queries */
@media (max-width: 992px) {
    .sidebar {
        width: 0;
        overflow: hidden;
    }

    .sidebar.active {
        width: 60px;
    }

    .sidebar-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 62px;
        left: 0;
        background-color: #2A4066;
        padding: 0;
        box-shadow: 0 8px 15px rgba(0,0,0,0.2);
        border-top: 1px solid #4A4A4A;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        width: 100%;
    }

    .nav-links li a {
        padding: 18px 25px;
        display: block;
        width: 100%;
        border-bottom: 1px solid #4A4A4A;
        font-size: 1.1em;
    }

    .nav-links li:last-child a {
        border-bottom: none;
    }

    .nav-links a:hover {
        background: linear-gradient(90deg, #1E3A8A, #701A75, #065F46);
        background-size: 300% 300%;
        animation: darkMulticolorHover 6s ease infinite;
        color: #E2E8F0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-banner-ia h1 {
        font-size: 2.8em;
    }

    .hero-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-multicolor-1, .btn-multicolor-2, .btn-multicolor-3, .btn-multicolor-4 {
        width: 85%;
        max-width: 320px;
        margin-bottom: 15px;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2.8em; }
    h2 { font-size: 2.2em; }
    h3 { font-size: 1.5em; }
    .seccion { padding: 60px 0; }
    .hero { padding-top: 62px; }
    .hero-banner-ia { min-height: 70vh; padding: 60px 15px 80px 15px; }
    .hero-banner-ia p { font-size: 1.2em; }
    .footer-contenido { flex-direction: column; text-align: center; }
    .footer-columna { margin-bottom: 30px; }
    .footer-columna h4 { display: block; text-align: center; }
    .redes-sociales { text-align: center; margin-top: 15px; }
    .redes-sociales a { margin: 0 12px; }
}

@media (max-width: 480px) {
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.8em; }
    .container { width: 95%; padding: 0 10px; }
    .hero-banner-ia { padding: 50px 10px; }
    .hero-banner-ia p { font-size: 1.1em; }
    .subtitulo-seccion { font-size: 1.05em; }
    .collapsible-item-header h3 { font-size: 1.3em; }
}