@import url('https://fonts.googleapis.com/css?family=Work+Sans');
@import url('https://fonts.googleapis.com/css2?family=Ma+Shan+Zheng&display=swap');

* {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}

html {
    height: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Work Sans', sans-serif;
    font-weight: 400;
    color: #000;
    height: 100%;
    font-size: 0.940rem;
    line-height: 1.65;
    background-color: #ffffff;
    word-wrap: break-word;
    margin: 0; /* reset */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    text-transform: uppercase;
}

h1 {
    font-size: 2rem;
    font-weight: 200;
    margin: 0;  
}

h2 {
    font-size: 1.75rem;
    font-weight: 200;
    margin-bottom: 0;
}

h3 {
    font-size: 1.5rem;
    font-weight: 200;
    margin-top: 0;
}

/* Sidebar */

.sidebar {
    position: fixed;
    background-image: url("../img/background_lunar.jpg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    top: 0;
    bottom: 0;
    text-align: center;
    width: 33%;
    color: #fff;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.sidebar-inner {
    padding: 10% 30px 30px;
    position: relative;
    z-index: 1;
}

header .logo {
    margin-bottom: 50px;
}

header h1 {
    font-size: 2.4rem;
}

header .social {
    display: flex;
    justify-content: center;
}

header .social .icon {
    margin: 10px;
}

header h2 {
    font-size: 1.438rem;
    margin-top: 1.4em;
    margin-bottom: 0.2em;
}

header p {
    margin-top: 1.4em;
    margin-bottom: 1em;
}

header .location p,
header .hours p {
    margin-top: 0;
}

header .contacts {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

header .contacts a {
    display: flex;
    color: #ede9dc;
    text-decoration: none;
    align-items: center;
    margin: 5px 15px;
}

header .contacts svg {
    margin-right: 2px;
}

header .contacts a:hover {
    text-decoration: underline;
}

/* Chinese font for menu */
main .zh {
    font-family: 'Ma Shan Zheng', cursive;
    font-size: 1.15em;
}

/* Menù */

main {
    display: block;
    margin-left: 33%;
    padding: 6%;
}

main h1 {
    margin: 0 0 10px;
}

main h2 {
    margin: 0.83em 0;
}

main h3 {
    margin-bottom: 0.5em;
}

main .section {
    display: flex;
    margin-bottom: 60px;
    justify-content: space-between;
    flex-grow: 1;   
}

main .text {
    flex-grow: 1;
    margin-bottom: 0.8em;
}

main .text h3:nth-of-type(2) {
    margin-top: 01.438rem;
}

main .plate {
    display: flex;
    align-items: center;
}

main .plate p:first-child {
    text-transform: uppercase;
}

main .plate p {
    margin: 0;  
}

main .dots {
    border-bottom: 1px solid #ededed;
    flex: 1;
    margin: 0 10px 0 10px;
}

main .description {
    margin: 0 0 20px 0;
}

main .img {
    width: 30%;
    height: auto;
    margin-left: 6%;
    box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
    border-radius: 2%;
}

main .left {
    order: -1;
    margin-left: 0;
    margin-right: 6%;
}

/* Tablet */

@media (min-width: 481px) and (max-width: 1024px) {
    .sidebar-inner {
        padding: 50% 30px;
    }

    header h1 {
        font-size: 1.8rem;
    }

    header .contacts {
        flex-direction: column;
        align-items: center;
    }

    main .section {
        flex-direction: column;
    }

    main .img {
        width: 100%;
        height: 15em;
        margin-left: 0;
    }

    main .left {
        order: 2;
        margin-right: 0;
    }
}

/* Phone */

@media (max-width: 480px) {
    .sidebar {
        position: relative;
        width: 100%;
        min-height: 100vh;
    }

    .sidebar-inner {
        padding: 50px 30px;
    }

    main {
        margin-left: 0;
        width: 100%;
    }

    main .section {
        margin-bottom: 0;
        display: flex;
        flex-direction: column;
    }

    main .img {
        display: none;
    }
    
    main .text {
        width: 100%;
    }
}

/* Animations */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatLogo {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* Logo float */
header .logo {
    animation: floatLogo 4s ease-in-out infinite;
}

/* Section reveal on scroll */
main .section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

main .section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Main heading reveal */
main > h1 {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

/* Staggered plate items */
main .section.visible .plate {
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

main .section.visible .plate:nth-child(1) { animation-delay: 0.05s; }
main .section.visible .plate:nth-child(2) { animation-delay: 0.1s; }
main .section.visible .plate:nth-child(3) { animation-delay: 0.15s; }
main .section.visible .plate:nth-child(4) { animation-delay: 0.2s; }
main .section.visible .plate:nth-child(5) { animation-delay: 0.25s; }
main .section.visible .plate:nth-child(6) { animation-delay: 0.3s; }
main .section.visible .plate:nth-child(7) { animation-delay: 0.35s; }
main .section.visible .plate:nth-child(8) { animation-delay: 0.4s; }
main .section.visible .plate:nth-child(9) { animation-delay: 0.45s; }
main .section.visible .plate:nth-child(10) { animation-delay: 0.5s; }

/* Plate hover effect */
main .plate {
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    cursor: default;
}

main .plate:hover {
    background-color: #fdf8ec;
    transform: translateX(6px);
    box-shadow: -3px 0 0 0 #d4af37;
}

/* Image hover zoom */
main .img {
    overflow: hidden;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

main .img:hover {
    transform: scale(1.03);
    box-shadow: rgba(0, 0, 0, 0.35) 0px 8px 20px;
}

/* Social icon hover */
header .social .icon {
    transition: transform 0.3s ease;
    display: inline-block;
}

header .social .icon:hover {
    transform: scale(1.25) rotate(-5deg);
}

/* Contact link hover */
header .contacts a {
    transition: color 0.3s ease, transform 0.2s ease;
}

header .contacts a:hover {
    color: #d4af37;
    transform: translateX(4px);
}

/* Section heading shimmer */
main h2 {
    display: inline-block;
    background: linear-gradient(90deg, #000 40%, #d4af37 50%, #000 60%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 4s linear infinite;
}

/* Sidebar content stagger */
.sidebar-inner > header > * {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.sidebar-inner > header > *:nth-child(1) { animation-delay: 0.1s; }
.sidebar-inner > header > *:nth-child(2) { animation-delay: 0.2s; }
.sidebar-inner > header > *:nth-child(3) { animation-delay: 0.3s; }
.sidebar-inner > header > *:nth-child(4) { animation-delay: 0.4s; }
.sidebar-inner > header > *:nth-child(5) { animation-delay: 0.5s; }
.sidebar-inner > header > *:nth-child(6) { animation-delay: 0.6s; }
.sidebar-inner > header > *:nth-child(7) { animation-delay: 0.7s; }
.sidebar-inner > header > *:nth-child(8) { animation-delay: 0.8s; }
.sidebar-inner > header > *:nth-child(9) { animation-delay: 0.9s; }
.sidebar-inner > header > *:nth-child(10) { animation-delay: 1.0s; }

/* Language switcher */
.lang-switch {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 15px 0 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    padding: 4px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.lang-btn {
    padding: 6px 22px;
    border: none;
    border-radius: 26px;
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-family: 'Work Sans', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.lang-btn:hover {
    color: #fff;
}

.lang-btn.active {
    background: #d4af37;
    color: #000;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
}

/* Language visibility */
body.lang-zh .en { display: none; }
body.lang-en .zh { display: none; }