/*
Theme Name: Newark Preschools
Theme URI: https://newarkpreschools.org
Author: Newark Preschools
Description: Parent-facing directory of preschool and early-childhood options in Newark, NJ.
Version: 0.1.0
Text Domain: nps
*/

:root {
    --green: #73B918;
    --green-dark: #5a9412;
    --green-darker: #46750e;
    --green-tint: #f0f8e0;
    --ink: #1f2937;
    --ink-soft: #4b5563;
    --line: #e5e7eb;
    --bg: #f8faf7;
    --white: #ffffff;
    --amber: #b45309;
    --radius: 10px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 14px rgba(0, 0, 0, .05);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

a { color: var(--green-dark); }
a:hover { color: var(--green-darker); }

img { max-width: 100%; height: auto; }

.wrap {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- Header ---------- */

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 20;
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 62px;
}

.site-branding a {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--ink);
    text-decoration: none;
}

.site-branding .dot { color: var(--green); }

.primary-nav { margin-left: auto; }

.primary-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 4px;
}

.primary-nav a {
    display: block;
    padding: 8px 14px;
    border-radius: 8px;
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
}

.primary-nav a:hover,
.primary-nav .current-menu-item a {
    color: var(--green-darker);
    background: var(--green-tint);
}

/* ---------- Hero ---------- */

.hero {
    background: linear-gradient(135deg, var(--green-darker), var(--green) 70%, #9ed94a);
    color: #fff;
    padding: 72px 0 64px;
}

.hero h1 {
    font-size: clamp(1.9rem, 4.5vw, 2.9rem);
    margin: 0 0 12px;
    line-height: 1.15;
    max-width: 700px;
}

.hero p {
    font-size: 1.1rem;
    margin: 0 0 28px;
    max-width: 640px;
    opacity: .95;
}

.hero-search {
    display: flex;
    gap: 10px;
    max-width: 560px;
}

.hero-search input[type="search"] {
    flex: 1;
    padding: 14px 16px;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius);
}

.hero-search button {
    padding: 14px 26px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--green-darker);
    background: #fff;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

.hero-search button:hover { background: var(--green-tint); }

.hero-stats {
    display: flex;
    gap: 36px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.hero-stats .stat strong {
    display: block;
    font-size: 1.9rem;
}

.hero-stats .stat span { opacity: .9; font-size: .92rem; }

/* ---------- Sections ---------- */

.section { padding: 56px 0; }
.section h2 { font-size: 1.6rem; margin: 0 0 8px; }
.section .section-sub { color: var(--ink-soft); margin: 0 0 28px; }

.three-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
    gap: 20px;
}

.info-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.info-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.info-card p { margin: 0; color: var(--ink-soft); font-size: .95rem; }

/* ---------- Directory ---------- */

.page-head {
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 36px 0;
}

.page-head h1 { margin: 0 0 6px; font-size: 1.9rem; }
.page-head .lede { color: var(--ink-soft); margin: 0; max-width: 720px; }

.directory-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 28px;
    padding: 32px 0 64px;
    align-items: start;
}

.filters {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
    position: sticky;
    top: 80px;
}

.filters h2 { font-size: 1rem; margin: 0 0 14px; }

.filters .field { margin-bottom: 14px; }

.filters label {
    display: block;
    font-size: .82rem;
    font-weight: 700;
    color: var(--ink-soft);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.filters input[type="search"],
.filters select {
    width: 100%;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: .95rem;
    background: #fff;
}

.filters .check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .92rem;
    margin-bottom: 8px;
}

.filters .check input { margin: 0; }

.filters-actions { display: flex; gap: 8px; margin-top: 6px; }

.filters-note {
    margin: 16px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font-size: .85rem;
    color: var(--ink-soft);
}
.filters-note a { font-weight: 700; }

.filters-toggle {
    display: none;
    width: 100%;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 18px;
    margin-bottom: 16px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 1rem;
    font-weight: 700;
    color: var(--ink);
    cursor: pointer;
}
.filters-toggle .chev { color: var(--green-darker); }

