/* ==========================================================================
   HEADER COMPONENT - Servidiesel
   ========================================================================== */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent; /* Transparente al inicio */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-bottom: 1px solid rgba(255, 255, 255, 0);
}

/* Estado cuando se hace scroll */
header.header-scrolled {
    background-color: rgba(15, 23, 42, 0.95); /* Slate 900 más opaco */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 5px 0;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
    transition: height 0.4s ease;
}

header.header-scrolled .nav-container {
    height: 70px;
}

/* --- LOGO --- */
.nav-logo img {
    height: 70px;
    width: auto;
    transition: all 0.4s ease;
    display: block;
}

header.header-scrolled .nav-logo img {
    height: 50px;
}

/* --- MENU PRINCIPAL (Desktop) --- */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 10px;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px 20px;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
}

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

.nav-link.active {
    color: var(--primary-orange);
    background-color: rgba(255, 140, 0, 0.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-orange);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 20px;
}

/* --- ACCIONES (Botones) --- */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-cta {
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-appointment {
    background: linear-gradient(135deg, #F97316 0%, #EA580C 100%);
    color: white !important;
    box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-appointment:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(249, 115, 22, 0.5);
    filter: brightness(1.1);
}

.btn-whatsapp {
    background-color: #25D366;
    color: white !important;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.2);
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    background-color: #22c55e;
}

.icon-circle {
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white !important;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.icon-circle:hover {
    background-color: var(--primary-orange);
    transform: rotate(15deg) scale(1.1);
    border-color: var(--white);
}

/* --- BURGER (Mobile) --- */
.nav-burger {
    display: none;
    cursor: pointer;
    padding: 5px;
}

.nav-burger div {
    width: 25px;
    height: 2px;
    background-color: white;
    margin: 6px;
    transition: all 0.3s ease;
}

/* --- RESPONSIVE LOGIC --- */

@media screen and (max-width: 1100px) {
    .nav-menu {
        display: none; /* Se oculta el menú central en tablets/móvil */
    }
}

@media screen and (max-width: 768px) {
    .nav-container {
        height: 70px;
    }
    
    .nav-logo img {
        height: 50px;
    }

    .btn-cta span {
        display: none; /* Oculta el texto de los botones en móvil */
    }

    .btn-cta {
        padding: 12px;
        border-radius: 50%;
        width: 45px;
        height: 45px;
        justify-content: center;
    }

    .nav-burger {
        display: block;
    }

    /* Mobile Nav Dropdown */
    .nav-menu.mobile-active {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 70px;
        right: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: #0F172A;
        padding: 40px 0;
        align-items: center;
        gap: 20px;
        z-index: 999;
        animation: slideIn 0.4s ease forwards;
    }

    .nav-menu.mobile-active .nav-link {
        font-size: 1.2rem;
    }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Burger Animation */
.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }
