/* Modern V3 Public Header Styles */

:root {
    --v3p-primary: #1e40af;
    --v3p-primary-dark: #1e3a8a;
    --v3p-primary-light: #3b82f6;
    --v3p-accent: #f59e0b;
    --v3p-gray-50: #f9fafb;
    --v3p-gray-100: #f3f4f6;
    --v3p-gray-200: #e5e7eb;
    --v3p-gray-300: #d1d5db;
    --v3p-gray-600: #4b5563;
    --v3p-gray-700: #374151;
    --v3p-gray-800: #1f2937;
    --v3p-gray-900: #111827;
    --v3p-white: #ffffff;
    --v3p-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --v3p-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Header Container */
.v3-public-header {
    background: var(--v3p-white);
    border-bottom: 1px solid var(--v3p-gray-200);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--v3p-shadow);
}

.v3-public-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

.v3-public-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Brand and Logo */
.v3-public-brand {
    display: flex;
    align-items: center;
}

.v3-public-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.v3-public-logo:hover {
    transform: translateX(-2px);
}

.v3-public-logo-mark {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--v3p-primary) 0%, var(--v3p-primary-dark) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.2);
}

.v3-public-logo-text {
    color: var(--v3p-white);
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
}

.v3-public-logo-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.v3-public-logo-main {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--v3p-gray-900);
    letter-spacing: -0.025em;
}

.v3-public-logo-sub {
    font-size: 1rem;
    font-weight: 600;
    color: var(--v3p-accent);
    letter-spacing: 0.05em;
}

/* Navigation */
.v3-public-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.v3-public-nav-link {
    position: relative;
    padding: 0.75rem 1.25rem;
    color: var(--v3p-gray-700);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9375rem;
    transition: color 0.2s ease;
    border-radius: 8px;
}

.v3-public-nav-link:hover {
    color: var(--v3p-primary);
    background: var(--v3p-gray-50);
}

.v3-public-nav-link.active {
    color: var(--v3p-primary);
}

.v3-public-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40%;
    height: 3px;
    background: var(--v3p-primary);
    border-radius: 3px 3px 0 0;
}

/* CTA Button */
.v3-public-actions {
    display: flex;
    align-items: center;
}

.v3-public-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--v3p-primary);
    color: var(--v3p-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px -1px rgba(30, 64, 175, 0.2);
}

.v3-public-cta:hover {
    background: var(--v3p-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(30, 64, 175, 0.3);
}

.v3-public-cta svg {
    transition: transform 0.2s ease;
}

.v3-public-cta:hover svg {
    transform: translateX(2px);
}

/* Mobile Toggle */
.v3-public-mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.v3-public-mobile-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--v3p-gray-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .v3-public-wrapper {
        height: 70px;
    }

    .v3-public-logo-mark {
        width: 40px;
        height: 40px;
    }

    .v3-public-logo-text {
        font-size: 1.5rem;
    }

    .v3-public-logo-main {
        font-size: 1.125rem;
    }

    .v3-public-logo-sub {
        font-size: 0.875rem;
    }

    .v3-public-mobile-toggle {
        display: flex;
    }

    .v3-public-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--v3p-white);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--v3p-gray-200);
        box-shadow: var(--v3p-shadow-lg);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }

    .v3-public-nav.show {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .v3-public-nav-link {
        width: 100%;
        padding: 1rem;
        text-align: center;
    }

    .v3-public-nav-link.active::after {
        display: none;
    }

    .v3-public-actions {
        display: none;
    }

    .v3-public-nav.show + .v3-public-actions {
        display: flex;
        position: absolute;
        top: calc(100% + 280px);
        left: 1rem;
        right: 1rem;
    }

    .v3-public-cta {
        width: 100%;
        justify-content: center;
    }
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Print styles */
@media print {
    .v3-public-header {
        position: static;
        box-shadow: none;
    }

    .v3-public-mobile-toggle,
    .v3-public-actions {
        display: none;
    }
}