/*
Theme Name: FBN Homes
Theme URI: https://fbnhomes.com
Author: FBN Homes
Author URI: https://fbnhomes.com
Description: Custom dynamic theme for FBN Homes — navy/gold/white real-estate design system with 3D coverflow carousels for featured properties, testimonials and property galleries. Built to work with the FBN Homes Core plugin (Properties, Team, Projects, Leads, Bookings).
Version: 1.1.0
Requires at least: 5.8
Requires PHP: 7.4
Text Domain: fbn-homes-theme
*/

/* =========================================================
   FBN HOMES — Design System
   Navy / Gold / White — Mobile-first
   ========================================================= */

:root {
  --navy: #0A1F44;
  --navy-light: #14315F;
  --gold: #C9A24B;
  --gold-light: #E4C778;
  --white: #FFFFFF;
  --fog: #F5F6F8;
  --charcoal: #1E2430;
  --emerald: #1E7A50;
  --whatsapp: #25D366;
  --border: #E3E6EC;

  --font-head: 'Montserrat', sans-serif;
  --font-body: 'Inter', sans-serif;

  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 2px 10px rgba(10, 31, 68, 0.05);
  --shadow-lg: 0 8px 24px rgba(10, 31, 68, 0.09);

  --container: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--charcoal);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  padding-bottom: 72px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy);
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1 { font-size: 1.75rem; font-weight: 700; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

p { color: var(--charcoal); }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 64px 0; }
@media (min-width: 900px) { .section { padding: 88px 0; } }

.section--fog { background: var(--fog); }
.section--navy { background: var(--navy); color: var(--white); }
.section--navy h1, .section--navy h2, .section--navy h3, .section--navy p { color: var(--white); }

.eyebrow {
  color: var(--gold);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 10px;
}

