/*
Theme Name:  Classic Realtor
Theme URI:   https://kiucode.com
Author:      KIUCODE TECHNOLOGIES
Description: Professional real estate theme with LinkedIn-inspired design and 9 colour palettes.
Version:     1.2.0
License:     GNU General Public License v2 or later
Text Domain: connectcad-realty
*/

/* ═══════════════════════════════════════════
   DESIGN TOKENS (Mapped to LinkedIn UI)
═══════════════════════════════════════════ */
:root {
  --primary:     #F3F2EF; /* LinkedIn feed background */
  --primary-mid: #EBF3F7; /* Subtle blue tint for hovers */
  --gold:        #0A66C2; /* LinkedIn Blue */
  --gold-dim:    #004182; /* LinkedIn Dark Blue (hover state) */
  --white:       #FFFFFF; /* Solid white for cards */
  --text-light:  rgba(0, 0, 0, 0.9); /* Primary Dark Text */
  --text-muted:  rgba(0, 0, 0, 0.6); /* Secondary/Muted Text */
  --card-bg:     #FFFFFF; /* Solid white */
  --card-border: #E0DFDC; /* Standard LinkedIn border */
  --radius:      8px;     /* Tighter, modern border-radius */
  --shadow:      0 0 0 1px rgba(0,0,0,0.08); /* Flat UI, rely on borders */
  --transition:  0.2s ease-in-out;
}

/* ═══════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  /* LinkedIn standard system font stack */
  font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--primary);
  color: var(--text-light); /* Changed to dark text for light mode */
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ═══════════════════════════════════════════
   TOP BAR
═══════════════════════════════════════════ */
.top-bar {
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  padding: 8px 0;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.top-bar-contact {
  display: flex;
  gap: 16px;
  align-items: center;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.top-bar-contact a { transition: var(--transition); }
.top-bar-contact a:hover { color: var(--gold); text-decoration: underline; }
.top-bar-contact i { margin-right: 4px; font-size: 0.76rem; color: var(--text-muted); }
.top-bar-sep { color: var(--card-border); font-size: 0.75rem; }

/* Top bar social icons */
.top-bar-socials {
  display: flex;
  align-items: center;
  gap: 6px;
}
.social-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  padding: 4px 8px;
  border-radius: var(--radius);
}

.top-social-btn {
  width: 28px;
  height: 28px;
  display: block;
  transition: var(--transition);
  flex-shrink: 0;
  text-decoration: none;
}
.top-social-btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}
.top-social-btn.facebook img {
  transform: scale(0.85);
}
.top-social-btn:hover {
  transform: translateY(-2px);
}

/* ═══════════════════════════════════════════
   NAV
═══════════════════════════════════════════ */
.site-nav {
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}
.site-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.site-logo img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--card-border);
}
.logo-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-mid);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--gold);
  border: 1px solid var(--card-border);
  flex-shrink: 0;
}
.logo-text .name {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-light);
  letter-spacing: 0;
  line-height: 1.2;
}
.logo-text .title {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: none;
  margin-top: 2px;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
  position: relative;
  transition: var(--transition);
}
.nav-links a:hover { color: var(--text-light); }
.nav-cta {
  background: var(--gold);
  color: var(--white) !important;
  min-height: 36px;
  padding: 0 20px;
  border-radius: 24px; /* LinkedIn Pill shape */
  font-weight: 600 !important;
  font-size: 0.9rem !important;
  line-height: 1;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.nav-cta:hover { background: var(--gold-dim); }

/* ═══════════════════════════════════════════
   HERO
═══════════════════════════════════════════ */
.hero-section {
  padding: 16px 0;
  position: relative;
  overflow: hidden;
  background: var(--primary);
}
.hero-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: 16px 0;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--primary-mid);
  border: 1px solid transparent;
  color: var(--gold);
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.hero-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 12px;
  color: var(--text-light);
}
.hero-title .gold { color: var(--gold); }
.hero-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 20px;
  line-height: 1.6;
  max-width: 540px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-primary {
  background: var(--gold);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 24px; /* LinkedIn Pill shape */
  font-weight: 600;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
  border: 1px solid transparent; 
  cursor: pointer;
}
.btn-primary:hover { background: var(--gold-dim); }
.btn-outline-hero {
  background: transparent;
  color: var(--text-muted);
  padding: 12px 24px;
  border-radius: 24px;
  font-weight: 600;
  font-size: 1rem;
  border: 1px solid var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition);
}
.btn-outline-hero:hover { border-color: var(--text-light); color: var(--text-light); background: rgba(0,0,0,0.04); }

