/* Custom styles for The Housing Authority of the City of Hartselle */

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

/* Hide scrollbar for mobile menu */
body.menu-open {
    overflow: hidden;
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(253, 248, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.nav-scrolled .nav-link {
    color: #374151;
}

.nav-scrolled .nav-link:hover {
    color: #7f1e1e;
}

.nav-scrolled .logo-text {
    color: #7f1e1e;
}

/* Button hover effects */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover::after {
    opacity: 1;
}

/* Card hover lift */
.card-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

/* Geometric shape animations */
@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(2deg); }
}

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

.float-1 { animation: float 6s ease-in-out infinite; }
.float-2 { animation: float-delayed 8s ease-in-out infinite; }

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(127, 30, 30, 0.1);
}

/* Selection color */
::selection {
    background: #fce7e7;
    color: #7f1e1e;
}

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

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

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

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

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

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

/* Image lazy loading fade */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print styles */
@media print {
    nav, #contact-form, .reveal { display: none; }
    body { color: #000; background: #fff; }
    .bg-burgundy-950, .bg-burgundy-900 { background: #7f1e1e !important; }
}
