/* ===== ESTILOS GENERALES ===== */

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000;
    overflow-x: hidden;
    background-color: #fff;
    margin: 0;
    padding: 0;
}

/* Ajuste para el contenido principal */
main {
    margin-top: 112px;
    min-height: calc(100vh - 112px);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    margin: 0;
    padding: 0;
}

/* Estilos para las notificaciones */
.notification {
    position: fixed;
    top: 140px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    max-width: 300px;
    fontSize: 14px;
    font-weight: 500;
    color: white;
}

.notification-success {
    background: #000;
    color: #FFD700;
}

.notification-error {
    background: #FFD700;
    color: #000;
}

.notification-info {
    background: #000;
    color: #fff;
}

.notification-warning {
    background: #FFD700;
    color: #000;
}

/* ===== MENSAJE DE LOGOUT EXITOSO ===== */
.logout-success-message {
    position: fixed;
    top: 170px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    z-index: 10000;
    animation: slideInDown 0.5s ease;
    max-width: 500px;
    width: 90%;
}

.logout-success-message .message-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
}

.logout-success-message i {
    font-size: 1.2rem;
    color: #fff;
}

.logout-success-message .close-message {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: auto;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.logout-success-message .close-message:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ===== MENSAJE DE ERROR DE ACCESO ===== */
.error-message {
    position: fixed;
    top: 170px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
    z-index: 10000;
    animation: slideInDown 0.5s ease;
    max-width: 500px;
    width: 90%;
}

.error-message .message-content {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 0.95rem;
}

.error-message i {
    font-size: 1.2rem;
    color: #fff;
}

.error-message .close-message {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    margin-left: auto;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.error-message .close-message:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* ===== ANIMACIONES PARA MENSAJES ===== */
@keyframes slideInDown {
    from {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }
    to {
        transform: translateX(-50%) translateY(-100%);
        opacity: 0;
    }
}

.logout-success-message.hide,
.error-message.hide {
    animation: slideOutUp 0.5s ease forwards;
}

/* Contenedores generales - Mejorado para diferentes pantallas */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Contenedores específicos para diferentes resoluciones */
.container-fluid {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 30px;
}

.container-narrow {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

/* Títulos y textos */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 20px;
    color: #000;
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Botones generales */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #FFD700, #FFC000);
    color: #000;
    font-weight: 700;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 215, 0, 0.4);
    background: linear-gradient(135deg, #FFC000, #FFD700);
}

.btn-secondary {
    background: transparent;
    color: #000;
    border: 2px solid #FFD700;
}

.btn-secondary:hover {
    background: #FFD700;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.3);
}

.btn-dark {
    background: #000;
    color: #fff;
    border: 2px solid #000;
}

.btn-dark:hover {
    background: #333;
    color: #fff;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Grids y layouts - Sistema responsive mejorado */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Grids específicos para diferentes pantallas */
.grid-responsive-2-4 {
    display: grid;
    gap: 30px;
    grid-template-columns: repeat(2, 1fr);
}

.grid-responsive-3-6 {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(3, 1fr);
}

/* Flexbox utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-column {
    flex-direction: column;
}

/* Cards */
.card {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Imágenes responsivas */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Enlaces */
a {
    color: #000;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #FFD700;
}

/* Formularios */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #FFD700;
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

/* Utilidades */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Clases de animación */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

/* Loader */
.loader {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }

    .grid {
        gap: 20px;
    }

    .card {
        padding: 20px;
    }

    .btn {
        padding: 10px 25px;
        font-size: 0.95rem;
    }
}

@media screen and (max-width: 480px) {
    .section-title {
        font-size: 1.8rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .card {
        padding: 15px;
    }

    .btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

/* Estados de carga y errores */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.error {
    border-color: #e74c3c !important;
    background-color: #fdf2f2;
}

.success {
    border-color: #27ae60 !important;
    background-color: #f2fdf5;
}

/* Accesibilidad */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus visible para navegación por teclado */
.nav-link:focus-visible,
.btn:focus-visible,
.form-input:focus-visible {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}
