/* ==========================================================================
   NUEVAS SECCIONES ACAES
   Estilos para Cursos, Departamentos, Clases YouTube y componentes generales
   Compatible con style.css (variables CSS y sistema de temas)
   ========================================================================== */

/* ==========================================================================
   1. CURSOS (cursos.html)
   ========================================================================== */

.cursos-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background: linear-gradient(135deg, #0b1a2e 0%, #1a3a5c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    padding: 80px 20px;
}

.cursos-hero h1 {
    font-size: 3rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 16px;
}

.cursos-hero p {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, 0.75);
    max-width: 600px;
    margin: 0 auto;
}

[data-theme="light"] .cursos-hero {
    background: linear-gradient(135deg, #e8f0fe 0%, #d0e1f9 100%);
}

[data-theme="light"] .cursos-hero h1 {
    color: var(--text-main);
}

[data-theme="light"] .cursos-hero p {
    color: var(--text-muted);
}

.cursos-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
}

.cursos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.curso-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.curso-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .curso-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.curso-card .card-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: var(--bg-main);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-muted);
}

.curso-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.curso-card .card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.curso-card .card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.curso-instructor {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.curso-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    flex: 1;
}

.curso-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 8px 0;
}

.curso-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.curso-badge.virtual {
    color: var(--accent);
    border-color: var(--accent);
    background: rgba(0, 149, 246, 0.08);
}

.curso-badge.presencial {
    color: #2e7d32;
    border-color: #2e7d32;
    background: rgba(46, 125, 50, 0.08);
}

.curso-badge.hibrida {
    color: #e65100;
    border-color: #e65100;
    background: rgba(230, 81, 0, 0.08);
}

.curso-cupo {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

.curso-cupo.available {
    color: #2e7d32;
    border-color: #2e7d32;
    background: rgba(46, 125, 50, 0.08);
}

.curso-cupo.full {
    color: #c62828;
    border-color: #c62828;
    background: rgba(198, 40, 40, 0.08);
}

.btn-inscribir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    width: 100%;
    margin-top: auto;
    text-decoration: none;
}

.btn-inscribir:hover {
    background: #1b5e20;
}

.btn-inscribir:active {
    transform: scale(0.98);
}

.btn-inscrito {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--text-muted);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: default;
    opacity: 0.7;
    width: 100%;
    margin-top: auto;
}

.btn-inscrito:hover {
    background: var(--text-muted);
}

.btn-desinscribir {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--danger);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    width: 100%;
    margin-top: auto;
}

.btn-desinscribir:hover {
    background: #b71c1c;
}

.btn-desinscribir:active {
    transform: scale(0.98);
}

.curso-admin-form {
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px 60px;
    display: none;
}

.curso-admin-form.visible {
    display: block;
}

.curso-admin-form h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 24px;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-form label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
}

.admin-form input,
.admin-form select,
.admin-form textarea {
    padding: 12px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.admin-form input:focus,
.admin-form select:focus,
.admin-form textarea:focus {
    border-color: var(--accent);
}

.admin-form textarea {
    resize: vertical;
    min-height: 80px;
}

.admin-form .btn-submit {
    padding: 14px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-form .btn-submit:hover {
    background: var(--accent-hover);
}

.admin-form .form-row-double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.mis-cursos-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.mis-cursos-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.mis-cursos-section .cursos-grid {
    margin-top: 20px;
}

.no-cursos-msg {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 1rem;
}

.no-cursos-msg i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 12px;
}

/* ==========================================================================
   2. DEPARTAMENTOS HUB (departamentos.html)
   ========================================================================== */

.dept-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-image: url('../img/carina_nebula~orig.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.dept-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px 60px;
}

.dept-loading {
    text-align: center;
    color: var(--text-muted);
    padding: 60px 20px;
}

.dept-loading p {
    margin-top: 15px;
    font-size: 1rem;
}

.bloque-section {
    margin-bottom: 50px;
}

.bloque-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.bloque-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bloque-title h2 i {
    color: var(--accent);
}

.bloque-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    background: var(--bg-main);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.dept-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dept-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dept-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .dept-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.dept-card .dept-icon {
    font-size: 2.8rem;
    color: var(--accent);
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-main);
    border-radius: 50%;
    border: 1px solid var(--border-color);
}

.dept-card .dept-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 4px 0 2px;
}