.btn {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 700;
    font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); color: #fff; }
.btn-ghost {
    background: transparent;
    color: var(--ink-soft);
    border: 1px solid var(--line);
}
.btn-ghost:hover { background: var(--green-tint); color: var(--green-darker); }

.results-count {
    font-size: .9rem;
    color: var(--ink-soft);
    margin: 0 0 16px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr));
    gap: 18px;
}

.card {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-badges { display: flex; flex-wrap: wrap; gap: 6px; }

.card-title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--green-dark); }

.card-district { margin: 0; font-size: .85rem; color: var(--ink-soft); font-style: italic; }
.card-address { margin: 0; font-size: .9rem; color: var(--ink-soft); }

.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: auto;
    padding-top: 6px;
}

.card-phone { font-weight: 700; text-decoration: none; font-size: .95rem; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
}

.badge-green { background: var(--green-tint); color: var(--green-darker); }
.badge-amber { background: #fef3c7; color: var(--amber); }
.badge-muted { background: #f3f4f6; color: var(--ink-soft); }
.badge-type  { background: #eef2ff; color: #4338ca; }
.badge-gnjk  { background: #fffbeb; color: #92400e; }
.gnjk-stars  { letter-spacing: 1px; }

.pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.pagination .page-numbers {
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-decoration: none;
    color: var(--ink-soft);
    font-weight: 600;
}

.pagination .current {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}

/* ---------- Single provider ---------- */

.provider-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 28px;
    padding: 36px 0 64px;
    align-items: start;
}

.provider-main,
.provider-side {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
}

.provider-main h2,
.provider-side h2 { font-size: 1.05rem; margin: 0 0 12px; }

.detail-list { margin: 0; display: grid; gap: 12px; }

.detail-row { display: grid; grid-template-columns: 160px 1fr; gap: 12px; font-size: .95rem; }
.detail-row dt { font-weight: 700; color: var(--ink-soft); }
.detail-row dd { margin: 0; }

.side-block { margin-bottom: 20px; }
.side-block:last-child { margin-bottom: 0; }
.side-block .big-phone { font-size: 1.25rem; font-weight: 800; }
.side-note { margin: 0 0 16px; font-size: .9rem; color: var(--ink-soft); }

.crumb { margin: 0 0 12px; font-size: .85rem; }
.crumb a { color: var(--ink-soft); text-decoration: none; font-weight: 600; }
.crumb a:hover { color: var(--green-darker); text-decoration: underline; }

.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr));
    gap: 10px;
    margin: 0 0 26px;
}
.fact {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.fact-label {
    font-size: .7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--green-darker);
}
.fact-value { font-size: .95rem; font-weight: 700; }

.enroll-box {
    background: var(--green-tint);
    border: 1px solid #d8edb8;
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 26px;
}
.enroll-box h2 { font-size: 1.1rem; margin: 0 0 6px; }
.enroll-box p { margin: 0 0 14px; font-size: .95rem; color: var(--ink-soft); line-height: 1.6; }
.enroll-box .btn { margin: 0 8px 8px 0; }

.checklist { margin-top: 26px; }
.checklist h2 { font-size: 1.05rem; margin: 0; }
.checklist ul { list-style: none; margin: 10px 0 0; padding: 0; }
.checklist li {
    position: relative;
    padding: 9px 0 9px 28px;
    border-bottom: 1px dashed var(--line);
    font-size: .95rem;
}
.checklist li::before {
    content: "✓";
    position: absolute;
    left: 4px;
    color: var(--green-dark);
    font-weight: 800;
}

@media (min-width: 881px) {
    .provider-side { position: sticky; top: 80px; }
}

.nearby { padding: 8px 0 64px; }
.nearby h2 { font-size: 1.35rem; margin: 0 0 18px; }
.nearby .more { margin: 22px 0 0; }

.disclaimer {
    font-size: .82rem;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
    margin-top: 20px;
    padding-top: 14px;
}

