/**
 * CSS do Header - Blog ProCuidar Vacinas
 */

/* ========================================
   HEADER
   ======================================== */

.blog-header {
    background: #FFFFFF;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.blog-header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

/* Logo */
.header-logo {
    flex-shrink: 0;
}

.logo-img {
    height: 65px;
    width: auto;
    transition: transform 0.3s ease;
}

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

/* Navegação Desktop */
.desktop-nav {
    flex: 1;
    display: flex;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #1F2937;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link:hover {
    background: #F9FAFB;
    color: #7C3AED;
}

.nav-link i {
    font-size: 0.875rem;
}

.submenu-icon {
    margin-left: 0.25rem;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.has-submenu:hover .submenu-icon {
    transform: rotate(180deg);
}

/* Submenu */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #FFFFFF;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    padding: 0.5rem;
    margin-top: 0.5rem;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    margin: 0;
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #1F2937;
    text-decoration: none;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.submenu a:hover {
    background: #F9FAFB;
    color: #7C3AED;
    padding-left: 1.25rem;
}

.submenu a i {
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Busca Desktop */
.desktop-search {
    display: flex;
}

.search-form-header {
    display: flex;
    align-items: center;
    background: #F9FAFB;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-form-header:focus-within {
    background: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.search-input-header {
    padding: 0.625rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
    width: 200px;
    transition: width 0.3s ease;
}

.search-input-header:focus {
    outline: none;
    width: 250px;
}

.search-btn-header {
    padding: 0.625rem 1rem;
    background: transparent;
    border: none;
    color: #6B7280;
    cursor: pointer;
    transition: color 0.3s ease;
}

.search-btn-header:hover {
    color: #7C3AED;
}

/* Botão Inscreva-se */
.btn-subscribe {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.3);
    white-space: nowrap;
}

.btn-subscribe:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.btn-subscribe i {
    font-size: 0.875rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 0.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1F2937;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    padding-top: 15px;
    padding-bottom: 49px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-menu.active {
    max-height: 600px;
}

.mobile-search {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 1rem;
}

.search-form-mobile {
    display: flex;
    background: #F9FAFB;
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-input-mobile {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    font-size: 0.875rem;
}

.search-input-mobile:focus {
    outline: none;
}

.search-btn-mobile {
    padding: 0.75rem 1rem;
    background: #7C3AED;
    border: none;
    color: #FFFFFF;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-btn-mobile:hover {
    background: #6D28D9;
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-item {
    border-bottom: 1px solid #F3F4F6;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: #1F2937;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover {
    background: #F9FAFB;
    color: #7C3AED;
    padding-left: 2rem;
}

.mobile-nav-link i {
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.mobile-nav-link.btn-style {
    background: linear-gradient(135deg, #7C3AED 0%, #6D28D9 100%);
    color: #FFFFFF;
    margin: 1rem 1.5rem 0;
    border-radius: 0.5rem;
    justify-content: center;
}

.mobile-nav-link.btn-style:hover {
    padding-left: 1rem;
    transform: translateY(-2px);
}

/* Mobile Submenu */
.mobile-submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    color: #1F2937;
    font-weight: 500;
    font-size: 1rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mobile-submenu-toggle:hover {
    background: #F9FAFB;
    color: #7C3AED;
}

.mobile-submenu-toggle i:first-child {
    margin-right: 0.75rem;
}

.mobile-submenu-toggle i:last-child {
    transition: transform 0.3s ease;
}

.mobile-has-submenu.active .mobile-submenu-toggle i:last-child {
    transform: rotate(180deg);
}

.mobile-submenu {
    list-style: none;
    margin: 0;
    padding: 0;
    background: #F9FAFB;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-has-submenu.active .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu li {
    border-bottom: 1px solid #E5E7EB;
}

.mobile-submenu li:last-child {
    border-bottom: none;
}

.mobile-submenu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem 0.875rem 3rem;
    color: #4B5563;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.mobile-submenu a:hover {
    background: #FFFFFF;
    color: #7C3AED;
    padding-left: 3.5rem;
}

.mobile-submenu a i {
    font-size: 0.875rem;
    width: 16px;
    text-align: center;
}

/* Body quando menu está aberto */
body.menu-open {
    overflow: hidden;
}

/* ========================================
   RESPONSIVIDADE
   ======================================== */

/* Tablets e Mobile */
@media (max-width: 991px) {
    .desktop-nav {
        display: none;
    }
    
    .desktop-search {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu {
        display: block;
    }
    
    .btn-subscribe {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }
    
    .btn-subscribe span {
        display: none;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem 1rem;
        gap: 1rem;
    }
    
    .logo-img {
        height: 60px;
    }
    
    .btn-subscribe {
        padding: 0.5rem 0.75rem;
    }
    
    .btn-subscribe i {
        font-size: 0.75rem;
    }
}
