/* Base & Utilities */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(46, 204, 113, 0.2);
    color: #0a2540;
}

/* Hero Animations */
.hero-subtitle {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-title span {
    animation: slideUp 0.8s ease forwards;
    opacity: 0;
}

.hero-title span:nth-child(1) { animation-delay: 0.3s; }
.hero-title span:nth-child(2) { animation-delay: 0.45s; }
.hero-title span:nth-child(3) { animation-delay: 0.6s; }
.hero-title span:nth-child(4) { animation-delay: 0.75s; }

.hero-desc {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.hero-image-main {
    animation: floatIn 1s ease forwards;
    animation-delay: 0.5s;
    opacity: 0;
    transform: translateY(30px);
}

.hero-floating-card {
    animation: floatIn 1s ease forwards;
    animation-delay: 0.8s;
    opacity: 0;
    transform: translateY(20px);
}

.hero-image-small {
    animation: floatIn 1s ease forwards;
    animation-delay: 1s;
    opacity: 0;
    transform: scale(0.9);
}

.hero-stat {
    animation: slideUp 0.8s ease forwards;
    animation-delay: 1.1s;
    opacity: 0;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    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; }

/* Service Cards */
.service-card {
    transform: translateY(0);
    transition: transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.service-card:hover {
    transform: translateY(-8px);
}

/* Gallery */
.gallery-item {
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* Navbar */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #2ecc71, #58d689);
    transition: width 0.3s ease;
    border-radius: 1px;
}

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

/* Navbar scrolled state */
.nav-scrolled {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(10, 37, 64, 0.06);
}

.nav-scrolled .nav-link {
    color: #0a2540 !important;
}

.nav-scrolled .font-serif {
    color: #0a2540 !important;
}

/* Mobile Menu */
.mobile-link {
    position: relative;
}

/* Smooth focus styles */
input:focus, textarea:focus {
    outline: none;
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #2ecc71, #1e8449);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #58d689, #2ecc71);
}

/* About image grid */
.about-image-grid {
    position: relative;
}

/* Decorative horse shoe SVG pattern */
.pattern-dots {
    background-image: radial-gradient(circle, rgba(46, 204, 113, 0.1) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-title span {
        font-size: 2.5rem !important;
    }

    .hero-floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }

    .hero-image-small {
        display: none;
    }

    .hero-image-main {
        height: 350px !important;
    }

    .about-image-grid .absolute {
        display: none;
    }
}

/* Print styles */
@media print {
    nav, #contact, .gallery-item {
        display: none;
    }
}
