/* ===== Custom Styles for Main Street Townhomes ===== */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #111111;
}
::-webkit-scrollbar-thumb {
    background: #2e2e2e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C9A84C;
}

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

/* ===== Navbar Styles ===== */
.nav-scrolled {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 168, 76, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-scrolled .menu-line {
    background: #F5F0CC !important;
}

/* ===== Mobile Menu ===== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* When JS adds the class, animate from hidden */
.reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Respect reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== Property Card Hover ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ===== Gold Gradient Text ===== */
.gold-gradient-text {
    background: linear-gradient(135deg, #C9A84C, #E0CC8A, #C9A84C);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Coral Glow Effect ===== */
.coral-glow {
    box-shadow: 0 0 40px rgba(232, 99, 91, 0.15);
}

/* ===== Image Hover Zoom ===== */
.img-zoom {
    overflow: hidden;
}
.img-zoom img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.img-zoom:hover img {
    transform: scale(1.05);
}

/* ===== Button Ripple Effect ===== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}
.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}
.btn-ripple:hover::after {
    width: 300px;
    height: 300px;
}

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

/* ===== Testimonial Card Tilt ===== */
.tilt-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tilt-card:hover {
    transform: translateY(-4px);
}

/* ===== Map Filter Override ===== */
.map-section iframe {
    filter: grayscale(1) invert(0.92) contrast(0.9);
}

/* ===== Form Focus States ===== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(201, 168, 76, 0.5) !important;
    box-shadow: 0 0 0 1px rgba(201, 168, 76, 0.2) !important;
}

/* ===== Loading State for Button ===== */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}
.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(26, 26, 26, 0.3);
    border-top-color: #1a1a1a;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ===== Decorative Pattern ===== */
.pattern-grid {
    background-image: linear-gradient(rgba(201, 168, 76, 0.03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(201, 168, 76, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}
