/**
 * YardNAcre — Internal page layouts (services, locality, projects, NRI, resources, about)
 */

/* Two-column content + sidebar */
.yn-content-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-10);
  margin-top: var(--space-10);
}

.yn-sidebar-sticky {
  position: sticky;
  top: 100px;
}

.yn-sidebar-cta {
  background: var(--color-primary);
  color: #fff;
  padding: var(--space-8);
  border-radius: var(--radius-lg);
  margin-top: var(--space-6);
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(197, 168, 128, 0.2);
}

.yn-sidebar-cta h3 {
  color: #fff;
  font-size: var(--text-xl);
  margin: 0 0 var(--space-4);
}

.yn-sidebar-cta p {
  font-size: var(--text-sm);
  color: #94A3B8;
  margin: 0 0 var(--space-5);
}

.yn-sidebar-cta .btn-premium-outline {
  width: 100%;
  border-color: rgba(255, 255, 255, 0.6) !important;
  color: #fff !important;
}

.yn-sidebar-cta .btn-premium-outline:hover {
  background: var(--color-accent) !important;
  color: var(--color-primary) !important;
  border-color: var(--color-accent) !important;
}

@media (max-width: 900px) {
  .yn-content-layout {
    grid-template-columns: 1fr;
  }
  .yn-sidebar-sticky {
    position: static;
  }
}

/* Content sections */
.yn-content-section {
  margin-bottom: var(--space-10);
}

.yn-content-heading {
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  border-bottom: 2px solid var(--color-border);
  padding-bottom: var(--space-3);
  margin-bottom: var(--space-5);
}

.yn-content-intro {
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  color: var(--color-text-dark);
}

.yn-content-body {
  line-height: 1.75;
  font-size: var(--text-base);
  color: var(--color-text-dark);
}

.yn-content-body h3 {
  font-size: var(--text-xl);
  margin: var(--space-6) 0 var(--space-3);
}

.yn-content-body ul {
  padding-left: var(--space-5);
  margin-bottom: var(--space-4);
}

.yn-content-body li {
  margin-bottom: var(--space-2);
}

/* Benefit list */
.yn-benefit-list {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0 var(--space-8);
}

.yn-benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  font-size: var(--text-base);
  font-weight: 500;
  line-height: var(--leading-snug);
}

/* Step boxes */
.yn-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  margin: var(--space-6) 0;
}

.yn-step-box {
  background: var(--color-bg-white);
  padding: var(--space-6);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border-top: 4px solid var(--color-primary);
  transition: var(--transition-normal);
}

.yn-step-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-top-color: var(--color-accent);
}

.yn-step-num {
  font-family: var(--font-headings);
  font-size: 2rem;
  font-weight: 800;
  color: rgba(10, 25, 47, 0.1);
  margin-bottom: var(--space-3);
  line-height: 1;
}

.yn-step-box h4 {
  margin-bottom: var(--space-2);
  font-size: var(--text-lg);
}

.yn-step-box p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0;
}

/* Locality metrics */
.yn-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.yn-metric-tile {
  background: var(--color-bg-white);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-accent);
}

.yn-metric-tile span {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--space-1);
}

.yn-metric-tile strong {
  font-size: var(--text-xl);
  color: var(--color-primary);
}

/* Tables */
.yn-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-5) 0;
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.yn-table th {
  background: var(--color-primary);
  color: #fff;
  padding: 12px 15px;
  text-align: left;
  font-size: var(--text-sm);
}

.yn-table td {
  background: var(--color-bg-white);
  padding: 12px 15px;
  border-bottom: 1px solid var(--color-border);
  font-size: var(--text-sm);
}

.yn-table tr:last-child td {
  border-bottom: none;
}

/* Project list rows */
.yn-project-row {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  border-left: 4px solid var(--color-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  transition: var(--transition-normal);
}

.yn-project-row:hover {
  box-shadow: var(--shadow-md);
  border-left-color: var(--color-accent);
}

/* Checklist */
.yn-checklist-box {
  background: #FAFBFD;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  margin-top: var(--space-8);
}

.yn-checklist-box h3 {
  margin: 0 0 var(--space-4);
  font-size: var(--text-xl);
}

.yn-checklist-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.yn-checklist-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 500;
}

/* Article cards */
.yn-article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-6);
}

.yn-article-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: var(--transition-normal);
}

