/* ================================
   Header and Navigation Styles
   ================================ */

/* Header Container */
header {
    background: linear-gradient(180deg, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.85) 100%);
    color: white;
    padding: 0.5rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, padding, box-shadow;
}

/* Header States */
header.scrolled {
    padding: 0.25rem 0;
    box-shadow: 0 6px 30px rgba(0,0,0,0.4);
    background: linear-gradient(180deg, rgba(0,0,0,0.98) 0%, rgba(0,0,0,0.95) 100%);
}

header.hidden {
    transform: translateY(-100%);
}

header.visible {
    transform: translateY(0);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

@media (min-width: 1200px) {
    nav {
        padding: 0 3rem;
    }
}

/* ================================
   Language Selector
   ================================ */

.language-selector {
    display: flex;
    gap: 0.3rem;
    align-items: center;
    margin-left: auto;
    margin-right: 0.8rem;
    z-index: 1001;
}

.language-selector button {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 18px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.language-selector button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.language-selector button.active {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.1);
}

.language-selector button.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: #d4af37;
    border-radius: 50%;
}

/* Loading state during language switch */
body.language-switching {
    position: relative;
}

body.language-switching::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.05);
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

/* ================================
   Logo
   ================================ */

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 60px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    background-color: transparent;
    image-rendering: crisp-edges;
    image-rendering: -webkit-crisp-edges;
}

/* Shrink logo when header is scrolled */
header.scrolled .logo img {
    height: 45px;
}

.logo:hover img {
    transform: scale(1.08) rotate(2deg);
}

/* ================================
   Navigation Menu
   ================================ */

.nav-menu {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    white-space: nowrap;
    padding: 0 0.3rem;
}

/* Smaller font when scrolled */
header.scrolled .nav-link {
    font-size: 0.85rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: #d4af37;
    transition: all 0.3s;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.nav-link:hover {
    color: #d4af37;
}

/* ================================
   Rating Badge
   ================================ */

.rating-badge-container {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    margin-left: auto;
    margin-right: 1.2rem;
}

.google-rating-badge {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Smaller badge when scrolled */
header.scrolled .google-rating-badge {
    padding: 0.35rem 0.75rem;
    gap: 0.6rem;
}

.google-rating-badge:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.rating-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-number {
    color: white;
    font-size: 1.2rem;
    font-weight: 700;
    transition: font-size 0.3s;
}

header.scrolled .rating-number {
    font-size: 1rem;
}

.stars {
    display: flex;
    gap: 0.1rem;
}

.star {
    color: #d4af37;
    font-size: 1rem;
    transition: font-size 0.3s;
}

header.scrolled .star {
    font-size: 0.85rem;
}

.review-count {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin-left: 0.3rem;
    transition: font-size 0.3s;
}

header.scrolled .review-count {
    font-size: 0.75rem;
}

.google-icon {
    width: 16px;
    height: 16px;
}

/* ================================
   Platform Icons in Header
   ================================ */

.badge-platforms {
    display: flex;
    gap: 0.3rem;
    margin-left: 0.5rem;
    padding-left: 0.5rem;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.platform-icon-link {
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s;
}

.platform-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.15);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.platform-icon i {
    font-size: 0.75rem;
}

.platform-icon-link:hover .platform-icon {
    background: rgba(255,255,255,0.25);
    transform: scale(1.1);
}

/* ================================
   Hamburger Menu
   ================================ */

.hamburger {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
    transition: all 0.3s;
    outline: none;
}

.hamburger-line {
    display: block;
    width: 28px;
    height: 3px;
    background: white;
    margin: 6px 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-radius: 2px;
}

/* Hamburger Animation when Active */
.hamburger.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.hamburger:hover .hamburger-line {
    background: #d4af37;
}

/* ================================
   Mobile Menu Overlay
   ================================ */

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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