/* 1. Definición de Variables con nueva paleta Gris y Amarillo */
:root {
    --primary-color: #004a99;
    /* Azul base */
    --accent-color: #ffcc00;
    /* Amarillo Institucional */
    --bg-gray: #f2f2f2;
    /* Gris muy claro para fondo */
    --dark-gray: #333333;
    /* Gris oscuro para texto */
    --medium-gray: #7f8c8d;
    /* Gris medio para bordes/iconos */
    --white: #ffffff;

    --shadow-soft: 0 2px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 12px;
}

/* 2. Estilos para el Body y Layout */
body {
    font-family: 'Segoe UI', sans-serif;
    background-color: var(--bg-gray);
    color: var(--dark-gray);
}

/* ================================
   3. HEADER MEJORADO Y OPTIMIZADO
   ================================ */
.main-header {
    background-color: #ffffff;
    border-bottom: 3px solid #ffcc00;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 2000;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.main-header .navbar {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

/* Logo optimizado */
.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    min-width: 0;
}

.logo-img {
    height: 55px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    margin-left: 0.75rem;
    min-width: 0;
    overflow: hidden;
}

.logo-main {
    font-size: 1rem;
    font-weight: 600;
    color: #2d2d2d;
    letter-spacing: -0.3px;
    text-transform: capitalize;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.logo-sub {
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffcc00;
    text-transform: none;
    letter-spacing: 0.3px;
    margin-top: -2px;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* Links de navegación */
.nav-link-custom {
    color: #2d2d2d !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link-custom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: #ffcc00;
    transition: width 0.3s ease;
}

.nav-link-custom:hover {
    color: #ffcc00 !important;
}

.nav-link-custom:hover::after {
    width: 80%;
}

/* Dropdown mejorado */
.dropdown-custom {
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border: 1px solid #f0f0f0 !important;
}

.dropdown-item-custom {
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d2d2d;
    transition: all 0.3s ease;
}

.dropdown-item-custom i {
    margin-right: 0.5rem;
    color: #ffcc00;
    font-size: 0.9rem;
}

.dropdown-item-custom:hover {
    background: linear-gradient(135deg, #ffcc00 0%, #ffd633 100%);
    color: #2d2d2d;
    padding-left: 1.5rem;
}

/* Botón MI PANEL */
.btn-mi-panel {
    background: linear-gradient(135deg, #ffcc00 0%, #ffd633 100%);
    color: #2d2d2d;
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 204, 0, 0.3);
    border: none;
}

.btn-mi-panel:hover {
    background: linear-gradient(135deg, #2d2d2d 0%, #3d3d3d 100%);
    color: #ffcc00;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(45, 45, 45, 0.3);
}

.btn-mi-panel i {
    font-size: 1rem;
}

/* Navbar toggler personalizado */
.navbar-toggler {
    border: 2px solid #ffcc00;
    padding: 0.4rem 0.6rem;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 204, 0, 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23ffcc00' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Responsive header */
@media (max-width: 991px) {
    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem 0;
        border-top: 1px solid #f0f0f0;
    }
    
    .nav-link-custom {
        padding: 0.7rem 0 !important;
    }
    
    .nav-link-custom::after {
        display: none;
    }
    
    .btn-mi-panel {
        margin-top: 0.5rem;
        width: 100%;
        justify-content: center;
    }
    
    .dropdown-custom {
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
}

@media (max-width: 768px) {
    .logo-img {
        height: 40px;
        max-width: 110px;
    }
    .logo-text {
        margin-left: 0.5rem;
    }
    .logo-main {
        font-size: 0.92rem;
    }
    .logo-sub {
        font-size: 0.68rem;
    }
}

@media (max-width: 480px) {
    .navbar-brand {
        flex-direction: column;
        align-items: flex-start;
        min-width: 0;
    }
    .logo-img {
        height: 28px;
        max-width: 70vw;
        margin-right: 0;
        margin-bottom: 2px;
    }
    .logo-text {
        margin-left: 0;
        width: 100%;
        min-width: 0;
        text-align: left;
    }
    .logo-main {
        font-size: 0.82rem;
    }
    .logo-sub {
        font-size: 0.58rem;
    }
}

/* 4. Sidebar Estilo Moderno (Gris y Amarillo) */
.sidebar {
    background-color: var(--dark-gray);
    /* Fondo Gris Oscuro */
    color: var(--white);
    min-height: 100vh;
    padding: 25px 15px;
}

.sidebar a {
    color: #bdc3c7;
    /* Gris claro */
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    border-radius: var(--border-radius);
    margin-bottom: 5px;
    transition: all 0.3s;
}

.sidebar a:hover,
.sidebar a.active {
    background-color: var(--accent-color);
    /* Fondo Amarillo al hover */
    color: var(--dark-gray);
    font-weight: bold;
}

/* 5. Estilos para el Footer */
.footer-container .bg-secondary {
    background-color: var(--dark-gray) !important;
    /* Gris oscuro */
}

.footer-container .text-primary {
    color: var(--accent-color) !important;
    /* Amarillo para títulos */
}

/* Botón flotante WhatsApp */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* Estilo de Tarjetas (Cards) */
.card-login,
.card-pago,
.main-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-soft);
    border-top: 5px solid var(--accent-color);
    /* Detalle amarillo arriba */
}

/* Estilos auxiliares del layout */
.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    align-items: center;
}

/* --- Mejora de Footer --- */
.footer-container {
    background-color: #333;
    /* Gris oscuro institucional */
    color: #fff;
    padding: 40px 0 20px 0;
}

.footer-container h3 {
    color: var(--accent-color);
    /* Amarillo para títulos */
    font-size: 1.2rem;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-container a {
    color: #ccc;
    text-decoration: none;
    transition: 0.3s;
}

.footer-container a:hover {
    color: var(--accent-color);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* --- Estilos específicos del Footer --- */
.footer-section {
    background-color: #2d2d2d;
}

.footer-section .bg-dark-gray {
    background-color: #2d2d2d !important;
}

/* Títulos del footer en amarillo */
.footer-section .text-primary,
.footer-title {
    color: #ffcc00 !important;
    font-size: 1.1rem !important;
    margin-bottom: 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Iconos en amarillo */
.footer-section .text-primary {
    color: #ffcc00 !important;
}

.footer-contact-item i {
    color: #ffcc00 !important;
    font-size: 1rem;
    min-width: 20px;
}

/* Botones sociales con borde amarillo */
.social-icons-container .social-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffcc00 !important;
    color: #ffcc00 !important;
    transition: all 0.3s ease;
}

.social-icons-container .social-icon:hover {
    background: linear-gradient(135deg, #ffcc00 0%, #ffd633 100%);
    color: #2d2d2d !important;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.3);
}

.footer-logo {
    max-height: 80px !important;
    width: auto !important;
    object-fit: contain !important;
    transition: transform 0.3s ease;
}

.footer-logo:hover {
    transform: scale(1.05);
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #b8b8b8;
}

.footer-contact-item {
    align-items: flex-start;
}

.footer-contact-label {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #ffffff !important;
}

.footer-link {
    font-size: 0.9rem;
    transition: all 0.3s ease;
    color: #b8b8b8;
}

.footer-link i {
    color: #ffcc00 !important;
    transition: transform 0.3s ease;
}

.footer-link:hover {
    color: #ffcc00 !important;
    padding-left: 8px;
}

.footer-link:hover i {
    transform: translateX(3px);
}

/* Formulario del footer */
.footer-form .form-control {
    font-size: 0.9rem;
    padding: 8px 12px !important;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.footer-form .form-control:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
    outline: none;
}

.footer-form textarea {
    resize: none;
}

.footer-form .btn {
    font-size: 0.95rem;
    background: linear-gradient(135deg, #ffcc00 0%, #ffd633 100%);
    color: #2d2d2d;
    font-weight: 700;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 10px rgba(255, 204, 0, 0.3);
}

.footer-form .btn:hover {
    background: linear-gradient(135deg, #ffd633 0%, #ffe066 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 204, 0, 0.4);
}

.footer-copyright {
    font-size: 0.85rem;
    font-weight: 400;
}

.footer-link-copyright {
    color: #ffcc00 !important;
    transition: all 0.3s ease;
    font-weight: 400 !important;
    font-size: inherit !important;
    text-decoration: none;
}

.footer-link-copyright:hover {
    color: #ffd633 !important;
    text-decoration: none;
}

/* WhatsApp flotante */
.whatsapp-float {
    width: 55px;
    height: 55px;
    background-color: #25d366;
    color: white;
    border-radius: 50%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* Responsive del Footer */
@media (max-width: 768px) {
    .footer-section .bg-dark-gray {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
    
    .footer-section .row > div {
        margin-bottom: 2rem !important;
    }
    
    .footer-logo {
        max-height: 60px !important;
    }
    
    .footer-title {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .footer-text,
    .footer-link {
        font-size: 0.85rem;
    }
    
    .footer-contact-label {
        font-size: 0.9rem !important;
    }
    
    .social-icons-container {
        margin-top: 1rem !important;
    }
    
    .social-icons-container .social-icon {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .footer-form .form-control {
        font-size: 0.85rem;
        padding: 6px 10px !important;
    }
    
    .footer-form textarea {
        font-size: 0.85rem !important;
    }
    
    .footer-form .btn {
        font-size: 0.9rem;
        padding: 8px 16px !important;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 15px;
        right: 15px;
    }
    
    .footer-copyright {
        font-size: 0.8rem;
        padding: 0 15px;
    }
}

@media (max-width: 576px) {
    .footer-section .bg-dark-gray {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    .footer-section .row > div {
        margin-bottom: 1.5rem !important;
    }
    
    .footer-section .row > div:last-child {
        margin-bottom: 1rem !important;
    }
}

/* --- Estilo de Botón Amarillo --- */
.btn-amarillo {
    background-color: var(--accent-color);
    color: #333 !important;
    font-weight: bold;
    padding: 10px 20px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
}

:root {
    --primary-color: #ffcc00;
    /* AMARILLO */
    --bg-dark: #222222;
    /* GRIS OSCURO */
}

.bg-dark-gray {
    background-color: var(--bg-dark) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    color: #333 !important;
}

/* Efectos para los enlaces */
.quick-link {
    text-decoration: none;
    transition: 0.3s;
}

.quick-link:hover {
    color: var(--primary-color) !important;
    padding-left: 10px;
}

.social-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.social-icon:hover {
    background-color: var(--primary-color) !important;
    color: #333 !important;
}

/* WhatsApp Flotante estilo moderno */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

/* Botón "Mi Panel" personalizado */
.btn-panel-amarillo {
    background-color: var(--accent-color);
    color: var(--dark-gray) !important;
    border-radius: 50px;
    /* Bordes redondeados profesionales */
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-panel-amarillo:hover {
    background-color: var(--dark-gray);
    color: var(--accent-color) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Estilo para los enlaces del menú */
.nav-link {
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Dropdown styling */
.dropdown-menu {
    border-radius: 10px;
    margin-top: 15px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* Hacer el header pegajoso (opcional) */
.sticky-top {
    z-index: 1020;
}