.yn-article-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.yn-article-card__image {
  height: 200px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.yn-article-card__cat {
  position: absolute;
  bottom: var(--space-4);
  left: var(--space-4);
  background: var(--color-primary);
  color: var(--color-accent);
  padding: 4px 10px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.yn-article-card__body {
  padding: var(--space-6);
}

.yn-article-card__meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-3);
}

.yn-article-card__body h3 {
  font-size: var(--text-xl);
  margin-bottom: var(--space-3);
  line-height: var(--leading-snug);
}

.yn-article-card__body h3 a {
  color: var(--color-primary);
}

.yn-article-card__body h3 a:hover {
  color: var(--color-accent);
}

/* About page */
.yn-about-hero {
  background: linear-gradient(135deg, rgba(10, 25, 47, 0.95) 0%, rgba(23, 42, 69, 0.92) 100%),
    url('/wp-content/uploads/yardnacre/about-hero.jpg') center/cover;
  color: var(--color-text-light);
  padding: clamp(5rem, 10vw, 7rem) var(--container-padding);
  text-align: center;
}

.yn-about-hero h1 {
  color: #fff;
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  margin-bottom: var(--space-5);
}

.yn-about-hero p {
  font-size: var(--text-xl);
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.92;
  color: var(--color-text-light);
}

.yn-about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  margin-bottom: var(--space-16);
}

.yn-about-text h2 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: var(--space-6);
  position: relative;
  color: var(--color-primary);
}

.yn-about-text h2::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 60px;
  height: 4px;
  background: var(--color-accent);
  border-radius: 2px;
}

.yn-about-text p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
}

.yn-founder-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-xl);
  padding: var(--space-12);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-border);
  transition: var(--transition-normal);
}

.yn-founder-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

.yn-founder-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: var(--space-6);
}

.yn-founder-header-row {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  width: 100%;
}

.yn-founder-photo-wrap {
  flex-shrink: 0;
  width: 128px;
  height: 128px;
  border-radius: var(--radius-full);
  padding: 3px;
  background: linear-gradient(145deg, var(--color-accent) 0%, rgba(197, 168, 128, 0.45) 100%);
  box-shadow: 0 12px 28px -8px rgba(10, 25, 47, 0.28);
  overflow: hidden;
}

.yn-founder-photo {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-full);
  object-fit: cover;
  object-position: center center;
  background: #eef1f4;
}

.yn-founder-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
}

.yn-founder-badge {
  background: var(--color-accent);
  color: var(--color-primary);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--text-sm);
  font-weight: 600;
  display: inline-block;
  margin-bottom: var(--space-4);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  line-height: 1;
}

.yn-founder-name {
  font-size: var(--text-3xl);
  margin-top: 0;
  margin-bottom: var(--space-2);
  color: var(--color-primary);
  line-height: 1.15;
}

.yn-founder-title {
  color: var(--color-accent);
  font-weight: 600;
  margin-bottom: 0;
  line-height: 1.4;
}

.yn-associates-section {
  background: var(--color-bg-white);
  padding: var(--section-y) var(--container-padding);
}

.yn-associate-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-6);
  max-width: var(--container-max);
  margin: 0 auto;
}

.yn-associate-card {
  background: var(--color-bg-light);
  padding: var(--space-8) var(--space-6);
  border-radius: var(--radius-lg);
  text-align: center;
  transition: var(--transition-normal);
  border: 1px solid var(--color-border);
}

.yn-associate-card:hover {
  background: var(--color-bg-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--color-accent);
}

.yn-associate-icon {
  width: 56px;
  height: 56px;
  background: rgba(197, 168, 128, 0.15);
  color: var(--color-accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-5);
  transition: var(--transition-normal);
}

.yn-associate-card:hover .yn-associate-icon {
  background: var(--color-accent);
  color: var(--color-primary);
}

.yn-associate-card h3 {
  font-size: var(--text-lg);
  margin: 0;
}

@media (max-width: 768px) {
  .yn-about-grid {
    grid-template-columns: 1fr;
  }
  .yn-founder-header {
    align-items: center;
  }
  .yn-founder-header-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .yn-founder-meta {
    align-items: center;
    text-align: center;
  }
  .yn-founder-photo-wrap {
    width: 140px;
    height: 140px;
  }
  .yn-metric-grid {
    grid-template-columns: 1fr;
  }
}

/* Legacy FAQ accordion (locality pages) */
.yn-legacy-faq-item {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-3);
  overflow: hidden;
}

.yn-legacy-faq-q {
  padding: var(--space-5);
  font-weight: 600;
  cursor: pointer;
  background: #FAFBFD;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-primary);
}

