/**
 * @file
 * Navbar styles - El Taller del Calçat
 * Basado en new_design.jsx
 */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500;600&display=swap');

/* Navbar principal - Sticky con backdrop blur */
#navbar-main {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #f3f4f6;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    padding: 1rem 1.5rem;
}

#navbar-main .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0;
}

/* Logo original - mantener el existente */
#navbar-main .region-header {
    margin: 0;
    padding: 0;
}

.navbar-brand {
    margin: 0;
    padding: 0;
}

.navbar-brand img {
    height: 40px;
    width: auto;
    display: block;
}

/* Contenedor derecho con menú y controles */
.navbar-right {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: flex-end;
}

/* Wrapper del menú desktop */
.navbar-menu-wrapper {
    display: none;
}

/* Contenedor del menú principal */
#block-frontend-main-menu {
    margin: 0;
}

#block-frontend-main-menu > ul {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

#block-frontend-main-menu > ul > li {
    margin: 0;
    padding: 0;
}

#block-frontend-main-menu > ul > li > a {
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 500;
    color: #4b5563;
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0;
    border: none;
    background: none;
    display: block;
}

#block-frontend-main-menu > ul > li > a:hover,
#block-frontend-main-menu > ul > li > a.active,
#block-frontend-main-menu > ul > li.active-trail > a {
    color: #b45309;
    background: none;
    border: none;
}

/* Selector de idioma moderno */
.navbar-language {
    display: none;
}

.region-header-form,
.advanced-language-selector {
    margin: 0;
}

/* Estilo pill para el selector de idioma */
.language-switcher-language-url {
    margin: 0;
}

.language-switcher-language-url .dropdown-toggle,
.language-switcher-language-url > a {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    background-color: #f3f4f6;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.language-switcher-language-url .dropdown-toggle:hover,
.language-switcher-language-url > a:hover {
    background-color: #e5e7eb;
    text-decoration: none;
}

.language-switcher-language-url .dropdown-toggle::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    margin-left: 0.25rem;
    border: none;
}

/* Botón de menú móvil */
.navbar-toggle {
    display: flex;
    background: none;
    border: none;
    color: #4b5563;
    cursor: pointer;
    padding: 0.25rem;
}

.navbar-toggle:hover {
    color: #111827;
}

.navbar-toggle svg {
    width: 28px;
    height: 28px;
}

/* Menú móvil desplegable */
.navbar-mobile-menu {
    display: none;
    width: 100%;
    background-color: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.navbar-mobile-menu.active {
    display: block;
}

/* Menú dentro del móvil */
.navbar-mobile-menu #block-frontend-main-menu > ul {
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.navbar-mobile-menu #block-frontend-main-menu > ul > li > a {
    font-size: 1.125rem;
    color: #1f2937;
    padding: 0.5rem 0;
}

.navbar-mobile-menu #block-frontend-main-menu > ul > li > a:hover {
    color: #b45309;
}

/* Selector de idioma en móvil */
.navbar-mobile-language {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.navbar-mobile-language .language-switcher-language-url .dropdown-toggle,
.navbar-mobile-language .language-switcher-language-url > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    background-color: #f3f4f6;
    padding: 0.75rem 1rem;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.navbar-mobile-language .language-switcher-language-url .dropdown-toggle:hover,
.navbar-mobile-language .language-switcher-language-url > a:hover {
    background-color: #e5e7eb;
    text-decoration: none;
}

/* Dropdown de idiomas en móvil */
.navbar-mobile-language .dropdown-menu {
    position: static;
    width: 100%;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Responsive - Desktop */
@media (min-width: 768px) {
    #navbar-main {
        padding: 1rem 3rem;
    }

    .navbar-brand img {
        height: 50px;
    }

    .navbar-menu-wrapper {
        display: flex;
    }

    .navbar-language {
        display: flex;
    }

    .navbar-toggle {
        display: none;
    }

    .navbar-mobile-menu {
        display: none !important;
    }
}

/* Dropdown de idiomas */
.dropdown-menu {
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    min-width: 120px;
    margin-top: 0.5rem;
}

.dropdown-menu li {
    list-style: none;
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #4b5563;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    transition: background-color 0.2s ease;
}

.dropdown-menu a:hover {
    background-color: #f3f4f6;
    color: #111827;
    text-decoration: none;
}

/* Ocultar items de menú duplicados en móvil */
@media (max-width: 767px) {
    .navbar-menu-wrapper {
        display: none;
    }

    .navbar-language {
        display: none;
    }
}

