/* ===== VARIABLES CSS ===== */
:root {
    --primary-gradient: linear-gradient(135deg, #79BED9 0%, #1B7EA6 100%);
    --secondary-gradient: linear-gradient(135deg, #79BED9 0%, #1B7EA6 100%);
    --success-gradient: linear-gradient(135deg, #79BED9 0%, #1B7EA6 100%);
    --warning-gradient: linear-gradient(135deg, #79BED9 0%, #1B7EA6 100%);
}

/* ===== ESTILOS BASE ===== */
html {
    font-size: 90%;
}
body {
    font-family: 'Inter', sans-serif;
    background-color: #1B7EA6;
    min-height: 100vh;
    padding: 2rem 0;
}

.main-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    width: 100%;
}

/* ===== HEADER SECTION ===== */
.header-section {
    display: flex;
    flex-direction: row; /* una sola línea */
    align-items: center; /* centra verticalmente */
    justify-content: space-between; /* extremos con título centrado visualmente */
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
    flex-wrap: nowrap;
}

.logo-img {
    height: 64px;
    width: auto;
    object-fit: contain;
}

.icon-img {
    height: 60px;
    width: auto;
    object-fit: contain;
}

.page-title {
    flex: 1; /* que ocupe el espacio central */
    text-align: center;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    font-size: 2rem;
    margin: 0;
}

/* ===== BOTÓN VOLVER ===== */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1B7EA6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(102, 126, 234, 0.35);
    background: rgba(102, 126, 234, 0.08);
    white-space: nowrap;
}

.back-button:hover {
    color: #1B7EA6;
    transform: translateX(-2px);
    background: rgba(102, 126, 234, 0.15);
}

.back-button i {
    font-size: 1.1rem;
}

/* Responsive header tweaks */
@media (max-width: 768px) {
    .header-section {
        gap: 0.5rem;
    }
    .logo-img { height: 56px; }
    .page-title { font-size: 1.6rem; }
}

@media (max-width: 520px) {
    .header-section {
        flex-wrap: wrap; /* permitir salto si no cabe */
        justify-content: center;
    }
    .back-button { order: 1; }
    .page-title { order: 2; width: 100%; }
    .logo-img { order: 3; }
}

/* ===== TARJETAS DE ENLACES ===== */
.link-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    align-items: stretch;
    text-align: left;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.link-card:hover::before {
    transform: scaleX(1);
}

.link-card.social::before {
    background: var(--secondary-gradient);
}

.link-card.tools::before {
    background: var(--success-gradient);
}

.link-card.learning::before {
    background: var(--warning-gradient);
}

.card-title {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.card-icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 0.75rem;
    text-align: center;
    width: 100%;
}

.card-description {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.5;
    flex-grow: 1;
    text-align: justify;
}

.card-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: #764ba2;
}

/* ===== TARJETAS DE CONTACTO ===== */
.contact-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
}

.contact-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--warning-gradient);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.contact-card:hover::before {
    transform: scaleX(1);
}

.contact-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.contact-icon {
    font-size: 1.5rem;
    color: #667eea;
    min-width: 24px;
}

.contact-title {
    font-weight: 600;
    font-size: 1rem;
    color: #2d3748;
    margin: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: rgba(102, 126, 234, 0.03);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(2px);
}

.contact-item i {
    font-size: 1rem;
    color: #667eea;
    min-width: 16px;
}

.contact-value {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contact-value:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ===== TARJETAS DE VIDEO ===== */
.video-card {
    background: white;
    border-radius: 10px;
    padding: 1rem 1rem 1.25rem 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
    height: 100%;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
    align-items: center;
    cursor: pointer;
}

.video-thumbnail {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    background: #000;
    aspect-ratio: 16 / 9;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-card:hover {
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.15);
    background: #f7f8fa;
}

.video-title {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0.75rem 0 0.25rem 0;
    color: #2d3748;
    text-align: center;
}

.video-icon {
    font-size: 3rem;
    color: #000000;
    position: absolute;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.video-card:hover .video-icon {
    opacity: 0.2;
}

/* ===== TÍTULOS DE SECCIÓN ===== */
.section-title {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: #2d3748;
    position: relative;
    padding-left: 1rem;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 30px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* ===== CAJA DE BÚSQUEDA ===== */
.search-box {
    background: white;
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
}

.search-box:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* ===== SISTEMA DE GRID ===== */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}

.row>[class*="col-"] {
    display: flex;
    flex-direction: column;
    transition: order 0.3s ease;
}

.contact-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    flex: 1 1 320px;
    max-width: 350px;
    min-width: 260px;
    margin-bottom: 1rem;
}

.col-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1 1 320px;
    max-width: 350px;
    min-width: 260px;
    margin-bottom: 1rem;
}

/* ===== BÚSQUEDA ACTIVA ===== */
.search-active .row>[class*="col-"] {
    flex: 0 0 auto;
}

.search-active .row>[class*="col-"]:nth-child(1) { order: 1; }
.search-active .row>[class*="col-"]:nth-child(2) { order: 2; }
.search-active .row>[class*="col-"]:nth-child(3) { order: 3; }
.search-active .row>[class*="col-"]:nth-child(4) { order: 4; }
.search-active .row>[class*="col-"]:nth-child(5) { order: 5; }
.search-active .row>[class*="col-"]:nth-child(6) { order: 6; }

#contactSection {
    gap: 1rem !important;
}

/* ===== FOOTER ===== */
.footer-wrapper {
    display: flex;
    justify-content: center;
    width: 100%;
}

.footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 1.5rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.footer-description {
    color: #2d3748;
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: justify;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1B7EA6;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(102, 126, 234, 0.35);
    background: rgba(102, 126, 234, 0.08);
    white-space: nowrap;
}

.footer-link:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #1B7EA6;
    transform: translateX(-2px);
    box-shadow: none;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    margin-top: 1rem;
}

.copyright {
    color: #718096;
    margin: 0;
    font-size: 0.9rem;
}

/* ===== ACORDEÓN ===== */
.accordion-button:not(.collapsed) {
    background-color: rgba(102, 126, 234, 0.1);
    color: #2d3748;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25);
}

.accordion-button::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23667eea'%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");
}

/* ===== UTILIDADES ===== */
.btn-inicio {
    margin-bottom: 2rem;
}

/* ===== CLASES DE TEXTO ===== */
.text-justify {
    text-align: justify !important;
}

/* ===== MEDIA QUERIES ===== */
@media (max-width: 1200px) {
    .main-container,
    .footer {
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 992px) {
    .contact-col,
    .col-video {
        flex-basis: 48%;
        max-width: 100%;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-link {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .contact-col,
    .col-video {
        flex-basis: 100%;
        min-width: 0;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .footer-link {
        justify-content: center;
    }
    
    .page-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 1rem;
        margin: 1rem auto;
    }
    
    .page-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
} 