/* ===== Custom Styles for EZ CRIBS ===== */

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

/* Section label */
.section-label {
    letter-spacing: 0.15em;
}

/* ===== Navbar ===== */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

#navbar .nav-link {
    position: relative;
}

#navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7B2D3B;
    border-radius: 1px;
    transition: width 0.3s ease;
}

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

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

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

#navbar.scrolled .font-serif {
    color: #7B2D3B !important;
}

/* ===== Hero Animations ===== */
.hero-badge {
    animation: fadeInDown 0.8s ease forwards;
    opacity: 0;
}

.hero-title {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-subtitle {
    animation: fadeInUp 0.8s ease 0.4s forwards;
    opacity: 0;
}

.hero-ctas {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

.hero-trust {
    animation: fadeInUp 0.8s ease 0.8s forwards;
    opacity: 0;
}

.hero-scroll {
    animation: fadeInUp 0.8s ease 1s forwards;
    opacity: 0;
}

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

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

/* Floating shapes */
.hero-shape {
    animation: float 6s ease-in-out infinite;
}

.shape-1 { animation-delay: 0s; }
.shape-2 { animation-delay: 2s; }
.shape-3 { animation-delay: 4s; }

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}

.hero-float {
    animation: floatHouse 4s ease-in-out infinite;
}

.float-1 { animation-delay: 0s; }
.float-2 { animation-delay: 1.5s; }

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

/* ===== 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, #7B2D3B, #f9cdd5);
    border-radius: 3xl 3xl 0 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.service-link {
    font-size: 0.95rem;
}

/* ===== Scroll Reveal ===== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.25s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.3s; }

/* ===== CTA Buttons ===== */
.cta-primary {
    box-shadow: 0 10px 40px rgba(123, 45, 59, 0.3);
}

.cta-primary:hover {
    box-shadow: 0 20px 50px rgba(123, 45, 59, 0.35);
}

/* ===== Back to Top ===== */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top.hidden-state {
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

/* ===== Mobile Menu ===== */
#mobileMenu {
    animation: slideDown 0.3s ease;
}

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

#mobileMenu a {
    display: block;
    padding: 0.5rem 0;
}

/* ===== Form Select ===== */
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='%239ca3af' 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 1rem center;
    padding-right: 2.5rem;
}

/* ===== Neighborhood Cards ===== */
.group:hover .group-hover\:scale-110 {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ===== Testimonial Cards ===== */
.scroll-reveal:nth-child(1) { transition-delay: 0.05s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.15s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.25s; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .font-serif.text-5xl {
        font-size: 2.5rem;
    }

    .font-serif.text-4xl {
        font-size: 2rem;
    }
}

/* ===== Selection Color ===== */
::selection {
    background-color: #f9cdd5;
    color: #5c1f2b;
}
