/* ===================================================================
   Bradley Farm HOA — Public Website Styles
   WordPress-matching layout for Azure Static Web Apps.
   =================================================================== */

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

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- Layout --- */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

main {
    flex: 1;
    padding: 2rem 0;
}

/* --- Header --- */
header {
    background: #fff;
    color: #333;
    padding: 0.75rem 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

header .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* --- Site logo --- */
.site-logo {
    height: 48px;
    width: auto;
    display: block;
}

.site-logo-link {
    display: block;
    line-height: 0;
}

/* --- Navigation --- */
nav {
    display: flex;
    gap: 1.5rem;
}

nav a {
    color: #555;
    text-decoration: none;
    font-size: 0.95rem;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

nav a:hover {
    color: #17551E;
    border-bottom-color: #237F2E;
}

nav a.active {
    color: #17551E;
    font-weight: 600;
    border-bottom-color: #17551E;
}

/* --- Resident Portal link --- */
.portal-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: #17551E;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.portal-link:hover {
    color: #237F2E;
}

.portal-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #237F2E;
}

/* --- Hamburger toggle --- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #333;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

/* --- Hero / season banner --- */
.hero {
    text-align: center;
    padding: 2rem 1rem;
    margin-bottom: 1.5rem;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.hero h2 {
    font-size: 1.75rem;
    color: #17551E;
    margin-bottom: 0.5rem;
    font-family: Georgia, "Times New Roman", serif;
}

.season-status {
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.5rem;
}

.season-open {
    background: #d5f5e3;
    color: #1e8449;
}

.season-closed {
    background: #fadbd8;
    color: #922b21;
}

/* --- Info cards --- */
.info-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
    font-size: 1.15rem;
    color: #17551E;
    margin-bottom: 0.75rem;
    border-bottom: 2px solid #810D3F;
    padding-bottom: 0.4rem;
    font-family: Georgia, "Times New Roman", serif;
}

/* --- Definition lists (season dates) --- */
dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem 1.5rem;
}

dt {
    font-weight: 600;
    color: #555;
}

dd {
    color: #333;
}

/* --- Tables (operating hours) --- */
table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    text-align: left;
    padding: 0.6rem 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

th {
    font-weight: 600;
    color: #555;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Lists --- */
ul {
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.4rem;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.2s, transform 0.1s;
    text-align: center;
}

.btn:active {
    transform: translateY(1px);
}

.btn-primary {
    background: #17551E;
    color: #fff;
}

.btn-primary:hover {
    background: #237F2E;
}

/* --- Registration section --- */
.registration {
    text-align: center;
}

.registration p {
    margin-bottom: 1rem;
}

.registration .note {
    font-size: 0.85rem;
    color: #777;
    margin-top: 0.75rem;
    margin-bottom: 0;
}

/* --- Contact --- */
.contact-email {
    font-size: 1.15rem;
    margin: 0.5rem 0;
}

.contact-email a {
    color: #1480B0;
    text-decoration: none;
    border-bottom: 1px solid #b3d7e8;
}

.contact-email a:hover {
    border-bottom-color: #0A3C52;
}

/* --- Body links inside content cards --- */
.info-card a {
    color: #1480B0;
    text-decoration: none;
    border-bottom: 1px solid #b3d7e8;
}

.info-card a:hover {
    color: #0A3C52;
    border-bottom-color: #0A3C52;
}

/* --- Footer --- */
footer {
    background: #0A3C52;
    color: #b0c4d4;
    text-align: center;
    padding: 1.25rem 0;
    font-size: 0.85rem;
    margin-top: auto;
}

/* --- Utility --- */
.hidden {
    display: none !important;
}

/* --- Responsive --- */
/* --- Responsive: header & mobile nav --- */
@media (min-width: 769px) {
    header .container {
        flex-direction: row;
        justify-content: space-between;
    }

    .nav-drawer {
        display: contents;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .nav-toggle {
        display: block;
    }

    .nav-drawer {
        display: none;
        flex-direction: column;
        width: 100%;
        padding-top: 0.75rem;
        border-top: 1px solid #e9ecef;
    }

    header.nav-open .nav-drawer {
        display: flex;
    }

    .nav-drawer nav {
        flex-direction: column;
        gap: 0;
        width: 100%;
    }

    .nav-drawer nav a {
        display: block;
        padding: 0.65rem 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-drawer nav a:last-child {
        border-bottom: none;
    }

    .nav-drawer .portal-link {
        padding: 0.65rem 0;
        border-top: 1px solid #e9ecef;
        width: 100%;
        font-size: 0.88rem;
    }

    .site-logo {
        height: 38px;
    }
}

@media (max-width: 480px) {
    .site-logo {
        height: 34px;
    }

    .hero h2 {
        font-size: 1.4rem;
    }

    .btn {
        display: block;
        width: 100%;
    }

    dl {
        grid-template-columns: 1fr;
        gap: 0.25rem;
    }

    dt {
        margin-top: 0.5rem;
    }
}

/* --- Home hero banner (two-column) --- */
.home-hero {
    background: #f2f4ef;
    padding: 3rem 0;
}

.home-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
}

.home-hero-text h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 2rem;
    color: #17551E;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.home-hero-text p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.read-more {
    color: #17551E;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.read-more:hover {
    color: #237F2E;
}

.home-hero-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* --- Section cards (home page) --- */
.section-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0 1.25rem;
}

