/* ===== Custom Styles for Cen's Landscaping Service ===== */

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

/* Custom selection color */
::selection {
    background-color: #1B4332;
    color: #FDFCF8;
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-up {
    animation: fadeUp 0.7s ease-out forwards;
}

@keyframes scrollLine {
    0% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        opacity: 1;
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        opacity: 0;
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scrollLine 1.5s ease-in-out infinite;
}

/* ===== Section Labels ===== */
.section-label {
    position: relative;
    display: inline-block;
}

.section-label::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 1px;
    background-color: currentColor;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

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

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

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

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background-color: #1B4332;
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

/* ===== Gallery Items ===== */
.gallery-item {
    position: relative;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(27, 67, 50, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.gallery-item:hover::after {
    opacity: 1;
}

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

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 16px;
    right: 24px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 6rem;
    line-height: 1;
    color: rgba(27, 67, 50, 0.06);
    font-style: italic;
}

/* ===== Form Styles ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%231B4332' 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: 36px;
}

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

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

/* ===== Mobile Menu Animation ===== */
.menu-line {
    transition: all 0.3s ease;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .section-label::before {
        display: none;
    }

    #hero h1 {
        font-size: 2.75rem;
    }

    .testimonial-card::before {
        font-size: 4rem;
    }
}

/* ===== Focus visible for accessibility ===== */
:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
}

/* ===== Print styles ===== */
@media print {
    nav, #contactForm, .animate-scroll-line {
        display: none;
    }
}
