/* ===== HEADER STYLES - MINIMALIST & PROFESSIONAL ===== */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateY(0);
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    position: relative;
}

/* ===== LOGO ===== */
.logo {
    flex-shrink: 0;
    z-index: 1001;
}

.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo a:hover {
    transform: scale(1.05);
}

.logo img {
    height: 40px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

/* ===== DESKTOP NAVIGATION ===== */
.nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #a32b20;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #a32b20;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #a32b20;
}

.nav-link.active::after {
    width: 100%;
}

/* ===== MOBILE TOGGLE ===== */
.mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 4px;
    z-index: 1001;
    transition: all 0.3s ease;
}

.mobile-toggle:hover {
    transform: scale(1.1);
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: #333;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 1px;
    transform-origin: center;
}

.mobile-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== MOBILE NAVIGATION ===== */
.nav-mobile {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-mobile.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 5rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -5px 0 20px rgba(0, 0, 0, 0.1);
}

.nav-mobile.active .mobile-menu {
    transform: translateX(0);
}

.mobile-menu .nav-link {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(20px);
}

.nav-mobile.active .nav-link {
    opacity: 1;
    transform: translateX(0);
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

.mobile-menu .nav-link:hover {
    background: rgba(163, 43, 32, 0.05);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    color: #a32b20;
}

.mobile-menu .nav-link.active {
    color: #a32b20;
    background: rgba(163, 43, 32, 0.1);
    margin: 0 -1rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet and smaller desktop */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .nav-desktop {
        gap: 1.2rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
}

/* Large mobile and small tablet */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        height: 69px;
    }
    
    .logo img {
        height: 35px;
    }
    
    .nav-desktop {
        display: none;
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .nav-mobile {
        display: block;
    }
    
    .mobile-menu {
        width: 100%;
        max-width: 320px;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .header-container {
        padding: 0 0.75rem;
        height: 69px;
    }
    
    .logo img {
        height: 30px;
    }
    
    .mobile-language-selector {
        padding: 0.4rem;
    }
    
    .mobile-language-option {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .mobile-menu {
        max-width: 280px;
        padding: 4rem 1.5rem 2rem;
    }
    
    .mobile-menu .nav-link {
        font-size: 1rem;
        padding: 0.875rem 0;
    }
    
    .hamburger-line {
        width: 22px;
        height: 2px;
    }
}

/* Extra small mobile */
@media (max-width: 360px) {
    .header-container {
        padding: 0 0.5rem;
        height: 69px;
    }
    
    .logo img {
        height: 28px;
    }
    
    .mobile-language-selector {
        padding: 0.3rem;
    }
    
    .mobile-language-option {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .mobile-menu {
        max-width: 260px;
        padding: 3.5rem 1rem 2rem;
    }
    
    .mobile-menu .nav-link {
        font-size: 0.95rem;
        padding: 0.75rem 0;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2px;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .header-container {
        height: 69px;
    }
    
    .logo img {
        height: 30px;
    }
    
    .mobile-menu {
        padding: 3rem 2rem 1rem;
    }
    
    .mobile-menu .nav-link {
        padding: 0.5rem 0;
        font-size: 0.9rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-mobile.active .nav-link {
    animation: fadeInDown 0.3s ease forwards;
}

.nav-mobile.active .nav-link:nth-child(1) { animation-delay: 0.1s; }
.nav-mobile.active .nav-link:nth-child(2) { animation-delay: 0.15s; }
.nav-mobile.active .nav-link:nth-child(3) { animation-delay: 0.2s; }
.nav-mobile.active .nav-link:nth-child(4) { animation-delay: 0.25s; }
.nav-mobile.active .nav-link:nth-child(5) { animation-delay: 0.3s; }
.nav-mobile.active .nav-link:nth-child(6) { animation-delay: 0.35s; }
.nav-mobile.active .nav-link:nth-child(7) { animation-delay: 0.4s; }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .header,
    .nav-link,
    .mobile-toggle,
    .nav-mobile,
    .mobile-menu {
        transition: none;
    }
    
    .nav-mobile.active .nav-link {
        animation: none;
        opacity: 1;
        transform: translateX(0);
    }
}

/* Focus styles for keyboard navigation */
.nav-link:focus,
.mobile-toggle:focus {
    outline: 2px solid #a32b20;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    .header {
        background: linear-gradient(135deg, rgb(0, 0, 0) 20%, rgb(205, 16, 16) 100%);
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .header.scrolled {
        background: linear-gradient(135deg, rgb(0, 0, 0) 20%, rgb(205, 16, 16) 100%);
    }
    
    .nav-link {
        color: #e0e0e0;
    }
    
    .nav-link:hover,
    .nav-link.active {
        color: #ff6b6b;
    }
    
    .nav-link::after {
        background: #ff6b6b;
    }
    
    .hamburger-line {
        background: #e0e0e0;
    }
    
    .nav-mobile {
        background: rgba(0, 0, 0, 0.7);
    }
    
    .mobile-menu {
        background: rgba(18, 18, 18, 0.98);
    }
    
    .mobile-menu .nav-link {
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .mobile-menu .nav-link:hover {
        background: rgba(255, 107, 107, 0.1);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .header {
        position: static;
        background: white;
        border-bottom: 1px solid #ccc;
    }
    
    .mobile-toggle,
    .nav-mobile {
        display: none !important;
    }
    
    .nav-desktop {
        display: flex !important;
    }
}

/* ===== LANGUAGE SELECTOR STYLES ===== */
.language-selector {
    position: relative;
    margin-left: 1rem;
}

.language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.language-toggle:hover {
    background: rgba(163, 43, 32, 0.1);
    border-color: #a32b20;
    color: #a32b20;
}

.language-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(163, 43, 32, 0.3);
}

.language-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.language-name {
    font-size: 0.85rem;
    white-space: nowrap;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
}

.language-selector:hover .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(163, 43, 32, 0.1);
    color: #a32b20;
}

.language-option.active {
    background: rgba(163, 43, 32, 0.15);
    color: #a32b20;
    font-weight: 600;
}

/* ===== MOBILE LANGUAGE SELECTOR NUEVO (Dropdown) ===== */
.mobile-language-selector {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1002;
}

.mobile-language-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,0,0,0.3);
    border: 1.5px solid rgba(86, 9, 9, 0.7);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.18);
    transition: all 0.2s;
    position: relative;
}

.mobile-language-toggle:focus {
    outline: 2px solid #a32b20;
}

.mobile-language-toggle i {
    font-size: 0.9em;
    margin-left: 0.3em;
}

.mobile-language-dropdown {
    display: none;
    position: absolute;
    left: 50%;
    top: 110%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.92);
    border: 1.5px solid #444;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
    min-width: 140px;
    z-index: 1003;
    flex-direction: column;
    padding: 0.3rem 0;
}

.mobile-language-selector.open .mobile-language-dropdown {
    display: flex;
}

.mobile-language-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #fff;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background 0.2s, color 0.2s;
}

.mobile-language-option:hover {
    background: rgba(163, 43, 32, 0.18);
    color: #ffb3a3;
}

.mobile-language-option.active {
    background: rgba(163, 43, 32, 0.32);
    color: #fff;
    font-weight: 700;
}

@media (max-width: 768px) {
    .language-selector {
        display: none;
    }
    .mobile-language-selector {
        display: block;
    }
}
@media (min-width: 769px) {
    .mobile-language-selector {
        display: none;
    }
}

/* ===== DARK MODE LANGUAGE SELECTOR ===== */
@media (prefers-color-scheme: dark) {
    .language-toggle {
        border-color: rgba(255, 255, 255, 0.2);
        color: #fff;
        background: rgba(255, 255, 255, 0.1);
    }
    
    .language-toggle:hover {
        background: rgba(163, 43, 32, 0.3);
        border-color: #a32b20;
    }
    
    .language-dropdown {
        background: rgba(0, 0, 0, 0.9);
        border-color: rgba(255, 255, 255, 0.2);
    }
    
    .language-option {
        color: #fff;
        border-bottom-color: rgba(255, 255, 255, 0.1);
    }
    
    .language-option:hover {
        background: rgba(163, 43, 32, 0.3);
    }
    
    .language-option.active {
        background: rgba(163, 43, 32, 0.4);
    }
    
    .mobile-language-label {
        color: #ccc;
    }
    
    .mobile-language-option {
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
    }
    
    .mobile-language-option:hover {
        background: rgba(163, 43, 32, 0.3);
    }
    
    .mobile-language-option.active {
        background: rgba(163, 43, 32, 0.4);
    }
    
    .mobile-language-selector {
        border-color: rgba(255, 255, 255, 0.2);
    }
}



