/* Main website styles: layout, navigation, forms, staff cards, and admin pages.
Mobile rules and photo placeholders are near the bottom. */

/* Colors and base styles */

:root {
    --forest: #204733;
    --forest-deep: #12352b;
    --blue: #397d9e;
    --sky: #8cc3df;
    --ice: #eaf5fa;
    --paper: #f6faf8;
    --ink: #183f3a;
    --muted: #4d6870;
    --line: #bcd5df;
    --white: #fff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #eef5f2;
    font: 16px/1.6 Arial, Helvetica, sans-serif;
    color: var(--ink);
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

.container {
    width: 100%;
    max-width: none;
    margin: auto;
    min-width: 0;
}

a {
    color: #145b77;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid #51a8df;
    outline-offset: 3px;
}

/* Header and navigation */

.site-header .banner {
    width: 100%;
    min-height: 450px;
    background-size: cover;
    background-position: center;
    border-radius: 0;
}

.site-header {
    width: 100%;
    overflow: hidden;
    border-radius: 0;
    background: var(--paper);
    box-shadow: 0 9px 25px #12352b24;
}

.branding {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 20px clamp(18px, 3vw, 42px);
    background: #f5f8f5;
}

.branding, .navbar {
    padding-left: 4%;
    padding-right: 4%;
}

.brand-logo {
    display: block;
    flex: none;
    width: 90px;
    height: 90px;
}

.logo-image {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    border-radius: 50%;
}

.company-info {
    min-width: 0;
}

.company-info h1 {
    margin: 0;
    color: var(--forest);
    font-size: clamp(22px, 2.25vw, 34px);
    line-height: 1.15;
}

.company-info p {
    margin: 3px 0;
    color: var(--muted);
    font-size: 14px;
}

.company-info .eyebrow {
    font-size: 11px;
    letter-spacing: .14em;
    color: var(--blue);
    font-weight: 800;
}

.header-contact {
    margin-left: auto;
    background: var(--forest);
    color: white;
    text-decoration: none;
    padding: 10px 17px;
    border-radius: 8px;
    font-weight: 700;
    white-space: nowrap;
}

.header-contact:hover {
    background: #2c7656;
}

.navbar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    padding: 11px clamp(12px, 2.5vw, 36px);
    background: var(--forest-deep);
    border-bottom: 4px solid var(--sky);
}

.navbar a {
    color: #f6fbff;
    text-decoration: none;
    padding: 10px 16px;
    border-radius: 7px;
    font-weight: 700;
    font-size: 14px;
}

.navbar a:hover {
    background: #2d685a;
}

.navbar a.active {
    background: #e1f2f8;
    color: #123c4b;
}

.banner {
    display: flex;
    align-items: center;
    min-height: clamp(360px, 36vw, 540px);
    padding: clamp(30px, 5vw, 72px);
    background-color: var(--forest);
    background-image: linear-gradient(90deg, rgba(8, 38, 34, .92), rgba(8, 38, 34, .63) 53%, rgba(8, 38, 34, .12)), url("assets/bay-header.jpg");
    background-position: center;
    background-size: cover;
}

.banner-small {
    min-height: clamp(230px, 24vw, 330px);
}

.banner-content {
    max-width: 780px;
    color: white;
}

.banner-content h2 {
    margin: 0 0 14px;
    font-size: clamp(31px, 4.3vw, 58px);
    line-height: 1.15;
    color: white;
}

.banner-content p {
    font-size: clamp(15px, 1.6vw, 18px);
    margin: 0 0 22px;
    color: white;
}

.banner-subtitle {
    color: #addaf0 !important;
    letter-spacing: .16em;
    font-size: 12px !important;
    font-weight: 800;
}

.hero-button {
    display: inline-block;
    background: #f5fbfd;
    color: var(--forest);
    padding: 12px 19px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
}

.hero-button:hover {
    background: #bde4f2;
}

