/* ============================================
   Property Page Template — Standalone CSS
   For WordPress integration via PHP snippets
   ============================================ */

/* --- Font Faces --- */
@font-face {
  font-family: 'Lexend';
  src: url('/wp-content/uploads/fonts/Lexend-Light.ttf') format('truetype');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/wp-content/uploads/fonts/Lexend-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/wp-content/uploads/fonts/Lexend-Medium.ttf') format('truetype');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Lexend';
  src: url('/wp-content/uploads/fonts/Lexend-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

.property-page {
  font-family: 'Lexend', sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: hsl(220, 20%, 14%);
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

/* --- Container --- */
.property-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 0.5rem;
}

/* --- Photo Gallery --- */
.property-gallery {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: 60% 1fr;
  grid-template-rows: 1fr 1fr auto;
}

.gallery-main {
  grid-row: 1 / 4;
  overflow: hidden;
  border-radius: 0.75rem;
}

.gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}

.gallery-thumb {
  overflow: hidden;
  border-radius: 0.75rem;
  aspect-ratio: 1 / 1;
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-view-all {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: hsl(220, 20%, 14%);
  letter-spacing: 0.05em;
  padding: 0.875rem 0;
  border-radius: 0.75rem;
  background-color: #e0e0f8;
  border: none;
  cursor: pointer;
  transition: opacity 0.2s;
}

.gallery-view-all:hover {
  opacity: 0.8;
}

.gallery-view-all svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* --- Property Stats Bar --- */
.stats-bar {
  background-color: hsl(220, 14%, 96%);
  border: 1px solid hsl(220, 13%, 88%);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.stats-bar-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
}

.stats-address {
  flex: 1;
}

.stats-address h1 {
  font-family: 'Lexend', sans-serif;
  font-size: 1.875rem;
  font-weight: 400;
  color: hsl(220, 20%, 14%);
  line-height: 1.25;
}

.stats-numbers {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.stat-box {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 0.75rem 1.5rem;
  text-align: center;
  min-width: 90px;
}

.stat-box .stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: hsl(220, 20%, 14%);
}

.stat-box .stat-label {
  font-size: 11px;
  font-weight: 700;
  color: hsl(220, 10%, 46%);
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.stats-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.stats-meta-box {
  background-color: #ffffff;
  border-radius: 0.75rem;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  color: hsl(220, 20%, 14%);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stats-meta-box svg {
  width: 1rem;
  height: 1rem;
}

.stats-meta-box .meta-bold {
  font-weight: 700;
}

.stats-meta-box .meta-muted {
  color: hsl(220, 10%, 46%);
}

/* --- Main Content Grid --- */
.content-grid {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 1.25rem;
  margin-top: 1.25rem;
}

.content-left {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.content-right {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* --- Divider --- */
.section-divider {
  border: none;
  border-bottom: 1px solid hsl(220, 13%, 88%);
}

/* --- About Section --- */
.about-section {
  padding: 2.5rem 1.5rem 4rem;
}

.about-section h2 {
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: hsl(220, 20%, 14%);
  margin-bottom: 1rem;
}

.about-section .about-divider {
  border: none;
  border-bottom: 1px solid hsl(220, 13%, 88%);
  margin-bottom: 1rem;
}

.about-section .about-text {
  font-size: 1rem;
  color: hsl(220, 20%, 14%);
  line-height: 1.625;
 /*  white-space: pre-line; */
}

/* --- Gradient Button (shared) --- */
.btn-gradient {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #3c3bf5, #00007c);
  color: #ffffff;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-gradient:hover {
  opacity: 0.9;
}

.btn-gradient svg {
  width: 1rem;
  height: 1rem;
}

.btn-gradient-full {
  width: 100%;
}

/* --- Property Map --- */
.property-map {
  border: 1px solid hsl(220, 13%, 88%);
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: #ffffff;
}

.property-map iframe {
  width: 100%;
  height: 400px;
  border: 0;
}

.map-footer {
  padding: 1rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.map-footer .map-address-bold {
  font-weight: 700;
  font-size: 0.875rem;
  color: hsl(220, 20%, 14%);
}

.map-footer .map-address-muted {
  font-size: 0.875rem;
  color: hsl(220, 10%, 46%);
}

.map-footer .map-link {
  color: hsl(233, 62%, 30%);
  font-size: 0.75rem;
  font-weight: 600;
  margin-top: 0.25rem;
  display: inline-block;
  text-decoration: none;
}

.map-footer .map-link:hover {
  text-decoration: underline;
}

.map-directions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  color: hsl(233, 62%, 30%);
  text-decoration: none;
  transition: opacity 0.2s;
}

.map-directions:hover {
  opacity: 0.7;
}

.map-directions svg {
  width: 1.25rem;
  height: 1.25rem;
}

.map-directions span {
  font-size: 0.75rem;
  font-weight: 600;
}

/* --- Property Info Box --- */
.property-info-box {
  background-color: hsl(220, 14%, 96%);
  border: 1px solid hsl(220, 13%, 88%);
  border-radius: 0.75rem;
  padding: 1.25rem;
  font-size: 1rem;
  line-height: 1.625;
  color: hsl(220, 20%, 14%);
}

.property-info-box p {
  margin-bottom: 1rem;
}

.property-info-box p:last-child {
  margin-bottom: 0;
}

/* --- Membership Section --- */
.membership-section {
  padding: 3rem 1.5rem;
}

.membership-icon {
  width: 9rem;
  height: auto;
  margin-bottom: 1rem;
}

.membership-section h2 {
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 1.875rem;
  color: hsl(220, 20%, 14%);
  margin-bottom: 0.5rem;
}

.membership-section .membership-subtitle {
  font-size: 1.125rem;
  color: hsl(220, 20%, 14%);
  margin-bottom: 1.5rem;
}

.membership-section .btn-gradient-link {
  display: inline-block;
  background: linear-gradient(to right, #3c3bf5, #00007c);
  color: #ffffff;
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: opacity 0.2s;
}

.membership-section .btn-gradient-link:hover {
  opacity: 0.9;
}

.membership-divider {
  border: none;
  border-bottom: 1px solid hsl(220, 13%, 88%);
  margin-bottom: 2.5rem;
}

.membership-pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.pillar-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background-color: #F1D058;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.pillar-icon svg {
  width: 1.5rem;
  height: 1.5rem;
  color: #ffffff;
}

.pillar h3 {
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  font-size: 1.125rem;
  color: hsl(220, 20%, 14%);
  margin-bottom: 0.75rem;
}

.pillar p {
  font-size: 1rem;
  color: hsl(220, 20%, 14%);
  line-height: 1.625;
}

/* --- Inquiry Form (Sidebar) --- */
.inquiry-form {
  border: 1px solid hsl(220, 13%, 88%);
  border-radius: 0.75rem;
  overflow: hidden;
  background-color: #ffffff;
}

.inquiry-header {
  background: linear-gradient(135deg, #3c3bf5, #00007c);
  padding: 1.25rem;
  text-align: center;
}

.inquiry-header h3 {
  color: #ffffff;
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
}

.inquiry-body {
  padding: 1.25rem;
}

.inquiry-body input[type="text"],
.inquiry-body input[type="email"],
.inquiry-body input[type="tel"],
#state_cd {
  width: 100%;
  border: 1px solid hsl(220, 13%, 88%);
  border-radius: 2px;
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  font-family: 'Lexend', sans-serif;
  background-color: #ffffff;
  color: hsl(220, 20%, 14%);
  margin-bottom: 0.75rem;
  outline: none;
}

.inquiry-body input:focus {
  box-shadow: 0 0 0 1px hsl(233, 62%, 30%);
}

.inquiry-body input::placeholder {
  color: hsl(220, 10%, 46%);
}
#state_cd {
  color: hsl(220, 10%, 46%);
}

.inquiry-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  margin-bottom: 0.75rem;
}

.inquiry-consent input[type="checkbox"] {
  margin-top: 0.25rem;
  accent-color: hsl(233, 62%, 30%);
}

.inquiry-consent span {
  font-size: 10px;
  line-height: 1.3;
  color: hsl(220, 10%, 46%);
}

/* --- Grant Program Card (Sidebar) --- */
.grant-card {
  border-radius: 0.75rem;
  background: linear-gradient(180deg, #3c3bf5, #00007c);
  padding: 1.25rem 2.5rem 2.5rem;
  text-align: center;
}

.grant-icon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1.25rem;
}

.grant-icon img {
  width: 100%;
  height: 100%;
}

.grant-card p {
  color: #ffffff;
  font-size: 1.25rem;
  font-family: 'Lexend', sans-serif;
  line-height: 1.15;
}

.grant-card p + p {
  margin-top: 0.75rem;
}

.grant-highlight {
  font-weight: 700;
  color: hsl(45, 93%, 58%);
}

/* --- Path to Ownership Card (Sidebar) --- */
.path-card {
  border-radius: 0.75rem;
  overflow: hidden;
  position: relative;
}

.path-card img.path-image {
  width: 100%;
  height: auto;
  display: block;
}

.path-card-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  padding-bottom: 1.25rem;
}

.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: hsl(45, 93%, 58%);
  color: hsl(220, 20%, 14%);
  font-family: 'Lexend', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  padding: 0.75rem 2rem;
  border-radius: 0.75rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s;
}

.btn-accent:hover {
  opacity: 0.9;
}

.btn-accent svg {
  width: 1rem;
  height: 1rem;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr;
  }

  .stats-bar-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .stats-address h1 {
    font-size: 1.5rem;
  }

  .membership-pillars {
    grid-template-columns: 1fr;
  }

  .property-gallery {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .gallery-main {
    grid-row: auto;
  }

  .modal-content {
    width: 95%;
    margin: 1rem;
  }
}

/* --- Lightbox --- */
.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-img {
  max-width: 85%;
  max-height: 85vh;
  border-radius: 0.5rem;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
  z-index: 10001;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #ffffff;
  font-size: 3rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 0.5rem;
  transition: background 0.2s;
  z-index: 10001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* --- Inquiry Popup Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: #ffffff;
  border-radius: 0.75rem;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.75rem;
  cursor: pointer;
  line-height: 1;
  z-index: 10000;
}
/* ============================================
   MOBILE OPTIMIZATION PATCH
   Append this to the bottom of property-template.css
   ============================================ */

/* Force no horizontal overflow */
.property-page {
  overflow-x: hidden !important;
  width: 100% !important;
}

.property-container {
  overflow-x: hidden !important;
}

@media (max-width: 1024px) {
  .content-grid {
    grid-template-columns: 1fr !important;
  }

  .stats-bar-inner {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  .stats-address h1 {
    font-size: 1.5rem !important;
  }

  .membership-pillars {
    grid-template-columns: 1fr !important;
  }

  .property-gallery {
    grid-template-columns: 1fr !important;
    grid-template-rows: auto !important;
  }

  .gallery-main {
    grid-row: auto !important;
    width: 100% !important;
    aspect-ratio: 16 / 10 !important;
  }

  .gallery-main img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }

  .modal-content {
    width: 95% !important;
    margin: 1rem !important;
  }
}

@media (max-width: 640px) {
  .property-container {
    padding: 1rem 0.75rem !important;
  }

  .stats-bar {
    padding: 1rem !important;
  }

  .stats-numbers {
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .stat-box {
    flex: 1 !important;
    min-width: 70px !important;
    padding: 0.625rem 0.75rem !important;
  }

  .stat-box .stat-value {
    font-size: 1.25rem !important;
  }

  .stats-meta {
    width: 100% !important;
  }

  .stats-meta-box {
    font-size: 0.8rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  .stats-address h1 {
    font-size: 1.25rem !important;
  }

  .about-section {
    padding: 1.5rem 1rem 2rem !important;
  }

  .about-section h2 {
    font-size: 1.25rem !important;
  }

  .property-map iframe {
    height: 280px !important;
  }

  .map-footer {
    padding: 0.75rem !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
  }

  .property-info-box {
    padding: 1rem !important;
    font-size: 0.9rem !important;
  }

  .membership-section {
    padding: 2rem 1rem !important;
  }

  .membership-section h2 {
    font-size: 1.5rem !important;
  }

  .grant-card {
    padding: 1.25rem 1.5rem 2rem !important;
  }

  .grant-card p {
    font-size: 1.1rem !important;
  }

  .gallery-thumbs {
    grid-template-columns: 1fr 1fr !important;
  }
}
