/* =========================================
   LOANWARE - ESTILOS GLOBALES UNIFICADOS
   Paleta: Midnight Green & Neon Lime 
   ========================================= */

/* --- VARIABLES --- */
:root {
    --primary: #1a392a;
    --accent: #09FF00;
    --accent-dark: #059669;
    --light-bg: #f8fafc;
    --white: #ffffff;
    --text-dark: #334155;
    --border-color: #e2e8f0;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

/* --- RESET Y BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* --- HEADER Y NAVEGACIÓN --- */
.header-main {
    background-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo i {
    color: var(--accent);
    font-size: 1.5rem;
}

.logo h1 {
    color: white;
    font-weight: 700;
    font-style: italic;
    letter-spacing: -0.05em;
    margin: 0;
}

.logo h1 span {
    color: var(--accent);
}

.main-nav a,
.dropdown-btn {
    color: var(--white);
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.3s;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
}

.main-nav a:hover,
.main-nav a.active,
.dropdown-btn:hover {
    color: var(--accent);
}

/* --- BOTONES GLOBALES --- */
.btn-login-style {
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login-style:hover {
    background: var(--accent);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(9, 255, 0, 0.4);
}

.tag-label {
    color: var(--accent);
    background: var(--primary);
    padding: 4px 12px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    display: inline-block;
}

.section-line {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin-top: 15px;
    border-radius: 10px;
}

/* --- CARDS GENERALES (Dashboard y Sidebar) --- */
.card-loanware {
    background: var(--white);
    padding: 30px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    will-change: transform;
}

.card-loanware:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* --- COMPONENTES ESPECÍFICOS: CATÁLOGO DE EQUIPOS --- */

/* Sidebar Filtros */
.cat-link {
    display: block;
    padding: 10px 12px;
    color: var(--text-dark);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 600;
}

.cat-link:hover {
    color: var(--primary);
    background: #f1f5f9;
    transform: translateX(5px);
}

.cat-link.active {
    background: var(--primary);
    color: var(--accent);
}

/* Grid de Equipos */
.contenedor-grid-equipos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* Tarjeta individual de equipo */
.equipo-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    position: relative;
    will-change: transform;
}

.equipo-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
    border-color: var(--accent);
}

/* Variante para equipos no disponibles */
.equipo-card.grayscale-card {
    opacity: 0.75;
}

.equipo-card.grayscale-card:hover {
    transform: none;
    box-shadow: var(--shadow);
    border-color: transparent;
}

.equipo-img-wrapper {
    position: relative;
    height: 200px;
    background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.equipo-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

/* Etiquetas de estado (Badges) */
.badge-dispo,
.badge-no {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge-dispo {
    background: var(--accent);
    color: var(--primary);
}

.badge-no {
    background: #ef4444;
    color: white;
}

/* Botones dentro de las tarjetas */
.btn-card-primary {
    background: var(--primary);
    color: var(--white);
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.btn-card-primary:hover {
    background: #000;
    transform: scale(1.02);
}

.btn-card-secondary {
    background: #f1f5f9;
    color: #475569;
    text-align: center;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    border: none;
    width: 100%;
    transition: background 0.3s;
}

/* --- FOOTER --- */
.footer-main {
    background: var(--primary);
    padding-top: 60px;
    color: var(--white);
    margin-top: auto;
}

.logo-footer span {
    color: var(--accent);
}

.social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--white);
    transition: 0.3s;
    text-decoration: none;
}

.social-btn:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 25px;
    text-align: center;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 2px;
}

/* --- WIDGET DE ACCESIBILIDAD LOANWARE --- */

.accessibility-wrapper {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 10000 !important;
}

.btn-access {
    width: 65px;
    height: 65px;
    background: #1a392a !important;
    border: 2px solid #09FF00;
    border-radius: 50%;
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(9, 255, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: pulse-neon 2s infinite;
}

.btn-access i {
    color: #09FF00 !important;
    font-size: 1.8rem !important;
    text-shadow: 0 0 8px rgba(9, 255, 0, 0.6);
}

.btn-access:hover {
    transform: scale(1.1) rotate(5deg);
    background: #09FF00 !important;
}

.btn-access:hover i {
    color: #1a392a !important;
    text-shadow: none;
}

/* Menú de Accesibilidad */
.access-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    width: 260px;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    display: none;
    /* Se activa con la clase .active desde tu JS */
    flex-direction: column;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Esta es la clave para que tu JS funcione */
.access-menu.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

.access-section {
    background: rgba(26, 57, 42, 0.05);
    padding: 12px;
    border-radius: 15px;
}

/* --- ESTILOS PARA DALTONISMO (Sincronizado con tu JS) --- */

/* Protanopia (Rojo débil) */
.protanopia {
    filter: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><filter id="f"><feColorMatrix type="matrix" values="0.567, 0.433, 0, 0, 0, 0.558, 0.442, 0, 0, 0, 0, 0.242, 0.758, 0, 0, 0, 0, 0, 1, 0"/></filter></svg>#f');
}

/* Deuteranopia (Verde débil) */
.deuteranopia {
    filter: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><filter id="f"><feColorMatrix type="matrix" values="0.625, 0.375, 0, 0, 0, 0.7, 0.3, 0, 0, 0, 0, 0.3, 0.7, 0, 0, 0, 0, 0, 1, 0"/></filter></svg>#f');
}

/* Ceguera Total / Alto Contraste */
.ceguera-total {
    filter: grayscale(100%) contrast(150%);
}

/* --- ANIMACIONES --- */

@keyframes pulse-neon {
    0% {
        box-shadow: 0 0 0 0 rgba(9, 255, 0, 0.6);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(9, 255, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(9, 255, 0, 0);
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}