/* McKee Realty - Professional Styles */

html { scroll-behavior: smooth; }

/* Fade in */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Listing card - clean, professional */
.listing-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.listing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(30, 58, 95, 0.1);
}

/* Hero gradient overlay */
.hero-overlay {
    background: linear-gradient(to right, rgba(30,58,95,0.85) 0%, rgba(30,58,95,0.4) 100%);
}

/* Status badges - clean */
.badge-active { background-color: #059669; }
.badge-pending { background-color: #d97706; }
.badge-closed { background-color: #4b5563; }

/* Gold accent underline */
.gold-underline {
    display: inline-block;
    border-bottom: 3px solid #c9a84c;
    padding-bottom: 4px;
}

/* Gallery thumbnails */
.gallery-thumb-btn {
    display: block;
    flex: 0 0 auto;
    border: none;
    padding: 0;
    background: transparent;
}
.gallery-thumb {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
    border: 2px solid transparent;
    display: block;
}
.gallery-thumb:hover,
.gallery-thumb.active {
    opacity: 1;
    border-color: #c9a84c;
}

/* Agent card */
.agent-card {
    transition: transform 0.2s ease;
    border: 1px solid #e5e7eb;
}
.agent-card:hover {
    transform: translateY(-2px);
}

/* Form inputs - visible, sharp */
.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #9ca3af;
    border-radius: 0.375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 0.925rem;
    background-color: #fff;
    color: #1f2937;
}
.form-input:hover {
    border-color: #6b7280;
}
.form-input:focus {
    outline: none;
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
}
.form-input::placeholder {
    color: #9ca3af;
}

/* Front-end form fields (contact, interest form) */
.form-field {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #9ca3af;
    border-radius: 0.375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    font-size: 0.925rem;
    background-color: #f9fafb;
    color: #1f2937;
}
.form-field:hover {
    border-color: #6b7280;
}
.form-field:focus {
    outline: none;
    border-color: #c9a84c;
    box-shadow: 0 0 0 3px rgba(201, 168, 76, 0.2);
    background-color: #fff;
}
.form-field::placeholder {
    color: #9ca3af;
}

/* Form section card - visible boundaries */
.form-card {
    background-color: #fff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.btn-primary {
    display: inline-block;
    background-color: #1e3a5f;
    color: white;
    padding: 0.625rem 1.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover { background-color: #2a4f7a; }

.btn-gold {
    display: inline-block;
    background-color: #c9a84c;
    color: #1e3a5f;
    padding: 0.625rem 1.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-gold:hover { background-color: #dbb95c; }

/* Price display */
.price-display {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e3a5f;
}

/* Image container */
.img-container {
    position: relative;
    overflow: hidden;
    background-color: #e5e7eb;
}
.img-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Professional card borders */
.card {
    border: 1px solid #e5e7eb;
}

/* Subtle scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #c9a84c; }
::-webkit-scrollbar-thumb:hover { background: #b8973a; }

/* ══════════════════════════════════
   LIGHTBOX
   ══════════════════════════════════ */
.lightbox-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}
.lightbox-overlay.open {
    display: flex;
}
.lightbox-overlay img {
    max-width: 95vw;
    max-height: 95vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 24px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    line-height: 1;
    z-index: 10000;
    background: none;
    border: none;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    padding: 16px;
    background: none;
    border: none;
    z-index: 10000;
}
.lightbox-prev { left: 8px; }
.lightbox-next { right: 8px; }
.lightbox-prev:hover,
.lightbox-next:hover { opacity: 1; }
.lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #888;
    font-size: 0.85rem;
    font-family: sans-serif;
}

/* ══════════════════════════════════
   MOBILE TOUCHUPS
   ══════════════════════════════════ */
@media (max-width: 768px) {
    /* Filter bar: stack filters vertically */
    .filter-bar form {
        flex-direction: column;
        gap: 0.5rem;
    }
    .filter-bar select,
    .filter-bar button {
        width: 100%;
        min-width: unset !important;
    }
    /* Listing grid: single column on mobile */
    .listings-grid {
        grid-template-columns: 1fr !important;
    }
    /* Hero sections */
    .hero-content {
        padding: 2rem 0;
    }
    .hero-content h1 {
        font-size: 1.75rem !important;
    }
    /* Prevent horizontal scroll */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        overflow-x: hidden;
    }
    body {
        overflow-x: hidden;
    }
    /* Listing detail page: stack sidebar below */
    .detail-layout {
        grid-template-columns: 1fr !important;
    }
    /* Gallery thumbnails: scrollable row */
    .gallery-thumbs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 0.25rem;
    }
    .gallery-thumbs img {
        width: 60px;
        height: 44px;
        flex-shrink: 0;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 1.4rem !important;
    }
    .contact-info-bar {
        font-size: 0.65rem;
    }
    .contact-info-bar > div {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
}