.dept-card .dept-bloque-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    background: rgba(0, 149, 246, 0.1);
    border: 1px solid rgba(0, 149, 246, 0.2);
    padding: 3px 10px;
    border-radius: 20px;
}

.dept-card .dept-member-count {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 5px;
}

.dept-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
    width: 100%;
}

.dept-btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.dept-btn:active {
    transform: scale(0.97);
}

.btn-entrar {
    background: var(--accent);
    color: #fff;
}

.btn-entrar:hover {
    background: var(--accent-hover);
}

.btn-unirse {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-unirse:hover {
    background: var(--border-color);
}

.btn-unirse:disabled {
    opacity: 0.6;
    cursor: default;
}

.btn-unirse.unido {
    background: rgba(0, 200, 83, 0.1);
    color: #00c853;
    border-color: #00c853;
    cursor: default;
}

/* ==========================================================================
   3. DEPARTAMENTO INDIVIDUAL (departamento.html)
   ========================================================================== */

.dept-header {
    position: relative;
    width: 100%;
    min-height: 300px;
    background: linear-gradient(135deg, #0b1a2e 0%, #1a3a5c 100%);
    display: flex;
    align-items: flex-end;
    padding: 60px 40px 30px;
    overflow: hidden;
}

[data-theme="light"] .dept-header {
    background: linear-gradient(135deg, #e8f0fe 0%, #d0e1f9 100%);
}

.dept-header-info {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.dept-header-info h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -1px;
    margin-bottom: 6px;
}

[data-theme="light"] .dept-header-info h1 {
    color: var(--text-main);
}

.dept-header-info p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    max-width: 600px;
}

[data-theme="light"] .dept-header-info p {
    color: var(--text-muted);
}

/* Tabs */
.dept-tab-bar {
    display: flex;
    gap: 4px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 20px;
    position: sticky;
    top: 60px;
    z-index: 100;
    overflow-x: auto;
    scrollbar-width: none;
}

.dept-tab-bar::-webkit-scrollbar {
    display: none;
}

.dept-tab {
    padding: 14px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
    transition: color 0.2s;
}

.dept-tab::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 100%;
    height: 3px;
    background: var(--accent);
    border-radius: 3px 3px 0 0;
    transition: transform 0.2s;
}

.dept-tab:hover {
    color: var(--text-main);
}

.dept-tab.active {
    color: var(--accent);
}

.dept-tab.active::after {
    transform: translateX(-50%) scaleX(1);
}

.dept-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 60px;
}

/* --- Lobby --- */
.comunicado-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    min-height: 200px;
    margin-bottom: 24px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    border: 1px solid var(--border-color);
}

.comunicado-card.pinned {
    border: 2px solid var(--accent);
}

.comunicado-card.pinned::before {
    content: '📌';
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 1.2rem;
    z-index: 3;
}

.comunicado-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.comunicado-content {
    position: relative;
    z-index: 2;
    padding: 30px;
    width: 100%;
}

.comunicado-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.comunicado-content p {
    font-size: 0.9rem;
    line-height: 1.5;
    opacity: 0.85;
}

.comunicado-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.comunicado-video {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.comunicado-form {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.comunicado-form.active {
    display: flex;
}

.comunicado-form-inner {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.comunicado-form-inner h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* --- Chat --- */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 220px);
    min-height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chat-message {
    display: flex;
    gap: 10px;
    max-width: 80%;
}

.chat-message .msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
}

.chat-message .msg-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.chat-message .msg-content {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--text-main);
}

.chat-message .msg-content .msg-author {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--accent);
    margin-bottom: 4px;
}

.chat-message .msg-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.chat-message.compartido .msg-content {
    border-left: 3px solid var(--accent);
    background: rgba(0, 149, 246, 0.05);
}

