/* ==========================================
   ARCHIVO COMPARTIDO: NAVBAR Y FOOTER
   Estilos comunes para todas las páginas públicas
   ========================================== */

/* Variables globales */
:root {
    --primary-50: #f0f7ff;
    --primary-100: #e0effe;
    --primary-200: #b9dffe;
    --primary-300: #7cc7fd;
    --primary-400: #36adfa;
    --primary-500: #0c94eb;
    --primary-600: #6adcf5;
    --primary-700: #00b2e0;
    --primary-800: #005ea3;
    --primary-900: #0b436f;
    --primary-950: #072a4a;

    --white: #ffffff;
    --light: #f8fbfe;
    --dark: #1a1a2e;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --gradient: linear-gradient(135deg, var(--primary-600), var(--primary-800));
}

/* Estilos base */
html {
    font-size: 16px;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    background-color: var(--light);
    overflow-x: hidden;
    margin: 0;
    padding-top: 80px;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

main {
    padding-top: 0;
    min-height: calc(100vh - 80px);
}

/* ==========================================
   HEADER / NAVBAR
   ========================================== */

.main-header {
    width: 100%;
    height: 80px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 4px 20px rgba(0, 94, 163, 0.2);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    transition: var(--transition);
    flex-shrink: 0;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo-text {
    font-family: 'Kanit', sans-serif;
    font-size: 26px;
    font-weight: 600;
    color: var(--white);
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

/* Navegación */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    margin-left: 30px;
    gap: 5px;
}

.nav-link {
    color: var(--white);
    font-weight: 500;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--white);
    transition: var(--transition);
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 70%;
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.15);
    font-weight: 600;
}

/* Botones de autenticación */
.auth-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-buttons .btn {
    margin-left: 12px;
    border-radius: var(--border-radius);
    padding: 10px 24px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    z-index: 1;
    text-decoration: none;
}

.btn-login {
    border: 2px solid var(--white);
    color: var(--white);
    background: transparent;
}

.btn-login:hover {
    background-color: var(--white);
    color: var(--primary-800);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.btn-register {
    background: linear-gradient(135deg, var(--primary-400), var(--primary-600));
    color: var(--white);
    box-shadow: var(--box-shadow);
    border: none;
}

.btn-register:hover {
    background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 146, 235, 0.4);
    color: var(--white);
    text-decoration: none;
}

/* Menú Hamburguesa */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 5px;
    transition: var(--transition);
}

.mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn .fa-bars {
    font-size: 1.5rem;
    color: var(--white);
    transition: var(--transition);
}

.mobile-menu-btn.active .fa-bars {
    transform: rotate(90deg);
}

/* ==========================================
   FOOTER
   ========================================== */

footer, .mini-footer {
    background: linear-gradient(to right, #005ea3, #0b436f);
    color: white;
    padding: 1rem;
    text-align: center;
    margin-top: auto;
    width: 100%;
    position: relative;
    bottom: 0;
}

.mini-footer {
    background: #005ea3;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.footer-logo {
    height: 25px;
    filter: brightness(0) invert(1);
    margin-bottom: 0.5rem;
}

.footer-text {
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    margin: 0;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-right: 10px;
    color: var(--white);
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary-400);
    transform: translateY(-3px);
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
    color: rgba(255, 255, 255, 0.6);
}

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

@media (max-width: 1200px) {
    .main-header {
        padding: 0 1.5rem;
    }
}

@media (max-width: 992px) {
    .nav-links {
        margin-left: 15px;
    }

    .nav-link {
        padding: 8px 15px;
    }

    .auth-buttons .btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    body {
        padding-top: 80px;
    }

    .main-header {
        padding: 0 1rem;
        height: 80px;
    }

    .logo-text {
        font-size: 22px;
    }

    .mobile-menu-btn {
        display: block;
        color: var(--white);
        font-size: 1.5rem;
    }

    .main-nav {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(11, 67, 111, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        padding: 30px 0;
        transition: left 0.3s ease-in-out;
        z-index: 999;
        box-shadow: 0 0 30px rgba(0, 0, 0, 0.3);
    }

    .main-nav.active {
        left: 0;
    }

    .nav-links {
        flex-direction: column;
        width: 100%;
        margin: 0 0 30px 0;
        gap: 15px;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-link {
        width: 90%;
        max-width: 300px;
        padding: 15px 20px;
        margin: 0 auto;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: var(--border-radius);
        font-size: 1rem;
        font-weight: 500;
        display: block;
        text-align: center;
    }

    .nav-link:hover {
        background-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }

    .nav-link.active {
        background-color: rgba(255, 255, 255, 0.25);
        font-weight: 600;
    }

    .nav-link.active:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

    .auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 15px;
        align-items: center;
    }

    .auth-buttons .btn {
        width: 90%;
        max-width: 250px;
        margin: 0;
        text-align: center;
        padding: 12px 20px;
        font-size: 1rem;
        font-weight: 500;
        display: block;
    }

    .btn-login {
        background-color: rgba(255, 255, 255, 0.1);
        border: 2px solid var(--white);
    }

    .btn-login:hover {
        background-color: var(--white);
        color: var(--primary-800);
    }

    .btn-register {
        background: linear-gradient(135deg, var(--primary-400), var(--primary-600)) !important;
        border: none;
    }

    .btn-register:hover {
        background: linear-gradient(135deg, var(--primary-500), var(--primary-700)) !important;
        transform: translateY(-2px);
    }

    /* Evitar scroll del body cuando el menú está abierto */
    body.menu-open {
        overflow: hidden;
    }
}

@media (max-width: 576px) {
    .logo-text {
        font-size: 20px;
    }

    .main-header {
        padding: 0 0.75rem;
    }

    .nav-link {
        width: 95%;
        padding: 12px 15px;
        font-size: 0.95rem;
    }

    .auth-buttons .btn {
        width: 95%;
        padding: 10px 15px;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 70px;
    }

    .main-header {
        height: 70px;
        padding: 0 0.5rem;
    }

    .logo-text {
        font-size: 18px;
    }

    .main-nav {
        top: 70px;
        height: calc(100vh - 70px);
    }

    .mobile-menu-btn {
        width: 35px;
        height: 35px;
    }

    .mobile-menu-btn .fa-bars {
        font-size: 1.3rem;
    }
}

/* ==========================================
   UTILIDADES
   ========================================== */

.text-center {
    text-align: center;
}

.mt-auto {
    margin-top: auto;
}

.mb-0 {
    margin-bottom: 0;
}

/* Clase para evitar scroll cuando el menú móvil está abierto */
body.mobile-menu-open {
    overflow: hidden;
}

/* Animaciones mejoradas */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-link {
    animation: fadeIn 0.3s ease-out;
}

/* Mejoras de accesibilidad */
.mobile-menu-btn:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.nav-link:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.btn:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .main-header, 
    .mini-footer {
        display: none;
    }
    
    body {
        padding-top: 0;
    }
}