body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #EEEDE8;
    color: #333;
}
header {
    background-color: #0D0D0D;
    color: white;
    padding: 10px;
    text-align: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    backdrop-filter: blur(10px);
    z-index: 999;
}

.logo {
    height: 80px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}
.menu-toggle {
    display: none;
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}
nav {
    background-color: #0D0D0D;
    padding: 10px;
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 999;
}
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    text-align: center;
}
nav ul li {
    display: inline-block;
    margin: 0 10px;
}
nav ul li a {
    color: white;
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}
nav ul li a:hover {

}
nav ul li a .nav-icon {
    font-size: 1.1em;
    display: inline-block;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-toggle .dropdown-arrow {
    display: inline-block;
    font-size: 0.7em;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.dropdown-toggle:hover .dropdown-arrow,
.dropdown.active .dropdown-toggle .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    background-color: #1a1a1a;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    z-index: 10000;
    list-style: none;
    margin: 0;
    padding: 8px 0;
    top: 100%;
    left: 0;
    border-radius: 4px;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu li a {
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
}

.dropdown-menu li a:hover {
    background-color: rgba(13,13,13,0.85);
    transform: none;
}

.dropdown-menu li a .nav-icon {
    font-size: 1em;
}

/* Estilos para submenús de claustro */
.dropdown-claustro {
    position: relative;
    margin: 0;
    padding: 0;
}

.dropdown-claustro-toggle {
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    font-size: inherit;
}

.dropdown-claustro-toggle:hover {
    background-color: rgba(13,13,13,0.85);
}

.dropdown-submenu {
    display: none;
    position: absolute;
    background-color: #111111;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
    list-style: none;
    margin: 0;
    padding: 8px 0;
    top: 100%;
    left: 0;
    border-radius: 4px;
    overflow: visible;
    z-index: 10002;
    backdrop-filter: blur(10px);
}

/* Mostrar submenu con hover o clase active */
/* hover removido — solo click */
.dropdown-claustro-DISABLED > .dropdown-submenu {
    display: block;
}

.dropdown-claustro.active > .dropdown-submenu {
    display: block;
}

.dropdown-submenu li {
    margin: 0;
    padding: 0;
}

.dropdown-submenu li a {
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.dropdown-submenu li a:hover {
    background-color: rgba(13,13,13,0.85);
}

.dropdown-claustro-toggle .dropdown-arrow {
    margin-left: auto;
    font-size: 0.7em;
    transition: transform 0.2s ease;
}

.dropdown-claustro.active .dropdown-claustro-toggle .dropdown-arrow {
    transform: rotate(90deg);
}

.dropdown-menu li a.disabled {
    color: #999;
    cursor: not-allowed;
    padding: 10px 20px;
    display: block;
}

.dropdown-menu li a.disabled:hover {
    background-color: transparent;
}

.container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 100%;
}
.main-content {
    flex: 3;
    padding-right: 20px;
    min-width: 0; /* Permite que flex shrink funcione correctamente */
}
.sidebar {
    flex: 1;
    background-color: #DEDBD6;
    padding: 20px;
    min-width: 200px;
}
.sidebar h3 {
    margin-top: 0;
}
.sidebar ul {
    list-style-type: none;
    padding: 0;
}
.sidebar ul li {
    margin-bottom: 10px;
}
.sidebar ul li a {
    color: #DD652E;
    text-decoration: none;
}
.news-item {
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.news-item h3 {
    color: #333;
}
.news-card {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 18px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    align-items: flex-start;
    width: 100%;
    overflow: hidden; /* Prevenir que el contenido se expanda fuera */
}
.news-card img {
    width: 250px;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}
.news-card .news-content {
    flex: 1;
    min-width: 0; /* Permite que el contenido se ajuste correctamente */
    overflow: hidden; /* Prevenir desbordamiento */
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.news-card h3 {
    margin: 0 0 8px 0;
    font-size: 1.3rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.news-card .news-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 12px;
    white-space: normal;
}
.news-card p.excerpt {
    margin: 0;
    color: #333;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.5;
}

/* Carrusel de Fotos */
.carousel-container {
    margin-bottom: 40px;
}

.carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.carousel-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
    flex-shrink: 0;
}

.carousel-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.carousel-slides {
    flex: 1;
    overflow: hidden;
    border-radius: 8px;
    min-height: 300px;
    position: relative;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    width: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f0f0;
    position: relative;
    overflow: hidden;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.carousel-slide:hover img {
    transform: scale(1.05);
}

.carousel-slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    color: white;
    padding: 20px;
    padding-bottom: 30px;
}

.carousel-slide-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.carousel-slide-date {
    font-size: 0.9rem;
    color: #ddd;
    margin: 0;
}

.carousel-dots {
    text-align: center;
    padding: 15px 0 0 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    padding: 0;
}

.carousel-dot.active {
    background: #667eea;
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: #764ba2;
}

/* Página de Detalle de Noticia */
.news-detail {
    width: 100%;
}

.news-detail-image {
    margin-bottom: 30px;
    width: 100%;
    max-width: 100%;
}

.news-detail-img {
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-detail-no-image {
    width: 100%;
    height: 300px;
    background-color: #f0f0f0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #ccc;
    margin-bottom: 30px;
}

.news-detail-content {
    width: 100%;
}

.news-detail-content h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-detail-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.news-date {
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
}

.news-body {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 30px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.news-body p {
    margin-bottom: 20px;
    text-align: justify;
}

.btn-back {
    display: inline-block;
    padding: 12px 24px;
    background-color: #DD652E;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-back:hover {
    background-color: #0056b3;
}

.badge {
    display: inline-block;
    background: #007bff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    margin-right: 6px;
}
.news-list-wrapper {
    margin-bottom: 20px;
}
.admin-section {
    background-color: #f9f9f9;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    border: 1px solid #ddd;
}
.admin-section h2 {
    margin-top: 0;
}
.admin-section form {
    display: flex;
    flex-direction: column;
}
.admin-section input, .admin-section textarea, .admin-section button {
    margin-bottom: 10px;
    padding: 8px;
}
.admin-section button {
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
}
.login-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: center;
}
.login-modal.show {
    display: flex;
}
.login-form {
    background-color: white;
    padding: 20px;
    border-radius: 5px;
    width: 300px;
    text-align: center;
}
.login-form input {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
}
.login-form button {
    width: 100%;
    padding: 8px;
    background-color: #DD652E;
    color: white;
    border: none;
    cursor: pointer;
}
.error {
    color: red;
    margin-top: 10px;
}

/* Estilos para el modal de login personalizado */
.login-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.login-modal-box {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    width: 350px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.login-modal-box h2 {
    margin: 0 0 20px 0;
    text-align: center;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #DD652E;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.login-error {
    color: red;
    margin-bottom: 15px;
    font-size: 13px;
    text-align: center;
}

.login-btn {
    width: 100%;
    padding: 10px;
    background-color: #DD652E;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 8px;
}

.login-btn:hover {
    background-color: #0056b3;
}

.login-cancel-btn {
    width: 100%;
    padding: 10px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
}

.login-cancel-btn:hover {
    background-color: #545b62;
}

footer {
    background-color: #0D0D0D;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
    backdrop-filter: blur(10px);
}

/* Responsive del Carrusel */
@media (max-width: 1024px) {
    .carousel-slide {
        min-height: 250px;
    }

    .carousel-slide-title {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .carousel-wrapper {
        gap: 10px;
        padding: 15px;
    }

    .carousel-slide {
        min-height: 200px;
    }

    .carousel-slide-title {
        font-size: 1rem;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .carousel-wrapper {
        gap: 8px;
        padding: 10px;
    }

    .carousel-slide {
        min-height: 150px;
    }

    .carousel-slide-overlay {
        padding: 12px;
        padding-bottom: 15px;
    }

    .carousel-slide-title {
        font-size: 0.9rem;
    }

    .carousel-slide-date {
        font-size: 0.75rem;
    }

    .carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }

    .carousel-dots {
        padding: 10px 0 0 0;
        gap: 6px;
    }

    .carousel-dot {
        width: 10px;
        height: 10px;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 15px;
    }

    .main-content {
        padding-right: 15px;
    }

    .news-card {
        flex-direction: column;
    }

    .news-card img {
        width: 100%;
        height: auto;
        max-height: 250px;
    }
}

@media (max-width: 768px) {
    .container {
        flex-direction: column;
        margin: 10px auto;
        padding: 10px;
    }

    .main-content {
        flex: 1;
        padding-right: 0;
        margin-bottom: 20px;
    }

    .sidebar {
        flex: 1;
        min-width: auto;
    }

    nav ul li {
        display: block;
        margin: 10px 0;
    }

    .news-card {
        flex-direction: column;
        padding: 12px;
        margin-bottom: 15px;
    }

    .news-card img {
        width: 100%;
        height: auto;
        max-height: 250px;
    }

    .news-card h3 {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 14px;
    }

    header {
        padding: 15px 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    .container {
        padding: 8px;
    }

    .news-card {
        padding: 10px;
        gap: 10px;
    }

    .news-card img {
        max-height: 200px;
    }

    .news-card h3 {
        font-size: 1rem;
    }

    .news-card .news-meta {
        font-size: 0.8rem;
    }

    .badge {
        font-size: 0.65rem;
        padding: 2px 6px;
    }

    .news-detail-content h1 {
        font-size: 1.5rem;
    }

    .news-body {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .btn-back {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
}/* Admin Dashboard Styles */

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

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

header {
    background: #0D0D0D;
    color: white;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
}

/* Admin header layout */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    gap: 16px;
    flex-wrap: nowrap;
}

.admin-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.admin-header-left .logo {
    height: 50px;
    flex-shrink: 0;
}

.admin-header-title h1 {
    font-size: 1.3rem;
    margin: 0;
    font-weight: 700;
    white-space: nowrap;
}

.admin-header-title .subtitle {
    font-size: 0.78rem;
    opacity: 0.75;
    margin: 0;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.admin-header-user {
    text-align: right;
    line-height: 1.3;
}

.admin-header-username {
    font-weight: 600;
    color: white;
    font-size: 0.9rem;
    white-space: nowrap;
}

.admin-header-userrole {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.7);
}

.btn-logout {
    padding: 7px 14px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background 0.2s;
    flex-shrink: 0;
}

.btn-logout:hover { background: #c0392b; }

.menu-toggle-admin {
    display: none;
    background: none;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 6px;
    color: white;
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    flex-shrink: 0;
    transition: border-color 0.2s;
}

.menu-toggle-admin:hover {
    border-color: rgba(255,255,255,0.8);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 8px;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    gap: 0;
    min-height: calc(100vh - 150px);
}

/* Sidebar */
.dashboard-sidebar {
    width: 250px;
    background-color: white;
    border-right: 1px solid #e1e4e8;
    padding: 30px 0;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
}

.dashboard-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    font-weight: 500;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: white;
}

.nav-item.active {
    background-color: white;
    color: #667eea;
    border-left-color: #667eea;
}

.nav-icon {
    font-size: 1.3rem;
}

/* Content Area */
.dashboard-content {
    flex: 1;
    padding: 30px;
    background-color: #f5f7fa;
}

.dashboard-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dashboard-section.active {
    display: block;
}

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

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 1.8rem;
    color: #333;
}

/* Buttons */
.btn {
    padding: 10px 18px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5568d3;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.3);
}

.btn-success {
    background-color: #48bb78;
    color: white;
}

.btn-success:hover {
    background-color: #38a169;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(72, 187, 120, 0.3);
}

.btn-danger {
    background-color: #f56565;
    color: white;
    padding: 8px 14px;
    font-size: 0.85rem;
}

.btn-danger:hover {
    background-color: #e53e3e;
}

.btn-secondary {
    background-color: #cbd5e0;
    color: #333;
}

.btn-secondary:hover {
    background-color: #a0aec0;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1rem;
}

.btn-edit {
    background-color: #4299e1;
    color: white;
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-edit:hover {
    background-color: #3182ce;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e1e4e8;
}

.modal-header h3 {
    font-size: 1.5rem;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-form {
    padding: 20px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
}

.form-group input[type="text"]:focus,
.form-group input[type="date"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
}

/* File Input */
.file-input-wrapper {
    position: relative;
    margin-bottom: 10px;
}

.file-input {
    display: none;
}

.file-label {
    display: block;
    padding: 12px 16px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
    background-color: #f9fafb;
    font-weight: 600;
    color: #667eea;
}

.file-label:hover {
    border-color: #667eea;
    background-color: #f0f3f7;
}

.file-name {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}

.image-preview {
    margin-top: 15px;
    text-align: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    justify-content: flex-end;
}

.form-actions button {
    flex: 1;
}

/* Table */
.table-wrapper {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.noticias-table {
    width: 100%;
    border-collapse: collapse;
}

.noticias-table thead {
    background-color: #f7fafc;
    border-bottom: 2px solid #e1e4e8;
}

.noticias-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.noticias-table td {
    padding: 15px;
    border-bottom: 1px solid #e1e4e8;
    color: #555;
}

.noticias-table tbody tr:hover {
    background-color: #f9fafb;
}

.noticias-table tbody tr:last-child td {
    border-bottom: none;
}

.tabla-imagen {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
}

.tabla-imagen.no-image {
    background-color: #e1e4e8;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 2rem;
}

.tabla-titulo {
    font-weight: 600;
    color: #333;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabla-descripcion {
    color: #999;
    font-size: 0.9rem;
    max-width: 250px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tabla-acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.text-center {
    text-align: center;
    color: #999;
}

/* Galería */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.galeria-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.galeria-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.galeria-img-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background-color: #f0f0f0;
}

.galeria-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.galeria-item:hover .galeria-img {
    transform: scale(1.05);
}

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.galeria-item:hover .galeria-overlay {
    opacity: 1;
}

.btn-galeria-delete {
    background-color: #f56565;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-galeria-delete:hover {
    background-color: #e53e3e;
}

.galeria-info {
    padding: 12px;
    background: white;
}

.galeria-titulo {
    margin: 0 0 4px 0;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.galeria-fecha {
    margin: 0;
    color: #999;
    font-size: 0.8rem;
}

.modal-foto-content {
    max-width: 500px;
}


@media (max-width: 768px) {
    .menu-toggle-admin {
        display: block;
    }

    .admin-header-user {
        display: none;
    }

    .admin-header-title .subtitle {
        display: none;
    }

    .dashboard-container {
        flex-direction: column;
    }

    .dashboard-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e1e4e8;
        padding: 15px 0;
        display: none;
        position: static;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

    .dashboard-sidebar.active {
        display: block;
    }

    .dashboard-nav {
        flex-direction: column;
        gap: 0;
        overflow-x: auto;
    }

    .nav-item {
        flex-shrink: 0;
        border-left: 4px solid transparent;
        border-bottom: none;
        padding: 12px 20px;
        border-top: 1px solid #f0f3f7;
    }

    .nav-item.active {
        border-left-color: #667eea;
        border-bottom: none;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .btn-primary {
        width: 100%;
    }

    .noticias-table {
        font-size: 0.85rem;
    }

    .noticias-table th,
    .noticias-table td {
        padding: 10px;
    }

    .tabla-imagen {
        width: 40px;
        height: 40px;
    }

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

    .tabla-acciones .btn {
        width: 100%;
    }
}

/* Menú Mobile */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        width: 100%;
        background-color: #0D0D0D;
        padding: 0;
        border-radius: 0;
    }

    nav.active {
        display: block;
    }

    nav ul {
        flex-direction: column;
        padding: 10px 0;
    }

    nav ul li {
        display: block;
        margin: 0;
        border-bottom: 1px solid #444;
    }

    nav ul li:last-child {
        border-bottom: none;
    }

    nav ul li a {
        padding: 12px 15px;
        border-radius: 0;
        justify-content: flex-start;
        font-size: 0.95rem;
    }

    nav ul li a:hover {
        
    }

    .dropdown-menu {
        position: static;
        display: none;
        background-color: #1a1a1a;
        box-shadow: none;
        border-top: 1px solid #333;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li a {
        padding: 10px 15px 10px 35px;
        background-color: #222;
    }

    .dropdown-menu li a:hover {
        background-color: #111;
    }
}
/* ===== CONFIGURATION STYLES ===== */
.config-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.config-card h3 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #DD652E;
    padding-bottom: 10px;
}

.config-description {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 15px;
}

.checkbox-input {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.form-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #DD652E;
    box-shadow: 0 0 5px rgba(221,101,46,0.4);
}

.message {
    padding: 12px 15px;
    border-radius: 4px;
    border-left: 4px solid #ddd;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border-left-color: #28a745;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border-left-color: #dc3545;
}

/* Student Links Styles */
.student-link-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.student-link-content {
    flex: 1;
}

.student-link-content h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #333;
}

.student-link-content a {
    color: #DD652E;
    text-decoration: none;
    font-size: 0.9rem;
    word-break: break-all;
}

.student-link-content a:hover {
    text-decoration: underline;
}

.student-link-icon {
    font-size: 1.5rem;
}

.student-link-actions {
    display: flex;
    gap: 8px;
}

.student-link-actions button {
    padding: 6px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}
/* ═══════════════════════════════════════════════════════════════
   TABLAS COMPARTIDAS — reemplaza el bloque que agregaste antes
═══════════════════════════════════════════════════════════════ */

/* Acciones en tabla — DEBE estar fuera del @media para funcionar en desktop */
.tabla-acciones {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* Botón Editar */
.btn-edit {
    background-color: #4299e1;
    color: white;
    padding: 8px 14px;
    font-size: 0.85rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-edit:hover {
    background-color: #3182ce;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(66, 153, 225, 0.35);
}

/* Botón Eliminar — asegurar mismo tamaño que Editar */
.tabla-acciones .btn-danger {
    padding: 8px 14px;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

/* Tablas compartidas */
.autoridades-table,
.documentos-table,
.carreras-table,
.mensajes-table {
    width: 100%;
    border-collapse: collapse;
}

.autoridades-table thead,
.documentos-table thead,
.carreras-table thead,
.mensajes-table thead {
    background-color: #f7fafc;
    border-bottom: 2px solid #e1e4e8;
}

.autoridades-table th,
.documentos-table th,
.carreras-table th,
.mensajes-table th {
    padding: 15px;
    text-align: left;
    font-weight: 700;
    color: #333;
    font-size: 0.95rem;
}

.autoridades-table td,
.documentos-table td,
.carreras-table td,
.mensajes-table td {
    padding: 15px;
    border-bottom: 1px solid #e1e4e8;
    color: #555;
    vertical-align: middle;
}

.autoridades-table tbody tr:hover,
.documentos-table tbody tr:hover,
.carreras-table tbody tr:hover,
.mensajes-table tbody tr:hover {
    background-color: #f9fafb;
}

.autoridades-table tbody tr:last-child td,
.documentos-table tbody tr:last-child td,
.carreras-table tbody tr:last-child td,
.mensajes-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge estados mensajes */
.badge.leido {
    background-color: #e2e8f0;
    color: #718096;
}

.badge.no-leido {
    background-color: #ebf8ff;
    color: #2b6cb0;
    font-weight: 700;
}
/* Ocultar iconos del nav público */
nav ul li a .nav-icon {
    display: none;
}

/* ═══════════════════════════════════════════════════════════════
   CARRERAS PAGE
═══════════════════════════════════════════════════════════════ */
.carreras-container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.carreras-container h2 {
    border-bottom: 3px solid #DD652E;
    padding-bottom: 10px;
    margin-bottom: 30px;
    color: #333;
    text-align: center;
    font-size: 2rem;
}
.carreras-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 20px;
}
.carrera-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 5px solid #DD652E;
    display: flex;
    flex-direction: column;
}
.carrera-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 24px rgba(221,101,46,0.2);
}
.carrera-header {
    background: linear-gradient(135deg, #0D0D0D, #3a3a3a);
    color: white;
    padding: 20px;
}
.carrera-header h3 {
    margin: 0 0 8px 0;
    font-size: 1.4rem;
}
.carrera-code {
    background: rgba(255,255,255,0.2);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    font-family: monospace;
}
.carrera-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.carrera-description {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}
.carrera-duration {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(221,101,46,0.07);
    border-radius: 8px;
    color: #DD652E;
    font-weight: bold;
    font-size: 0.95rem;
}
.carrera-duration-icon { font-size: 1.2rem; }
.empty-message { text-align: center; padding: 60px 20px; color: #999; }
.empty-message-icon { font-size: 4rem; margin-bottom: 20px; }
@media (max-width: 768px) {
    .carreras-grid { grid-template-columns: 1fr; }
    .carreras-container { padding: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   AUTORIDADES PAGE
═══════════════════════════════════════════════════════════════ */
.autoridades-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}
.autoridades-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.autoridad-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.autoridad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}
.autoridad-foto {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    background: #DEDBD6;
    display: flex;
    align-items: center;
    justify-content: center;
}
.autoridad-foto img { width: 100%; height: 100%; object-fit: cover; }
.autoridad-foto-placeholder { font-size: 3rem; }
.autoridad-info h3 { margin: 0 0 6px 0; font-size: 1.1rem; color: #0D0D0D; }
.autoridad-cargo { color: #666; font-size: 0.9rem; margin-bottom: 10px; }
.autoridad-contacto { display: flex; flex-direction: column; gap: 4px; font-size: 0.85rem; }
.autoridad-contacto a { color: #DD652E; text-decoration: none; }
.autoridad-contacto a:hover { text-decoration: underline; }
@media (max-width: 600px) {
    .autoridades-grid { grid-template-columns: 1fr; }
    .autoridad-foto { width: 90px; height: 90px; }
}

/* ═══════════════════════════════════════════════════════════════
   HELP GUIDE PAGE
═══════════════════════════════════════════════════════════════ */
.help-container {
    display: flex;
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    width: 100%;
}
.help-main { flex: 3; padding-right: 20px; min-width: 0; }
.help-sidebar { flex: 1; background-color: #DEDBD6; padding: 20px; min-width: 200px; }
.help-sidebar h3 { margin-top: 0; }
.help-sidebar ul { list-style-type: none; padding: 0; }
.help-sidebar ul li { margin-bottom: 10px; }
.help-sidebar ul li a { color: #DD652E; text-decoration: none; }
.category-section { margin-bottom: 40px; }
.category-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    border-bottom: 3px solid #DD652E;
    padding-bottom: 10px;
    color: #333;
}
.document-card {
    display: flex;
    gap: 20px;
    background: #fff;
    padding: 18px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    margin-bottom: 20px;
    align-items: flex-start;
    width: 100%;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    transition: box-shadow 0.2s, transform 0.2s;
}
.document-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.1); transform: translateY(-2px); }
.document-preview {
    width: 200px; height: 150px; background: #f5f5f5;
    border-radius: 6px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; border: 1px solid #e0e0e0;
}
.document-preview.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loadingShimmer 1.5s infinite;
}
@keyframes loadingShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
.document-preview canvas { max-width: 100%; max-height: 100%; object-fit: contain; }
.document-content { flex: 1; min-width: 0; overflow: hidden; word-wrap: break-word; overflow-wrap: break-word; }
.document-content h3 { margin: 0 0 8px 0; font-size: 1.3rem; word-wrap: break-word; color: #333; }
.document-content p {
    margin: 0 0 12px 0; color: #333; line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.95rem;
}
.document-meta { color: #666; font-size: 0.9rem; margin-bottom: 12px; }
.document-actions { display: flex; gap: 10px; margin-top: 10px; }
.btn-view, .btn-download {
    display: inline-block; padding: 8px 16px; border-radius: 4px;
    text-decoration: none; font-weight: bold; font-size: 0.9rem;
    transition: background 0.2s; border: none; cursor: pointer; white-space: nowrap;
}
.btn-view { background: #DD652E; color: white; }
.btn-view:hover { background: #c45520; }
.btn-download { background: #28a745; color: white; }
.btn-download:hover { background: #218838; }
.breadcrumb { margin: 20px auto; max-width: 1200px; padding: 0 20px; font-size: 0.9rem; }
.breadcrumb a { color: #DD652E; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { margin: 0 5px; }
.page-header { text-align: center; margin: 20px 0; padding: 20px; background: white; box-shadow: 0 0 10px rgba(0,0,0,0.1); }
.page-header h1 { margin: 0 0 10px 0; font-size: 2rem; color: #333; }
.page-header p { margin: 0; color: #666; font-size: 1rem; }
.empty { text-align: center; color: #999; padding: 40px; font-size: 1rem; }
@media (max-width: 768px) {
    .document-card { flex-direction: column; gap: 15px; }
    .document-preview { width: 100%; height: 200px; }
    .help-container { flex-direction: column; padding: 10px; }
    .help-main { padding-right: 0; }
    .help-sidebar { margin-top: 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN PAGE
═══════════════════════════════════════════════════════════════ */
body.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #0D0D0D;
}
.login-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    padding: 40px;
    width: 100%;
    max-width: 400px;
}
.login-header { text-align: center; margin-bottom: 30px; }
.login-header img { height: 80px; margin-bottom: 15px; }
.login-header h1 { color: #333; font-size: 24px; margin: 0; }
.login-header p { color: #666; margin-top: 5px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; color: #333; font-weight: 500; }
.form-group input {
    width: 100%; padding: 12px; border: 1px solid #ddd;
    border-radius: 5px; font-size: 14px;
    transition: border-color 0.3s; box-sizing: border-box;
}
.form-group input:focus {
    outline: none;
    border-color: #DD652E;
    box-shadow: 0 0 0 3px rgba(221,101,46,0.15);
}
.login-button {
    width: 100%; padding: 12px;
    background: #DD652E;
    color: white; border: none; border-radius: 5px;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(221,101,46,0.3);
    background: #c45520;
}
.login-button:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.login-spinner {
    display: inline-block; width: 20px; height: 20px;
    border: 3px solid rgba(255,255,255,.3); border-radius: 50%;
    border-top-color: white; animation: spin 1s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════
   TABLAS RESPONSIVAS EN MOBILE
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .autoridades-table,
    .documentos-table,
    .carreras-table,
    .mensajes-table,
    .noticias-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .tabla-acciones {
        flex-wrap: nowrap;
    }

    .tabla-acciones .btn,
    .tabla-acciones .btn-edit,
    .tabla-acciones .btn-danger {
        padding: 6px 10px;
        font-size: 0.8rem;
    }
}

.permissions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 10px;
}
@media (max-width: 768px) {
    .permissions-grid {
        grid-template-columns: 1fr;
    }
}

/* Tablas usuarios y roles */
.usuarios-table,
.roles-table {
    width: 100%;
    border-collapse: collapse;
}

.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .usuarios-table,
    .roles-table {
        white-space: nowrap;
    }

    /* Modal de roles ocupa todo el ancho en mobile */
    .modal-content {
        width: 95%;
        max-width: 95%;
        margin: 10px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Permisos en 1 columna ya cubierto por .permissions-grid */
}