.section-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s, transform 0.15s;
}

.section-card:hover {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.14);
    transform: translateY(-3px);
}

.section-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.section-card-body {
    padding: 1.25rem 1.25rem 1.5rem;
    flex: 1;
    background: #CDD5C4;
    display: flex;
    flex-direction: column;
}

.section-card-body h3 {
    font-size: 1.1rem;
    color: #17551E;
    margin-bottom: 0.25rem;
    font-family: Georgia, "Times New Roman", serif;
}

.section-card-body p {
    font-size: 0.88rem;
    color: #555;
    line-height: 1.5;
}

.card-subtitle {
    font-style: italic;
    font-size: 0.85rem !important;
    color: #666 !important;
    margin-bottom: 0.5rem;
}

.section-card-body ul {
    padding-left: 1.15rem;
    margin-bottom: 1rem;
    flex: 1;
}

.section-card-body ul li {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 0.3rem;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

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

    .home-hero-inner {
        grid-template-columns: 1fr;
    }

    .home-hero-text h2 {
        font-size: 1.6rem;
    }
}

@media (min-width: 701px) and (max-width: 900px) {
    .section-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Pool page header image --- */
.page-img {
    width: 100%;
    max-height: 280px;
    object-fit: cover;
    display: block;
    border-radius: 8px;
    margin-top: 2rem;
    margin-bottom: 1.25rem;
}

/* --- Info card sub-headings (rules, community pages) --- */
.info-card h4 {
    font-size: 1rem;
    color: #17551E;
    margin: 1.4rem 0 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
    font-family: Georgia, "Times New Roman", serif;
}

.info-card h4:first-of-type {
    border-top: none;
    padding-top: 0.25rem;
    margin-top: 0.75rem;
}

.info-card h5 {
    font-size: 0.93rem;
    font-weight: 600;
    color: #333;
    margin: 0.9rem 0 0.35rem;
}

.info-card ol {
    padding-left: 1.25rem;
}

.info-card ol li {
    margin-bottom: 0.75rem;
}

/* --- Rules metadata caption --- */
.rules-caption {
    display: block;
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    margin-bottom: 1rem;
}

.rules-meta {
    font-size: 0.8rem;
    color: #888;
    font-style: italic;
    margin-top: 1rem;
    text-align: right;
}

/* --- Utilities table (community page) --- */
.utilities-table {
    width: 100%;
    border-collapse: collapse;
}

.utilities-table th {
    background: #e8f0e4;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #555;
}

.utilities-table th,
.utilities-table td {
    padding: 0.55rem 0.75rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
    vertical-align: top;
}

.utilities-table td:first-child {
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

/* --- Utility spacing & alignment --- */
.mt-sm  { margin-top: 0.4rem; }
.mt-md  { margin-top: 0.5rem; }
.mt-lg  { margin-top: 0.75rem; }
.mt-xl  { margin-top: 1rem; }
.mt-2xl { margin-top: 1.25rem; }
.text-left { text-align: left; }

/* --- Contact form iframe --- */
.contact-iframe {
    border: none;
    width: 100%;
    height: 800px;
    display: block;
}

/* ===================================================================
   Two-column content rows (residents page)
   =================================================================== */

.content-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2.5rem;
    margin: 2rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.content-row:last-of-type {
    border-bottom: none;
}

/* Pool info top row — equal columns so address/contact text isn't cramped */
.pool-info-top {
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.content-row-intro h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    color: #17551E;
    font-style: italic;
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.content-row-intro p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.65;
}

.content-row-intro a {
    color: #1480B0;
    text-decoration: none;
    border-bottom: 1px solid #b3d7e8;
}

.content-row-detail p {
    color: #555;
    line-height: 1.7;
    font-size: 0.95rem;
}

.content-row-detail a {
    color: #1480B0;
    text-decoration: none;
    border-bottom: 1px solid #b3d7e8;
}

.content-row-detail a:hover {
    color: #0A3C52;
    border-bottom-color: #0A3C52;
}

.detail-heading {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    color: #222;
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.address-block {
    font-family: "Courier New", Courier, monospace;
    font-size: 0.9rem;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0.9rem 1.1rem;
    line-height: 1.8;
    color: #333;
    display: inline-block;
}

@media (max-width: 768px) {
    .content-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
}

/* ===================================================================
   Community page — WordPress-matching layout components
   =================================================================== */

/* --- Standalone section headings --- */
.section-heading {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.9rem;
    color: #17551E;
    margin-top: 2.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid #e0e0e0;
}

.community-page {
    padding-bottom: 3rem;
}

.community-page > p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 0.5rem;
}

/* --- Neighborhood map --- */
.community-map {
    margin: 2rem 0;
}

.community-map iframe {
    width: 100%;
    height: 350px;
    border: none;
    border-radius: 8px;
    display: block;
}

@media (max-width: 768px) {
    .community-map iframe {
        height: 250px;
    }
}

/* --- Amenity alternating rows --- */
.amenity-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    margin: 2rem 0;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e9ecef;
}

.amenity-row:last-of-type {
    border-bottom: none;
}

.amenity-text h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
    color: #17551E;
    margin-bottom: 0.6rem;
    font-style: italic;
}

