/* =========================================================================
   PRIME PROPERTIES — v3.0 UNIQUE PREMIUM ENHANCEMENTS
   Custom features to elevate the site beyond AI-slop:
   1. Live Market Pulse widget
   2. Neighborhood Guide cards
   3. Founder's Letter (handwritten)
   4. Live Viewers Counter
   5. Investment ROI Calculator
   6. Custom Sharjah skyline SVG
   ========================================================================= */

/* === 1. LIVE MARKET PULSE ============================================ */
.market-pulse {
  background: var(--navy);
  color: var(--white);
  padding: 50px 32px;
  border-radius: var(--radius-card);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.market-pulse::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(201,168,76,0.15), transparent 70%);
  pointer-events: none;
}
.market-pulse-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}
.market-pulse-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--white);
}
.market-pulse-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.5px;
  margin-top: 2px;
}
.market-pulse-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16,185,129,0.15);
  border: 1px solid rgba(16,185,129,0.4);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--green);
  text-transform: uppercase;
}
.market-pulse-live .live-dot {
  width: 8px; height: 8px;
  background: var(--green);
  border-radius: 50%;
  animation: livePulse 1.5s infinite;
}
@keyframes livePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
  50% { box-shadow: 0 0 0 8px rgba(16,185,129,0); }
}
.pulse-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  position: relative;
  z-index: 1;
}
.pulse-stat {
  text-align: left;
  padding: 18px 0;
  border-left: 2px solid rgba(201,168,76,0.3);
  padding-left: 18px;
}
.pulse-stat-num {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 1.8rem;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.pulse-stat-label {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.7);
  letter-spacing: 0.5px;
  line-height: 1.4;
}
.pulse-stat-delta {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  margin-top: 6px;
}
.pulse-stat-delta.up { background: rgba(16,185,129,0.2); color: var(--green); }
.pulse-stat-delta.down { background: rgba(220,38,38,0.2); color: #f87171; }
@media (max-width: 768px) {
  .pulse-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .market-pulse-header { flex-direction: column; align-items: flex-start; gap: 14px; }
}

/* === 2. NEIGHBORHOOD GUIDE =========================================== */
.neighborhood-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.neighborhood-card {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  min-height: 380px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  cursor: pointer;
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  box-shadow: var(--shadow-md);
}
.neighborhood-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.neighborhood-card .nb-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.7s ease;
}
.neighborhood-card:hover .nb-bg { transform: scale(1.06); }
.neighborhood-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15,42,71,0.1) 0%, rgba(15,42,71,0.6) 50%, rgba(15,42,71,0.95) 100%);
  z-index: 1;
}
.neighborhood-content {
  position: relative;
  z-index: 2;
  padding: 28px;
  color: var(--white);
}
.neighborhood-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.6rem;
  margin-bottom: 6px;
}
.neighborhood-tagline {
  font-size: 0.88rem;
  color: var(--soft-blue);
  margin-bottom: 16px;
  font-style: italic;
}
.neighborhood-stats {
  display: flex;
  gap: 18px;
  margin-bottom: 14px;
  padding: 12px 0;
  border-top: 1px solid rgba(201,168,76,0.3);
  border-bottom: 1px solid rgba(201,168,76,0.3);
}
.nb-stat {
  flex: 1;
}
.nb-stat-val {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gold);
  display: block;
  line-height: 1;
  margin-bottom: 4px;
}
.nb-stat-lbl {
  font-size: 0.68rem;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
}
.neighborhood-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: gap 0.3s ease;
}
.neighborhood-link:hover { gap: 12px; color: var(--white); }
.neighborhood-link svg { width: 14px; height: 14px; }
@media (max-width: 1024px) {
  .neighborhood-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .neighborhood-grid { grid-template-columns: 1fr; }
}

