/* ========================================
   TLC Care Services — Custom Styles
   ======================================== */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

/* Selection color */
::selection {
    background-color: rgba(123, 45, 59, 0.15);
    color: #7B2D3B;
}

/* ========================================
   Scroll Reveal Animations
   Progressive enhancement: only active when JS is enabled and user prefers motion
   ======================================== */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .reveal-up,
    .js-enabled .reveal-left,
    .js-enabled .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Staggered delays for grid items */
.reveal-up:nth-child(1) { transition-delay: 0.05s; }
.reveal-up:nth-child(2) { transition-delay: 0.12s; }
.reveal-up:nth-child(3) { transition-delay: 0.19s; }
.reveal-up:nth-child(4) { transition-delay: 0.26s; }
.reveal-up:nth-child(5) { transition-delay: 0.33s; }
.reveal-up:nth-child(6) { transition-delay: 0.40s; }

/* ========================================
   Navbar
   ======================================== */
#navbar {
    background: transparent;
    transition: background-color 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* ========================================
   Mobile Menu
   ======================================== */
.mobile-link {
    display: block;
}

.mobile-link:hover {
    padding-left: 1rem;
}

/* ========================================
   Custom Select Arrow
   ======================================== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%237B2D3B' viewBox='0 0 16 16'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 01.708 0L8 10.293l5.646-5.647a.5.5 0 01.708.708l-6 6a.5.5 0 01-.708 0l-6-6a.5.5 0 010-.708z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ========================================
   Form Input Focus States
   ======================================== */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* ========================================
   Image aspect ratios
   ======================================== */
img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Subtle hover animations
   ======================================== */
a, button {
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    #navbar,
    #mobile-menu-btn,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1 !important;
        transform: none !important;
    }

    section {
        page-break-inside: avoid;
    }
}

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

    html {
        scroll-behavior: auto;
    }
}
