/* ============================================================
   Lion Trust Spain — Community Page CSS
   Scoped under .community-page to avoid theme conflicts.
   Brand: navy #1a4d6e + orange #f47920
   ============================================================ */

.community-page {
  --cp-navy: #1a4d6e;
  --cp-navy-dark: #143d59;
  --cp-orange: #f47920;
  --cp-orange-hover: #e06a14;
  --cp-text: #404040;
  --cp-text-light: #666;
  --cp-border: #e5e5e5;
  --cp-bg-light: #f5f5f0;
  --cp-bg-grey: #f7f7f4;

  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--cp-text);
  font-size: 15px;
  line-height: 1.7;
}

.community-page * { box-sizing: border-box; }

.community-page a { color: var(--cp-navy); text-decoration: none; }
.community-page a:hover { text-decoration: underline; }

.community-page p { margin: 0; }

.community-page h1,
.community-page h2,
.community-page h3,
.community-page h4 {
  font-family: 'Open Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--cp-navy);
  font-weight: 600;
  margin: 0 0 16px;
  line-height: 1.3;
}

.cp-container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- BREADCRUMB ---------- */
.cp-breadcrumb {
  font-size: 14px;
  margin: 30px 0;
  color: var(--cp-text-light);
}
.cp-breadcrumb a { color: var(--cp-navy); }
.cp-breadcrumb .sep { margin: 0 8px; color: #bbb; }
.cp-breadcrumb .current { color: var(--cp-text-light); }

/* ---------- INTRO TWO-COLUMN (50/50) ---------- */
.cp-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-bottom: 50px;
  align-items: start;
}
.cp-intro__text h1 {
  font-size: 26px;
  color: var(--cp-navy);
  margin-bottom: 18px;
}
.cp-intro__text p {
  font-size: 14px;
  line-height: 1.75;
  color: #555;
}

.cp-intro__card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.cp-intro__card-img {
  width: 100%;
  border-radius: 4px;
  overflow: hidden;
  line-height: 0;
}
.cp-intro__card-img img {
  width: 100%;
  height: auto;
  display: block;
}
.cp-intro__card-cta {
  display: block;
  width: 100%;
  text-align: center;
}

/* ---------- SECTION HEADING ---------- */
.cp-section-heading {
  font-size: 20px;
  color: var(--cp-navy);
  margin: 0 0 20px;
  font-weight: 600;
}
.cp-section-heading--center {
  text-align: center;
  margin-bottom: 30px;
}

.cp-subheading {
  font-size: 16px;
  color: var(--cp-navy);
  margin: 22px 0 8px;
  font-weight: 600;
}

/* ---------- BUTTONS ---------- */
.cp-btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease;
}
.cp-btn--orange,
a.cp-btn--orange {
  background: var(--cp-orange);
  color: #fff;
}
.cp-btn--orange:hover,
a.cp-btn--orange:hover {
  background: var(--cp-orange-hover);
  color: #fff;
  text-decoration: none;
}
.cp-btn--inline {
  margin-top: 12px;
  padding: 10px 22px;
  font-size: 13px;
}

/* ---------- EXPLORE / FILTER TABS ---------- */
.cp-explore {
  margin-bottom: 35px;
}
.cp-filter-box {
  background: var(--cp-bg-light);
  border: 1px solid #e8e6dd;
  border-radius: 4px;
  padding: 22px 26px;
}
.cp-filter-box__label {
  font-size: 15px;
  color: var(--cp-navy);
  font-weight: 600;
  margin: 0 0 14px;
  padding: 0;
  line-height: 1.3;
}
.cp-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.cp-tab {
  background: #fff;
  border: 1px solid #d8d8d8;
  border-radius: 4px;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--cp-text);
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}
.cp-tab:hover { border-color: var(--cp-navy); }
.cp-tab.is-active {
  background: var(--cp-navy);
  color: #fff;
  border-color: var(--cp-navy);
}

