/* Custom styles for Middle Creek Insurance */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Geometric Decorative Shapes */
.geo-shape {
    position: fixed;
    pointer-events: none;
    z-index: 0;
}

.geo-circle-1 {
    top: 15%;
    right: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(16, 185, 129, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    bottom: 20%;
    left: -3%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(52, 211, 153, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-triangle {
    top: 50%;
    left: 5%;
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(16, 185, 129, 0.05);
    animation: float-medium 12s ease-in-out infinite;
}

.geo-square-rotated {
    top: 70%;
    right: 8%;
    width: 60px;
    height: 60px;
    background: rgba(52, 211, 153, 0.06);
    border-radius: 12px;
    transform: rotate(45deg);
    animation: float-medium 18s ease-in-out infinite reverse;
}

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

@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

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

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: -2s;
}

.card-3 {
    animation-delay: -4s;
}

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

/* Navbar */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(4, 120, 87, 0.08);
}

.nav-scrolled .font-heading,
.nav-scrolled a:not([class*="bg-emerald"]) {
    color: #047857 !important;
}

.nav-scrolled .mobile-link {
    color: #047857 !important;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #10b981, #34d399);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* Testimonial Cards */
.testimonial-card {
    position: relative;
}

.testimonial-card::after {
    content: '"';
    position: absolute;
    top: -10px;
    right: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 8rem;
    color: rgba(16, 185, 129, 0.06);
    line-height: 1;
    pointer-events: none;
}

.testimonial-card.bg-emerald-700::after {
    color: rgba(255, 255, 255, 0.08);
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.hidden-reveal {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Button Hover Effects */
a[href="#hero"],
a[href="#services"],
a[href="#about"],
a[href="#testimonials"],
a[href="#contact"] {
    scroll-margin-top: 80px;
}

/* Input Focus States */
input:focus,
select:focus,
textarea:focus {
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
}

/* Smooth transitions for all interactive elements */
button, a {
    transition: all 0.2s ease;
}

/* Selection color */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #047857;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #34d399;
}

/* Active nav link */
.nav-link-active {
    color: #059669 !important;
    position: relative;
}

.nav-link-active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #10b981;
    border-radius: 1px;
}
