/* Custom styles for Mister Tint Kingwood */

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

/* Prevent flash of unstyled content */
body {
    opacity: 1;
}

/* Navbar scroll effect */
.nav-scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(22, 101, 52, 0.08);
}

.nav:not(.nav-scrolled) {
    background: transparent;
    box-shadow: none;
}

.nav:not(.nav-scrolled) .font-display,
.nav:not(.nav-scrolled) .text-forest-800,
.nav:not(.nav-scrolled) a:not(.bg-forest-600) {
    color: #ffffff;
}

.nav:not(.nav-scrolled) a:not(.bg-forest-600):hover {
    color: #a7f3d0;
}

/* Mobile menu */
.mobile-menu {
    max-height: 0;
}

.mobile-menu.active {
    max-height: 400px;
}

.menu-line {
    transition: all 0.3s ease;
}

.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Floating card animations */
@keyframes float1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(1deg); }
}

@keyframes float2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(-1deg); }
}

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

.floating-card-1 {
    animation: float1 4s ease-in-out infinite;
}

.floating-card-2 {
    animation: float2 5s ease-in-out infinite;
}

.floating-card-3 {
    animation: float3 4.5s ease-in-out infinite;
}

/* Service card hover */
.service-card {
    transform: translateY(0);
}

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

/* Why us cards */
.why-card {
    transform: translateY(0);
}

.why-card:hover {
    transform: translateY(-4px);
}

/* Scroll reveal animations (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s 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; }
}

/* Geometric decorative elements */
.geo-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.geo-square {
    position: absolute;
    pointer-events: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}

/* Selection color */
::selection {
    background: #166534;
    color: #ffffff;
}

/* Form select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23166534' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

/* Mobile link hover */
.mobile-link {
    display: block;
    padding: 8px 0;
    border-bottom: 1px solid #d9eed9;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Gallery image hover */
.rounded-2xl.overflow-hidden {
    position: relative;
}

.rounded-2xl.overflow-hidden::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(22, 101, 52, 0.1) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: 16px;
}

.rounded-2xl.overflow-hidden:hover::after {
    opacity: 1;
}