.notice {
    background: var(--green-tint);
    border: 1px solid #d8edb8;
    border-radius: var(--radius);
    padding: 14px 18px;
    margin-bottom: 24px;
    font-size: .95rem;
}

/* ---------- Maps ---------- */

.nps-map {
    height: 320px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    background: #eef2f0;
    z-index: 1;
}

#nps-directory-map { height: 400px; margin-bottom: 22px; }

.nps-marker span {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}

.nps-marker-child-care-center span { background: var(--green-dark); }
.nps-marker-district-prek span { background: #4338ca; }
.nps-marker-charter-prek span { background: #b45309; }

.leaflet-popup-content a { color: var(--green-darker); font-weight: 600; }

/* ---------- Generic content ---------- */

.content-area { padding: 32px 0 64px; }
.entry-content { max-width: 880px; }
.entry-content h1 { font-size: 2rem; }

.entry-content > p { max-width: 720px; line-height: 1.7; color: var(--ink-soft); margin: 0 0 18px; }
.entry-content > h2 {
    font-size: 1.35rem;
    margin: 40px 0 16px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
}
.entry-content > h2:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.entry-content h3 { font-size: 1.05rem; margin: 0 0 6px; }
.entry-content a { color: var(--green-darker); font-weight: 600; }
.entry-content ul { color: var(--ink-soft); line-height: 1.7; padding-left: 22px; }
.entry-content li { margin-bottom: 6px; }

/* Resource/link cards used on seeded content pages */
.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr));
    gap: 16px;
    margin: 0 0 20px;
}

.resource-card {
    background: var(--white);
    border: 1px solid var(--line);
    border-left: 4px solid var(--green);
    border-radius: var(--radius);
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
}

.resource-card h3 { margin: 0 0 8px; font-size: 1.02rem; }
.resource-card p { margin: 0 0 12px; font-size: .93rem; line-height: 1.6; color: var(--ink-soft); flex: 1; }
.resource-card .resource-meta {
    margin: 0;
    font-size: .85rem;
    color: var(--ink-soft);
    border-top: 1px solid var(--line);
    padding-top: 10px;
}
.resource-card .resource-meta a { font-weight: 700; }
.resource-card .resource-meta a::after { content: " ↗"; }

/* ---------- Footer ---------- */

.site-footer {
    background: var(--ink);
    color: #d1d5db;
    padding: 40px 0;
    margin-top: 40px;
    font-size: .9rem;
}

.site-footer a { color: #b8d98a; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; }
.site-footer .credit { margin-left: auto; }

.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 18px; }

/* ---------- Responsive ---------- */

@media (max-width: 880px) {
    .directory-layout { grid-template-columns: 1fr; gap: 0; padding-top: 20px; }
    .filters { position: static; margin-bottom: 24px; }
    .directory-layout.filters-collapsed .filters { display: none; }
    .filters-toggle { display: flex; }
    .provider-layout { grid-template-columns: 1fr; }
    .site-header .wrap { flex-wrap: wrap; padding: 10px 20px; row-gap: 6px; }
    .primary-nav { margin-left: 0; }
    .primary-nav a { padding: 7px 10px; font-size: .9rem; }
    .hero { padding: 52px 0 48px; }
    .hero-stats { gap: 22px; margin-top: 32px; }
    .hero-stats .stat strong { font-size: 1.55rem; }
    .section { padding: 40px 0; }
    #nps-directory-map { height: 280px; }
    .provider-main, .provider-side { padding: 18px; }
    .pagination .page-numbers { padding: 10px 15px; }
}

@media (max-width: 560px) {
    .hero-search { flex-direction: column; }
    .hero-search button { padding: 14px; }
    .detail-row { grid-template-columns: 1fr; gap: 2px; }
    .entry-content > h2 { margin-top: 32px; }
    .hero-stats { gap: 18px; }
}

/* Keep text inputs at 16px+ so iOS doesn't zoom on focus. */
@media (max-width: 880px) {
    .filters input[type="search"],
    .filters select,
    .hero-search input[type="search"] { font-size: 16px; }
}
