/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

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

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card-delayed {
    animation: float-delayed 5s ease-in-out infinite;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }
.reveal-delay-4 { transition-delay: 400ms; }

/* Navbar */
.navbar-scrolled {
    background: rgba(8, 14, 26, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    border-bottom: 1px solid rgba(13, 148, 136, 0.15) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.navbar-scrolled .nav-link {
    color: #94a3b8;
}

.navbar-scrolled .nav-link:hover {
    color: #2dd4bf;
}

/* Menu Tabs */
.menu-tab {
    position: relative;
    overflow: hidden;
}

.menu-tab::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.menu-tab:hover::after {
    opacity: 1;
}

.menu-tab.active {
    background: linear-gradient(135deg, #0d9488, #14b8a6) !important;
    border-color: transparent !important;
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.4);
}

/* Menu Cards */
.menu-card {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.menu-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s;
    border-radius: inherit;
}

.menu-card:hover {
    transform: translateY(-6px);
    border-color: rgba(13, 148, 136, 0.5) !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 40px rgba(13, 148, 136, 0.1) !important;
}

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

.menu-card:hover .menu-card-img {
    transform: scale(1.08);
}

.menu-card-img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stat Counter Animation */
.stat-item {
    position: relative;
}

.stat-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, transparent, #2dd4bf, transparent);
}

/* Button Hover Glow */
a[href="tel:13608021500"],
button[type="submit"] {
    position: relative;
    overflow: hidden;
}

a[href="tel:13608021500"]::before,
button[type="submit"]::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

a[href="tel:13608021500"]:hover::before,
button[type="submit"]:hover::before {
    opacity: 1;
}

/* Mobile Menu */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.mobile-link {
    animation: fadeInUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
}

.mobile-link:nth-child(1) { animation-delay: 0.1s; }
.mobile-link:nth-child(2) { animation-delay: 0.2s; }
.mobile-link:nth-child(3) { animation-delay: 0.3s; }
.mobile-link:nth-child(4) { animation-delay: 0.4s; }

/* Hamburger Animation */
#menu-icon line {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: center;
}

body.menu-open #menu-icon line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

body.menu-open #menu-icon line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

body.menu-open #menu-icon line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Image Placeholder Fallback */
img {
    image-rendering: auto;
}

/* Selection Color */
::selection {
    background: rgba(13, 148, 136, 0.4);
    color: #f0fdfa;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-card,
    .floating-card-delayed {
        display: none;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }
    .fixed, nav, #navbar {
        display: none;
    }
}