/* Hero photo card */
.hero-photo-wrap {
  position: relative;
  display: flex;
  justify-content: flex-end;
}
.hero-photo-card {
  position: relative;
  display: inline-block;
}
.hero-photo-card img {
  width: 100%;
  max-width: 480px;
  height: 360px;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius);
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  position: relative;
  z-index: 1;
}
.hero-exp-badge {
  position: absolute;
  bottom: 24px;
  right: 90%; /* right edge sits at 10% from left of photo = 10% overlap */
  background: var(--card-bg);
  color: var(--text-light);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  z-index: 2;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.hero-exp-badge .num { 
  font-size: 2rem; 
  line-height: 1; 
  color: var(--gold);
  font-weight: 600; 
  display: block; 
}
.hero-exp-badge .lbl { 
  font-size: 0.9rem; 
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 400;
}

/* ═══════════════════════════════════════════
   STATS
═══════════════════════════════════════════ */
.stats-section {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 24px 0;
}
.stats-section .container,
.social-section .container {
  max-width: 100%;
  margin: 0;
  padding: 0 24px;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}
.stat-item {
  text-align: center;
  padding: 16px;
  border-right: 1px solid var(--card-border);
}
.stat-item:last-child { border-right: none; }
.stat-num {
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-light);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-lbl {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   SECTION HEADER
═══════════════════════════════════════════ */
.section-header {
  text-align: center;
  margin-bottom: 24px;
}
.section-tag {
  display: inline-block;
  color: var(--gold);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--text-light);
  margin-bottom: 8px;
}
.section-header p {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════
   SERVICES
═══════════════════════════════════════════ */
.services-section { padding: 48px 0; }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  transition: var(--transition);
  position: relative;
}
.service-card:hover { 
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); 
}
.service-icon {
  width: 48px; height: 48px;
  background: var(--primary-mid);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gold);
  margin-bottom: 16px;
}
.service-card h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-light); margin-bottom: 8px; }
.service-card p { font-size: 0.9rem; color: var(--text-muted); line-height: 1.5; }

