/* CMS Safe Formatting — narrowly scoped classes and custom property for CMS text */
[data-cms-id].cms-bold {
    font-weight: 700;
}

[data-cms-id].cms-italic {
    font-style: italic;
}

[data-cms-id].cms-underline {
    text-decoration: underline;
}

[data-cms-id].cms-size-small {
    font-size: .875em;
}

[data-cms-id].cms-size-large {
    font-size: 1.125em;
}

[data-cms-id].cms-size-x-large {
    font-size: 1.25em;
}

[data-cms-id].cms-colored {
    color: var(--cms-color);
}

@media (forced-colors: active) {
    [data-cms-id].cms-colored {
        color: CanvasText;
    }
}

/* CMS page section layouts. These reuse the site's section, card, button and glass tokens. */
[data-cms-builtin-section][hidden] { display: none !important; }
main > [data-cms-builtin-section].cms-width-narrow,
main > .cms-custom-section.cms-width-narrow,
main > .cms-layout-width-narrow { width: min(100% - 32px, 760px); margin-inline: auto; }
main > [data-cms-builtin-section].cms-width-standard,
main > .cms-custom-section.cms-width-standard,
main > .cms-layout-width-standard { width: min(100% - 32px, 1120px); margin-inline: auto; }
main > [data-cms-builtin-section].cms-width-wide,
main > .cms-custom-section.cms-width-wide,
main > .cms-layout-width-wide { width: min(100% - 24px, 1400px); margin-inline: auto; }
main > [data-cms-builtin-section].cms-spacing-sm,
main > .cms-custom-section.cms-spacing-sm,
main > .cms-layout-spacing-sm { padding-block: clamp(1rem, 2vw, 2rem); }
main > [data-cms-builtin-section].cms-spacing-md,
main > .cms-custom-section.cms-spacing-md,
main > .cms-layout-spacing-md { padding-block: clamp(2rem, 4vw, 4rem); }
main > [data-cms-builtin-section].cms-spacing-lg,
main > .cms-custom-section.cms-spacing-lg,
main > .cms-layout-spacing-lg { padding-block: clamp(3rem, 7vw, 6rem); }
main > [data-cms-builtin-section].cms-align-center,
main > .cms-custom-section.cms-align-center,
main > .cms-layout-align-center { text-align: center; }
.cms-custom-section {
    box-sizing: border-box;
    border: 1px solid var(--ocean-border, rgba(133, 207, 236, .28));
    border-top-color: var(--ocean-rim, rgba(181, 230, 248, .35));
    border-radius: var(--glass-radius, 16px);
    background: var(--ocean-glass, linear-gradient(155deg, rgba(18,70,94,.86), rgba(8,35,48,.8)));
    box-shadow: var(--ocean-shadow, 0 10px 28px rgba(0, 12, 22, .26));
    backdrop-filter: blur(16px) saturate(1.2);
    padding-inline: clamp(1rem, 4vw, 3rem);
}
.cms-custom-section > h2 { margin-top: 0; }
.cms-section-grid { display: grid; grid-template-columns: repeat(var(--cms-section-columns, 1), minmax(0, 1fr)); gap: clamp(.75rem, 2vw, 1.5rem); }
.cms-columns-1, .cms-layout-columns-1 { --cms-section-columns: 1; }
.cms-columns-2, .cms-layout-columns-2 { --cms-section-columns: 2; }
.cms-columns-3, .cms-layout-columns-3 { --cms-section-columns: 3; }
.cms-layout-section :is(.card-grid, .cms-columns) { grid-template-columns: repeat(var(--cms-section-columns, 1), minmax(0, 1fr)); }
.cms-section-item { min-width: 0; }
.cms-section-item img,
.cms-image-text-grid > img,
.cms-image-text > img,
.cms-custom-cards .card > img { display: block; width: 100%; height: auto; max-height: 480px; object-fit: cover; border-radius: var(--glass-radius-sm, 14px); }
.cms-image-text-grid, .cms-image-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(1rem, 4vw, 3rem); align-items: center; }
.cms-align-center .cms-image-text-copy { text-align: center; }
.cms-section-faq-list { text-align: left; }
.cms-custom-section.cms-section-cta { text-align: center; }
@media (max-width: 720px) {
    .cms-section-grid, .cms-image-text-grid, .cms-image-text { grid-template-columns: 1fr; }
}
@media (prefers-reduced-transparency: reduce) {
    .cms-custom-section { backdrop-filter: none; -webkit-backdrop-filter: none; }
}

/* ─── Global Visual Theme Scoped Overrides ────────────────────────────────── */

/* Buttons */
html[data-theme-btn] :is(.btn, .header-cta, .google-btn):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    background: var(--theme-btn-bg, var(--theme-btn-start)) !important;
}
html[data-theme-btn-text] :is(.btn, .header-cta, .google-btn):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    color: var(--theme-btn-text) !important;
}
html[data-theme-btn-border] :is(.btn, .header-cta, .google-btn):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    border: var(--theme-btn-border-rule) !important;
}

/* Pills */
html[data-theme-pill] :is(.glass-pill, .glass-nav-highlight):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    background: var(--theme-pill-bg, var(--theme-pill-start)) !important;
}
html[data-theme-pill-text] :is(.glass-pill, .glass-pill .pill-label, .glass-pill .pill-icon, .glass-pill .pill-arrow, .glass-nav-highlight):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    color: var(--theme-pill-text) !important;
}
html[data-theme-pill-border] :is(.glass-pill, .glass-nav-shell, .glass-nav-highlight):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    border-color: var(--theme-pill-border) !important;
}

