/*
 * Shared site header styles (used by partials/site-header.blade.php).
 *
 * Self-contained: brings its own CSS variables and scopes button/logo rules
 * under .header / .mobile-nav so it can be dropped onto any page (e.g. the blog)
 * without leaking into the page body.
 *
 * Mirrors the landing header look. The landing itself is still styled by
 * landing.css; if you change the header design, update both.
 */

:root {
    --sh-orange-primary: #FF6720;
    --sh-orange-hover: #E55A10;
    --sh-orange-light: #FFF4EF;
    --sh-orange-glow: rgba(255, 103, 32, 0.2);
    --sh-bg: #ffffff;
    --sh-bg-alt: #f8fafc;
    --sh-border: #e2e8f0;
    --sh-text-primary: #1e293b;
    --sh-text-secondary: #64748b;
}

/* Header bar */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--sh-border);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

/* Logo */
.header .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.header .logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* Desktop nav */
.header .nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header .nav a {
    color: var(--sh-text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

.header .nav a:hover {
    color: var(--sh-orange-primary);
}

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

/* Buttons (scoped to the header so they don't affect the page body) */
.header .btn,
.mobile-nav .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.header .btn-ghost,
.mobile-nav .btn-ghost {
    background: transparent;
    color: var(--sh-text-secondary);
}

.header .btn-ghost:hover,
.mobile-nav .btn-ghost:hover {
    color: var(--sh-orange-primary);
}

.header .btn-primary,
.mobile-nav .btn-primary {
    background: var(--sh-orange-primary);
    color: white;
}

.header .btn-primary:hover,
.mobile-nav .btn-primary:hover {
    background: var(--sh-orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--sh-orange-glow);
}

/* Language selector */
.language-selector {
    position: relative;
    margin-left: 1rem;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    color: inherit;
    cursor: pointer;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.language-btn:hover {
    background: rgba(0, 0, 0, 0.04);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    min-width: 150px;
    z-index: 100;
}

.language-selector.active .language-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s;
}

.language-dropdown a:first-child {
    border-radius: 0.5rem 0.5rem 0 0;
}

.language-dropdown a:last-child {
    border-radius: 0 0 0.5rem 0.5rem;
}

.language-dropdown a:hover,
.language-dropdown a.active {
    background: #f3f4f6;
}

.language-dropdown a.active {
    font-weight: 600;
}

.lang-flag {
    font-size: 1.25rem;
}

/* Mobile menu button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--sh-text-primary);
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile navigation overlay */
.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 99;
    padding: 2rem;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    display: block;
    padding: 1rem;
    color: var(--sh-text-primary);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 500;
    border-bottom: 1px solid var(--sh-border);
    transition: color 0.2s;
}

.mobile-nav a:hover {
    color: var(--sh-orange-primary);
}

.mobile-nav .btn {
    margin-top: 1rem;
    text-align: center;
    border-bottom: none;
}

.mobile-nav .btn-primary {
    width: 100%;
}

/* Mobile language selector */
.mobile-nav .language-selector {
    width: 100%;
    margin: 1.5rem 0 0 0;
    padding-top: 1.5rem;
    border-top: 1px solid var(--sh-border);
}

.mobile-nav .mobile-lang-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--sh-text-secondary);
    margin-bottom: 0.75rem;
}

.mobile-nav .language-dropdown {
    position: static;
    display: flex !important;
    flex-wrap: wrap;
    gap: 0.5rem;
    box-shadow: none;
    background: transparent;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
}

.mobile-nav .language-dropdown a {
    flex: 1;
    min-width: 90px;
    padding: 0.75rem 1rem;
    background: var(--sh-bg-alt);
    border: 1px solid var(--sh-border);
    border-radius: 8px;
    color: var(--sh-text-primary);
    text-align: center;
    justify-content: center;
    font-size: 0.9rem;
}

.mobile-nav .language-dropdown a:hover,
.mobile-nav .language-dropdown a.active {
    background: var(--sh-orange-light);
    border-color: var(--sh-orange-primary);
    color: var(--sh-orange-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header .nav,
    .header-actions {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .header .container {
        height: 64px;
    }

    .mobile-nav {
        top: 64px;
    }

    .header .logo img {
        height: 38px;
    }
}