/* ---------- LISTINGS HEADER ---------- */
.cp-listings { margin-bottom: 40px; }
.cp-listings__toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.cp-listings__count {
  font-size: 14px;
  color: var(--cp-text);
}
.cp-listings__controls {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cp-sort-label { font-size: 13px; color: var(--cp-text-light); }
.cp-sort {
  padding: 8px 28px 8px 12px;
  border: 1px solid var(--cp-border);
  border-radius: 4px;
  background: #fff;
  font-size: 13px;
  font-family: inherit;
  color: var(--cp-text);
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'><path d='M0 2l5 6 5-6z' fill='%23666'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.cp-view-toggle {
  display: flex;
  gap: 4px;
}
.cp-view-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--cp-border);
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  color: var(--cp-text-light);
  border-radius: 3px;
}
.cp-view-btn.is-active {
  background: var(--cp-navy);
  color: #fff;
  border-color: var(--cp-navy);
}

.cp-cards-placeholder {
  min-height: 100px;
  /* Property cards from existing template go here */
}

/* ---------- PAGINATION ---------- */
.cp-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 30px;
  flex-wrap: wrap;
}
.cp-page,
.cp-page-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--cp-border);
  border-radius: 3px;
  font-size: 13px;
  color: var(--cp-text);
  background: #fff;
}
.cp-page.is-active {
  background: var(--cp-orange);
  color: #fff;
  border-color: var(--cp-orange);
}
.cp-page:hover:not(.is-active),
.cp-page-arrow:hover {
  border-color: var(--cp-navy);
  text-decoration: none;
}
.cp-page-info {
  text-align: center;
  font-size: 13px;
  color: var(--cp-text-light);
  margin-top: 8px;
}

/* ---------- PRIVACY NOTICE ---------- */
.cp-privacy-notice {
  text-align: center;
  margin: 40px 0;
  padding: 30px 20px;
  border-top: 1px solid var(--cp-border);
  border-bottom: 1px solid var(--cp-border);
}
.cp-privacy-notice p {
  font-style: italic;
  font-size: 14px;
  font-weight: 700;
  color: var(--cp-text);
  margin-bottom: 18px;
}

/* ---------- EXPERT INSIGHT ---------- */
.cp-expert { margin-bottom: 45px; }
.cp-expert__grid {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  align-items: start;
}
.cp-expert__photo img {
  width: 100%;
  border-radius: 4px;
  display: block;
}
.cp-expert__intro {
  font-style: italic;
  color: var(--cp-text-light);
  font-size: 14px;
}
.cp-expert__text p {
  font-size: 14px;
  line-height: 1.75;
}

/* ---------- CONTACT BANNER ---------- */
.cp-contact-banner {
  background: #1b4f72;
  color: #fff;
  padding: 36px 30px;
  border-radius: 12px;
  text-align: center;
  margin: 40px 0;
}
.cp-contact-banner p {
  margin: 0px 0;
  font-size: 16px;
  line-height: 1.7;
}
.cp-contact-banner__title {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 0px !important;
}
.cp-contact-banner a {
  color: #fff;
  text-decoration: underline;
  font-weight: 600;
}

/* ---------- TEXT BLOCKS ---------- */
.cp-text-block {
  margin-bottom: 35px;
}
.cp-text-block p {
  font-size: 14px;
  line-height: 1.75;
}

.cp-divider {
  border: none;
  border-top: 1px solid var(--cp-border);
  margin: 20px 0 35px;
}

/* ---------- COMMUNITIES BOX ---------- */
.cp-communities {
  background: var(--cp-bg-light);
  border-radius: 4px;
  padding: 25px 30px;
  margin: 30px 0 40px;
}
.cp-communities__title {
  font-size: 17px;
  color: var(--cp-navy);
  margin: 0 0 14px;
  font-weight: 600;
}
.cp-communities__list {
  list-style: disc;
  padding-left: 22px;
  margin: 0;
  columns: 1;
}
.cp-communities__list li {
  margin: 5px 0;
  font-size: 14px;
}
.cp-communities__list a {
  color: var(--cp-navy);
}

