/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

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

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

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

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

/* Selection Color */
::selection {
    background: #f9a8b8;
    color: #3a0d16;
}

/* Navbar Transition States */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(125, 34, 55, 0.08), 0 4px 20px rgba(125, 34, 55, 0.06);
}

.navbar-scrolled .nav-text {
    color: #7d2237 !important;
}

.navbar-scrolled .nav-text-sub {
    color: #d44d6c !important;
}

.navbar-scrolled .menu-line {
    background: #7d2237 !important;
}

.navbar-scrolled .nav-link {
    color: #7d2237 !important;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7d2237, #f9a8b8, #7d2237);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* Department Cards */
.dept-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(58, 13, 22, 0.85) 100%);
    opacity: 0.7;
    transition: opacity 0.5s ease;
    border-radius: 16px;
    z-index: 1;
}

.dept-card:hover::after {
    opacity: 1;
}

.dept-card > * {
    position: relative;
    z-index: 2;
}

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

.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
}

.mobile-menu.active .mobile-nav-link {
    animation: fadeUp 0.4s ease forwards;
}

.mobile-menu.active .mobile-nav-link:nth-child(1) { animation-delay: 0.05s; }
.mobile-menu.active .mobile-nav-link:nth-child(2) { animation-delay: 0.1s; }
.mobile-menu.active .mobile-nav-link:nth-child(3) { animation-delay: 0.15s; }
.mobile-menu.active .mobile-nav-link:nth-child(4) { animation-delay: 0.2s; }

/* Mobile Menu Button Active State */
.mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

.mobile-menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 24px;
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal (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; }
}

/* Ensure content is visible without JS */
@media not all and (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

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

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}