/* Cards & Panels */
html[data-theme-card] :is(
    .card, .area-card, .package, .package-card, .additional-option,
    .article-card, .google-rating-card, .review-card, .info-panel,
    .stat-panel, .feature-article, .quick-facts, .related-section,
    .local-section, .article-outro, .article-related, .booking-frame,
    .contact-form-frame, .contact-page-frame, .contact-card,
    .contact-source-page .card, .supporting-card,
    .program-hero .program-summary, .program-toc a, .program-faq,
    .program-table-wrap table, .faq-list details, .quick-answer,
    .process-step, .gallery-item
):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    background: var(--theme-card-bg, var(--theme-card-start)) !important;
}
html[data-theme-card-text] :is(
    .card, .area-card, .package, .package-card, .additional-option,
    .article-card, .google-rating-card, .review-card, .info-panel,
    .stat-panel, .feature-article, .quick-facts, .related-section,
    .local-section, .article-outro, .article-related, .booking-frame,
    .contact-form-frame, .contact-page-frame, .contact-card,
    .contact-source-page .card, .supporting-card,
    .program-hero .program-summary, .program-toc a, .program-faq,
    .program-table-wrap table, .faq-list details, .quick-answer,
    .process-step, .gallery-item
):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    color: var(--theme-card-text) !important;
}
html[data-theme-card-text] :is(
    .card, .area-card, .package, .package-card, .additional-option,
    .article-card, .google-rating-card, .review-card, .info-panel,
    .stat-panel, .feature-article, .quick-facts, .related-section,
    .local-section, .article-outro, .article-related, .booking-frame,
    .contact-form-frame, .contact-page-frame, .contact-card,
    .contact-source-page .card, .supporting-card,
    .program-hero .program-summary, .program-toc a, .program-faq,
    .program-table-wrap table, .faq-list details, .quick-answer,
    .process-step, .gallery-item
):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) :is(h2, h3, p, strong, td, th, li, summary, span:not(.eyebrow):not(.pill-label)) {
    color: var(--theme-card-text);
}
html[data-theme-card-border] :is(
    .card, .area-card, .package, .package-card, .additional-option,
    .article-card, .google-rating-card, .review-card, .info-panel,
    .stat-panel, .feature-article, .quick-facts, .related-section,
    .local-section, .article-outro, .article-related, .booking-frame,
    .contact-form-frame, .contact-page-frame, .contact-card,
    .contact-source-page .card, .supporting-card,
    .program-hero .program-summary, .program-toc a, .program-faq,
    .program-table-wrap table, .faq-list details, .quick-answer,
    .process-step, .gallery-item
):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    border-color: var(--theme-card-border) !important;
}

/* Telephone Links */
html[data-theme-tel] a[href^="tel:"]:not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
    color: var(--theme-tel-color) !important;
}
html[data-theme-tel] a[href^="tel:"]:not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) svg.phone-icon {
    stroke: var(--theme-tel-color) !important;
}

/* Accent Lines */
html[data-theme-accent] .eyebrow.line:after {
    background: var(--theme-accent-color) !important;
}

/* Accessibility & Preferences */
@media (forced-colors: active) {
    :is(.btn, .header-cta, .google-btn):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
        background: ButtonText !important;
        color: ButtonFace !important;
        border-color: ButtonText !important;
    }
    :is(.glass-pill, .glass-nav-highlight):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
        border-color: Highlight !important;
        color: CanvasText !important;
    }
    :is(
        .card, .area-card, .package, .package-card, .additional-option,
        .article-card, .google-rating-card, .review-card, .info-panel,
        .stat-panel, .feature-article, .quick-facts, .related-section,
        .local-section, .article-outro, .article-related, .booking-frame,
        .contact-form-frame, .contact-page-frame, .contact-card,
        .contact-source-page .card, .supporting-card,
        .program-hero .program-summary, .program-toc a, .program-faq,
        .program-table-wrap table, .faq-list details, .quick-answer,
        .process-step, .gallery-item
    ):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
        border-color: CanvasText !important;
        color: CanvasText !important;
    }
    a[href^="tel:"]:not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
        color: LinkText !important;
    }
    .eyebrow.line:after {
        background: CanvasText !important;
    }
}

@media (prefers-reduced-transparency: reduce) {
    :is(
        .card, .area-card, .package, .package-card, .additional-option,
        .article-card, .google-rating-card, .review-card, .info-panel,
        .stat-panel, .feature-article, .quick-facts, .related-section,
        .local-section, .article-outro, .article-related, .booking-frame,
        .contact-form-frame, .contact-page-frame, .contact-card,
        .contact-source-page .card, .supporting-card,
        .program-hero .program-summary, .program-toc a, .program-faq,
        .program-table-wrap table, .faq-list details, .quick-answer,
        .process-step, .gallery-item
    ):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
    :is(.glass-pill, .glass-nav-shell, .glass-nav-highlight):not(#admin-bar *):not(#admin-dashboard *):not(#admin-drawer *):not(#admin-tools-menu *):not(#editor-modal *):not(#design-dialog *):not(#text-editor-dialog *):not(#photo-admin-dialog *):not(#history-dialog *):not(#access-dialog *):not(#help-dialog *) {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}