/* ---------- WHY BUYERS CHOOSE ---------- */
.cp-why { margin-bottom: 40px; }
.cp-why p {
  font-size: 14px;
  margin-bottom: 8px;
}

/* ---------- BUYING PROPERTY (full-width strip) ---------- */
.cp-buying {
  background: var(--cp-bg-grey);
  padding: 50px 0 60px;
  margin: 40px 0 50px;
}
.cp-buying__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}
.cp-buying__col {
  background: #fff;
  border: 1px solid #e8e6dd;
  border-radius: 4px;
  padding: 30px;
}
.cp-buying__col-title {
  font-size: 16px;
  color: var(--cp-navy);
  font-weight: 600;
  margin: 0 0 18px;
}
.cp-buying__col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--cp-text);
  margin: 16px 0 4px;
}
.cp-buying__col p {
  font-size: 13.5px;
  line-height: 1.65;
  color: var(--cp-text);
  margin-bottom: 0;
}

/* ---------- FAQ ---------- */
.cp-faq {
  max-width: 820px;
  margin: 0 auto 50px;
}
.cp-faq__item {
  border: 1px solid var(--cp-border);
  border-radius: 3px;
  margin-bottom: 8px;
  background: #fff;
  overflow: hidden;
}
.cp-faq__q {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  background: #fff;
  border: none;
  font-size: 14px;
  font-weight: 500;
  color: var(--cp-text);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.2s;
}
.cp-faq__q:hover { background: #fafaf7; }
.cp-faq__icon {
  font-size: 18px;
  color: var(--cp-text-light);
  flex-shrink: 0;
  margin-left: 16px;
}
.cp-faq__a {
  display: none;
  padding: 0 20px 16px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--cp-text);
}
.cp-faq__item.is-open .cp-faq__a { display: block; }
.cp-faq__item.is-open .cp-faq__q { background: #fafaf7; }

/* ---------- CTA BANNER (NAVY FULL-WIDTH) ---------- */
.cp-cta-banner {
  background: var(--cp-navy);
  color: #fff;
  padding: 50px 0;
  margin: 50px 0;
  text-align: center;
}
.cp-cta-banner h2 {
  color: #fff;
  font-size: 22px;
  margin-bottom: 12px;
}
.cp-cta-banner p {
  font-size: 15px;
  margin-bottom: 24px;
  color: #e0e7ed;
}

/* ---------- NEARBY LOCATIONS ---------- */
.cp-nearby {
  margin: 40px 0 60px;
}
.cp-nearby__title {
  font-size: 18px;
  color: var(--cp-navy);
  margin-bottom: 20px;
  font-weight: 600;
}
.cp-nearby__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.cp-nearby__card {
  display: block;
  border: 1px solid var(--cp-border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  transition: box-shadow 0.25s, transform 0.25s;
  color: inherit;
}
.cp-nearby__card:hover {
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transform: translateY(-2px);
  text-decoration: none;
}
.cp-nearby__img {
  width: 100%;
  height: 140px;
  overflow: hidden;
}
.cp-nearby__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cp-nearby__body {
  padding: 14px 16px 18px;
}
.cp-nearby__body h3 {
  font-size: 14px;
  margin: 0 0 10px;
  color: var(--cp-navy);
  font-weight: 600;
  line-height: 1.35;
}
.cp-nearby__link {
  font-size: 13px;
  color: var(--cp-navy);
  font-weight: 500;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .cp-intro { grid-template-columns: 1fr; }
  .cp-buying__grid { grid-template-columns: 1fr; }
  .cp-nearby__grid { grid-template-columns: repeat(2, 1fr); }
  .cp-expert__grid { grid-template-columns: 1fr; }
  .cp-expert__photo { max-width: 200px; }
}

@media (max-width: 560px) {
  .cp-intro__text h1 { font-size: 22px; }
  .cp-listings__toolbar { flex-direction: column; align-items: flex-start; }
  .cp-tabs { gap: 6px; }
  .cp-tab { padding: 8px 14px; font-size: 13px; }
  .cp-nearby__grid { grid-template-columns: 1fr; }
  .cp-btn { padding: 12px 20px; font-size: 13px; }
}

/* ============================================================
   Archive / main listing page (/popular-locations/)
   ============================================================ */

.lt-loc-archive {
  padding: 40px 0 60px;
}

.lt-loc-archive__header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 40px;
}

.lt-loc-archive__title {
  font-size: 32px;
  margin: 0 0 12px;
}

.lt-loc-archive__subtitle {
  color: var(--cp-text-light);
  font-size: 16px;
  margin: 0 0 28px;
}

.lt-loc-search {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
}

.lt-loc-search__input {
  width: 100%;
  padding: 14px 48px 14px 22px;
  font-size: 15px;
  border: 1px solid var(--cp-border);
  border-radius: 999px;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
  font-family: inherit;
  color: var(--cp-text);
}

.lt-loc-search__input:focus {
  border-color: var(--cp-navy);
  box-shadow: 0 0 0 3px rgba(26, 77, 110, 0.12);
}

.lt-loc-search__icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--cp-text-light);
  pointer-events: none;
}

