/* Estilos del header principal */
.header__main {
    background: transparent;
    box-shadow: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    transition: all 0.3s ease;
    margin-top: 10px; /* Add some top margin to match the Figma positioning */
}

.header__main .navbar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    background: transparent;
}

/* Contenedor del menú fijo en la esquina superior izquierda */
.header__menu-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.5);
    padding: 12px 16px;
    border-radius: 0;
    position: absolute;
    left: 0px;
    z-index: 101;
    /* backdrop-filter: blur(10px); */
    width: 245px;
    height: 112px;
}

/* Cambiar a sticky positioning cuando no está en la página de inicio */
.header__main.not-home .header__menu-container {
    position: sticky !important;
    top: 10px;
    margin: 10px;
}

/* En mobile, el header debe ocupar su propio espacio para no solaparse con el contenido */
@media (max-width: 768px) {
    .header__main.not-home {
        position: relative;
        margin-bottom: 20px;
    }

    .header__main.not-home .header__menu-container {
        position: relative !important;
        top: 0;
        left: 0;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    .header__main.not-home .header__menu-container {
        width: auto;
        height: auto;
        padding: 8px 12px;
    }
}
/* Estilos para el logo con texto */
.header__logo-text {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    text-decoration: none;
}

.header__logo {
    height: 48px;
    width: auto;
    max-width: 100px;
    display: block;
    transition: all 0.3s ease;
}

.header__logo-name {
    font-family: 'Zilla Slab', serif;
    font-size: 16px;
    font-weight: 500;
    color: #000;
    margin: 0;
    white-space: nowrap;
}

.header__main.scrolled .header__logo {
    height: 40px;
    max-width: 80px;
}

.header__main.scrolled .header__logo-name {
    font-size: 14px;
}

.header__category-buttons {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    transition: all 0.3s ease;
    align-self: center;
    margin-top: 12px; /* Align with the menu container */
}

.header__category-buttons.hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    pointer-events: none;
}

.header__category-btn {
    font-family: 'Zilla Slab', serif;
    font-size: 16px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Estilos del menú lateral */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar {
    position: fixed;
    top: 0;
    left: -400px;
    width: 400px;
    height: 100%;
    background: #fff;
    z-index: 1001;
    transition: left 0.3s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
}

.sidebar.active {
    left: 0;
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
}

.sidebar-logo {
    height: 60px;
    width: auto;
    max-width: 100px;
}

.sidebar-close {
    background: none;
    border: none;
    font-size: 32px;
    cursor: pointer;
    color: #000;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.sidebar-close:hover {
    color: #3C364C;
}

.sidebar-nav {
    padding: 40px 30px;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    margin-bottom: 30px;
}

.sidebar-nav a {
    font-family: 'Zilla Slab', serif;
    font-size: 24px;
    font-weight: 500;
    color: #000;
    text-decoration: none;
    display: block;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #3C364C;
    font-weight: 600;
}

.sidebar-footer {
    position: absolute;
    bottom: 40px;
    left: 30px;
    right: 30px;
}

.sidebar-socials {
    display: flex;
    gap: 18px;
    justify-content: flex-start;
}

.sidebar-social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #000;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    background: #fff;
    transition: background 0.2s, border 0.2s;
    text-decoration: none;
}

.sidebar-social-icon:hover {
    background: #F2F2F2;
    border-color: #3C364C;
}

/* Botón hamburguesa */
.menu-toggle {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    transition: background 0.2s ease;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.hamburger {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
}

.hamburger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #000;
    transition: all 0.3s ease;
}

.menu-toggle:hover .hamburger span {
    background: #3C364C;
}

/* Responsive */
@media (max-width: 991px) {
    .header__logo {
        height: 48px;
        max-width: 90px;
    }

    .header__main.scrolled .header__logo {
        height: 40px;
        max-width: 70px;
    }

    .header__category-btn {
        font-size: 14px;
        padding: 6px 12px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 320px;
        left: -320px;
    }

    .sidebar-nav {
        padding: 30px 20px;
    }

    .sidebar-nav a {
        font-size: 22px;
    }

    .sidebar-header {
        padding: 15px 20px;
    }

    .sidebar-footer {
        bottom: 30px;
        left: 20px;
        right: 20px;
    }

    .sidebar-social-icon {
        width: 44px;
        height: 44px;
    }

    .header__category-btn {
        font-size: 12px;
        padding: 5px 10px;
    }
}

@media (max-width: 600px) {
    .header__main {
        padding: 0;
    }

    .header__logo {
        height: 40px;
        max-width: 60px;
    }

    .header__main.scrolled .header__logo {
        height: 36px;
        max-width: 55px;
    }

    .sidebar {
        width: 280px;
        left: -280px;
    }

    .sidebar-nav a {
        font-size: 20px;
    }

    .sidebar-logo {
        height: 45px;
        max-width: 80px;
    }
}

@media (max-width: 480px) {
    .header__menu-container{
     margin-top:50px;   
    }
    .header__category-btn {
        font-size: 11px;
        padding: 4px 8px;
    }

    .sidebar-nav li {
        margin-bottom: 25px;
    }

    .sidebar-nav a {
        font-size: 18px;
    }
}