.chat-message.compartido .msg-content::before {
    content: 'Compartido';
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.chat-input-area {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.chat-input:focus {
    border-color: var(--accent);
}

.btn-chat-send {
    padding: 10px 18px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-chat-send:hover {
    background: var(--accent-hover);
}

/* Thread / Hilo */
.hilo-thread {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px;
    margin-top: 8px;
    margin-left: 46px;
}

.hilo-thread .hilo-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hilo-item {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.hilo-item:last-child {
    border-bottom: none;
}

.hilo-item .msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
}

.hilo-item .msg-content {
    font-size: 0.85rem;
    color: var(--text-main);
    flex: 1;
}

.hilo-item .msg-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
}

.hilo-input-area {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.hilo-input-area input {
    flex: 1;
    padding: 8px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-main);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.hilo-input-area input:focus {
    border-color: var(--accent);
}

.btn-compartir {
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-compartir:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 149, 246, 0.05);
}

/* --- P2P --- */
.p2p-container {
    display: flex;
    height: calc(100vh - 220px);
    min-height: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.p2p-contact-list {
    width: 280px;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    flex-shrink: 0;
    background: var(--bg-main);
}

.p2p-contact-list h3 {
    padding: 16px 16px 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
}

.p2p-contact {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.p2p-contact:hover {
    background: var(--bg-card);
}

.p2p-contact.active {
    background: rgba(0, 149, 246, 0.08);
    border-left: 3px solid var(--accent);
}

.p2p-contact .contact-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    overflow: hidden;
}

.p2p-contact .contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.p2p-contact .contact-info {
    flex: 1;
    min-width: 0;
}

.p2p-contact .contact-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p2p-contact .contact-preview {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.p2p-contact .unread-badge {
    background: var(--accent);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    flex-shrink: 0;
}

.p2p-conversation {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.p2p-conversation-header {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.p2p-conversation-header h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

.p2p-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.p2p-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.9rem;
    line-height: 1.5;
    position: relative;
}

.p2p-message.sent {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}

.p2p-message.received {
    align-self: flex-start;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-bottom-left-radius: 4px;
}

.p2p-message .msg-time {
    font-size: 0.65rem;
    opacity: 0.6;
    margin-top: 4px;
    display: block;
    text-align: right;
}

.p2p-input-area {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.p2p-input-area input {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
}

.p2p-input-area input:focus {
    border-color: var(--accent);
}

.cifrado-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 200, 83, 0.1);
    color: #00c853;
    border: 1px solid rgba(0, 200, 83, 0.2);
    cursor: pointer;
    transition: all 0.2s;
}

.cifrado-toggle.inactive {
    background: var(--bg-main);
    color: var(--text-muted);
    border-color: var(--border-color);
}

.cifrado-toggle:hover {
    transform: scale(1.05);
}

/* --- Special Modules --- */
.bloque-banner-editor {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 30px;
}

.bloque-banner-editor h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bloque-banner-editor .banner-preview {
    width: 100%;
    height: 200px;
    border-radius: 10px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
}

.bloque-paper {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 30px;
}

.bloque-paper h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bloque-paper .paper-meta {
    display: flex;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.bloque-paper .paper-abstract {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-main);
    padding: 16px;
    background: var(--bg-main);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.bloque-dashboard {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 30px;
}

.bloque-dashboard h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bloque-dashboard .status-light {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.bloque-dashboard .status-light.green {
    background: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.5);
}

.bloque-dashboard .status-light.red {
    background: var(--danger);
    box-shadow: 0 0 6px rgba(237, 73, 86, 0.5);
}

.bloque-dashboard .kanban-card {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.bloque-dashboard .kanban-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.bloque-dashboard .kanban-card .kanban-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 4px;
}

.bloque-dashboard .kanban-card .kanban-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.bloque-cosmos {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1a3e 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 30px;
    color: #fff;
}

[data-theme="light"] .bloque-cosmos {
    background: linear-gradient(135deg, #e8f0fe 0%, #d0e1f9 100%);
    color: var(--text-main);
    border-color: var(--border-color);
}

.bloque-cosmos h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 24px;
    color: #fff;
}

[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

.glass-card h4 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.glass-card p {
    font-size: 0.85rem;
    opacity: 0.8;
    line-height: 1.5;
}

.tech-panel {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: #4caf50;
}

[data-theme="light"] .tech-panel {
    background: var(--bg-main);
    border-color: var(--border-color);
    color: var(--text-main);
}

.tech-panel .data-row {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .tech-panel .data-row {
    border-bottom-color: var(--border-color);
}

.tech-panel .data-row:last-child {
    border-bottom: none;
}

.tech-panel .data-label {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="light"] .tech-panel .data-label {
    color: var(--text-muted);
}

.python-code-area {
    background: #1e1e1e;
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #d4d4d4;
    position: relative;
}

.python-code-area .code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.python-code-area .code-header span {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
}

.python-code-area pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.python-code-area code {
    font-family: inherit;
}

/* --- Modal --- */
.dept-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.dept-modal.active {
    display: flex;
}

.dept-modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.dept-modal-content h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.dept-modal-content .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.3rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.dept-modal-content .modal-close:hover {
    color: var(--text-main);
}

/* ==========================================================================
   4. CLASES YOUTUBE (clases-youtube.html)
   ========================================================================== */

.youtube-hero {
    position: relative;
    width: 100%;
    min-height: 400px;
    background-image: url('../img/fondo-astronomico.avif');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.youtube-hero .hero-container {
    justify-content: center;
    text-align: center;
}

.youtube-filter-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 0;
    position: sticky;
    top: 60px;
    z-index: 100;
}

.youtube-filter-bar .filter-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.youtube-filter-btn {
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
}

.youtube-filter-btn.active,
.youtube-filter-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.youtube-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.youtube-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.youtube-grid.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.youtube-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease;
}

.youtube-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .youtube-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.youtube-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    background: #000;
    overflow: hidden;
}

.youtube-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.youtube-thumbnail .play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.8rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.youtube-card:hover .play-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: #ff0000;
}

.youtube-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.youtube-card-body {
    padding: 16px;
}

.youtube-card-body h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.youtube-card-body .video-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.youtube-card-body .video-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.youtube-card-body .video-instructor {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
}

.youtube-departamento-tag {
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    padding: 3px 10px;
    border-radius: 20px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.video-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal.active {
    display: flex;
}

.video-modal-content {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.video-modal .modal-close-btn {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
    padding: 5px;
    transition: transform 0.2s ease;
}

.video-modal .modal-close-btn:hover {
    transform: scale(1.2);
}

.video-modal .video-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
}

.video-modal .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 8px;
}

/* Admin bar for YouTube */
.admin-bar {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: flex-end;
}

.admin-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

.admin-add-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.admin-add-btn:active {
    transform: scale(0.98);
}

.admin-form-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.admin-form-overlay.active {
    display: flex;
}

.admin-form-card {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    border: 1px solid var(--border-color);
}

.admin-form-card h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-main);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.form-actions button {
    flex: 1;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

.form-actions .btn-submit {
    background: var(--accent);
    color: #fff;
}

.form-actions .btn-submit:hover {
    background: var(--accent-hover);
}

.form-actions .btn-cancel {
    background: var(--bg-main);
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.form-actions .btn-cancel:hover {
    background: var(--border-color);
}

.form-actions button:active {
    transform: scale(0.98);
}

/* ==========================================================================
   5. COMPONENTES GENERALES
   ========================================================================== */

.section-headline {
    text-align: center;
    margin-bottom: 40px;
}

.section-headline h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-main);
}

.section-headline p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Toast Notifications */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 3000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.toast-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.toast-notification.success {
    border-color: #4caf50;
    color: #4caf50;
}

.toast-notification.error {
    border-color: var(--danger);
    color: var(--danger);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.loading-spinner i {
    font-size: 2.5rem;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-bottom: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.empty-state p {
    font-size: 1rem;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Back to home floating button */
.back-to-home {
    position: absolute;
    top: 25px;
    right: 25px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    background: var(--bg-main);
    z-index: 10;
}

.back-to-home:hover {
    color: var(--text-main);
    background: var(--border-color);
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {
    .cursos-hero {
        min-height: 300px;
        padding: 60px 20px;
    }

    .cursos-hero h1 {
        font-size: 2rem;
    }

    .dept-hero {
        min-height: 300px;
        background-attachment: scroll;
    }

    .dept-main {
        padding: 25px 15px 40px;
    }

    .bloque-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .dept-actions {
        flex-direction: column;
    }

    .youtube-hero {
        min-height: 300px;
    }

    .dept-header {
        padding: 50px 20px 25px;
        min-height: 220px;
    }

    .dept-header-info h1 {
        font-size: 1.8rem;
    }

    .dept-tab-bar {
        top: 55px;
        padding: 0 10px;
    }

    .dept-tab {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    .p2p-container {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .p2p-contact-list {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        max-height: 200px;
    }

    .p2p-conversation {
        height: 400px;
    }

    .chat-container {
        height: calc(100vh - 180px);
        padding-bottom: max(60px, env(safe-area-inset-bottom));
    }

    .chat-input-area {
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .youtube-filter-bar {
        top: 55px;
    }

    .admin-form .form-row-double {
        grid-template-columns: 100%;
    }
}

@media (max-width: 768px) {
    .cursos-section {
        padding: 40px 15px;
    }

    .cursos-grid {
        grid-template-columns: 1fr;
    }

    .youtube-section {
        padding: 25px 15px;
    }

    .youtube-grid {
        grid-template-columns: 1fr;
    }

    .youtube-filter-bar .filter-container {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: none;
        justify-content: flex-start;
        padding: 0 15px;
    }

    .youtube-filter-bar .filter-container::-webkit-scrollbar {
        display: none;
    }

    .youtube-filter-btn {
        flex-shrink: 0;
    }

    .video-modal-content {
        max-width: 100%;
    }

    .video-modal .modal-close-btn {
        top: -35px;
        right: 0;
    }

    .comunicado-content {
        padding: 20px;
    }

    .comunicado-content h3 {
        font-size: 1.1rem;
    }

    .dept-grid {
        grid-template-columns: 1fr;
    }

    .p2p-message {
        max-width: 90%;
    }

    .chat-message {
        max-width: 90%;
    }

    .dept-content {
        padding: 20px 15px 40px;
    }
}

@media (max-width: 480px) {
    .cursos-hero h1 {
        font-size: 1.6rem;
    }

    .cursos-hero p {
        font-size: 1rem;
    }

    .curso-card .card-body {
        padding: 16px;
    }

    .dept-header-info h1 {
        font-size: 1.4rem;
    }

    .dept-header {
        padding: 40px 15px 20px;
        min-height: 180px;
    }

    .dept-tab {
        padding: 10px 10px;
        font-size: 0.8rem;
        gap: 4px;
    }

    .mis-cursos-section {
        padding: 25px 15px 40px;
    }

    .curso-admin-form {
        padding: 25px 15px 40px;
    }

    .admin-form-card {
        padding: 20px;
    }

    .dept-modal-content {
        padding: 20px;
    }

    .comunicado-form-inner {
        padding: 20px;
    }

    .bloque-banner-editor,
    .bloque-paper,
    .bloque-dashboard,
    .bloque-cosmos {
        padding: 20px;
    }
}

/* ==========================================================================
   DARK MODE OVERRIDES ESPECÍFICOS
   ========================================================================== */

[data-theme="dark"] .comunicado-card {
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .comunicado-card.pinned {
    border-color: var(--accent);
}

[data-theme="dark"] .p2p-contact:hover {
    background: rgba(255, 255, 255, 0.03);
}

[data-theme="dark"] .p2p-contact.active {
    background: rgba(0, 149, 246, 0.1);
}

[data-theme="dark"] .chat-message .msg-content {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .p2p-message.received {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .bloque-dashboard .kanban-card {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .glass-card {
    background: rgba(255, 255, 255, 0.04);
}

[data-theme="dark"] .tech-panel {
    background: rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .python-code-area {
    background: #0d0d0d;
}

[data-theme="dark"] .admin-form-card {
    border-color: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   ANIMACIONES ADICIONALES
   ========================================================================== */

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

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

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

.animate-fade-in {
    animation: fadeInUp 0.5s ease forwards;
}

.animate-slide-in {
    animation: slideIn 0.3s ease forwards;
}

/* Stagger animation for grid items */
.dept-grid .dept-card,
.cursos-grid .curso-card,
.youtube-grid .youtube-card {
    animation: fadeInUp 0.5s ease both;
}

.dept-grid .dept-card:nth-child(1),
.cursos-grid .curso-card:nth-child(1),
.youtube-grid .youtube-card:nth-child(1) { animation-delay: 0.05s; }
.dept-grid .dept-card:nth-child(2),
.cursos-grid .curso-card:nth-child(2),
.youtube-grid .youtube-card:nth-child(2) { animation-delay: 0.1s; }
.dept-grid .dept-card:nth-child(3),
.cursos-grid .curso-card:nth-child(3),
.youtube-grid .youtube-card:nth-child(3) { animation-delay: 0.15s; }
.dept-grid .dept-card:nth-child(4),
.cursos-grid .curso-card:nth-child(4),
.youtube-grid .youtube-card:nth-child(4) { animation-delay: 0.2s; }
.dept-grid .dept-card:nth-child(5),
.cursos-grid .curso-card:nth-child(5),
.youtube-grid .youtube-card:nth-child(5) { animation-delay: 0.25s; }
.dept-grid .dept-card:nth-child(6),
.cursos-grid .curso-card:nth-child(6),
.youtube-grid .youtube-card:nth-child(6) { animation-delay: 0.3s; }