/* Page layout and content */

.content-layout {
    width: 100%;
    max-width: none;
    padding: 35px 4%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 310px);
    gap: 24px;
    align-items: start;
    margin: 30px 0 48px;
}

.content-layout main {
    min-width: 0;
    padding: clamp(22px, 3.4vw, 44px);
    border: 1px solid #c6dcd7;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 22px #193e3921;
    color: var(--ink);
}

.content-layout main h2 {
    font-size: clamp(26px, 2.4vw, 37px);
    color: var(--forest);
    margin: 0 0 18px;
    line-height: 1.25;
}

.content-layout main h3 {
    font-size: 22px;
    color: var(--forest);
    margin: 24px 0 12px;
}

.content-layout main p {
    margin: 0 0 19px;
}

.content-layout main li {
    margin-bottom: 6px;
}

.section-tag {
    display: block;
    font-weight: 800;
    letter-spacing: .16em;
    font-size: 12px;
    color: var(--blue);
    margin-bottom: 10px;
}

.rule-heading {
    padding-bottom: 10px;
    border-bottom: 3px solid var(--sky);
}

.service-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin: 16px 0 25px;
}

.service-columns section {
    background: var(--ice);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid var(--line);
    min-width: 0;
}

.service-columns h3 {
    margin: 0 0 12px !important;
}

.service-columns ul {
    padding-left: 20px;
    margin: 0;
}

.contact-box {
    padding: 26px 23px;
    border-radius: 13px;
    border: 1px solid #92b6c4;
    background: var(--forest-deep);
    box-shadow: 0 6px 20px #12352b24;
    color: white;
    position: sticky;
    top: 18px;
}

.contact-box h2 {
    margin: 0 0 15px;
    color: white;
}

.contact-box h4 {
    margin: 17px 0 8px;
}

.contact-box p {
    margin: 0 0 14px;
}

.contact-box a {
    color: #c4e9ff;
}

.contact-box .estimate-btn {
    display: inline-block;
    background: #bde4f2;
    color: #12352b;
    text-decoration: none;
    border-radius: 8px;
    padding: 11px 15px;
    font-weight: 700;
    margin-top: 8px;
}

.site-footer {
    text-align: center;
    font-size: 13px;
    padding: 0 0 28px;
    color: #244a48;
}

/* Image grids and galleries */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
    margin: 18px 0 30px;
}

.photo-grid-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.gallery-photo {
    width: 100%;
    height: clamp(180px, 21vw, 300px);
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.gallery-after {
    margin-top: 28px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 35px;
}

.section-heading h3 {
    margin: 0 0 6px !important;
}

.minor-note {
    color: var(--muted);
    font-size: 13px;
}

/* Team profiles and affiliations */

.team-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 18px 0 35px;
}

.team-card {
    background: #f7fbfd;
    border: 1px solid #bad9e7;
    border-radius: 13px;
    overflow: hidden;
    min-width: 0;
}

.team-photo {
    display: grid;
    place-items: center;
    position: relative;
    height: 110px;
    background: #e8f0ec;
    color: #315647;
    font-size: 30px;
    font-weight: 700;
    text-align: center;
}

.team-photo.has-photo {
    height: 230px;
}

.team-photo img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.team-details {
    padding: 17px;
}

.team-details h4 {
    margin: 0 0 6px;
    font-size: 19px;
    color: var(--forest);
}

.team-title {
    font-weight: 700;
    color: #246582;
    margin: 0 0 12px !important;
    font-size: 14px;
}

.team-credential {
    font-size: 12px;
    margin: 5px 0 !important;
    color: #45615f;
    overflow-wrap: anywhere;
}

.affiliations {
    margin-top: 25px;
}

.affiliations-box {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    background: var(--ice);
    border: 1px solid var(--line);
    border-radius: 9px;
}

.affiliations-box ul {
    margin: 0;
    padding-left: 20px;
}

/* Contact form */

