/* Global Styles for Västertorp Sushibar */

body {
    font-family: 'Poppins', sans-serif;
    background-color: #FDFBF6;
    color: #3a3a3a;
}

.font-serif {
    font-family: 'Poppins', sans-serif;
}

/* Hero Base Styles */
.hero {
    background-size: cover;
    background-position: center;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero>* {
    position: relative;
    z-index: 2;
}

/* Navbar */
.navbar {
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
}

.navbar.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    margin: 0 1rem;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #A7FA91;
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #f0f0f0;
    transform: translateY(-2px);
}

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

.nav-link.active {
    color: #ffffff;
}

.logo {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Hamburger menu toggle button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
}

.hamburger span {
    width: 25px;
    height: 2px;
    background: #ffffff;
    margin: 3px 0;
    transition: all 0.4s cubic-bezier(0.68, -0.6, 0.32, 1.6);
    border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
    background: #A7FA91;
}

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

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
    background: #A7FA91;
}

/* Mobile styles */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        background-color: rgba(0, 0, 0, 0.9);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        transition: all 0.6s cubic-bezier(0.85, 0, 0.15, 1);
        clip-path: circle(0% at 100% 0%);
        opacity: 0;
        pointer-events: none;
        z-index: 100;
        padding-top: 0;
        border-top: none;
    }

    /* Screen reader/keyboard focus fix when hidden */
    .nav-menu:not(.active) {
        visibility: hidden;
    }

    .nav-menu.active {
        clip-path: circle(150% at 100% 0%);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-menu.active .nav-link {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-menu .nav-link:nth-child(1) {
        transition-delay: 0.1s;
    }

    .nav-menu .nav-link:nth-child(2) {
        transition-delay: 0.2s;
    }

    .nav-menu .nav-link:nth-child(3) {
        transition-delay: 0.3s;
    }

    .nav-menu .nav-link:nth-child(4) {
        transition-delay: 0.4s;
    }

    .nav-link {
        padding: 1rem 2rem;
        font-size: 1.75rem;
        font-weight: 700;
        letter-spacing: 2px;
        text-transform: uppercase;
        border-bottom: none;
        opacity: 0;
        transform: translateY(30px);
        transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
        width: 100%;
        text-align: center;
    }

    .nav-link:hover,
    .nav-link.active {
        background-color: transparent;
        color: #A7FA91;
        transform: scale(1.1);
    }

    .nav-link::after {
        display: none;
    }
}

/* Utility Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

.text-shadow-lg {
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.7);
}

/* Accessibility settings */
.nav-link:focus,
.lang-switch a:focus,
.hamburger:focus {
    outline: 2px solid #A7FA91;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .navbar {
        background-color: rgba(0, 0, 0, 1);
    }

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

/* General Layout utilities */
.container {
    max-width: 100%;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (max-width: 480px) {
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
}

/* Announcement Banner */
#announcement-banner {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translate(-50%, -150%);
    width: 90%;
    max-width: 600px;
    background: rgba(30, 30, 30, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 10000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

#announcement-banner.show {
    transform: translate(-50%, 0);
    opacity: 1;
}

#announcement-banner.hide {
    transform: translate(-50%, -150%);
    opacity: 0;
}

.announcement-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.announcement-dot {
    width: 8px;
    height: 8px;
    background-color: #fbbf24; /* Amber alert color */
    border-radius: 50%;
    box-shadow: 0 0 8px #fbbf24;
    animation: alert-pulse 2s infinite;
}

@keyframes alert-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(1.2); }
}

#announcement-banner .close-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
}

#announcement-banner .close-btn:hover {
    color: white;
}