.yn-legacy-faq-a {
  padding: 0 var(--space-5);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

.yn-legacy-faq-item.is-open .yn-legacy-faq-a {
  padding: var(--space-4) var(--space-5) var(--space-5);
  max-height: 500px;
  border-top: 1px solid var(--color-border);
}

.yn-legacy-faq-item.is-open .yn-legacy-faq-q .accordion-toggle-icon {
  transform: rotate(45deg);
}

.accordion-toggle-icon {
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

/* ==========================================================================
   Projects page — vetted project cards
   ========================================================================== */

.yn-project-filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin: calc(var(--space-8) * -1) auto var(--space-10);
  max-width: 52rem;
}

.yn-project-filters a {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-family: var(--font-headings);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  text-decoration: none;
  transition: var(--transition-fast);
}

.yn-project-filters a:hover,
.yn-project-filters a.is-active {
  color: var(--color-primary);
  border-color: var(--color-accent);
  background: var(--color-accent-light);
}

.yn-project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  align-items: stretch;
}

.yn-project-card {
  display: flex;
  flex-direction: column;
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition-normal);
}

.yn-project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(197, 168, 128, 0.35);
}

.yn-project-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-primary);
}

.yn-project-card__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s var(--ease-out);
}

.yn-project-card:hover .yn-project-card__media img {
  transform: scale(1.04);
}

.yn-project-card__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 25, 47, 0.05) 0%, rgba(10, 25, 47, 0.45) 100%);
  pointer-events: none;
}

.yn-project-card__badge {
  position: absolute;
  top: var(--space-4);
  left: var(--space-4);
  z-index: 2;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: 700;
  font-family: var(--font-headings);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: var(--color-accent);
  color: var(--color-primary);
  line-height: 1;
}

.yn-project-card__badge--ready {
  background: var(--color-primary);
  color: var(--color-accent);
  border: 1px solid rgba(197, 168, 128, 0.4);
}

.yn-project-card__badge--commercial {
  background: var(--color-bg-white);
  color: var(--color-primary);
}

.yn-project-card__rating {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  z-index: 2;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.95);
  color: var(--color-primary);
  font-family: var(--font-headings);
  font-size: var(--text-sm);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.yn-project-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--space-6);
}

.yn-project-card__title {
  font-size: var(--text-xl);
  line-height: var(--leading-snug);
  margin: 0 0 var(--space-2);
  color: var(--color-primary);
}

.yn-project-card__location {
  margin: 0 0 var(--space-4);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-accent);
}

.yn-project-card__desc {
  margin: 0 0 var(--space-5);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  color: var(--color-text-muted);
  flex-grow: 1;
}

.yn-project-card__meta {
  list-style: none;
  margin: 0 0 var(--space-6);
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-4);
}

.yn-project-card__meta li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: var(--text-sm);
  color: var(--color-text-dark);
  line-height: 1.35;
}

.yn-project-card__meta-label {
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.yn-project-card__cta {
  margin-top: auto;
}

/* CTA filler card for balanced grid */
.yn-project-card--cta {
  background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  border-color: rgba(197, 168, 128, 0.2);
}

.yn-project-card--cta:hover {
  border-color: rgba(197, 168, 128, 0.45);
}

.yn-project-card__cta-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  text-align: center;
}

.yn-project-card__cta-inner h3 {
  color: #fff;
  font-size: clamp(1.25rem, 2vw, 1.5rem);
  margin: 0 0 var(--space-4);
}

.yn-project-card__cta-inner p {
  color: rgba(250, 248, 245, 0.75);
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
  margin: 0 0 var(--space-6);
}

.yn-project-card--cta .btn-premium-outline {
  border-color: var(--color-accent) !important;
  color: var(--color-accent) !important;
}

.yn-project-card--cta .btn-premium-outline:hover {
  background: var(--color-accent) !important;
  color: var(--color-primary) !important;
}

.yn-projects-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: var(--space-16) var(--space-6);
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  border: 1px dashed var(--color-border);
}

.yn-projects-consult {
  max-width: 640px;
  margin: 0 auto;
}

@media (max-width: 1024px) {
  .yn-project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .yn-project-grid {
    grid-template-columns: 1fr;
  }

  .yn-project-card__meta {
    grid-template-columns: 1fr;
  }

  .yn-project-filters {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: var(--space-2);
    -webkit-overflow-scrolling: touch;
  }

  .yn-project-filters a {
    flex-shrink: 0;
  }
}

