/* ============================================================
   assets/css/main.css - Estilos principales
   Instituto Educativo Jorge Isaac
   ============================================================ */

/* ===== Aprende a Usarnos (material de apoyo) ===== */
.ayuda-intro { margin-bottom: 22px; }
.ayuda-intro h5 { font-weight: 700; color: var(--color-dark); margin-bottom: 6px; }
.ayuda-intro p  { color: #7c8a99; margin: 0; font-size: .93rem; }

.ayuda-lista { display: flex; flex-direction: column; gap: 14px; max-width: 900px; }

.ayuda-card {
    background: #fff; border-radius: 14px; overflow: hidden;
    box-shadow: 0 2px 10px rgba(16,42,67,.07); transition: box-shadow .25s;
}
.ayuda-card:hover { box-shadow: 0 4px 18px rgba(16,42,67,.12); }
.ayuda-card.abierta { box-shadow: 0 6px 24px rgba(16,42,67,.15); }

.ayuda-head {
    width: 100%; display: flex; align-items: center; gap: 16px;
    padding: 18px 20px; background: none; border: none; text-align: left; cursor: pointer;
}
.ayuda-num {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), #1565c0);
    color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.ayuda-texto { flex: 1 1 auto; min-width: 0; }
.ayuda-titulo { display: block; font-weight: 700; color: var(--color-dark); line-height: 1.35; }
.ayuda-desc   { display: block; font-size: .85rem; color: #8a99a8; margin-top: 3px; line-height: 1.5; }
.ayuda-flecha { flex: 0 0 auto; color: #b0bcc8; transition: transform .3s; }
.ayuda-card.abierta .ayuda-flecha { transform: rotate(180deg); color: var(--color-primary); }

/* La altura se anima desde JS con el alto real del contenido */
.ayuda-cuerpo { max-height: 0; overflow: hidden; transition: max-height .35s ease; }
.ayuda-card.abierta .ayuda-cuerpo { max-height: 1200px; }

.ayuda-video {
    position: relative; padding-top: 56.25%;   /* 16:9 */
    margin: 0 20px 20px; border-radius: 10px; overflow: hidden; background: #0d1b2a;
}
.ayuda-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

@media (max-width: 576px) {
    .ayuda-head  { padding: 14px; gap: 12px; }
    .ayuda-num   { width: 32px; height: 32px; font-size: .85rem; }
    .ayuda-desc  { display: none; }          /* en móvil el título basta */
    .ayuda-video { margin: 0 14px 14px; }
}

/* Password toggle */
.pwd-toggle-wrap { position: relative; }
.pwd-toggle-wrap input { padding-right: 44px; }
.pwd-toggle-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #8899aa; cursor: pointer;
    padding: 4px 6px; font-size: 1rem; line-height: 1; border-radius: 6px;
    transition: color .2s, background .2s;
}
.pwd-toggle-btn:hover { color: var(--color-primary); background: rgba(41,171,226,.08); }

:root {
    --color-primary: #29ABE2;
    --color-secondary: #FFD700;
    --color-dark: #1a2f4a;
    --color-light: #f0f8ff;
    --color-success: #28a745;
    --color-danger: #dc3545;
    --sidebar-width: 260px;
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f4f6f9;
    color: #333;
}

/* ============================================================
   LANDING PAGE
   ============================================================ */
.navbar-brand img { height: 55px; }

.navbar-landing {
    background: linear-gradient(135deg, var(--color-dark) 0%, #0d47a1 100%);
    box-shadow: 0 2px 15px rgba(0,0,0,0.3);
    padding: 0.5rem 0;
}

.navbar-landing .navbar-brand span {
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.2;
}

.navbar-landing .nav-link {
    color: rgba(255,255,255,0.85) !important;
    font-weight: 500;
    transition: color 0.2s;
}

.navbar-landing .nav-link:hover { color: var(--color-secondary) !important; }

.btn-login-nav {
    background: var(--color-secondary);
    color: var(--color-dark) !important;
    font-weight: 700;
    border-radius: 25px;
    padding: 8px 22px !important;
    transition: all 0.3s;
}

.btn-login-nav:hover {
    background: #e6c200;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255,215,0,0.4);
}

/* Hero section */
.hero-section { padding-top: 76px; }

/* Slider */
.carousel-item { height: 520px; background: var(--color-dark); }
.carousel-item img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.carousel-caption { bottom: 30%; }
.carousel-caption h2 { font-size: 2.8rem; font-weight: 800; text-shadow: 2px 2px 8px rgba(0,0,0,0.7); }
.carousel-caption p { font-size: 1.2rem; text-shadow: 1px 1px 4px rgba(0,0,0,0.7); }

/* Sección institucional */
.section-title {
    position: relative;
    color: var(--color-dark);
    font-weight: 700;
    margin-bottom: 1rem;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    margin-top: 8px;
    border-radius: 2px;
}
.section-title.center::after { margin: 8px auto 0; }

.card-noticia {
    border: none;
    border-radius: 12px;
    box-shadow: 0 3px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    overflow: hidden;
}
.card-noticia:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}
.card-noticia .card-header {
    background: linear-gradient(135deg, var(--color-primary), #0d47a1);
    color: white;
    border: none;
}

/* Facebook iframe */
.fb-section { background: var(--color-light); }
.fb-wrapper {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

/* Footer */
.footer-main {
    background: linear-gradient(135deg, var(--color-dark) 0%, #0d47a1 100%);
    color: rgba(255,255,255,0.85);
    padding: 50px 0 20px;
}
.footer-main h5 { color: var(--color-secondary); font-weight: 700; }
.footer-main a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color 0.2s; }
.footer-main a:hover { color: var(--color-secondary); }
.footer-divider { border-color: rgba(255,255,255,0.15); }

/* ============================================================
   LOGIN
   ============================================================ */
.login-wrapper {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-primary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}
.login-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    animation: slideUp 0.5s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-logo { width: 100px; margin: 0 auto 20px; display: block; }
.login-title { color: var(--color-dark); font-weight: 700; font-size: 1.3rem; text-align: center; }
.login-subtitle { color: #888; font-size: 0.85rem; text-align: center; margin-bottom: 25px; }

/* ============================================================
   DASHBOARD (panel interno)
   ============================================================ */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--color-dark) 0%, #1565c0 100%);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    transition: transform 0.3s;
    z-index: 1000;
    box-shadow: 3px 0 15px rgba(0,0,0,0.2);
}

.sidebar-header {
    padding: 20px 15px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}
.sidebar-header img { width: 70px; border-radius: 50%; border: 3px solid var(--color-secondary); }
.sidebar-header .sidebar-avatar { width: 70px; height: 70px; border-radius: 50%; border: 3px solid var(--color-secondary); object-fit: cover; font-size: 1.8rem; }
.sidebar-header .sidebar-name { color: #fff; font-weight: 700; font-size: 0.85rem; margin-top: 8px; }
.sidebar-header .sidebar-role { color: var(--color-secondary); font-size: 0.75rem; }

.sidebar-menu { padding: 10px 0; list-style: none; margin: 0; }
.sidebar-menu .menu-section {
    color: rgba(255,255,255,0.4);
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 15px 20px 5px;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 11px 20px;
    transition: all 0.2s;
    font-size: 0.88rem;
    border-left: 3px solid transparent;
}
.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-left-color: var(--color-secondary);
}
.sidebar-menu a i { width: 20px; text-align: center; font-size: 1rem; }
.sidebar-menu .badge-menu {
    margin-left: auto;
    background: var(--color-secondary);
    color: var(--color-dark);
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 700;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: white;
    border-bottom: 2px solid #e9ecef;
    padding: 12px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 500;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.topbar-title { font-weight: 700; color: var(--color-dark); font-size: 1.1rem; }
.topbar-user { display: flex; align-items: center; gap: 10px; }
.topbar-user img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-primary); }
.topbar-user .topbar-avatar { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; border: 2px solid var(--color-primary); font-size: 0.95rem; }

.page-content { padding: 25px; flex: 1; }

/* Cards de estadísticas */
.stat-card {
    border: none;
    border-radius: 15px;
    padding: 22px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.12);
    transition: transform 0.3s;
}
.stat-card:hover { transform: translateY(-3px); }
.stat-card .icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 3.5rem;
    opacity: 0.2;
}
.stat-card .number { font-size: 2.2rem; font-weight: 800; }
.stat-card .label { font-size: 0.85rem; opacity: 0.9; }
.stat-blue { background: linear-gradient(135deg, #29ABE2, #1565c0); }
.stat-yellow { background: linear-gradient(135deg, #FFD700, #f57f17); }
.stat-green { background: linear-gradient(135deg, #28a745, #1b5e20); }
.stat-purple { background: linear-gradient(135deg, #9c27b0, #4a148c); }

/* Tablas */
.table-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.07);
    overflow: hidden;
    margin-bottom: 25px;
}
.table-card .card-header {
    background: linear-gradient(135deg, var(--color-primary), #1565c0);
    color: white;
    font-weight: 700;
    border: none;
    padding: 15px 20px;
}
.table thead th {
    background: #f8f9fa;
    border-top: none;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #666;
    letter-spacing: 0.5px;
}
.table tbody tr:hover { background: #f0f8ff; }

/* Botones */
.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #1565c0);
    border: none;
    border-radius: 8px;
    font-weight: 600;
}
.btn-primary:hover { background: linear-gradient(135deg, #1a9cd8, #0d47a1); }
.btn-warning {
    background: linear-gradient(135deg, var(--color-secondary), #f57f17);
    border: none;
    color: var(--color-dark);
    font-weight: 600;
}
.btn-icon { width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; font-size: 0.8rem; }

/* Formularios */
.form-control, .form-select {
    border-radius: 8px;
    border-color: #dee2e6;
    transition: all 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(41,171,226,0.15);
}
.form-label { font-weight: 600; font-size: 0.88rem; color: #555; }

/* Badge estado */
.badge-entregado { background: #d4edda; color: #155724; }
.badge-pendiente { background: #fff3cd; color: #856404; }
.badge-tarde { background: #f8d7da; color: #721c24; }
.badge-calificado { background: #d1ecf1; color: #0c5460; }

/* Foro */
.mensaje-foro {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border-left: 4px solid var(--color-primary);
}
.mensaje-foro.respuesta {
    margin-left: 40px;
    border-left-color: var(--color-secondary);
    background: #fffdf0;
}
.mensaje-autor { font-weight: 700; color: var(--color-dark); font-size: 0.9rem; }
.mensaje-fecha { font-size: 0.78rem; color: #999; }

/* Foro estilo chat (WhatsApp) */
.chat-thread { display: flex; flex-direction: column; gap: 14px; padding: 10px 6px; }
.chat-msg { display: flex; gap: 10px; align-items: flex-end; max-width: 80%; }
.chat-msg.own { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
    width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.15); font-size: 1rem;
}
.avatar-admin {
    display: inline-flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--color-dark), var(--color-primary)); color: #fff;
}
.chat-bubble {
    background: #fff; border-radius: 16px; padding: 9px 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-top-left-radius: 4px; min-width: 90px;
}
.chat-msg.own .chat-bubble {
    background: linear-gradient(135deg, var(--color-primary), #1f8fc4); color: #fff;
    border-top-left-radius: 16px; border-top-right-radius: 4px;
}
.chat-head { display: flex; align-items: center; gap: 6px; margin-bottom: 2px; flex-wrap: wrap; }
.chat-author { font-weight: 700; font-size: 0.82rem; color: var(--color-dark); }
.chat-msg.own .chat-author { color: #fff; }
.chat-text { margin: 0; font-size: 0.93rem; line-height: 1.45; word-break: break-word; }
.chat-text a { color: var(--color-primary); text-decoration: underline; }
.chat-msg.own .chat-text a { color: #fff; }
.chat-time { font-size: 0.7rem; color: #999; margin-top: 3px; display: block; text-align: right; }
.chat-msg.own .chat-time { color: rgba(255,255,255,0.85); }
.chat-actions { display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end; }
.chat-actions a, .chat-actions button {
    border: none; border-radius: 6px; padding: 2px 8px; font-size: 0.72rem; cursor: pointer;
    line-height: 1.6; background: rgba(0,0,0,0.06); color: #555; transition: background 0.15s;
}
.chat-actions a:hover, .chat-actions button:hover { background: rgba(0,0,0,0.12); }
.chat-msg.own .chat-actions a, .chat-msg.own .chat-actions button { background: rgba(255,255,255,0.25); color: #fff; }
.chat-msg.own .chat-actions a:hover, .chat-msg.own .chat-actions button:hover { background: rgba(255,255,255,0.4); }
.chat-edited { font-size: 0.66rem; font-style: italic; opacity: 0.75; }
@media (max-width: 768px) { .chat-msg { max-width: 92%; } }

/* Foro: temas / hilos */
.temas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tema-card {
    background: #fff; border-radius: 14px; padding: 16px 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07); border-left: 5px solid var(--color-primary);
    display: flex; flex-direction: column; gap: 8px; transition: transform 0.15s, box-shadow 0.15s;
}
.tema-card:hover { transform: translateY(-3px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); }
.tema-card-main { cursor: pointer; text-decoration: none; color: inherit; flex: 1; }
.tema-card-title { display: flex; align-items: center; gap: 9px; font-weight: 700; color: var(--color-dark); font-size: 1rem; }
.tema-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; }
.tema-meta { font-size: 0.76rem; color: #888; margin-top: 6px; display: flex; flex-wrap: wrap; gap: 10px; }
.tema-card-actions { display: flex; gap: 8px; border-top: 1px solid #f0f0f0; padding-top: 10px; }
.tema-card-actions a { font-size: 0.78rem; text-decoration: none; padding: 3px 10px; border-radius: 6px; }
.tema-color-presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tema-color-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; }
.tema-color-swatch:hover { transform: scale(1.1); }
.tema-header-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tema-header-bar .tema-dot { width: 18px; height: 18px; }

/* Foro: buscador y paginación de temas */
.temas-toolbar { display: flex; justify-content: flex-end; margin-bottom: 18px; }
.temas-search { position: relative; width: 100%; max-width: 360px; }
.temas-search i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #aaa; font-size: 0.9rem; pointer-events: none; }
.temas-search input {
    width: 100%; padding: 10px 16px 10px 40px; border: 1px solid #e3e6ea;
    border-radius: 30px; outline: none; font-size: 0.92rem; transition: border-color 0.15s, box-shadow 0.15s;
}
.temas-search input:focus { border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(41,171,226,0.15); }
.temas-no-results { text-align: center; color: #888; padding: 34px 10px; }
.temas-no-results i { font-size: 2rem; opacity: 0.4; display: block; margin-bottom: 8px; }
.temas-pagination { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 24px; flex-wrap: wrap; }
.tema-page-btn {
    min-width: 38px; height: 38px; padding: 0 11px; border: none; border-radius: 10px;
    background: #fff; color: var(--color-dark); font-weight: 600; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,0,0,0.07); transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    display: inline-flex; align-items: center; justify-content: center;
}
.tema-page-btn:hover:not(:disabled):not(.active) { background: var(--color-light); }
.tema-page-btn.active { background: linear-gradient(135deg, var(--color-primary), #1f8fc4); color: #fff; box-shadow: 0 4px 12px rgba(41,171,226,0.35); }
.tema-page-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.tema-page-ellipsis { min-width: 22px; text-align: center; color: #aaa; }

/* Botón flotante de WhatsApp (landing) */
.whatsapp-float {
    position: fixed; bottom: 24px; right: 24px; z-index: 1050;
    width: 60px; height: 60px; border-radius: 50%;
    background: #25D366; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 32px;
    text-decoration: none; box-shadow: 0 6px 20px rgba(37,211,102,0.5);
    transition: transform 0.2s, box-shadow 0.2s; animation: wa-pulse 2.5s infinite;
}
.whatsapp-float:hover { transform: scale(1.1); color: #fff; box-shadow: 0 8px 26px rgba(37,211,102,0.7); }
.whatsapp-float i { line-height: 1; }
@keyframes wa-pulse {
    0%   { box-shadow: 0 6px 20px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0.5); }
    70%  { box-shadow: 0 6px 20px rgba(37,211,102,0.5), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 6px 20px rgba(37,211,102,0.5), 0 0 0 0 rgba(37,211,102,0); }
}
@media (max-width: 576px) { .whatsapp-float { width: 54px; height: 54px; font-size: 28px; bottom: 18px; right: 18px; } }

/* Boletín */
.boletin-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.1);
}
.boletin-header { text-align: center; border-bottom: 3px solid var(--color-primary); padding-bottom: 20px; margin-bottom: 25px; }
.boletin-logo { width: 80px; }
.boletin-titulo { color: var(--color-dark); font-weight: 800; font-size: 1.5rem; }
.nota-alta { color: var(--color-success); font-weight: 700; }
.nota-media { color: #f57f17; font-weight: 700; }
.nota-baja { color: var(--color-danger); font-weight: 700; }

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

/* Tablets & below: sidebar collapses */
@media (max-width: 991px) {
    html, body {
        overflow-x: hidden;
        width: 100%;
    }
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 5px 0 30px rgba(0,0,0,0.4);
    }
    .sidebar.open::after {
        content: '';
        position: fixed;
        top: 0; left: 260px; right: 0; bottom: 0;
        background: rgba(0,0,0,0.45);
        z-index: -1;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        max-width: 100vw;
    }

    #sidebarToggle {
        width: 38px;
        height: 38px;
        padding: 0;
        flex-shrink: 0;
        background: var(--color-primary);
        color: white;
        border-radius: 8px;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
    }

    .topbar {
        padding: 8px 12px;
        gap: 10px;
    }
    .topbar-title {
        font-size: 0.92rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex: 1;
        min-width: 0;
    }
    .topbar-user span { display: none; }
    .page-content {
        padding: 15px;
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Mobile */
@media (max-width: 768px) {
    /* --- GLOBAL OVERFLOW FIX --- */
    *, *::before, *::after { max-width: 100vw; }
    .app-wrapper { max-width: 100vw; overflow-x: hidden; }
    .row { margin-left: 0; margin-right: 0; }
    .container, .container-fluid { padding-left: 12px; padding-right: 12px; }

    /* --- LANDING PAGE --- */
    .navbar-landing { padding: 0.3rem 0; }
    .navbar-landing .navbar-brand img { height: 36px; }
    .navbar-landing .navbar-brand span { font-size: 0.82rem; }
    .btn-login-nav { padding: 6px 14px !important; font-size: 0.82rem; margin-top: 8px; }
    .navbar-landing .navbar-collapse {
        background: linear-gradient(135deg, var(--color-dark), #0d47a1);
        border-radius: 12px;
        padding: 12px;
        margin-top: 8px;
    }
    .navbar-landing .navbar-nav { gap: 0 !important; }
    .navbar-landing .nav-link { padding: 8px 12px !important; border-radius: 8px; }

    /* Hero + Slider */
    .hero-section { padding-top: 56px; }
    .carousel-item { height: 260px; }
    .carousel-caption { bottom: 10%; padding: 0 20px; }
    .carousel-caption h2 { font-size: 1.2rem; }
    .carousel-caption p { font-size: 0.82rem; }

    /* Sections */
    .section-title { font-size: 1.2rem; }
    .fb-section iframe { height: 320px !important; }
    .footer-main { padding: 25px 0 12px; }

    /* --- DASHBOARD PANELS --- */

    /* Topbar */
    .topbar { padding: 8px 10px; gap: 6px; }
    .topbar-title { font-size: 0.82rem; }
    .topbar-title i { display: none; }
    .topbar-user img { width: 28px; height: 28px; }
    #sidebarToggle { width: 34px; height: 34px; font-size: 0.88rem; }

    /* Page content */
    .page-content { padding: 10px; }

    /* Stat cards — make sure 2 per row works */
    .stat-card {
        padding: 14px 12px;
        border-radius: 10px;
    }
    .stat-card .number { font-size: 1.5rem; }
    .stat-card .label { font-size: 0.7rem; }
    .stat-card .icon { font-size: 2rem; right: 8px; opacity: 0.15; }

    /* Tables */
    .table-card { border-radius: 8px; margin-bottom: 12px; overflow: hidden; }
    .table-card .card-header { padding: 10px 12px; font-size: 0.82rem; }
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table { font-size: 0.76rem; }
    .table th, .table td { padding: 6px 8px; white-space: nowrap; }

    /* Forms */
    .form-label { font-size: 0.8rem; }
    .form-control, .form-select { font-size: 0.85rem; padding: 6px 10px; }

    /* Buttons */
    .btn { font-size: 0.82rem; }

    /* Foro */
    .mensaje-foro { padding: 10px 12px; }
    .mensaje-foro.respuesta { margin-left: 15px; }

    /* Login page */
    .login-card { padding: 24px 18px; margin: 12px; }
    .login-logo { width: 75px; }
    .login-title { font-size: 1.1rem; }

    /* Boletín */
    .boletin-container { padding: 12px; border-radius: 8px; }
    .boletin-titulo { font-size: 1rem; }
    .avatar-lg { width: 65px; height: 65px; }

    /* Empty state */
    .empty-state { padding: 25px 10px; }
    .empty-state i { font-size: 2.5rem; }

    /* --- MODALS (notification + logout) --- */
    .notify-overlay, .logout-overlay {
        padding: 15px;
    }
    .notify-card, .logout-card {
        width: 100% !important;
        max-width: 340px !important;
    }
    .logout-card { padding: 28px 20px 22px; }
    .notify-body { padding: 10px 18px 8px; }
    .notify-footer { padding: 10px 18px 18px; }
    .notify-icon, .logout-icon { width: 60px; height: 60px; }
    .notify-icon i { font-size: 1.6rem; }
    .logout-icon i { font-size: 1.5rem; }
    .logout-title { font-size: 1.1rem; }
    .logout-msg { font-size: 0.85rem; margin-bottom: 18px; }
    .logout-actions { gap: 8px; }
    .logout-actions .btn-logout-confirm,
    .logout-actions .btn-logout-cancel { padding: 10px; font-size: 0.88rem; }
}

/* Small phones */
@media (max-width: 420px) {
    .hero-section { padding-top: 50px; }
    .carousel-item { height: 200px; }
    .carousel-caption h2 { font-size: 1rem; }
    .carousel-caption p { display: none; }

    .stat-card .number { font-size: 1.2rem; }
    .stat-card .label { font-size: 0.65rem; }
    .stat-card .icon { display: none; }
    .stat-card { padding: 10px; }

    .topbar-title { font-size: 0.75rem; }
    .page-content { padding: 8px; }

    .sidebar-header img { width: 50px; }
    .sidebar-header .sidebar-name { font-size: 0.75rem; }

    .notify-card, .logout-card { max-width: 290px !important; }
    .logout-title { font-size: 1rem; }
    .notify-title { font-size: 1rem; }
}

/* Utilidades */
.text-primary-custom { color: var(--color-primary) !important; }
.bg-primary-custom { background-color: var(--color-primary) !important; }
.border-primary-custom { border-color: var(--color-primary) !important; }
.avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.avatar-lg { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid var(--color-primary); }

.empty-state { text-align: center; padding: 50px 20px; }
.empty-state i { font-size: 4rem; color: #ddd; margin-bottom: 15px; }
.empty-state p { color: #aaa; font-size: 1rem; }

/* Alerts inline (contextual) */
.alert { border-radius: 10px; border: none; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger { background: #f8d7da; color: #721c24; }
.alert-warning { background: #fff3cd; color: #856404; }
.alert-info { background: #d1ecf1; color: #0c5460; }

/* ============================================================
   NOTIFICATION MODAL (Toast Modal System)
   ============================================================ */
.notify-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.notify-overlay.show {
    opacity: 1;
    visibility: visible;
}
.notify-card {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(255,255,255,0.1);
    text-align: center;
    overflow: hidden;
    transform: scale(0.7) translateY(30px);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.3s;
}
.notify-overlay.show .notify-card {
    transform: scale(1) translateY(0);
    opacity: 1;
}
.notify-overlay.hiding .notify-card {
    transform: scale(0.9) translateY(-10px);
    opacity: 0;
    transition: transform 0.25s ease-in, opacity 0.2s;
}

.notify-icon-wrap {
    padding: 30px 20px 10px;
}
.notify-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: white;
    position: relative;
    animation: notifyIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}
@keyframes notifyIconPop {
    from { transform: scale(0) rotate(-30deg); }
    to { transform: scale(1) rotate(0); }
}

.notify-icon-success { background: linear-gradient(135deg, #28a745, #20c997); box-shadow: 0 8px 25px rgba(40, 167, 69, 0.35); }
.notify-icon-danger  { background: linear-gradient(135deg, #dc3545, #e91e63); box-shadow: 0 8px 25px rgba(220, 53, 69, 0.35); }
.notify-icon-warning { background: linear-gradient(135deg, #ff9800, #f57c00); box-shadow: 0 8px 25px rgba(255, 152, 0, 0.35); }
.notify-icon-info    { background: linear-gradient(135deg, #29ABE2, #1565c0); box-shadow: 0 8px 25px rgba(41, 171, 226, 0.35); }

.notify-body {
    padding: 15px 30px 10px;
}
.notify-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1a2f4a;
    margin-bottom: 8px;
}
.notify-msg {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.notify-footer {
    padding: 15px 30px 25px;
}
.notify-btn {
    border: none;
    border-radius: 12px;
    padding: 12px 40px;
    font-size: 0.95rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    letter-spacing: 0.3px;
}
.notify-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}
.notify-btn:active { transform: translateY(0); }
.notify-btn-success { background: linear-gradient(135deg, #28a745, #20c997); }
.notify-btn-danger  { background: linear-gradient(135deg, #dc3545, #e91e63); }
.notify-btn-warning { background: linear-gradient(135deg, #ff9800, #f57c00); color: #1a2f4a; }
.notify-btn-info    { background: linear-gradient(135deg, #29ABE2, #1565c0); }

.notify-progress {
    height: 4px;
    background: #e9ecef;
    border-radius: 0 0 24px 24px;
    overflow: hidden;
}
.notify-progress-bar {
    height: 100%;
    border-radius: 0 0 24px 24px;
    transition: width linear;
}
.notify-progress-success { background: linear-gradient(90deg, #28a745, #20c997); }
.notify-progress-danger  { background: linear-gradient(90deg, #dc3545, #e91e63); }
.notify-progress-warning { background: linear-gradient(90deg, #ff9800, #f57c00); }
.notify-progress-info    { background: linear-gradient(90deg, #29ABE2, #1565c0); }

/* Perfil foto upload */
.foto-perfil-wrapper {
    position: relative;
    display: inline-block;
    cursor: pointer;
}
.foto-perfil-wrapper:hover::after {
    content: '\f030';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

/* Logout Modal */
.logout-overlay {
    position: fixed; inset: 0; z-index: 99999;
    background: rgba(15,23,42,0.6); backdrop-filter: blur(8px);
    display: none; align-items: center; justify-content: center;
}
.logout-overlay.show { display: flex; }
.logout-card {
    background: #fff; border-radius: 24px; padding: 40px 36px 32px;
    width: 90%; max-width: 400px; text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,0.3);
    animation: logoutIn 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes logoutIn {
    from { transform: scale(0.7) translateY(30px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes logoutOut {
    to { transform: scale(0.9) translateY(-10px); opacity: 0; }
}
.logout-overlay.hiding .logout-card { animation: logoutOut 0.25s ease forwards; }
.logout-icon {
    width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 20px;
    background: linear-gradient(135deg, #ff9800, #f57c00);
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 30px rgba(255,152,0,0.35);
    animation: notifyIconPop 0.5s cubic-bezier(0.34,1.56,0.64,1) 0.15s both;
}
.logout-icon i { color: #fff; font-size: 2rem; }
.logout-title { font-size: 1.35rem; font-weight: 800; color: #1a2f4a; margin-bottom: 8px; }
.logout-msg { color: #64748b; font-size: 0.95rem; margin-bottom: 28px; }
.logout-actions { display: flex; gap: 12px; }
.logout-actions .btn-logout-confirm {
    flex: 1; padding: 12px; border: none; border-radius: 14px; font-weight: 700;
    font-size: 0.95rem; cursor: pointer; transition: all 0.2s;
    background: linear-gradient(135deg, #dc3545, #b71c1c); color: #fff;
}
.logout-actions .btn-logout-confirm:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(220,53,69,0.4); }
.logout-actions .btn-logout-cancel {
    flex: 1; padding: 12px; border: 2px solid #e2e8f0; border-radius: 14px;
    font-weight: 700; font-size: 0.95rem; cursor: pointer; background: #fff; color: #64748b; transition: all 0.2s;
}
.logout-actions .btn-logout-cancel:hover { background: #f8fafc; border-color: #cbd5e1; }

/* Animaciones */
.fade-in { animation: fadeIn 0.4s ease; }
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ============================================================
   NOTIFICATION BELL & PANEL
   ============================================================ */
.notif-bell-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--color-dark);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.notif-bell-btn:hover {
    background: rgba(41, 171, 226, 0.1);
    color: var(--color-primary);
}
.notif-bell-btn.has-notif i {
    animation: bellRing 2s ease infinite;
}
@keyframes bellRing {
    0%, 80%, 100% { transform: rotate(0); }
    85% { transform: rotate(12deg); }
    90% { transform: rotate(-12deg); }
    95% { transform: rotate(6deg); }
}
.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--color-danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid white;
    animation: badgePop 0.3s ease;
}
@keyframes badgePop {
    0% { transform: scale(0); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Panel overlay */
.notif-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.notif-panel-overlay.open { opacity: 1; visibility: visible; }

/* Panel */
.notif-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 380px;
    max-width: 92vw;
    height: 100vh;
    background: #fff;
    box-shadow: -5px 0 30px rgba(0,0,0,0.15);
    z-index: 1100;
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.notif-panel.open { right: 0; }

.notif-panel-header {
    padding: 18px 20px;
    background: linear-gradient(135deg, var(--color-dark), #1565c0);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.notif-panel-title { font-weight: 700; font-size: 1.1rem; }
.notif-panel-actions { display: flex; gap: 8px; }
.notif-action-btn {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.notif-action-btn:hover { background: rgba(255,255,255,0.3); }

.notif-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}
.notif-panel-footer {
    padding: 10px 20px;
    text-align: center;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}

/* Notification items */
.notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 18px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: all 0.3s;
    align-items: flex-start;
}
.notif-item:hover { background: #f8fafc; }
.notif-item.notif-unread {
    background: linear-gradient(90deg, #eff6ff, #fff);
    border-left: 3px solid var(--color-primary);
}
.notif-item-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.notif-item-icon.bg-primary { background: var(--color-primary); }
.notif-item-icon.bg-success { background: var(--color-success); }
.notif-item-icon.bg-danger { background: var(--color-danger); }
.notif-item-icon.bg-warning { background: #ff9800; }
.notif-item-icon.bg-info { background: #17a2b8; }
.notif-item-icon.bg-purple { background: #9c27b0; }

.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-weight: 700; font-size: 0.82rem; color: var(--color-dark); margin-bottom: 2px; }
.notif-item-msg { font-size: 0.78rem; color: #64748b; line-height: 1.4; word-break: break-word; }
.notif-item-time { font-size: 0.7rem; color: #94a3b8; margin-top: 4px; }

.notif-item-actions {
    display: flex;
    flex-direction: column;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}
.notif-item:hover .notif-item-actions { opacity: 1; }
.notif-mark-read, .notif-delete {
    background: none;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    transition: all 0.2s;
}
.notif-mark-read { color: var(--color-success); }
.notif-mark-read:hover { background: #d4edda; }
.notif-delete { color: var(--color-danger); }
.notif-delete:hover { background: #f8d7da; }

/* Empty & loading states */
.notif-empty, .notif-loading {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}
.notif-empty i { font-size: 2.5rem; margin-bottom: 12px; display: block; }
.notif-empty p { font-size: 0.9rem; margin: 0; }
.notif-loading i { font-size: 1.5rem; }

/* Mobile responsive for notification panel */
@media (max-width: 480px) {
    .notif-panel { width: 100vw; max-width: 100vw; }
}
