/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Helvetica Neue', Arial, sans-serif; color: #333; background: #1a1a1a; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }

/* === Header === */
.site-header { background: #1a1a1a; padding: 10px 24px; position: sticky; top: 0; z-index: 1000; }
.header-container { display: flex; align-items: center; justify-content: space-between; max-width: 1400px; margin: 0 auto; gap: 20px; }
.header-logo img { height: 50px; width: auto; }

/* Nav menu */
.header-nav { flex: 1; }
.nav-menu { display: flex; list-style: none; gap: 0; align-items: center; justify-content: flex-end; }
.nav-menu > li { position: relative; }
.nav-menu > li > a { color: #fff; font-size: 14px; padding: 10px 14px; display: block; transition: color 0.2s; white-space: nowrap; }
.nav-menu > li > a:hover { color: #ccc; }

/* Dropdown indicator arrow */
.has-dropdown > a::after { content: ''; display: inline-block; width: 0; height: 0; margin-left: 5px; vertical-align: middle; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 4px solid currentColor; }

/* Dropdown menus */
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.15); min-width: 240px; padding: 8px 0; list-style: none; z-index: 1001; }
.dropdown-menu li a { display: block; padding: 10px 20px; color: #333; font-size: 13px; transition: background 0.15s; white-space: nowrap; }
.dropdown-menu li a:hover { background: #f5f7fa; color: #009cd0; }
.has-dropdown:hover > .dropdown-menu { display: block; }

/* Header actions */
.header-actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }
.btn-apply-now { background: #233962; color: #fff; padding: 10px 20px; border-radius: 4px; font-size: 14px; font-weight: 600; display: inline-block; white-space: nowrap; }
.btn-apply-now:hover { background: #1c2d4e; }

/* Mobile menu toggle */
.mobile-menu-toggle { display: none; background: none; border: none; color: #fff; cursor: pointer; padding: 8px; }

/* Mobile responsive */
@media (max-width: 1024px) {
    .mobile-menu-toggle { display: block; }
    .header-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #1a1a1a; padding: 16px 24px; border-top: 1px solid #333; }
    .header-nav.is-open { display: block; }
    .nav-menu { flex-direction: column; gap: 0; }
    .nav-menu > li > a { padding: 12px 0; border-bottom: 1px solid #333; }
    .has-dropdown > a::after { float: right; margin-top: 6px; }
    .dropdown-menu { display: none; position: static; box-shadow: none; background: #222; border-radius: 0; padding: 0; }
    .dropdown-menu li a { padding: 10px 20px 10px 24px; color: #ccc; }
    .dropdown-menu li a:hover { background: #333; color: #fff; }
    .has-dropdown.is-open > .dropdown-menu { display: block; }
    .has-dropdown:hover > .dropdown-menu { display: none; }
    .has-dropdown.is-open:hover > .dropdown-menu { display: block; }
}

/* === Listing Page === */
.listing-page { max-width: 1400px; margin: 0 auto; }
.listing-container { display: grid; grid-template-columns: 320px 1fr; min-height: 60vh; }

/* LO Sidebar */
.lo-sidebar { background: #1a1a1a; color: #fff; padding: 32px 24px; font-family: 'Montserrat', sans-serif; }
.lo-card { text-align: center; }
.lo-headshot-wrap { margin-bottom: 16px; }
.lo-headshot { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; border: 3px solid #39513D; }
.lo-name { font-size: 22px; margin-bottom: 4px; font-weight: 700; }
.lo-firstname, .lo-lastname { display: block; }
.lo-title { font-size: 14px; font-weight: 400; color: #aaa; margin-bottom: 16px; }
.lo-details { text-align: left; font-size: 13px; line-height: 1.6; margin-bottom: 16px; font-weight: 400; }
.lo-details p { margin-bottom: 8px; }
.lo-details strong { font-weight: 600; }
.lo-details a { color: #7cb8e4; }
.lo-address { font-size: 12px; color: #aaa; }
.lo-social { display: flex; gap: 10px; justify-content: center; margin-bottom: 16px; flex-wrap: wrap; }
.lo-social-icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #333; color: #fff; transition: background 0.2s, transform 0.2s; }
.lo-social-icon:hover { background: #39513D; transform: scale(1.1); }
.lo-social-icon svg { display: block; }

/* Property Content */
.property-content { background: #222; }
.property-hero { min-height: 500px; background-size: cover; background-position: center; position: relative; display: flex; align-items: flex-end; }
.property-hero-no-image { background: #333; }
.property-hero-overlay { background: linear-gradient(transparent, rgba(0,0,0,0.85)); width: 100%; padding: 40px 32px; color: #fff; font-family: 'Montserrat', sans-serif; }
.property-address { font-size: 32px; margin-bottom: 16px; font-weight: 700; }
.property-info h2 { font-size: 16px; font-weight: 400; margin-bottom: 6px; color: #ddd; }
.property-info h2 strong { font-weight: 600; }
.btn-view-listing { display: inline-block; background: #233962; color: #fff; padding: 10px 24px; border-radius: 4px; margin-top: 16px; font-weight: 600; }
.btn-view-listing:hover { background: #1c2d4e; }

/* Status banner — displayed over the hero for sold/pending listings */
.listing-status-banner { display: inline-block; padding: 8px 24px; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: #fff; border-radius: 4px; margin-bottom: 12px; }
.listing-status-sold { background: #c0392b; }
.listing-status-pending { background: #e67e22; }

/* Gallery */
.property-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; padding: 16px 32px; }
.gallery-thumb { cursor: pointer; }
.gallery-thumb img { width: 100%; height: 160px; object-fit: cover; border-radius: 4px; transition: opacity 0.2s; }
.gallery-thumb:hover img { opacity: 0.8; }

/* 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; align-items: center; justify-content: center; }
.lightbox-overlay.active { display: flex; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; text-align: center; }
.lightbox-content img { max-width: 90vw; max-height: 85vh; object-fit: contain; border-radius: 4px; }
.lightbox-close { position: absolute; top: 16px; right: 24px; background: none; border: none; color: #fff; font-size: 40px; cursor: pointer; z-index: 10001; line-height: 1; transition: opacity 0.2s; }
.lightbox-close:hover { opacity: 0.7; }
.lightbox-prev, .lightbox-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(255,255,255,0.15); border: none; color: #fff; font-size: 28px; padding: 16px 12px; cursor: pointer; z-index: 10001; transition: background 0.2s; }
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.3); }
.lightbox-prev { left: 16px; border-radius: 4px; }
.lightbox-next { right: 16px; border-radius: 4px; }
.lightbox-counter { color: #aaa; font-size: 14px; margin-top: 12px; }

/* === Password Page === */
.password-page { display: flex; justify-content: center; align-items: center; min-height: 60vh; background: #f5f5f5; }
.password-container { background: #fff; padding: 40px; border-radius: 12px; max-width: 500px; width: 100%; }
.password-container p { margin-bottom: 16px; color: #555; }
.password-container label { display: block; margin-bottom: 4px; font-weight: 600; }
.password-container input[type="password"] { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; margin-bottom: 16px; }
.btn-enter { background: #233962; color: #fff; padding: 10px 24px; border: 0; border-radius: 4px; cursor: pointer; font-weight: 600; }
.btn-enter:hover { background: #1c2d4e; }

/* === Create Page === */
.create-page { max-width: 820px; margin: 0 auto; padding: 32px 16px; background: #f5f5f5; min-height: 60vh; }
.create-page h1 { text-align: center; margin-bottom: 24px; font-size: 28px; }

/* === Success Page === */
.success-page { display: flex; justify-content: center; padding: 32px 16px; background: #f5f5f5; min-height: 60vh; }
.success-container { background: #fff; padding: 32px; border-radius: 12px; max-width: 700px; width: 100%; }
.success-container h1 { color: #39513D; margin-bottom: 16px; }
.listing-preview { background: #f9f9f9; padding: 24px; border-radius: 8px; margin: 24px 0; }
.preview-details p { margin-bottom: 6px; }
.preview-images { display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.preview-thumb { width: 120px; height: 80px; object-fit: cover; border-radius: 4px; }
.btn-submit-another { display: inline-block; background: #233962; color: #fff; padding: 10px 24px; border-radius: 4px; font-weight: 600; }
.btn-submit-another:hover { background: #1c2d4e; }

/* === Upload Notifications === */
.upload-toasts { position: fixed; top: 16px; right: 16px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.upload-toast { padding: 12px 20px; border-radius: 6px; font-size: 13px; font-weight: 500; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,0.15); animation: toast-in 0.3s ease-out; max-width: 360px; word-break: break-word; }
.upload-toast-success { background: #27ae60; }
.upload-toast-error { background: #e74c3c; }
.upload-toast.fade-out { animation: toast-out 0.3s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(40px); } }
.upload-status-icon { display: none; position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 50%; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; z-index: 10; }
.upload-status-ok { background: #27ae60; color: #fff; }
.upload-status-fail { background: #e74c3c; color: #fff; }

/* === Error Messages === */
.error-message { color: #c0392b; background: #fdecea; padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; }
.success-message { color: #27ae60; background: #eafaf1; padding: 10px 16px; border-radius: 4px; margin-bottom: 16px; }

/* === Footer === */
.site-footer { background: #1a1a1a; color: #fff; padding: 40px 24px 0; }
.footer-container { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; max-width: 1400px; margin: 0 auto; padding-bottom: 32px; }
.footer-section h5 { font-size: 16px; margin-bottom: 16px; letter-spacing: 1px; }
.footer-contact p { font-size: 13px; line-height: 1.6; margin-bottom: 10px; color: #ccc; }
.footer-contact a { color: #7cb8e4; }
.footer-links ul { list-style: none; }
.footer-links li { margin-bottom: 6px; }
.footer-links a { font-size: 13px; color: #ccc; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-brand { text-align: center; }
.footer-logo { margin-bottom: 16px; }
.social-icons { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; }
.social-icons a { color: #fff; transition: opacity 0.2s; }
.social-icons a:hover { opacity: 0.7; }
.social-icons svg { width: 28px; height: 28px; }
.eho-logo { margin-top: 8px; }
.footer-legal { border-top: 1px solid #333; padding: 16px 0; text-align: center; max-width: 1400px; margin: 0 auto; }
.footer-legal ul { display: flex; justify-content: center; gap: 16px; list-style: none; flex-wrap: wrap; margin-bottom: 8px; }
.footer-legal a { color: #aaa; font-size: 12px; }
.copyright { color: #888; font-size: 12px; }

/* Footer debug bar */
.footer-debug { border-top: 1px solid #222; padding: 10px 0; margin-top: 8px; }
.footer-debug-inner { max-width: 1400px; margin: 0 auto; text-align: center; font-size: 11px; color: #555; font-family: 'Courier New', monospace; }
.footer-debug-inner span { vertical-align: middle; }
.footer-separator { margin: 0 6px; color: #444; }

/* === Responsive === */
@media (max-width: 768px) {
    .listing-container { grid-template-columns: 1fr; }
    .footer-container { grid-template-columns: 1fr; }
}