.section-heading { text-align: center; max-width: 600px; margin: 0 auto 40px; }
.section-heading p { color: #5B6272; margin-top: 12px; font-size: 0.98rem; }
.section--navy .section-heading p { color: #C7CEDE; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }

.btn--gold { background: var(--gold); color: var(--navy); }
.btn--gold:hover { background: var(--gold-light); }

.btn--navy { background: var(--navy); color: var(--white); }
.btn--navy:hover { background: var(--navy-light); }

.btn--outline-gold { background: transparent; border-color: var(--gold); color: var(--white); }
.btn--outline-gold:hover { background: rgba(201,162,75,0.15); }

.btn--outline-navy { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn--outline-navy:hover { background: rgba(10,31,68,0.06); }

.btn--whatsapp { background: var(--whatsapp); color: var(--white); }
.btn--whatsapp:hover { filter: brightness(1.05); }

.btn--block { width: 100%; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  color: var(--navy);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 500;
  padding: 5px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.badge--success { border-color: var(--emerald); color: var(--emerald); }

/* ---------- Top utility bar ---------- */
.topbar { background: var(--navy); color: #C7CEDE; font-size: 0.8rem; }
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.topbar a { color: #C7CEDE; display: inline-flex; align-items: center; gap: 6px; }
.topbar a:hover { color: var(--gold-light); }
.topbar .topbar-links { display: flex; gap: 18px; }

/* ---------- Main nav ---------- */
.navbar { background: var(--white); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.25rem; color: var(--navy); display: flex; align-items: center; gap: 8px; }
.brand span { color: var(--gold); }

.nav-toggle { display: flex; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 26px; height: 2.5px; background: var(--navy); border-radius: 2px; }

.nav-links {
  position: fixed;
  top: 0;
  right: -100%;
  width: min(320px, 84vw);
  height: 100vh;
  background: var(--navy);
  padding: 90px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: right 0.3s ease;
  z-index: 200;
  overflow-y: auto;
}
.nav-links.open { right: 0; }
.nav-links a { color: var(--white); font-family: var(--font-head); font-weight: 600; font-size: 1.05rem; }
.nav-links a:hover { color: var(--gold-light); }
.nav-links ul { list-style: none; display: flex; flex-direction: column; gap: 22px; }
.nav-links > ul { gap: 22px; }
.nav-links li { position: relative; }
.nav-links .sub-menu { list-style: none; padding-left: 14px; margin-top: 14px; border-left: 2px solid var(--gold); display: flex; flex-direction: column; gap: 14px; }
.nav-close { position: absolute; top: 22px; right: 22px; background: none; border: none; color: var(--white); font-size: 1.6rem; cursor: pointer; }
.nav-overlay { display: none; position: fixed; inset: 0; background: rgba(10,31,68,0.5); z-index: 150; }
.nav-overlay.open { display: block; }
.nav-cta { display: none; }

@media (min-width: 900px) {
  .nav-toggle { display: none; }
  .nav-links { position: static; height: auto; width: auto; background: none; padding: 0; flex-direction: row; align-items: center; gap: 28px; overflow: visible; }
  .navbar, .navbar .container { overflow: visible; }
  .nav-links > ul { flex-direction: row; align-items: center; gap: 28px; }
  .nav-links a { color: var(--navy); font-size: 0.95rem; }
  .nav-links a:hover { color: var(--gold); }
  .nav-close { display: none; }
  .nav-cta { display: inline-flex; }
  .nav-links li.menu-item-has-children { position: relative; }
  .nav-links .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    background-color: #FFFFFF !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    border: 1px solid var(--border);
    border-left: 3px solid var(--gold);
    border-radius: var(--radius-sm);
    padding: 16px 22px;
    box-shadow: 0 12px 32px rgba(10,31,68,0.18);
    min-width: 250px;
    margin-top: 8px;
    z-index: 9999;
  }
  .nav-links .sub-menu::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 0;
    width: 100%;
    height: 30px;
    background: transparent;
  }
  .nav-links li.menu-item-has-children:hover .sub-menu,
  .nav-links li.menu-item-has-children.dropdown-active .sub-menu,
  .nav-links li.menu-item-has-children:focus-within .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
  .nav-links .sub-menu li { width: 100%; }
  .nav-links .sub-menu a {
    display: block;
    color: #0A1F44 !important;
    font-weight: 500;
    font-size: 0.92rem;
    white-space: nowrap;
    padding: 4px 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: center;
  background: linear-gradient(160deg, rgba(10,31,68,0.92), rgba(10,31,68,0.75)), var(--hero-image, none);
  background-size: cover;
  background-position: center;
  color: var(--white);
  text-align: center;
}
.hero .container { padding-top: 60px; padding-bottom: 60px; }
.hero h1 { color: var(--white); font-size: 1.9rem; max-width: 720px; margin: 0 auto 16px; }
.hero p.lead { color: #D9DFEC; font-size: 1.05rem; max-width: 560px; margin: 0 auto 28px; }
.hero-ctas { display: flex; flex-direction: column; gap: 14px; align-items: center; }
.hero-ctas .btn { min-width: 240px; }
.hero-trust { margin-top: 22px; font-size: 0.85rem; color: var(--gold-light); font-weight: 600; }

@media (min-width: 640px) {
  .hero h1 { font-size: 2.6rem; }
  .hero p.lead { font-size: 1.15rem; }
  .hero-ctas { flex-direction: row; justify-content: center; }
}

/* ---------- Trust bar strip ---------- */
.trust-strip { background: var(--navy); color: var(--gold-light); font-family: var(--font-head); font-weight: 600; font-size: 0.78rem; letter-spacing: 0.02em; padding: 12px 0; overflow-x: auto; border-top: 1px solid rgba(255,255,255,0.08); }
.trust-strip .container { display: flex; gap: 16px; justify-content: center; white-space: nowrap; }
.trust-strip .sep { color: rgba(255,255,255,0.3); }

/* ---------- Grid / Cards ---------- */
.grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid--2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.category-tabs { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 28px; }
.category-tab { flex: 0 0 auto; padding: 10px 20px; border-radius: 999px; border: 1.5px solid var(--border); font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; color: var(--navy); cursor: pointer; background: var(--white); }
.category-tab.active, .category-tab:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }

.property-card .thumb { position: relative; aspect-ratio: 16 / 9; background-size: cover; background-position: center; background-color: #dfe4ee; }
.property-card .tag { position: absolute; top: 12px; left: 12px; background: var(--gold); color: var(--navy); font-size: 0.72rem; font-weight: 700; padding: 5px 12px; border-radius: 999px; }
.property-card .quick-wa { position: absolute; bottom: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; background: var(--whatsapp); display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow); color: var(--white); font-size: 1.1rem; }
.property-card .body { padding: 18px; }
.property-card .price { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 1.15rem; margin-bottom: 4px; }
.property-card .loc { display: flex; align-items: center; gap: 6px; color: #5B6272; font-size: 0.85rem; margin-bottom: 10px; }
.property-card .meta { display: flex; gap: 14px; font-size: 0.8rem; color: #5B6272; }

.icon-card { padding: 26px 22px; text-align: center; }
.icon-card .icon { width: 52px; height: 52px; border-radius: 50%; background: rgba(201,162,75,0.12); display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.icon-card .icon svg { width: 26px; height: 26px; fill: var(--gold); }
.icon-card h3 { font-size: 1.05rem; margin-bottom: 8px; }
.icon-card p { font-size: 0.9rem; color: #5B6272; }

/* ---------- Pricing tables ---------- */
.pricing-table { width: 100%; border-collapse: collapse; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; font-size: 0.92rem; }
.pricing-table th, .pricing-table td { padding: 16px 18px; text-align: left; border-bottom: 1px solid var(--border); }
.pricing-table th { background: var(--navy); color: var(--white); font-family: var(--font-head); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.03em; }
.pricing-table tr:last-child td { border-bottom: none; }
.pricing-table .fee { color: var(--gold); font-weight: 700; }
.table-scroll { overflow-x: auto; }

.callout-banner { background: linear-gradient(120deg, rgba(201,162,75,0.12), rgba(201,162,75,0.04)); border: 1.5px solid var(--gold); border-radius: var(--radius); padding: 28px; text-align: center; margin: 32px 0; }
.callout-banner h3 { margin-bottom: 8px; }

/* ---------- Services two-column ---------- */
.service-block { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px; }
.service-block h3 { margin-bottom: 10px; }
.service-block p { color: #5B6272; margin-bottom: 18px; font-size: 0.95rem; }

/* ---------- Testimonials ---------- */
.testimonial { background: var(--white); border-radius: var(--radius); border: 1px solid var(--border); padding: 28px; height: 100%; }
.testimonial p.quote { font-style: italic; color: var(--charcoal); margin-bottom: 16px; }
.testimonial .author { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 0.9rem; }
.testimonial .author span { color: #5B6272; font-weight: 400; display: block; font-size: 0.8rem; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-family: var(--font-head); font-weight: 600; font-size: 0.85rem; color: var(--navy); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body); font-size: 0.95rem; background: var(--white);
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--gold); }
.form-row { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-row--2 { grid-template-columns: 1fr 1fr; } }

/* ---------- Contact cards ---------- */
.contact-card { display: flex; align-items: center; gap: 16px; padding: 20px; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); transition: border-color 0.2s ease; }
.contact-card:hover { border-color: var(--gold); }
.contact-card .icon { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: var(--gold-light); }
.contact-card .label { font-size: 0.78rem; color: #5B6272; }
.contact-card .value { font-family: var(--font-head); font-weight: 700; color: var(--navy); font-size: 0.95rem; }

.map-frame { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.map-frame iframe { width: 100%; height: 100%; border: 0; }
@media (min-width: 900px) { .map-frame { aspect-ratio: 16 / 10; } }

/* ---------- Footer ---------- */
.footer { background: var(--navy); color: #B9C1D4; padding: 48px 0 24px; }
.footer h4 { color: var(--white); font-size: 0.95rem; margin-bottom: 16px; }
.footer p { color: #B9C1D4; }
.footer a { color: #B9C1D4; display: block; margin-bottom: 10px; font-size: 0.9rem; }
.footer a:hover { color: var(--gold-light); }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 32px; }
@media (min-width: 700px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.8rem; text-align: center; color: #8792AB; }
.footer .badge { margin: 4px 6px 4px 0; color: var(--gold-light); border-color: rgba(228,199,120,0.4); }
.footer .badge.badge--success { color: #6FCF97; border-color: rgba(111,207,151,0.4); }

/* ---------- Sticky mobile CTA ---------- */
.mobile-cta { position: fixed; bottom: 0; left: 0; right: 0; display: flex; z-index: 90; box-shadow: 0 -4px 16px rgba(0,0,0,0.12); }
.mobile-cta a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 56px; font-family: var(--font-head); font-weight: 700; font-size: 0.95rem; color: var(--white); }
.mobile-cta .call { background: var(--navy); }
.mobile-cta .whatsapp { background: var(--whatsapp); }

@media (min-width: 900px) { .mobile-cta { display: none; } body { padding-bottom: 0; } }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.flex { display: flex; }
.gap-12 { gap: 12px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 640px) { .stack--row { flex-direction: row; } }

/* ---------- 3D Coverflow Carousels (Swiper.js) ---------- */
.fbn-carousel-section { padding: 48px 0; }
.fbn-carousel {
  padding: 40px 10px 60px;
}
.fbn-carousel .swiper-slide {
  width: 300px;
}
.fbn-carousel .swiper-slide .card { height: 100%; }
.fbn-carousel .swiper-pagination-bullet {
  background: var(--navy);
  opacity: 0.25;
}
.fbn-carousel .swiper-pagination-bullet-active {
  background: var(--gold);
  opacity: 1;
}
.fbn-carousel .swiper-button-next,
.fbn-carousel .swiper-button-prev {
  width: 44px;
  height: 44px;
  background: var(--white);
  border-radius: 50%;
  box-shadow: var(--shadow);
  color: var(--navy);
}
.fbn-carousel .swiper-button-next:after,
.fbn-carousel .swiper-button-prev:after {
  font-size: 16px;
  font-weight: 900;
}
.fbn-carousel .swiper-button-next:hover,
.fbn-carousel .swiper-button-prev:hover { color: var(--gold); }

.fbn-gallery-carousel { max-width: 720px; margin: 0 auto; }
.fbn-gallery-carousel .swiper-slide {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background-color: #dfe4ee;
  background-size: cover;
  background-position: center;
}

/* ---------- Single Property ---------- */
.property-hero { padding: 32px 0 8px; }
.property-meta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 16px 0; }
.property-detail-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-top: 24px; }
@media (min-width: 960px) { .property-detail-grid { grid-template-columns: 2fr 1fr; } }
.property-spec-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 20px 0; }
.property-spec-list div { background: var(--fog); border-radius: var(--radius-sm); padding: 12px 16px; font-size: 0.9rem; }
.property-spec-list strong { display: block; color: var(--navy); font-family: var(--font-head); }
.sidebar-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }

/* ---------- Landing Pages ---------- */
.landing-hero {
	position: relative;
	padding: 100px 20px;
	background-size: cover;
	background-position: center;
	color: #fff;
	text-align: center;
}
.landing-hero::before {
	content: '';
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(14, 27, 77, 0.85);
	z-index: 1;
}
.landing-hero .container {
	position: relative;
	z-index: 2;
}
.landing-hero h1 {
	font-size: 3rem;
	margin-bottom: 20px;
	color: #fff;
}
.landing-hero p.lead {
	font-size: 1.25rem;
	max-width: 800px;
	margin: 0 auto 40px;
	color: rgba(255,255,255,0.9);
}

.landing-features {
	padding: 80px 20px;
	background: #f8fafc;
}
.landing-features .section-heading {
	text-align: center;
	margin-bottom: 50px;
}
.feature-card {
	background: #fff;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.05);
	text-align: center;
	transition: transform 0.3s ease;
}
.feature-card:hover {
	transform: translateY(-5px);
}
.feature-card i {
	font-size: 3rem;
	color: var(--gold);
	margin-bottom: 20px;
}
.feature-card h3 {
	font-size: 1.3rem;
	margin-bottom: 15px;
	color: var(--navy);
}

.landing-form-section {
	padding: 80px 20px;
	background: #fff;
}

.landing-cta {
	padding: 80px 20px;
	background: var(--navy);
	color: #fff;
	text-align: center;
}
.landing-cta h2 {
	color: #fff;
	margin-bottom: 20px;
}

/* ---------- Archive filters ---------- */
.archive-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }

/* ---------- Generic page content (Terms, Projects, Team, About, etc.) ---------- */
.page-hero { background: var(--navy); padding: 44px 0; text-align: center; }
.page-hero h1 { color: var(--white); margin-top: 4px; }
.entry-content { max-width: 820px; margin: 0 auto; padding: 40px 0; }
.entry-content h2 { margin-top: 32px; margin-bottom: 12px; }
.entry-content h2:first-child { margin-top: 0; }
.entry-content h3 { margin-top: 22px; margin-bottom: 10px; }
.entry-content p { margin-bottom: 14px; color: #333; }
.entry-content ul, .entry-content ol { margin: 0 0 16px 22px; }
.entry-content li { margin-bottom: 8px; }
.entry-content a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.entry-content blockquote {
  background: var(--fog);
  border-left: 4px solid var(--gold);
  padding: 16px 20px;
  margin: 20px 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.92rem;
  color: #444;
}
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content.entry-content--wide { max-width: var(--container); }

/* ---------- Social Media Links (Footer) ---------- */
.footer-social-links { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 12px; 
    margin-top: 10px; 
}
.footer-social-links a { 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    width: 38px; 
    height: 38px; 
    border-radius: 50%; 
    background: rgba(255, 255, 255, 0.1); 
    color: var(--white); 
    transition: all 0.25s ease;
    text-decoration: none !important;
}
.footer-social-links a:hover { 
    background: var(--gold); 
    color: var(--navy); 
    transform: translateY(-3px);
}
.footer-social-links a svg {
    margin: 0;
}
