/* ===== Custom Styles for Treasure Coast Golf Homes ===== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

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

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

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

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

/* Selection */
::selection {
    background: rgba(189, 26, 68, 0.4);
    color: #f5f5f5;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

/* ===== Scroll Reveal (Progressive Enhancement) ===== */
@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease-out, transform 0.7s ease-out;
    }
    
    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: always visible if JS is disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal-on-scroll {
        opacity: 1;
        transform: none;
    }
}

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

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

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

/* ===== Gold Shimmer Effect =====
   Applied to select gold-accented elements */
.gold-shimmer {
    background: linear-gradient(
        105deg,
        #f0c846 0%,
        #f5d77a 40%,
        #e6b324 60%,
        #f0c846 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* ===== Card Hover Glow ===== */
.card-glow:hover {
    box-shadow: 0 0 40px rgba(240, 200, 70, 0.06), 0 0 80px rgba(125, 23, 54, 0.04);
}

/* ===== Button Ripple ===== */
.btn-ripple {
    position: relative;
    overflow: hidden;
}

.btn-ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-ripple:active::after {
    width: 300px;
    height: 300px;
}

/* ===== Image Hover Zoom ===== */
.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.6s ease;
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* ===== Decorative Divider ===== */
.divider-gold {
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(240, 200, 70, 0.3) 50%,
        transparent 100%
    );
}

/* ===== Gradient Text Utility ===== */
.text-gradient-gold {
    background: linear-gradient(135deg, #f5d77a 0%, #e6b324 50%, #c99316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== Custom Select Arrow ===== */
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='%236b7280' stroke-width='2'%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;
    background-size: 12px;
    padding-right: 2.5rem;
}

select:focus {
    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='%23f0c846' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ===== Testimonial Quote Mark ===== */
.testimonial-quote {
    font-family: 'Cormorant Garamond', Georgia, serif;
    line-height: 1;
}

/* ===== Mobile Menu Transition ===== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

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

/* ===== Back to Top Button ===== */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

#back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    transform: translateY(10px);
}

/* ===== Input Autofill Styling ===== */
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0a0a0d inset !important;
    -webkit-text-fill-color: #f5f5f5 !important;
    caret-color: #f5f5f5;
}

/* ===== Focus Visible for Accessibility ===== */
*:focus-visible {
    outline: 2px solid rgba(240, 200, 70, 0.5);
    outline-offset: 2px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== Print Styles ===== */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}
