/*
Theme Name: Eagle Crossing
Theme URI: https://www.eaglecrossing.org
Description: Eagle Crossing Homeowners Association theme. Child of Twenty Twenty-Five: spruce green, Source Serif 4 headings, Inter body text.
Template: twentytwentyfive
Version: 1.3.0
Requires at least: 6.7
License: GNU General Public License v2 or later
Text Domain: eaglecrossing
*/

/* ---------- Header ---------- */
.ec-header { background: var(--wp--preset--color--surface); border-bottom: 1px solid var(--wp--preset--color--line); }
.ec-header__inner { padding-top: 14px; padding-bottom: 14px; gap: 12px 24px; }
.ec-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--wp--preset--color--contrast); }
.ec-brand:hover { color: var(--wp--preset--color--contrast); }
.ec-brand__mark { width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--wp--preset--color--accent-1); display: flex; align-items: center; justify-content: center; }
.ec-brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.ec-brand__name { font-family: var(--wp--preset--font-family--source-serif); font-weight: 700; font-size: 1.2rem; }
.ec-brand__sub { font-size: 0.8rem; color: var(--wp--preset--color--muted); }
.ec-header__nav { gap: 4px 6px; }
.ec-header .wp-block-navigation { font-size: 0.95rem; font-weight: 500; gap: 0; }
.ec-header .wp-block-navigation .wp-block-navigation-item__content { padding: 10px 12px; }
.ec-header .wp-block-navigation .wp-block-navigation__submenu-container { border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 6px; box-shadow: 0 8px 24px rgba(28, 36, 34, 0.08); }
.ec-header .wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: 8px 12px; }
.ec-header .wp-block-buttons .wp-block-button__link { padding: 11px 18px; font-size: 0.95rem; }

/* ---------- Shared ---------- */
.ec-band { background: var(--wp--preset--color--surface); border-top: 1px solid var(--wp--preset--color--line); border-bottom: 1px solid var(--wp--preset--color--line); }
.ec-section { padding-top: 56px; padding-bottom: 56px; }
.ec-lead { color: var(--wp--preset--color--muted); max-width: 40rem; margin-top: 8px !important; }
.ec-eyebrow { font-size: 0.85rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); margin-bottom: 12px !important; }
.ec-muted { color: var(--wp--preset--color--muted); }
.ec-label { font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--accent-1); }

