/* ========================================================
   Mechanix Studios - Unified Navigation Styles
   ======================================================== */

:root {
    --mx-bg-header: rgba(8, 8, 10, 0.88);
    --mx-gold: #d4af37;
    --mx-gold-light: #f3e5ab;
    --mx-silver: #c0c0c0;
    --mx-silver-light: #e8e8e8;
    --mx-text: #f0f0f2;
    --mx-text-muted: #9e9ea6;
    --mx-border: rgba(212, 175, 55, 0.22);
}

header.mechanix-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 9990;
    background: var(--mx-bg-header);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--mx-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 5%;
    box-sizing: border-box;
    transition: background 0.3s ease, padding 0.3s ease;
}

.mechanix-nav-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.mechanix-nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    cursor: pointer;
}

.mechanix-nav-logo img {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--mx-gold);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mechanix-nav-logo:hover img {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.45);
}

.mechanix-nav-logo span {
    font-family: 'Cinzel', serif;
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--mx-gold-light);
    letter-spacing: 1.5px;
    white-space: nowrap;
}

/* Botón contextual de retorno para herramientas y servicios */
.mechanix-subpage-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--mx-border);
    color: var(--mx-gold-light);
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.mechanix-subpage-back:hover {
    background: var(--mx-gold);
    color: #08080a;
    transform: translateX(-2px);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.3);
}

/* Menú de enlaces de navegación principal */
nav.mechanix-nav {
    display: flex;
    align-items: center;
}

ul.mechanix-nav-list {
    display: flex;
    gap: 22px;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
}

.mechanix-nav-item a {
    color: var(--mx-text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.25s ease;
    letter-spacing: 0.4px;
    position: relative;
    padding: 6px 2px;
    white-space: nowrap;
    display: inline-block;
}

.mechanix-nav-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--mx-gold), var(--mx-gold-light));
    transition: width 0.3s ease;
    border-radius: 2px;
}

.mechanix-nav-item a:hover {
    color: var(--mx-gold-light);
}

.mechanix-nav-item a:hover::after {
    width: 100%;
}

.mechanix-nav-item a.active {
    color: var(--mx-gold);
    font-weight: 600;
}

.mechanix-nav-item a.active::after {
    width: 100%;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.6);
}

/* Botón Hamburguesa para Mobile */
.mechanix-hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--mx-border);
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    width: 42px;
    height: 42px;
    flex-direction: column;
    justify-content: space-around;
    align-items: center;
    box-sizing: border-box;
    transition: all 0.3s ease;
    z-index: 10000;
}

.mechanix-hamburger:hover {
    border-color: var(--mx-gold);
    background: rgba(212, 175, 55, 0.1);
}

.mechanix-hamburger-bar {
    width: 22px;
    height: 2px;
    background-color: var(--mx-gold);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.mechanix-hamburger.open .mechanix-hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.mechanix-hamburger.open .mechanix-hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mechanix-hamburger.open .mechanix-hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Drawer / Menú desplegable para móviles */
.mechanix-mobile-drawer {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 85vw;
    height: 100vh;
    background: rgba(14, 14, 18, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--mx-border);
    box-shadow: -10px 0 35px rgba(0, 0, 0, 0.85);
    z-index: 9995;
    padding: 90px 25px 40px;
    box-sizing: border-box;
    flex-direction: column;
    gap: 15px;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
    overflow-y: auto;
}

.mechanix-mobile-drawer.open {
    transform: translateX(0);
}

.mechanix-mobile-drawer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mechanix-mobile-drawer a {
    color: var(--mx-text-muted);
    text-decoration: none;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 12px 14px;
    border-radius: 8px;
    display: block;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.mechanix-mobile-drawer a:hover,
.mechanix-mobile-drawer a.active {
    color: var(--mx-gold-light);
    background: rgba(212, 175, 55, 0.08);
    border-left-color: var(--mx-gold);
    padding-left: 18px;
}

/* Backdrop para oscurecer el fondo al abrir en móvil */
.mechanix-mobile-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9992;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.mechanix-mobile-backdrop.open {
    opacity: 1;
    pointer-events: auto;
}

/* Media Query para pantallas medianas y pequeñas */
@media (max-width: 920px) {
    nav.mechanix-nav {
        display: none;
    }

    .mechanix-hamburger {
        display: flex;
    }

    .mechanix-mobile-drawer,
    .mechanix-mobile-backdrop {
        display: flex;
    }

    .mechanix-nav-logo span {
        font-size: 1rem;
    }
}
