/* ===== Custom Styles for Online Home Medical Solutions ===== */

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

/* Selection color */
::selection {
    background-color: #7B2D3B;
    color: white;
}

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

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

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7B2D3B;
    transition: width 0.3s ease;
}

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

/* ===== Buttons ===== */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

/* ===== Section Styles ===== */
.section-label {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #7B2D3B;
    background: linear-gradient(135deg, #fdf2f4, #fce7eb);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    border: 1px solid #f9cfd9;
}

.section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 700;
    color: #2b2523;
    line-height: 1.2;
}

.section-desc {
    font-size: 1.05rem;
    color: #8c756a;
    line-height: 1.7;
}

/* ===== Floating Cards ===== */
.floating-card {
    animation: float 4s ease-in-out infinite;
}

.floating-card:nth-child(2) {
    animation-delay: -1.3s;
    animation-duration: 4.5s;
}

.floating-card:nth-child(3) {
    animation-delay: -2.6s;
    animation-duration: 5s;
}

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

/* ===== Service Cards ===== */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(123, 45, 59, 0.12);
}

/* ===== Equip Cards ===== */
.equip-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.equip-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(123, 45, 59, 0.2);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.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; }

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

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

#backToTop:hover {
    box-shadow: 0 8px 24px rgba(123, 45, 59, 0.4);
}

/* ===== Mobile Menu ===== */
.mobile-nav-link {
    position: relative;
    padding-left: 0;
    transition: padding-left 0.3s ease, color 0.3s ease;
}

.mobile-nav-link:hover {
    padding-left: 12px;
    color: #7B2D3B;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 2px;
    background: #7B2D3B;
    transition: width 0.3s ease;
}

.mobile-nav-link:hover::before {
    width: 6px;
}

/* ===== Form Styles ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(123, 45, 59, 0.1);
}

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

    .floating-card:nth-child(1) {
        display: flex;
        position: relative;
        top: auto;
        left: auto;
        margin-top: 1rem;
        animation: none;
    }
}

/* ===== Print Styles ===== */
@media print {
    #navbar, #backToTop, .floating-card {
        display: none !important;
    }
}