/* ---------- Hero ---------- */
.ec-hero { padding-top: 56px; padding-bottom: 32px; gap: 40px; align-items: center !important; }
.ec-hero h1 { font-size: clamp(2.2rem, 4.5vw, 3rem); line-height: 1.1; margin: 0 0 16px; }
.ec-hero__intro { font-size: 1.15rem; color: #3E4845; max-width: 34rem; margin-bottom: 28px !important; }
.ec-hero__img img { display: block; width: 100%; height: 340px; object-fit: cover; border-radius: 16px; }

/* ---------- Cards ---------- */
.ec-cards { gap: 16px; }
.ec-card { position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 12px; transition: border-color .15s, box-shadow .15s; }
.ec-card:hover { border-color: var(--wp--preset--color--accent-1); box-shadow: 0 4px 16px rgba(46, 94, 78, 0.10); }
.ec-card > * { margin: 0 !important; }
.ec-card__title { font-weight: 600; font-size: 1.05rem; }
.ec-card__title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.ec-card__title a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.ec-card__text { font-size: 0.92rem; color: var(--wp--preset--color--muted); }
.ec-icon svg { display: block; }

/* ---------- Newsletter ---------- */
.ec-news { gap: 40px; }
.ec-latest { position: relative; display: flex; align-items: center; gap: 18px; padding: 20px; border-radius: 12px; background: var(--wp--preset--color--accent-2); }
.ec-latest > * { margin: 0 !important; }
.ec-latest__badge { width: 56px; height: 68px; flex: none; border-radius: 6px; background: #fff; border: 1px solid #C9D6CF; display: flex; align-items: center; justify-content: center; font-size: 0.72rem; font-weight: 600; color: var(--wp--preset--color--accent-1); }
.ec-latest__title { font-weight: 600; font-size: 1.15rem; }
.ec-latest__title a { color: var(--wp--preset--color--contrast); text-decoration: none; }
.ec-latest__title a::after { content: ""; position: absolute; inset: 0; border-radius: 12px; }
.ec-latest__text { font-size: 0.92rem; color: #3E4845; }
.ec-issues { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 4px 16px; }
.ec-issues a { display: block; padding: 8px 0; }
.ec-issues li:last-child a { font-weight: 600; }

/* ---------- Documents ---------- */
.ec-docs { gap: 12px; }
.ec-doc { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 18px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 10px; }
.ec-doc > * { margin: 0 !important; }
.ec-doc a { color: var(--wp--preset--color--contrast); text-decoration: none; font-weight: 500; }
.ec-doc a::after { content: ""; position: absolute; inset: 0; border-radius: 10px; }
.ec-doc:hover { border-color: var(--wp--preset--color--accent-1); }
.ec-doc__type { font-size: 0.8rem; color: var(--wp--preset--color--muted); }
.ec-doc--all { background: var(--wp--preset--color--accent-2); border-color: #C9D6CF; }
.ec-doc--all a { font-weight: 600; }
.ec-doc--all .ec-doc__type { color: var(--wp--preset--color--accent-1); }

/* ---------- Streets ---------- */
.ec-community { gap: 40px; align-items: flex-start !important; }
.ec-streets table { border-collapse: collapse; width: 100%; border-top: 1px solid var(--wp--preset--color--line); }
.ec-streets td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 11px 2px; }
.ec-streets td:last-child { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ec-community__img img { display: block; width: 100%; height: 460px; object-fit: cover; border-radius: 16px; }

/* ---------- Board ---------- */
.ec-board { gap: 16px; }
.ec-person { display: flex; flex-direction: column; gap: 4px; padding: 20px; background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 12px; }
.ec-person > * { margin: 0 !important; }
.ec-person__name { font-weight: 600; font-size: 1.05rem; }
.ec-person__term { font-size: 0.88rem; color: var(--wp--preset--color--muted); }

/* ---------- Contact band ---------- */
.ec-contact { background: var(--wp--preset--color--accent-1); color: #fff; border-radius: 16px; padding: 40px !important; gap: 32px; }
.ec-contact h2 { color: #fff; margin: 0 0 8px; }
.ec-contact p { margin: 0; }
.ec-contact__lead { color: #E3EEE9; max-width: 32rem; }
.ec-contact a { color: #fff; }
.ec-contact__details { display: flex; flex-direction: column; gap: 6px; }
.ec-contact__details > * { margin: 0 !important; }
.ec-contact__name { font-weight: 600; font-size: 1.1rem; }
.ec-contact__addr { color: #E3EEE9; }

/* ---------- Footer ---------- */
.ec-footer { background: var(--wp--preset--color--surface); border-top: 1px solid var(--wp--preset--color--line); font-size: 0.88rem; color: var(--wp--preset--color--muted); }
.ec-footer__inner { padding-top: 24px; padding-bottom: 24px; gap: 12px; }
.ec-footer p { margin: 0; }
.ec-footer__links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- Inner pages ---------- */
.wp-block-post-content table { border-collapse: collapse; }
.wp-block-post-content img { height: auto; max-width: 100%; }

/* ---------- Small screens ---------- */
@media (max-width: 781px) {
  .ec-hero, .ec-section { padding-top: 40px; padding-bottom: 40px; }
  .ec-hero__img img { height: 240px; }
  .ec-community__img img { height: 300px; }
  .ec-contact { padding: 28px !important; }
  .ec-brand__sub { display: none; }
}

/* ---------- Page template + grid fixes ---------- */
.ec-page { padding-top: 48px; padding-bottom: 72px; }
.ec-page .wp-block-post-title { margin-bottom: 24px; }
.ec-cards, .ec-docs, .ec-board { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)) !important; }
.ec-doc__type { white-space: nowrap; }
.wp-block-post-content iframe, .wp-block-post-content embed, .wp-block-post-content video { max-width: 100%; }

/* ---------- Maps page ---------- */
.ec-map img { border: 1px solid var(--wp--preset--color--line); border-radius: 12px; background: #fff; }
.ec-map figcaption { color: var(--wp--preset--color--muted); font-size: 0.9rem; text-align: center; }
.ec-streets--links td:last-child { text-align: right; font-weight: 500; width: 1%; padding-left: 16px; }
.ec-streets--links td:nth-child(2) { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ec-streets thead th { text-align: left; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--wp--preset--color--muted); border: 0; padding: 0 2px 8px; }
.ec-streets thead th:not(:first-child) { text-align: right; }
.ec-streets thead { border: 0; }
.ec-embed iframe { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border: 0; border-radius: 12px; }
.ec-callout { background: var(--wp--preset--color--accent-2); border: 1px solid #C9D6CF; border-radius: 12px; padding: 20px 22px !important; }
.ec-callout p { margin: 0; }

.ec-footer__credit { flex-basis: 100%; font-size: 0.8rem; opacity: 0.85; }

/* ---------- FAQ page ---------- */
.ec-faq-group { margin-top: 40px !important; }
.ec-faq-group h2 { font-size: 1.5rem; margin-bottom: 12px; }
.wp-block-details.ec-faq { background: var(--wp--preset--color--surface); border: 1px solid var(--wp--preset--color--line); border-radius: 10px; padding: 0; margin: 0 0 10px !important; }
.wp-block-details.ec-faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 600; position: relative; }
.wp-block-details.ec-faq summary::-webkit-details-marker { display: none; }
.wp-block-details.ec-faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.4rem; font-weight: 400; color: var(--wp--preset--color--accent-1); }
.wp-block-details.ec-faq[open] summary::after { content: "\2212"; }
.wp-block-details.ec-faq[open] summary { border-bottom: 1px solid var(--wp--preset--color--line); }
.wp-block-details.ec-faq > :not(summary) { margin-left: 18px; margin-right: 18px; }
.wp-block-details.ec-faq > :not(summary):first-of-type { margin-top: 14px; }
.wp-block-details.ec-faq > :last-child { margin-bottom: 16px; }
.wp-block-details.ec-faq summary:focus-visible { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 2px; border-radius: 10px; }
.ec-source { font-size: 0.85rem; color: var(--wp--preset--color--muted); }