.lt-loc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.lt-loc-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--cp-border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: transform .18s ease, box-shadow .18s ease;
}

.lt-loc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.lt-loc-card.is-hidden {
  display: none;
}

.lt-loc-card__media {
  display: block;
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--cp-bg-grey);
}

.lt-loc-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}

.lt-loc-card:hover .lt-loc-card__media img {
  transform: scale(1.04);
}

.lt-loc-card__media-placeholder {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #e8ecef 0%, #d6dde2 100%);
}

.lt-loc-card__body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.lt-loc-card__title {
  font-size: 20px;
  margin: 0;
  line-height: 1.3;
}

.lt-loc-card__title a {
  color: var(--cp-navy);
  text-decoration: none;
}

.lt-loc-card__title a:hover { text-decoration: underline; }

.lt-loc-card__excerpt {
  font-size: 14px;
  color: var(--cp-text-light);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

.lt-loc-card__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--cp-border);
}

.lt-loc-card__btn {
  display: inline-block;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--cp-navy);
  background: var(--cp-bg-grey);
  border: 1px solid var(--cp-border);
  border-radius: 999px;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}

.lt-loc-card__btn:hover {
  background: var(--cp-orange);
  color: #fff;
  border-color: var(--cp-orange);
  text-decoration: none;
}

.lt-loc-archive__no-results {
  text-align: center;
  padding: 40px 20px;
  color: var(--cp-text-light);
  font-size: 15px;
}

.lt-loc-archive__empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--cp-text-light);
}

.lt-loc-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.lt-loc-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--cp-border);
  border-radius: 6px;
  color: var(--cp-navy);
  text-decoration: none;
  font-size: 14px;
  background: #fff;
  transition: background .15s, color .15s, border-color .15s;
}

.lt-loc-pagination .page-numbers:hover {
  background: var(--cp-bg-grey);
}

.lt-loc-pagination .page-numbers.current {
  background: var(--cp-navy);
  color: #fff;
  border-color: var(--cp-navy);
}

.lt-loc-pagination .page-numbers.dots {
  border: 0;
  background: transparent;
}

@media (max-width: 960px) {
  .lt-loc-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 640px) {
  .lt-loc-archive { padding: 24px 0 40px; }
  .lt-loc-archive__title { font-size: 24px; }
  .lt-loc-archive__subtitle { font-size: 14px; }
  .lt-loc-grid { grid-template-columns: 1fr; gap: 18px; }
  .lt-loc-card__body { padding: 16px 18px 20px; }
  .lt-loc-card__title { font-size: 18px; }
}
