/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Header and Navigation */
header {
    background-color: #2c3e50;
    color: white;
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.logo {
    font-size: 1.1rem;
    line-height: 1.1;
    color: white;
    display: flex;
    align-items: flex-end;
}

.logo-chinese-text {
    margin-right: 10px;
    letter-spacing: 2px;
    font-weight: bold;
}

.logo-chinese-text img {
    height: 24px;
    width: auto;
}

.logo-image {
    height: 50px;
    width: 50px;
    margin-right: 10px;
    border-radius: 50%;
}

.food-home1 {
    width: 100%;
    margin-bottom: 60px;
}

.events {
    display: flex;
    margin-bottom: 60px;
}

.event-title {
    font-size: 26px;
    letter-spacing: 0.35em;
    margin-bottom: 60px;
    text-align: center;
    line-height: 2.5;
    font-family: madefor-text-mediumbold, helveticaneuew01-45ligh, helveticaneuew02-45ligh, helveticaneuew10-45ligh, sans-serif;
}

.events-text {
    width: 70%;
    padding: 0 20px;
    line-height: 2.5;
}

.event-p {
    margin-bottom: 30px;
    text-align: center;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.2rem;
}

.face-image {
    width: 98%;
    border-radius: 8px;
}

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

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #50ebcd;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    overflow: auto;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 10px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
}

/* Page Hero */
.page-hero {
    text-align: center;
    padding: 1rem 2rem;
    background: #f8f9fa;
    color: #2c3e50;
    border-radius: 10px;
    margin-bottom: 3rem;
}

.page-hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    font-size: 1.1rem;
}

/* Gallery Section */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.gallery-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    margin-bottom: -6px;
}

.gallery-item p {
    padding: 1.5rem;
    color: #555;
}

/* Menu Links Section */
.menu-links {
    margin-bottom: 3rem;
}

.menu-links h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.menu-link-card {
    background-image: url("./assets/images/circle-wood-bg.png");
    background-position: center; /* Keeps the subject centered */
    background-repeat: no-repeat;
    background-size: cover;
    padding: 2rem;
    border-radius: 50%;
    text-align: center;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    font-size: 20px;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 148px;
    height: 148px;
}

.menu-link-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.menu-link-card:hover {
    transform: translateY(-8px) scale(1.05);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.5);
}

.menu-link-card:hover::before {
    opacity: 1;
}

.menu-link-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    color: #fff;
    font-weight: 600;
}

.menu-link-card p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

/* Info Section */
.info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    border-bottom: 2px solid #16a085;
    padding-bottom: 0.5rem;
}

.info-card p {
    color: #555;
    margin-bottom: 1.2rem;
}

.call-number {
    font-weight: bold;
    margin-top: 1rem;
}

.call-number a {
    color: #16a085;
    text-decoration: none;
}

.call-number a:hover {
    text-decoration: underline;
}

/* Content Section */
.content-section {
    margin-bottom: 3rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 50px;
}

.content-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.content-item:hover {
    transform: translateY(-5px);
}

.content-item img {
    width: 98%;
    object-fit: cover;
    margin: 10px auto 3px auto;
}

.content-item h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    color: #2c3e50;
    font-size: 1.3rem;
}

.content-item p {
    padding: 0 1.5rem 1.5rem;
    color: #555;
}

.content-item a {
    color: #16a085;
    text-decoration: none;
}

.content-item a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 3rem 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.footer-section h3 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.footer-section h4 {
    color: white;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.footer-section p {
    color: #bdc3c7;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #16a085;
}

.social-links {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7ee4ed;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #50ebcd;
}

.social-links svg {
    width: 24px;
    height: 24px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
}

.footer-bottom p {
    color: #95a5a6;
}

.reservation-form {
    max-width: 1000px;
    margin: auto;
}

.reservation-form fieldset {
    border: none;
}

/* Reservation form: place each label and its control on a single row */
.reservation-form label {
    display: inline-block;
    width: 160px;
    margin-bottom: 0.75rem;
    vertical-align: middle;
    font-weight: 600;
}

.reservation-form input[type="text"],
.reservation-form input[type="tel"],
.reservation-form input[type="email"],
.reservation-form input[type="date"],
.reservation-form input[type="time"],
.reservation-form select,
.reservation-form textarea {
    display: inline-block;
    width: calc(100% - 180px);
    padding: 0.65rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    vertical-align: middle;
    margin-bottom: 0.75rem;
}

.reservation-form select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.7rem center;
    background-size: 1em;
    padding-right: 2.5rem;
    height: 2.5rem;
    line-height: 1.5;
}

.reservation-form textarea { height: auto; }

.reservation-form .communication { 
    margin: 1rem 0 1rem 160px;
}
.reservation-form .communication legend {
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.reservation-form .communication label {
    font-weight: normal;
    margin-bottom: 0;
}
.reservation-form .communication div { display: flex; align-items: center; gap: 0.5rem;margin-bottom: 0.25rem; }

.reservation-form button.btn {
    margin-left: 160px;
    background: #16a085;
    color: #fff;
    padding: 0.7rem 1rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.reservation-form button.btn[disabled] {
    background: #ccc;
    cursor: not-allowed;
}

.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda!important;
    color: #155724!important;;
    border: 1px solid #c3e6cb!important;;
}

.alert-error {
    background-color: #f8d7da!important;;
    color: #721c24!important;;
    border: 1px solid #f5c6cb!important;;
}

.hidden {
    display: none;
}

@media (max-width: 600px) {
    .reservation-form label,
    .reservation-form input[type="text"],
    .reservation-form input[type="tel"],
    .reservation-form input[type="email"],
    .reservation-form input[type="date"],
    .reservation-form input[type="time"],
    .reservation-form select,
    .reservation-form textarea,
    .reservation-form button.btn {
        display: block;
        width: 100%;
        margin-left: 0;
        margin-bottom: 0.75rem;
    }

    .reservation-form .communication { margin-left: 0; }
}

/* Human verification compact row */
.sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.human-check-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: nowrap;
    margin-bottom: 0.75rem;
}

