/* Custom styles for Healthy Living Medical Services */

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

/* Custom clip for hero diagonal */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Navigation scroll state */
.nav-scrolled {
    background: rgba(254, 254, 249, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-text {
    color: #1c1917 !important;
}

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

.mobile-menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

.mobile-menu-open .menu-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* Service card hover effects */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(217, 69, 36, 0.03) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
}

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

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Image hover zoom */
.rounded-3xl.overflow-hidden {
    overflow: hidden;
}

.rounded-3xl.overflow-hidden img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.rounded-3xl.overflow-hidden:hover img {
    transform: scale(1.05);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b8331a;
}

/* Selection color */
::selection {
    background: #fce4d8;
    color: #7a2216;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Subtle pattern for sections */
.bg-pattern-dots {
    background-image: radial-gradient(circle, rgba(217, 69, 36, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Hero image floating animation */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

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

/* Pulse dot */
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.animate-pulse {
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Counter animation */
@keyframes count-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .clip-diagonal {
        clip-path: none;
        opacity: 0.3;
    }

    #hero {
        min-height: auto;
        padding-top: 8rem;
        padding-bottom: 4rem;
    }

    .font-serif.text-5xl,
    .font-serif.text-6xl,
    .font-serif.text-7xl {
        font-size: 2.5rem !important;
    }

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

    .service-card {
        padding: 1.5rem;
    }
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #d94524;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, .scroll-indicator, #mobile-menu-btn {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    a {
        color: #000;
    }
}
