/* ===== Custom Styles for Marcia Perrin Real Estate ===== */

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

/* Custom selection color */
::selection {
    background: rgba(201, 168, 76, 0.3);
    color: #ffffff;
}

/* ===== Reveal Animations ===== */
.reveal-text {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 0.8s ease forwards;
}

.reveal-text:nth-child(1) { animation-delay: 0.1s; }
.reveal-text:nth-child(2) { animation-delay: 0.25s; }
.reveal-text:nth-child(3) { animation-delay: 0.4s; }
.reveal-text:nth-child(4) { animation-delay: 0.55s; }
.reveal-text:nth-child(5) { animation-delay: 0.7s; }
.reveal-text:nth-child(6) { animation-delay: 0.85s; }

@keyframes revealUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Scroll-triggered animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(5, 13, 26, 0.95);
    backdrop-blur-xl;
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #c9a84c !important;
}

/* ===== Mobile Menu ===== */
.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;
    transform: translateX(10px);
}

.mobile-link {
    font-size: 1.1rem;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(201, 168, 76, 0.03) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ===== Area Cards ===== */
.area-card {
    position: relative;
    overflow: hidden;
}

.area-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 1px solid rgba(201, 168, 76, 0);
    border-radius: inherit;
    transition: border-color 0.5s ease;
    pointer-events: none;
}

.area-card:hover::after {
    border-color: rgba(201, 168, 76, 0.4);
}

/* ===== Testimonial Cards ===== */
.testimonial-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

/* ===== Gold accent line animation ===== */
.gold-line {
    position: relative;
    overflow: hidden;
}

.gold-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #c9a84c, transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.gold-line:hover::after {
    transform: translateX(100%);
}

/* ===== Button hover effects ===== */
button, a {
    cursor: pointer;
}

/* ===== Form styling ===== */
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(201, 168, 76, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.15);
}

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

::-webkit-scrollbar-track {
    background: #0a1628;
}

::-webkit-scrollbar-thumb {
    background: rgba(201, 168, 76, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 168, 76, 0.5);
}

/* ===== Counter animation ===== */
.counter {
    display: inline-block;
}

/* ===== Parallax subtle effect ===== */
.parallax-slow {
    will-change: transform;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.2;
    }

    #hero h1 {
        font-size: 2.8rem !important;
    }

    .service-card,
    .testimonial-card {
        padding: 1.5rem;
    }
}

/* ===== Loading state for form ===== */
button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== Focus visible for accessibility ===== */
*:focus-visible {
    outline: 2px solid rgba(201, 168, 76, 0.6);
    outline-offset: 2px;
}