/* === 3. FOUNDER'S LETTER ============================================= */
.founders-letter {
  background: linear-gradient(135deg, #FFFBF0 0%, #FFF8E7 100%);
  border-radius: var(--radius-card);
  padding: 60px 50px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,0.2);
}
.founders-letter::before {
  content: '"';
  position: absolute;
  top: -40px; left: 20px;
  font-family: var(--font-head);
  font-size: 12rem;
  color: rgba(201,168,76,0.15);
  line-height: 1;
  font-weight: 900;
}
.founders-letter-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.founders-letter-eyebrow {
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold-deep);
  font-weight: 700;
  margin-bottom: 24px;
}
.founders-letter-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.85;
  color: var(--navy);
  margin-bottom: 30px;
}
.founders-signature {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 30px;
}
.founders-signature-img {
  font-family: 'Playfair Display', cursive;
  font-style: italic;
  font-size: 2rem;
  color: var(--gold-deep);
  font-weight: 400;
  letter-spacing: 1px;
}
.founders-signature-info {
  text-align: left;
  font-size: 0.88rem;
  color: var(--navy);
}
.founders-signature-info strong {
  display: block;
  font-weight: 700;
  font-family: var(--font-head);
}
.founders-signature-info span {
  font-size: 0.78rem;
  color: var(--slate);
}
@media (max-width: 768px) {
  .founders-letter { padding: 40px 28px; }
  .founders-letter-text { font-size: 1.1rem; }
}

/* === 4. LIVE VIEWERS BADGE =========================================== */
.live-viewers-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(15,42,71,0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  padding: 5px 11px;
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255,255,255,0.15);
  animation: subtlePulse 2.5s infinite;
}
.live-viewers-badge .live-dot {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  animation: livePulse 1.5s infinite;
}

/* === 5. INVESTMENT ROI CALCULATOR ==================================== */
.roi-calculator {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-md);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.roi-inputs .roi-field { margin-bottom: 22px; }
.roi-field label {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.roi-field label .field-val {
  color: var(--gold-deep);
  font-family: var(--font-head);
  font-weight: 700;
}
.roi-field input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 6px;
  background: var(--soft-blue);
  border-radius: 3px;
  outline: none;
}
.roi-field input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  background: var(--gold);
  border: 3px solid var(--white);
  box-shadow: 0 2px 6px rgba(15,42,71,0.25);
  border-radius: 50%;
  cursor: pointer;
}
.roi-output {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-card);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.roi-output .roi-headline {
  font-size: 0.78rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}
.roi-output .roi-big {
  font-family: var(--font-head);
  font-weight: 900;
  font-size: 2.6rem;
  color: var(--gold);
  margin-bottom: 8px;
  line-height: 1;
}
.roi-output .roi-sub {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.7);
  margin-bottom: 26px;
}
.roi-output .roi-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.9rem;
}
.roi-output .roi-row span:last-child { font-weight: 600; }
.roi-output .roi-verdict {
  margin-top: 20px;
  padding: 14px;
  background: rgba(16,185,129,0.15);
  border-left: 3px solid var(--green);
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--white);
}
.roi-output .roi-verdict.bad {
  background: rgba(245,158,11,0.15);
  border-left-color: var(--amber);
}
@media (max-width: 768px) {
  .roi-calculator { grid-template-columns: 1fr; padding: 28px; gap: 24px; }
}

/* === 6. SHARJAH SKYLINE SVG ========================================== */
.sharjah-skyline {
  width: 100%;
  height: 120px;
  display: block;
  margin: 0 auto;
  max-width: 1100px;
  color: var(--navy);
}
.sharjah-skyline .skyline-building { fill: currentColor; }
.sharjah-skyline .skyline-gold { fill: var(--gold); opacity: 0.85; }
.sharjah-skyline .skyline-window { fill: var(--gold); opacity: 0.6; }

/* === 7. AGENCY COMPARISON TABLE (vs competitors) ===================== */
.comparison-table-wrap {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 40px;
  box-shadow: var(--shadow-md);
  overflow-x: auto;
}
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.comparison-table th {
  background: var(--navy);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 700;
  padding: 18px 16px;
  text-align: left;
}
.comparison-table th.us {
  background: var(--gold);
  color: var(--navy);
  position: relative;
}
.comparison-table th.us::after {
  content: 'OUR TIER';
  position: absolute;
  top: 4px; left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  letter-spacing: 1.5px;
  font-family: var(--font-body);
  font-weight: 700;
  opacity: 0.7;
}
.comparison-table td {
  padding: 16px;
  border-bottom: 1px solid var(--navy-10);
  text-align: left;
  color: var(--slate);
}
.comparison-table td.us {
  background: rgba(201,168,76,0.08);
  color: var(--navy);
  font-weight: 600;
}
.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table .check { color: var(--green); font-weight: 700; }
.comparison-table .cross { color: var(--red); font-weight: 700; }
.comparison-table .partial { color: var(--amber); font-weight: 700; }