.project-form {
    display: grid;
    gap: 18px;
    padding: clamp(18px, 3vw, 32px);
    background: #f0f8fc;
    border: 1px solid var(--line);
    border-top: 5px solid var(--blue);
    border-radius: 12px;
}

.project-form label {
    display: grid;
    gap: 6px;
    font-weight: 700;
    color: var(--forest);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.project-form input,
.project-form textarea,
.admin-editor input:not([type=checkbox]),
.admin-editor textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #a1bfca;
    border-radius: 7px;
    background: white;
    font: inherit;
}

.form-honeypot {
    position: absolute !important;
    left: -99999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-submit,
.admin-buttons button,
.admin-team-row button {
    background: var(--forest);
    border: 0;
    border-radius: 8px;
    color: white;
    padding: 11px 18px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.form-submit:disabled,
.admin-buttons button:disabled {
    background: #6d8684;
    cursor: not-allowed;
}

.form-status {
    font-size: 14px;
    margin: 0 !important;
}

.form-status.error {
    color: #912e2e;
}

.form-status.success {
    color: #17623a;
}

/* Admin pages */

.admin-body {
    background: #eaf3ef;
}

.admin-shell {
    max-width: 980px;
    margin: 30px auto;
    padding: clamp(20px, 4vw, 40px);
    border-radius: 15px;
    background: white;
    box-shadow: 0 8px 35px #12352b26;
    color: var(--ink);
}

.admin-shell h1 {
    color: var(--forest);
    margin-top: 10px;
}

.admin-editor {
    display: grid;
    gap: 15px;
    padding: 22px;
    border-radius: 12px;
    background: var(--ice);
    margin-bottom: 28px;
}

.admin-editor label {
    display: grid;
    gap: 5px;
    font-weight: 700;
}

.admin-editor label:has(input[type=checkbox]) {
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-editor input[type=checkbox] {
    width: 20px;
    height: 20px;
}

.admin-buttons {
    display: flex;
    gap: 10px;
}

.admin-team-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 0;
    border-bottom: 1px solid var(--line);
}

.admin-team-row span {
    flex: 1;
}

.admin-team-row button:last-child {
    background: #913c3c;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 12px 0 22px;
}

.admin-nav a {
    padding: 10px 14px;
    border-radius: 8px;
    background: #e6f2f6;
    color: #204733;
    text-decoration: none;
    font-weight: bold;
}

.admin-nav a.active {
    background: #204733;
    color: white;
}

.admin-editor input[type="file"] {
    background: white;
    padding: 10px;
    border-radius: 7px;
    border: 1px dashed #95b5c6;
}

.admin-kicker {
    margin-bottom: 2px;
    color: var(--blue);
    font-size: 12px;
    letter-spacing: .12em;
    font-weight: 800;
}

.admin-message {
    padding: 12px 16px;
    border-left: 4px solid var(--blue);
    background: var(--ice);
    border-radius: 6px;
}

.admin-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.admin-overview[hidden] {
    display: none;
}

.admin-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.admin-stat span {
    color: var(--muted);
    font-weight: 700;
}

.admin-stat strong {
    font-size: 2rem;
    color: var(--forest);
    line-height: 1.25;
}

.admin-stat small {
    color: var(--muted);
}

.admin-stat a {
    margin-top: 10px;
    font-weight: 700;
}

.admin-login-link {
    display: inline-block;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    margin-left: 12px;
    border: 1px solid #23523e;
    border-radius: 8px;
    color: #23523e;
    background: #ffffff;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}

.admin-login-link:hover {
    background: #23523e;
    color: #ffffff;
}

/* Homepage carousel */

.carousel-section {
    margin: 30px 0 38px;
}

.project-carousel {
    min-height: 290px;
    overflow: hidden;
    border-radius: 13px;
    border: 1px solid #b7d7df;
    background: #12352b;
    color: white;
}

.carousel-frame {
    position: relative;
    min-height: clamp(200px, 33vw, 490px);
    overflow: hidden;
}

.carousel-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-shade {
    position: absolute;
    inset: auto 0 0;
    padding: 65px 22px 62px;
    background: linear-gradient(transparent, rgba(9, 31, 29, 0.93));
    color: white;
}

.carousel-shade h4 {
    font-size: clamp(21px, 2.3vw, 32px);
    line-height: 1.25;
    margin: 0 0 7px;
    color: white;
}

.carousel-shade p {
    font-size: 15px;
    margin: 0;
    max-width: 680px;
    color: white;
}

.carousel-controls {
    position: absolute;
    bottom: 12px;
    left: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.carousel-controls[hidden] {
    display: none;
}

.carousel-controls button {
    cursor: pointer;
    color: white;
    border: 1px solid #ffffff80;
    background: #12352bc9;
    border-radius: 30px;
    font-size: 22px;
    min-height: 39px;
    min-width: 39px;
}

.carousel-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.carousel-dots button {
    width: 12px;
    height: 12px;
    min-width: 12px;
    min-height: 12px;
    padding: 0;
    border: 1px solid white;
    border-radius: 50%;
    background: #ffffff55;
}

.carousel-dots button[aria-current="true"] {
    background: white;
}

.inquiries-toolbar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin: 24px 0;
}

.inquiries-toolbar select, .inquiries-toolbar button {
    padding: 10px 12px;
    border: 1px solid #a8c8d2;
    border-radius: 7px;
    font: inherit;
}

.inquiries-toolbar button {
    background: #204733;
    color: white;
    border: 0;
    cursor: pointer;
}

.inquiries-list {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.inquiry-card {
    padding: 22px;
    background: #f7fbfe;
    border: 1px solid #bbd7d4;
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.inquiry-card h2 {
    margin: 0 0 16px;
    color: #204733;
    font-size: 21px;
}

.inquiry-details p {
    margin: 9px 0;
    white-space: pre-wrap;
}

.inquiry-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #bbd7e4;
}

.inquiry-actions select {
    margin-left: 8px;
}

.delete-inquiry-btn {
    margin-left: auto;
    padding: 10px 16px;
    background: #a83232;
    color: white;
    border: 0;
    border-radius: 7px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.delete-inquiry-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.delete-inquiry-btn:hover {
    background: #812525;
}

/* Responsive layouts */

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

@media (max-width:850px) {
    .content-layout {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }
    .contact-box {
        position: static;
    }
    .banner {
        padding: 36px 30px;
    }
    .header-contact {
        display: none;
    }
    .site-header .banner {
        min-height: 320px;
    }
}

@media (max-width:620px) {
    .container {
        width: 100%;
    }
    .branding {
        padding: 17px 13px;
        gap: 12px;
    }
    .brand-logo {
        width: 65px;
        height: 65px;
    }
    .company-info h1 {
        font-size: 20px;
    }
    .company-info p {
        font-size: 12px;
    }
    .company-info .eyebrow {
        font-size: 10px;
    }
    .navbar {
        padding: 8px;
    }
    .navbar a {
        padding: 8px 10px;
        font-size: 12px;
    }
    .banner,
    .banner-small {
        min-height: 300px;
        padding: 28px 18px;
    }
    .banner-content h2 {
        font-size: 32px;
    }
    .content-layout {
        margin-top: 18px;
        gap: 15px;
        padding: 0 10px;
    }
    .content-layout main {
        padding: 20px 18px;
    }
    .service-columns,
    .photo-grid,
    .photo-grid-two,
    .team-grid,
    .form-row,
    .affiliations-box {
        grid-template-columns: 1fr;
    }
    .admin-shell {
        margin: 14px;
    }
    .admin-team-row {
        flex-wrap: wrap;
    }
    .admin-team-row span {
        flex-basis: 100%;
    }
    .carousel-shade {
        padding: 65px 16px 60px;
    }
    .carousel-frame {
        min-height: 320px;
    }
}

.site-header .banner-small {
    min-height: clamp(230px, 24vw, 330px);
}

@media (max-width: 600px) {
    .admin-login-link {
        margin: 10px 0 0;
    }
    .inquiry-card {
        padding: 15px;
    }
    .inquiry-actions {
        flex-wrap: wrap;
    }
}

@media (max-width: 850px) {
    .site-header .banner-small {
        min-height: 280px;
    }
}

/* Thank-you page */

.thanks-page {
    width: 100%;
    padding: clamp(22px, 4vw, 54px) clamp(14px, 4vw, 64px) 64px;
}

.thanks-hero {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1180px;
    min-height: 430px;
    margin: 0 auto;
    padding: clamp(30px, 5vw, 70px);
    overflow: hidden;
    border-radius: 20px;
    background-image: linear-gradient(90deg, rgba(13, 48, 38, .97), rgba(13, 48, 38, .84) 55%, rgba(13, 48, 38, .48)),
        url("/assets/bay-header.jpg");
    background-size: cover;
    background-position: center;
    box-shadow: 0 16px 38px rgba(14, 49, 39, .16);
}

.thanks-hero-inner {
    max-width: 650px;
    color: #fff;
}

.thanks-mark {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    margin-bottom: 24px;
    border: 2px solid rgba(192, 236, 204, .6);
    border-radius: 50%;
    background: rgba(218, 248, 222, .13);
    color: #c5f0d1;
    font-size: 36px;
    font-weight: 700;
}

.thanks-eyebrow,
.thanks-section-tag {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

.thanks-eyebrow {
    color: #bee8d0;
}

.thanks-section-tag {
    color: var(--blue);
}

.thanks-hero h2 {
    max-width: 640px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.12;
}

.thanks-lead {
    max-width: 570px;
    margin: 0 0 12px;
    color: #fff;
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 700;
    line-height: 1.5;
}

.thanks-description {
    max-width: 560px;
    margin: 0;
    color: #e0ede7;
    font-size: 15px;
    line-height: 1.8;
}

.thanks-buttons {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.thanks-primary,
.thanks-secondary {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    padding: 12px 20px;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .2s ease, transform .2s ease;
}

.thanks-primary {
    background: #fff;
    color: var(--forest);
}

.thanks-primary:hover {
    background: #d9efe3;
    color: var(--forest);
    transform: translateY(-2px);
}

.thanks-secondary {
    border: 1px solid rgba(255, 255, 255, .7);
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.thanks-secondary:hover {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

@media (max-width: 600px) {
    .thanks-page {
        padding: 18px 12px 40px;
    }
    .thanks-hero {
        min-height: 0;
        padding: 34px 24px;
        border-radius: 14px;
        background-image: linear-gradient(rgba(13, 48, 38, .94), rgba(13, 48, 38, .84)),
            url("/assets/bay-header.jpg");
    }
    .thanks-hero h2 {
        font-size: 35px;
    }
    .thanks-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    .thanks-primary, .thanks-secondary {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .thanks-primary, .thanks-secondary {
        transition: none;
    }
}

/* Photo placeholders */

.photo-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    min-height: 220px;
    padding: 20px;
    border: 2px solid #000;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
}

.photo-placeholder.wide {
    min-height: 260px;
}

.photo-placeholder.small {
    min-height: 170px;
}

.team-card .team-photo,
.team-card .team-photo.has-photo {
    width: calc(100% - 24px);
    height: 220px;
    margin: 12px 12px 0;
    overflow: hidden;
    border: 2px solid #000;
    border-radius: 5px;
    background: #fff;
    color: #222;
    font-size: 15px;
    font-weight: 600;
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 600px) {
    .photo-placeholder {
        min-height: 180px;
    }
}

/* Homepage photo spaces */

.home-photo-section {
    margin-top: 30px;
}

.home-photo-group {
    margin-top: 22px;
}

.home-photo-group h4 {
    margin: 0 0 10px;
    color: var(--forest);
    font-size: 18px;
}

.home-photo-group .photo-grid {
    margin: 12px 0 16px;
}

/* Content editor and live photo slots */
.site-header .banner {
    background-image: var(--editable-banner-image, url("/assets/bay-header.jpg"));
}

.photo-placeholder.has-photo {
    padding: 0;
    overflow: hidden;
}

.photo-placeholder.has-photo img {
    width: 100%;
    height: 100%;
    min-height: inherit;
    display: block;
    object-fit: cover;
}

.cms-rich p { margin: 0 0 0.85em; }
.cms-rich ul { margin: 0 0 1em; padding-left: 1.4em; }
.cms-rich li { margin-bottom: 0.25em; }

.content-admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 20px 0;
}

.content-admin-toolbar select,
.content-admin-toolbar button,
.content-edit-card input,
.content-edit-card textarea {
    border: 1px solid #a8b4b8;
    border-radius: 6px;
    padding: 10px;
    font: inherit;
}

.content-admin-toolbar button,
.content-edit-card button {
    cursor: pointer;
}

.content-editor {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 370px), 1fr));
    gap: 16px;
    align-items: start;
}

.content-edit-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    border: 1px solid #c3d2d5;
    border-radius: 8px;
    background: #fff;
}

.content-edit-card .content-field-label {
    font-weight: 700;
    font-size: 15px;
}

.content-edit-card small { color: #566771; }
.content-edit-card textarea { resize: vertical; min-height: 105px; }
.content-edit-card input[type=file] { width: 100%; }
.content-edit-card .secondary-btn { align-self: start; }
.content-edit-card .text-btn {
    padding: 4px 0;
    border: none;
    background: none;
    color: #165a77;
    text-align: left;
    align-self: start;
    text-decoration: underline;
}
.content-photo-preview {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-radius: 4px;
}

/* The thank-you banner also uses the selected coastal photograph. */
.thanks-hero {
    background-image: linear-gradient(90deg, rgba(13, 48, 38, .97), rgba(13, 48, 38, .42)),
        var(--thanks-banner-image, url("/assets/bay-header.jpg"));
}
@media (max-width: 600px) {
    .thanks-hero {
        background-image: linear-gradient(rgba(13, 48, 38, .94), rgba(13, 48, 38, .84)),
            var(--thanks-banner-image, url("/assets/bay-header.jpg"));
    }
}

/* Content editor: group fields by the section visitors see. */
.content-editor {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 22px;
}
.content-editor-section {
    padding: 18px;
    border: 1px solid #c3d2d5;
    border-radius: 10px;
    background: #f5f8f8;
}
.content-section-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}
.content-section-heading h2 {
    margin: 0;
    color: #204733;
    font-size: 21px;
}
.content-section-count {
    color: #566771;
    font-size: 13px;
}
.content-section-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
    gap: 14px;
    align-items: stretch;
}
.content-edit-card {
    min-width: 0;
}
.content-field-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}
.content-field-actions a {
    color: #165a77;
    font-size: 14px;
    text-decoration: underline;
}
.content-edit-card input, .content-edit-card textarea {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
/* Only shown when a staff member follows a field's preview link. */
.cms-preview-highlight {
    outline: 3px dashed #a45012;
    outline-offset: 5px;
}
@media (max-width: 600px) {
    .content-editor-section { padding: 12px; }
    .content-section-heading h2 { font-size: 18px; }
}

/* Office photo and publishing controls */
.office-feature {
    display: grid;
    grid-template-columns: minmax(0, .65fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin: 30px 0;
    padding: 20px;
    border: 1px solid #bed2d6;
    border-radius: 10px;
    background: #f5f9fa;
}
.office-feature-image {
    display: block;
    width: 100%;
    max-height: 390px;
    object-fit: cover;
    border: 1px solid #1c2b2e;
    border-radius: 5px;
}
.contact-office-image { max-width: 680px; }
.publish-group {
    background: #fff;
    border: 1px solid #bdced2;
    border-radius: 9px;
    padding: 20px;
    margin: 18px 0;
}
.publish-group h2 { margin: 0 0 5px; color: #204733; }
.publish-list { display: grid; gap: 0; }
.publish-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 0;
    border-bottom: 1px solid #e1e9eb;
}
.publish-item:last-child { border-bottom: none; }
.publish-item strong { display: block; }
.publish-item small { display: block; color: #617277; margin-top: 4px; }
.publish-actions { display: flex; gap: 12px; align-items: center; }
.publish-switch { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; }
.publish-switch input { width: 20px; height: 20px; accent-color: #246746; cursor: pointer; }
.publish-switch input:disabled { cursor: not-allowed; }
.publish-save {
    border: 0; border-radius: 8px; padding: 12px 22px;
    background: #204733; color: #fff; font: inherit; font-weight: 700;
    cursor: pointer;
}
.publish-save:disabled { opacity: .5; cursor: not-allowed; }
.publish-actions a { color: #165a77; }
.publish-note { color: #4f656b; max-width: 760px; }
@media(max-width: 660px) {
    .office-feature { grid-template-columns: 1fr; }
    .publish-actions { width: 100%; justify-content: space-between; }
}

/* Simple photo controls for admin editors */
.admin-photo-picker {
    display: grid;
    gap: 10px;
}
.admin-photo-picker > label {
    font-weight: 700;
}
.admin-photo-picker > small,
.admin-photo-filename {
    color: #52646b;
    font-size: 13px;
}
.admin-photo-frame {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 155px;
    padding: 10px;
    border: 1px solid #a6b7bc;
    border-radius: 8px;
    background: white;
    color: #53666b;
    text-align: center;
}
.admin-photo-frame img,
.admin-photo-frame .content-photo-preview {
    display: block;
    max-height: 210px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
.admin-photo-frame img[hidden],
.admin-photo-frame span[hidden],
.admin-photo-frame p[hidden] { display: none; }
.admin-photo-picker .secondary-btn,
.content-edit-card .secondary-btn {
    padding: 9px 14px;
    border: 1px solid #8ea5a9;
    border-radius: 7px;
    background: #eef5f5;
    color: #204733;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.admin-photo-picker .secondary-btn:disabled,
.content-edit-card .secondary-btn:disabled { opacity: .55; cursor: not-allowed; }

/* Homepage banner text and editable bullet points */
.home-banner {
    align-items: flex-start;
    justify-content: flex-start;
    padding-top: clamp(26px, 4vw, 54px);
}

.home-banner .banner-content {
    width: 100%;
    max-width: 1000px;
    text-align: left;
}

.home-banner .banner-content h2 {
    text-wrap: balance;
}

.home-banner .banner-bullets:empty {
    display: none;
}

.home-banner .banner-bullets ul {
    margin: 0 0 24px;
    padding-left: 1.4em;
}

.home-banner .banner-bullets li {
    margin-bottom: 7px;
    color: #fff;
    font-size: clamp(15px, 1.65vw, 19px);
    line-height: 1.45;
}

.banner-bullet-rows {
    display: grid;
    gap: 10px;
}

.banner-bullet-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.banner-bullet-row input {
    flex: 1;
}

.banner-bullet-row .secondary-btn {
    flex-shrink: 0;
}

.banner-bullet-add {
    align-self: flex-start;
}

@media (max-width: 600px) {
    .banner-bullet-row {
        flex-wrap: wrap;
    }

    .home-banner .banner-content h2 {
        font-size: clamp(27px, 8vw, 34px);
    }
}

/* Quick formatting controls beside editable paragraphs */
.content-format-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
