/* ── Base & Utilities ── */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* ── Header Scroll State ── */
#header {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* ── Nav Links ── */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #0d9488;
    border-radius: 1px;
    transition: all 0.2s ease;
    transform: translateX(-50%);
}

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

/* ── Mobile Menu ── */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

.mobile-link {
    display: block;
}

/* ── Scroll Animations ── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger children */
.stagger-children .animate-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.stagger-children .animate-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .animate-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.stagger-children .animate-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.stagger-children .animate-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.stagger-children .animate-on-scroll:nth-child(6) { transition-delay: 0.3s; }

/* ── Back to Top ── */
#backToTop {
    transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
}

#backToTop.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#backToTop:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.35);
}

/* ── Form Focus Styles ── */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ── Selection ── */
::selection {
    background: #ccfbf1;
    color: #134e4a;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}
