/* =============================================================================
   HEADER Y NAVEGACIÓN
   Estilos para header fijo, logo, navegación desktop y móvil
   ============================================================================= */

/* --- HEADER --- */
.header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 25px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: auto;
}

.header.scrolled {
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

/* --- LOGO --- */
.logo {
    font-family: var(--font-headings);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--color-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: transform 0.3s ease;
    position: relative;
    padding-left: 52px;
}

.logo-img {
    position: absolute;
    left: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    object-fit: cover;
}

.logo:hover .logo-img {
    transform: rotate(-10deg);
    box-shadow: 0 6px 16px rgba(76, 175, 80, 0.4);
}

.logo:focus .logo-img {
    outline: 2px solid var(--color-secondary);
    outline-offset: 4px;
    border-radius: 8px;
}

.logo:hover {
    transform: scale(1.05);
}

.logo:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 4px;
    border-radius: 8px;
}

/* --- NAVEGACIÓN DESKTOP --- */
.main-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(248, 249, 250, 0.8);
    padding: 6px;
    border-radius: 50px;
    position: relative;
}

.nav-links a {
    text-decoration: none;
    color: var(--color-primary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--color-secondary);
}

.nav-links a.active {
    color: white;
}

/* Sliding indicator for active section */
.nav-indicator {
    position: absolute;
    background: linear-gradient(135deg, var(--color-secondary), #45a049);
    height: calc(100% - 12px);
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    top: 6px;
    z-index: 1;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
    opacity: 0;
    transform: scale(0);
}

.nav-indicator.visible {
    opacity: 1;
    transform: scale(1);
}

.nav-cta {
    background: linear-gradient(135deg, var(--color-secondary), #45a049);
    color: white !important;
    padding: 12px 28px !important;
    border-radius: 50px;
    font-weight: 600 !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.nav-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    background: linear-gradient(135deg, #45a049, var(--color-secondary));
}

.nav-cta:focus {
    outline: 2px solid var(--color-secondary);
    outline-offset: 3px;
}

.nav-cta:after {
    content: "→";
    transition: transform 0.3s ease;
}

.nav-cta:hover:after {
    transform: translateX(3px);
}

/* --- MENÚ MÓVIL --- */
.mobile-menu-toggle {
    display: none;
    background: rgba(248, 249, 250, 0.8);
    border: 2px solid var(--color-primary);
    border-radius: 10px;
    font-size: 1.3rem;
    color: var(--color-primary);
    cursor: pointer;
    padding: 10px 14px;
    transition: all 0.3s;
}

.mobile-menu-toggle:hover, .mobile-menu-toggle:focus {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
    transform: scale(1.05);
    outline: none;
}

.mobile-menu-toggle[aria-expanded="true"] {
    background: var(--color-secondary);
    color: white;
    border-color: var(--color-secondary);
}

.mobile-menu-toggle[aria-expanded="true"] .fa-bars {
    display: none;
}

.mobile-menu-toggle[aria-expanded="false"] .fa-times {
    display: none;
}

/* Mobile Navigation Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s;
}

.mobile-nav-overlay.active {
    display: block;
    opacity: 1;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 350px;
    height: 100vh;
    background: var(--color-white);
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 999;
    overflow-y: auto;
    padding-top: 80px;
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav a {
    display: block;
    padding: 20px 30px;
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid var(--color-light);
    transition: background 0.3s;
}

.mobile-nav a:hover, .mobile-nav a:focus {
    background: var(--color-light);
    color: var(--color-secondary);
    outline: none;
}