/* === 8. MICRO-INTERACTIONS =========================================== */
/* Subtle gold underline on link hover */
.link-underline {
  position: relative;
  display: inline-block;
}
.link-underline::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 1px;
  background: var(--gold);
  transition: width 0.4s ease;
}
.link-underline:hover::after { width: 100%; }

/* Card with corner accent */
.corner-accent {
  position: relative;
}
.corner-accent::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 30px; height: 30px;
  border-top: 2px solid var(--gold);
  border-left: 2px solid var(--gold);
  border-radius: var(--radius-card) 0 0 0;
  pointer-events: none;
}
.corner-accent::after {
  content: '';
  position: absolute;
  bottom: 0; right: 0;
  width: 30px; height: 30px;
  border-bottom: 2px solid var(--gold);
  border-right: 2px solid var(--gold);
  border-radius: 0 0 var(--radius-card) 0;
  pointer-events: none;
}

/* Premium gold bullet */
.gold-bullet {
  list-style: none;
  padding-left: 0;
}
.gold-bullet li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--slate);
}
.gold-bullet li::before {
  content: '◆';
  position: absolute;
  left: 0; top: 0;
  color: var(--gold);
  font-size: 0.7rem;
}

/* Property card hover: show "View Details" overlay hint */
.property-card-v2 .view-hint {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(180deg, transparent, var(--navy));
  color: var(--gold);
  padding: 18px 24px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-align: center;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.4s ease, transform 0.4s ease;
  pointer-events: none;
  z-index: 3;
}
.property-card-v2:hover .view-hint {
  opacity: 1;
  transform: translateY(0);
}

/* === 9. SMOOTHER MODAL & GALLERY ===================================== */
.modal-close {
  background: rgba(15,42,71,0.85);
  backdrop-filter: blur(8px);
  color: var(--white);
  border: 1px solid rgba(201,168,76,0.4);
}
.modal-close:hover {
  background: var(--gold);
  color: var(--navy);
  border-color: var(--gold);
}
.gallery-nav {
  background: rgba(15,42,71,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(201,168,76,0.4);
  color: var(--white);
}
.gallery-nav:hover {
  background: var(--gold);
  color: var(--navy);
}

/* === 10. REFINED TYPOGRAPHY ========================================= */
.hero h1 {
  letter-spacing: -0.5px;
  font-weight: 700;
}
.section-intro {
  letter-spacing: 0.1px;
  line-height: 1.7;
}
.eyebrow {
  letter-spacing: 4px;
  font-weight: 600;
}
.btn {
  letter-spacing: 0.2px;
}

/* === 11. PROPERTY CARD COMPARE TOGGLE FIX =========================== */
.property-card-v2 .compare-toggle {
  position: absolute;
  bottom: 14px; right: 14px;
  background: rgba(255,255,255,0.95);
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background var(--transition), color var(--transition);
  z-index: 4;
  letter-spacing: 0.3px;
}
.property-card-v2 .compare-toggle.active {
  background: var(--navy);
  color: var(--gold);
}

/* === 12. CHATBOT REFINEMENTS ======================================== */
.chatbot-window {
  border: 1px solid rgba(201,168,76,0.3);
  box-shadow: 0 30px 80px rgba(15,42,71,0.4), 0 0 0 1px rgba(201,168,76,0.15);
}
.chatbot-toggle {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  box-shadow: 0 6px 20px rgba(201,168,76,0.5), 0 0 0 4px rgba(201,168,76,0.15);
}
.chat-handoff {
  background: linear-gradient(135deg, #0E9C6E 0%, var(--green) 100%);
  font-weight: 700;
  letter-spacing: 0.3px;
}

/* === 13. UTILITY ANIMATIONS ========================================= */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes pulse-soft {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* === 14. CONTACT FORM FIXES ========================================= */
/* Make sure contact form labels are properly associated */
.styled-form-premium .form-row-premium label {
  display: block;
}

/* === 15. PREMIUM TOUCHES FOR MOBILE ================================= */
@media (max-width: 768px) {
  .market-pulse { padding: 32px 20px; }
  .founders-letter { padding: 32px 24px; }
  .roi-calculator { padding: 24px 20px; }
  .comparison-table-wrap { padding: 20px 16px; }
  .neighborhood-card { min-height: 320px; }
  .neighborhood-content { padding: 22px 20px; }
  .neighborhood-name { font-size: 1.35rem; }
}