/* ═══════════════════════════════════════════
   SOCIAL MEDIA (mid-page section)
═══════════════════════════════════════════ */
.social-section {
  padding: 48px 0;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
}
.social-grid {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.social-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  border: 1px solid var(--card-border);
  border-radius: 24px;
  background: var(--card-bg);
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: var(--transition);
  min-width: 140px;
}
.social-card i, .social-card svg { font-size: 1.2rem; width: 24px; text-align: center; flex-shrink: 0; }
.social-card:hover { background: rgba(0,0,0,0.04); color: var(--text-light); }
.social-card.facebook i { color: #1877F2; }
.social-card.instagram i { color: #E1306C; }
.social-card.threads svg, .social-card.threads i { color: var(--text-light); }
.social-card.whatsapp i { color: #25D366; }
.social-card.tiktok i   { color: #010101; }

/* ═══════════════════════════════════════════
   PROPERTIES
═══════════════════════════════════════════ */
.properties-section { padding: 48px 0; }
.listings-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.listing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}
.listing-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); transform: translateY(-2px); }
.listing-img-box { position: relative; height: 200px; border-bottom: 1px solid var(--card-border); flex-shrink: 0; overflow: hidden; }
.listing-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.listing-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 4px;
  z-index: 2;
}
.listing-content { padding: 16px; flex: 1; display: flex; flex-direction: column; justify-content: flex-start; }
.listing-price { font-size: 1.2rem; font-weight: 700; color: var(--text-light); margin-bottom: 4px; }
.listing-title {
  font-size: 0.9rem; font-weight: 400; color: var(--text-light); margin-bottom: 8px;
  display: -webkit-box; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.4; max-height: 2.8em;
}
.listing-meta { display: flex; gap: 12px; font-size: 0.82rem; color: var(--text-muted); flex-wrap: wrap; }
.listing-meta span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ── Property overlay ────────────────────────────────────────────────────── */
.prop-overlay {
  display: none; position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.6); backdrop-filter: blur(4px);
  align-items: center; justify-content: center; padding: 20px;
}
.prop-overlay.open { display: flex; }
.prop-modal {
  background: var(--card-bg); border-radius: 12px; overflow: hidden;
  max-width: 560px; width: 100%; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative; animation: modalIn .2s ease;
}
@keyframes modalIn { from { opacity:0; transform:translateY(12px); } to { opacity:1; transform:none; } }
.prop-modal-img { width: 100%; height: 260px; object-fit: cover; display: block; }
.prop-modal-img-placeholder { width: 100%; height: 200px; background: var(--card-border); display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-size: 3rem; }
.prop-modal-body { padding: 24px; }
.prop-modal-badge { display: inline-block; background: var(--gold); color: #fff; font-size: 0.75rem; font-weight: 700; padding: 4px 12px; border-radius: 100px; margin-bottom: 12px; }
.prop-modal-price { font-size: 1.6rem; font-weight: 700; color: var(--text-light); margin-bottom: 4px; }
.prop-modal-addr { font-size: 1rem; color: var(--text-muted); margin-bottom: 16px; line-height: 1.5; max-height: 6rem; overflow-y: auto; scrollbar-width: thin; }
.prop-modal-meta { display: flex; gap: 20px; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; flex-wrap: wrap; }
.prop-modal-meta span { display: flex; align-items: center; gap: 6px; }
.prop-modal-link { display: inline-flex; align-items: center; gap: 8px; background: var(--gold); color: #fff; padding: 10px 20px; border-radius: var(--radius); font-weight: 600; font-size: 0.9rem; text-decoration: none; transition: opacity .15s; }
.prop-modal-link:hover { opacity: .85; }
.prop-modal-close {
  position: absolute; top: 14px; right: 14px; width: 32px; height: 32px;
  background: rgba(0,0,0,0.5); color: #fff; border: none; border-radius: 50%;
  font-size: 16px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px); transition: background .15s; z-index: 2;
}
.prop-modal-close:hover { background: rgba(0,0,0,0.8); }
.prop-video-wrap { position: relative; width: 100%; background: #000; overflow: hidden; }
.prop-video-wrap.landscape { aspect-ratio: 16/9; }
.prop-video-wrap.portrait { aspect-ratio: 9/16; height: 500px; width: auto; margin: 0 auto; }
.prop-video-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }

/* ═══════════════════════════════════════════
   CONTACT
═══════════════════════════════════════════ */
.contact-section {
  padding: 48px 0;
  background: var(--primary);
  border-top: 1px solid var(--card-border);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.contact-info h2 { font-size: 1.8rem; font-weight: 600; color: var(--text-light); margin-bottom: 12px; }
.contact-info p { color: var(--text-muted); margin-bottom: 24px; }
.contact-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  color: var(--text-light);
  font-size: 0.95rem;
}
.contact-icon {
  width: 40px; height: 40px;
  background: var(--primary-mid);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.1rem;
  flex-shrink: 0;
}
.contact-form {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
}
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--text-muted);
  border-radius: 4px;
  color: var(--text-light);
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold); }
.form-group textarea { resize: vertical; min-height: 100px; }
.wpcf7-submit, .contact-submit {
  width: 100%;
  padding: 12px;
  background: var(--gold);
  color: var(--white);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.wpcf7-submit:hover, .contact-submit:hover { background: var(--gold-dim); }

/* ═══════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════ */
.site-footer {
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  padding: 32px 0;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand .name { font-size: 1.2rem; font-weight: 600; color: var(--text-light); }
.footer-brand .name span { color: var(--gold); }
.footer-brand .tagline { font-size: 0.85rem; color: var(--text-muted); margin-top: 2px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.9rem; color: var(--text-muted); transition: var(--transition); font-weight: 600; }
.footer-links a:hover { color: var(--gold); text-decoration: underline; }
.footer-socials { display: flex; gap: 8px; }
.footer-socials a {
  width: 36px; height: 36px;
  background: transparent;
  border: 1px solid var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-muted);
  transition: var(--transition);
}
.footer-socials a:hover { border-color: var(--gold); color: var(--gold); background: var(--primary-mid); }
.footer-bottom {
  border-top: 1px solid var(--card-border);
  padding-top: 16px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-photo-wrap { order: -1; justify-content: center; }
  .hero-actions { justify-content: center; }
  .hero-desc { margin: 0 auto 20px; }
  .services-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hero-exp-badge { right: auto; left: 20px; }
  .services-section, .properties-section, .contact-section { padding: 32px 0; }
  .social-section { padding: 32px 0; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-item { border-right: none; border-bottom: 1px solid var(--card-border); }
  .stat-item:nth-child(odd) { border-right: 1px solid var(--card-border); }
  .listings-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
  .services-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .footer-inner { flex-direction: column; text-align: center; }
}