/* ===================================
   La Gardenia Tea Room — Custom Styles
   =================================== */

/* ---------- Base ---------- */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #0d9488;
    color: white;
}

/* ---------- Navbar ---------- */
#navbar {
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(4, 47, 46, 0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    padding: 0;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #5eead4;
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

.btn-primary-nav {
    background: #0d9488;
    color: white !important;
    padding: 0.55rem 1.4rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-primary-nav:hover {
    background: #0f766e;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(13, 148, 136, 0.4);
}

.btn-primary-nav::after {
    display: none;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

.mobile-link {
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* ---------- Hero ---------- */
.hero-bg {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(4, 47, 46, 0.65) 0%,
        rgba(13, 47, 43, 0.55) 50%,
        rgba(4, 47, 46, 0.80) 100%
    );
}

.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

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

h1 {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

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

.hero p {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

.hero .flex {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

/* Hero buttons */
.btn-hero-primary {
    background: #0d9488;
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.4);
    border: 2px solid #0d9488;
}

.btn-hero-primary:hover {
    background: #0f766e;
    border-color: #0f766e;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(13, 148, 136, 0.5);
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all 0.3s ease;
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
    transform: translateY(-3px);
}

/* Float animations */
.float-slow { animation: float 8s ease-in-out infinite; }
.float-medium { animation: float 6s ease-in-out infinite; animation-delay: 1s; }
.float-fast { animation: float 4s ease-in-out infinite; animation-delay: 2s; }

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

/* ---------- Section Headers ---------- */
section h2 {
    position: relative;
}

/* ---------- About ---------- */
.about-img-up { animation: slideLeft 0.8s ease forwards; opacity: 0; animation-delay: 0.2s; }
.about-img-bottom { animation: slideLeft 0.8s ease forwards; opacity: 0; animation-delay: 0.4s; }
.about-img-top { animation: slideRight 0.8s ease forwards; opacity: 0; animation-delay: 0.3s; }
.about-img-down { animation: slideRight 0.8s ease forwards; opacity: 0; animation-delay: 0.5s; }

@keyframes slideLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

.about-tag { animation: fadeIn 0.6s ease forwards; opacity: 0; animation-delay: 0.1s; }
.about-title { animation: fadeIn 0.6s ease forwards; opacity: 0; animation-delay: 0.2s; }
.about-text { animation: fadeIn 0.6s ease forwards; opacity: 0; animation-delay: 0.3s; }
.about-stats { animation: fadeIn 0.6s ease forwards; opacity: 0; animation-delay: 0.4s; }
.about-badge-float { animation: badgeFloat 3s ease-in-out infinite; }

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

@keyframes badgeFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(5deg); }
}

/* ---------- Menu ---------- */
.menu-header { animation: fadeIn 0.6s ease forwards; opacity: 0; }

.menu-card {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
}

.menu-card:nth-child(1) { animation-delay: 0.1s; }
.menu-card:nth-child(2) { animation-delay: 0.2s; }
.menu-card:nth-child(3) { animation-delay: 0.3s; }

.menu-card-icon {
    animation: popIn 0.5s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
    transform: scale(0);
}

.menu-card:nth-child(2) .menu-card-icon { animation-delay: 0.3s; }
.menu-card:nth-child(3) .menu-card-icon { animation-delay: 0.4s; }

@keyframes popIn {
    0% { opacity: 0; transform: scale(0) rotate(-10deg); }
    60% { transform: scale(1.1) rotate(2deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

.menu-card:hover {
    transform: translateY(-8px);
}

.menu-card:hover .menu-card-icon {
    transform: scale(1.05) rotate(-3deg);
    transition: transform 0.3s ease;
}

.menu-cta { animation: fadeIn 0.6s ease forwards; opacity: 0; animation-delay: 0.4s; }

/* ---------- Gallery ---------- */
.gallery-header { animation: fadeIn 0.6s ease forwards; opacity: 0; }

.gallery-item {
    animation: fadeIn 0.6s ease forwards;
    opacity: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.15s; }
.gallery-item:nth-child(3) { animation-delay: 0.2s; }
.gallery-item:nth-child(4) { animation-delay: 0.25s; }
.gallery-item:nth-child(5) { animation-delay: 0.3s; }
.gallery-item:nth-child(6) { animation-delay: 0.35s; }
.gallery-item:nth-child(7) { animation-delay: 0.4s; }

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item img {
    transition: transform 0.7s ease;
}

/* ---------- Visit ---------- */
.visit-info { animation: slideLeft 0.8s ease forwards; opacity: 0; }
.visit-map { animation: slideRight 0.8s ease forwards; opacity: 0; animation-delay: 0.2s; }

/* ---------- Contact ---------- */
.contact-header { animation: fadeIn 0.6s ease forwards; opacity: 0; }
.contact-form { animation: fadeIn 0.6s ease forwards; opacity: 0; animation-delay: 0.2s; }

.btn-contact {
    background: #0d9488;
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.3);
}

.btn-contact:hover {
    background: #0f766e;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(13, 148, 136, 0.4);
}

.btn-contact:active {
    transform: translateY(-1px);
}

/* ---------- Back to Top ---------- */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background: #0d9488;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.4);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 40;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #0f766e;
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(13, 148, 136, 0.5);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    h1 {
        font-size: 2.75rem !important;
    }

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

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 0.85rem 1.5rem;
        font-size: 0.9rem;
    }

    section {
        padding-top: 4rem !important;
        padding-bottom: 4rem !important;
    }

    .grid lg\:grid-cols-2 {
        grid-template-columns: 1fr;
    }

    .grid lg\:grid-cols-3 {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .about-stats > div {
        border: none !important;
    }

    .about-stats > div:nth-child(2) {
        border-top: 1px solid #e2e8f0 !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.25rem !important;
    }

    .font-display.text-4xl {
        font-size: 2rem !important;
    }

    .font-display.text-5xl {
        font-size: 2.25rem !important;
    }
}

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

    html {
        scroll-behavior: auto;
    }

    .float-slow, .float-medium, .float-fast {
        animation: none;
    }
}