.amenity-text p {
    color: #555;
    line-height: 1.7;
}

.amenity-text a {
    color: #1480B0;
    text-decoration: none;
    border-bottom: 1px solid #b3d7e8;
}

.amenity-text a.read-more {
    border-bottom: none;
    color: #17551E;
    font-weight: 600;
    font-size: 0.95rem;
}

.amenity-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

/* --- Utility provider grid --- */
.utility-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.utility-card {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.utility-card-header {
    background: #CDD5C4;
    color: #17551E;
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.5rem 0.9rem;
}

.utility-card-body {
    padding: 0.75rem 0.9rem;
    font-size: 0.88rem;
    color: #555;
    line-height: 1.6;
}

.utility-card-body strong {
    display: block;
    font-size: 0.95rem;
    color: #222;
    margin-bottom: 0.35rem;
}

.utility-card-body p {
    margin-bottom: 0.2rem;
}

.utility-card-body a {
    color: #1480B0;
    text-decoration: none;
}

.utility-card-body a:hover {
    color: #0A3C52;
}

/* --- School photo cards --- */
.school-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.school-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.school-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.school-card-body {
    padding: 1rem 1.1rem 1.25rem;
}

.school-card-body h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1rem;
    color: #17551E;
    margin-bottom: 0.5rem;
}

.school-card-body ul {
    padding-left: 1.1rem;
    margin: 0;
}

.school-card-body ul li {
    font-size: 0.88rem;
    margin-bottom: 0.3rem;
}

.school-card-body a {
    color: #1480B0;
    text-decoration: none;
}

.school-card-body a:hover {
    color: #0A3C52;
}

/* --- Responsive: community page --- */
@media (max-width: 768px) {
    .section-heading {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .amenity-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .amenity-image img {
        height: 200px;
    }

    .utility-grid {
        grid-template-columns: 1fr;
    }

    .school-cards {
        grid-template-columns: 1fr;
    }

    .contact-iframe {
        height: 600px;
    }
}

@media (min-width: 769px) and (max-width: 1000px) {
    .school-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}
