/**
 * Header Builder Styles
 *
 * CSS for header builder components and layouts.
 *
 * @package ProductMantis
 * @since 2.0.0
 */

/* Header Container */
.pm-header {
    position: relative;
    width: 100%;
    z-index: 999;
    transition: all 0.3s ease;
}

.pm-header-sticky {
    position: sticky;
    top: 0;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pm-header-transparent {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
}

.pm-header-scrolled {
    background: white !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pm-header-shrunk {
    padding: 0.5rem 0;
}

/* Header Rows */
.pm-header-row {
    padding: 1rem 0;
}

.pm-header-columns {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
}

.pm-header-column {
    display: flex;
    align-items: center;
}

.pm-header-column-left {
    justify-content: flex-start;
}

.pm-header-column-center {
    justify-content: center;
}

.pm-header-column-right {
    justify-content: flex-end;
}

/* Logo Component */
.pm-header-logo a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.pm-header-logo .site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pm-color-heading, #1e293b);
}

.pm-header-logo img {
    max-height: 60px;
    width: auto;
}

/* Menu Component */
.pm-nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.pm-nav-menu li {
    margin: 0;
}

.pm-nav-menu a {
    color: var(--pm-color-text, #1e293b);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.pm-nav-menu a:hover {
    color: var(--pm-color-primary, #1B4332);
}

/* CTA Button */
.pm-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.pm-btn-primary {
    background: var(--pm-color-primary, #1B4332);
    color: white;
}

.pm-btn-primary:hover {
    background: var(--pm-color-accent, #0D1F17);
}

.pm-btn-secondary {
    background: var(--pm-color-secondary, #74C69D);
    color: white;
}

.pm-btn-outline {
    border: 2px solid var(--pm-color-primary, #1B4332);
    color: var(--pm-color-primary, #1B4332);
    background: transparent;
}

/* Mobile Menu Toggle */
.pm-mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.pm-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pm-hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--pm-color-text, #1e293b);
    transition: all 0.3s;
}

.pm-mobile-toggle.is-active .pm-hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.pm-mobile-toggle.is-active .pm-hamburger-line:nth-child(2) {
    opacity: 0;
}

.pm-mobile-toggle.is-active .pm-hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Drawer */
.pm-mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    transition: right 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

.pm-mobile-menu.is-open {
    right: 0;
}

.pm-mobile-menu-header {
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.pm-mobile-nav {
    padding: 1rem;
}

.pm-mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pm-mobile-nav-menu li {
    margin: 0;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.pm-mobile-nav-menu a {
    color: var(--pm-color-text, #1e293b);
    text-decoration: none;
    font-weight: 500;
}

/* Search Component */
.pm-search-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--pm-color-text, #1e293b);
}

.pm-search-form-wrapper {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    padding: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

/* Social Icons */
.pm-social-icons {
    display: flex;
    gap: 0.75rem;
}

.pm-social-icon {
    color: var(--pm-color-text, #1e293b);
    transition: color 0.2s;
}

.pm-social-icon:hover {
    color: var(--pm-color-primary, #1B4332);
}

.pm-social-icon svg {
    width: 20px;
    height: 20px;
}

.pm-social-rounded .pm-social-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 1024px) {
    .pm-mobile-toggle {
        display: block;
    }

    .pm-header-menu {
        display: none;
    }

    .pm-header-columns {
        grid-template-columns: 1fr auto;
    }

    .pm-header-column-center {
        display: none;
    }
}

@media (max-width: 768px) {
    .pm-header-cta {
        display: none;
    }
}