.human-code-wrap, .human-code-input-wrap {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.human-code-box {
    font-family: monospace;
    background: #eef;
    padding: 0.35rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.12em;
    font-weight: 700;
    min-width: 3.1ch;
    text-align: center;
}

.human-refresh-btn {
    background: transparent;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2c3e50;
}

.human-refresh-btn svg { display: block; }

.human-input.short {
    width: 200px!important;
    margin-bottom: 0!important;
    margin-left: -0.6rem!important;
    flex: 0 0 auto;
    padding: 0.45rem;
    text-transform: uppercase;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .order-page {
        padding: 0!important;
        margin-top: 0!important;
        gap: 10px!important;
    }
    .category-sidebar { 
        display: none!important;
    }
    .menu-content .category-nav {
        display: block!important;
        padding: 10px!important;
        position: static!important;
        background-color: white!important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1)!important;
        overflow-x: auto!important;
        overflow-y: hidden!important;
        -webkit-overflow-scrolling: touch!important;
        white-space: nowrap!important;
        margin-bottom: 15px!important;
    }
    .menu-content .category-nav h3 {
        display: none!important;
    }
    .menu-content .category-nav button {
        display: inline-block!important;
        width: auto!important;
        white-space: nowrap!important;
        padding: 8px 16px!important;
        margin-right: 8px!important;
        margin-bottom: 0!important;
        font-size: 14px!important;
        vertical-align: top!important;
    }
    #category-buttons-mobile {
        display: inline!important;
    }
    #category-buttons-mobile button {
        display: inline-block!important;
        width: auto!important;
        white-space: nowrap!important;
        padding: 8px 16px!important;
        margin-right: 8px!important;
        margin-bottom: 0!important;
        font-size: 14px!important;
    }
    .quantity-control {
        gap: 0!important;
    }
    .menu-item-price {
        margin: 0!important;
    }
    .menu-content {
        overflow: auto;
    }
    .menu-section h2 {
        font-size: 1.2rem;
    }
    .menu-item {
        padding: 10px 8px!important;
        flex-direction: column!important;
        align-items: flex-start!important;
        font-size: 14px!important;
    }
    .menu-item-info {
        display: flex!important;
        flex-direction: row!important;
        justify-content: space-between!important;
        width: 100%!important;
    }
    .menu-item-price {
        font-size: 16px!important;
    }
    .menu-item-price-quantity {
        margin-top: 0.5rem!important;
        width: 100%!important;
        justify-content: flex-end!important;
    }
    .cart-item {
        flex-direction: column!important;
        align-items: flex-start!important;
        gap: 0.5rem!important;
        position: relative!important;
    }
    .cart-summary {
        padding: 0!important;
        margin-top: 15px!important;
    }
    .remove-item-btn {        position: absolute!important;
        top: 5px!important;
        right: 0!important;
        position: absolute;
    }
    .cart-item-controls {
        justify-content: flex-end;
        width: 100%;
    }

    .human-check-row {
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .human-input.short {
        margin-left: 0!important;
    }

    nav {
        padding: 1rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2c3e50;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
        gap: 0;
        z-index: 1000;
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

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

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

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

    main {
        padding: 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .page-hero h1 {
        font-size: 1.8rem;
    }

    .gallery {
        grid-template-columns: 1fr;
    }

    .info-section {
        grid-template-columns: 1fr;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .events {
        display: flex;
        flex-direction: column;
        margin-bottom: 60px;
    }

    .events-text {
        width: 100%;
        line-height: 2.5;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 1rem;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .page-hero {
        padding: 2rem 1rem;
    }

    .page-hero h1 {
        font-size: 1.5rem;
    }

    .events {
        display: flex;
        flex-direction: column;
        margin-bottom: 60px;
    }

    .events-text {
        width: 100%;
        line-height: 2.5;
    }

    .hidden-480 {
        display: none;
    }
    .show-480 {
        display: block;
    }
}

/* Toast / small modal */
.toast {
    position: fixed;
    left: 50%;
    top: 24px;
    transform: translateX(-50%) translateY(10px);
    background: rgba(58, 136, 215, 0.97);
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, transform 220ms ease;
    z-index: 2000;
    min-width: 220px;
    max-width: calc(100% - 40px);
    text-align: center;
}
.toast.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

/* Toast close button */
.toast { padding-right: 2.4rem; }
.toast-close {
    position: absolute;
    right: 8px;
    top: 8px;
    background: transparent;
    border: none;
    color: #000;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    cursor: pointer;
    opacity: 0.9;
}
.toast-close:hover { background: rgba(255,255,255,0.06); }
.toast-message { padding: 0 0.4rem; }
