/* Shared presentation layer for the public-site redesign. */
:root {
    --msm-bg: rgba(174, 22, 22, 0.94);
    --msm-header: rgba(40, 0, 0, 0.96);
    --msm-deep: #400000;
    --msm-accent: #8f1717;
    --msm-paper: #fffaf7;
    --msm-card: rgba(255, 255, 255, 0.97);
    --msm-text: #2b0b0b;
    --msm-muted: #704747;
    --msm-line: rgba(96, 0, 0, 0.16);
    --msm-shadow: 0 18px 50px rgba(35, 0, 0, 0.24);
}

html,
body,
input,
select,
textarea,
button {
    font-family: 'Manrope', sans-serif !important;
}

/* Site-wide type scale for the redesign. Base bumped from the legacy 13px to 16px;
   headings and helpers scaled up in proportion. Plain selectors (no !important) so
   page-specific hero/intro rules can still override. */
html,
body {
    font-size: 16px;
    line-height: 1.6;
}

p {
    font-size: 16px;
    line-height: 1.7;
}

h1 { font-size: 44px; }
h2 { font-size: 34px; }
h3 { font-size: 27px; }
h4 { font-size: 22px; }
h5 { font-size: 19px; }
h6 { font-size: 18px; }

h1, h2, h3, h4, h5, h6 {
    line-height: 1.15;
    margin: 14px 0 10px;
}

.w3-small  { font-size: 14px !important; }
.w3-medium { font-size: 17px !important; }
.w3-large  { font-size: 20px !important; }
.w3-xlarge { font-size: 27px !important; }

@media (max-width: 600px) {
    h1 { font-size: 36px; }
    h2 { font-size: 29px; }
    h3 { font-size: 24px; }
}

body.w3-theme-l5 {
    color: var(--msm-text) !important;
    background:
        radial-gradient(circle at top left, rgba(255, 217, 217, 0.14), transparent 28%),
        linear-gradient(180deg, #681010 0%, var(--msm-bg) 42%, #861010 100%) !important;
    padding-top: 72px;
}

h1,
h2,
h3,
h4,
h5,
h6,
.w3-slim,
.w3-wide {
    font-family: 'Cormorant Garamond', Georgia, serif !important;
    font-weight: 700 !important;
    letter-spacing: -0.015em;
}

a {
    color: var(--msm-deep);
}

.w3-top {
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: 0 8px 28px rgba(20, 0, 0, 0.24);
}

.w3-top .w3-navbar {
    min-height: 72px;
    padding: 0 max(18px, calc((100vw - 1380px) / 2));
    background: var(--msm-header) !important;
}

.w3-top .w3-navbar li:first-child,
.w3-top .w3-navbar li:first-child a {
    background: transparent !important;
}

.w3-top .w3-navbar li a {
    display: flex;
    align-items: center;
    min-height: 72px;
    color: #fff7f4 !important;
    border: 0 !important;
    background: transparent !important;
    font-size: 14px !important;
    line-height: 1.2 !important;
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.w3-top .w3-navbar li a:hover {
    color: #ffffff !important;
    background: rgba(255, 255, 255, 0.10) !important;
}

.w3-top .w3-navbar li:nth-child(3) a {
    margin: 15px 8px;
    min-height: 42px;
    padding: 0 18px !important;
    border-radius: 999px;
    background: #a63b3b !important;
    font-weight: 800;
}

.w3-top .w3-navbar img {
    width: 205px;
    height: auto;
    margin: 0 !important;
}

#navDemo {
    margin-top: 72px !important;
    border: 0 !important;
    background: var(--msm-header) !important;
    box-shadow: var(--msm-shadow);
}

#navDemo .w3-navbar {
    background: var(--msm-header) !important;
}

#navDemo .w3-navbar a {
    color: #fff7f4 !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

.w3-content {
    max-width: 1180px;
}

.w3-white,
.w3-card,
.w3-card-2,
.w3-card-4,
.w3-modal-content {
    color: var(--msm-text) !important;
    background-color: var(--msm-card) !important;
    border: 1px solid var(--msm-line);
    border-radius: 20px;
    box-shadow: var(--msm-shadow);
}

.w3-card-2,
.w3-card-4 {
    overflow: hidden;
}

.w3-theme-l4,
.w3-theme-light,
.w3-light-grey,
.w3-pale-red {
    color: var(--msm-text) !important;
    background-color: #fff1f1 !important;
}

.w3-theme-d1,
.w3-theme-d2,
.w3-theme-d3,
.w3-theme-d4,
.w3-theme-d5,
.w3-theme {
    color: #fff7f4 !important;
    background-color: var(--msm-deep) !important;
}

.w3-button,
.w3-btn,
input[type='submit'],
input[type='button'],
button[type='submit'] {
    border: 0 !important;
    border-radius: 999px !important;
    color: #ffffff !important;
    background: linear-gradient(135deg, #6f1111, var(--msm-accent)) !important;
    box-shadow: 0 8px 18px rgba(64, 0, 0, 0.18);
    font-weight: 800;
}

.w3-button:hover,
.w3-btn:hover,
input[type='submit']:hover,
input[type='button']:hover,
button[type='submit']:hover {
    background: var(--msm-deep) !important;
}

.w3-input,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='number'],
select,
textarea {
    color: var(--msm-text) !important;
    background: #ffffff !important;
    border: 1px solid var(--msm-line) !important;
    border-radius: 12px !important;
    padding: 11px 13px !important;
}

.w3-input:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid rgba(174, 22, 22, 0.20);
    border-color: var(--msm-accent) !important;
}

.w3-table-all,
.w3-table-all tr,
.w3-table-all td,
.w3-table-all th {
    color: var(--msm-text);
    border-color: var(--msm-line) !important;
}

.w3-table-all tr:nth-child(odd) {
    background-color: #fffaf7 !important;
}

.w3-table-all tr:nth-child(even) {
    background-color: #fff1f1 !important;
}

footer.w3-container {
    margin-top: 36px;
    padding: 28px max(20px, calc((100vw - 1180px) / 2)) !important;
    border-radius: 0;
}

footer.w3-container a {
    color: #fff7f4 !important;
    text-decoration: none;
}

footer.w3-container a:hover {
    color: #ffffff !important;
    text-decoration: underline;
}

@media (max-width: 600px) {
    body.w3-theme-l5 {
        padding-top: 58px;
    }

    .w3-top .w3-navbar {
        min-height: 58px;
        padding: 0 10px;
    }

    .w3-top .w3-navbar li a {
        min-height: 58px;
    }

    .w3-top .w3-navbar img {
        width: 170px;
    }

    #navDemo {
        margin-top: 58px !important;
    }

    .w3-white,
    .w3-card,
    .w3-card-2,
    .w3-card-4 {
        border-radius: 14px;
    }
}

/* Shared header and footer used by every public PHP page. */
body.w3-theme-l5 {
    padding-top: 0;
}

.msm-site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(40, 0, 0, 0.96);
    box-shadow: 0 8px 28px rgba(20, 0, 0, 0.24);
}

.msm-site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    width: min(1480px, calc(100% - 48px));
    min-height: 72px;
    margin: 0 auto;
}

.msm-site-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #fff7f4;
    text-decoration: none;
}

.msm-site-brand img {
    width: 190px;
    height: auto;
}

.msm-site-brand span {
    color: #f5dada;
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.msm-site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.msm-site-nav a {
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 999px;
    color: #fff7f4;
    background: rgba(255, 255, 255, 0.08);
    font-size: 14px;
    text-decoration: none;
}

.msm-site-nav a:hover,
.msm-site-mobile-nav nav a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
}

.msm-site-nav .msm-site-join,
.msm-site-mobile-nav .msm-site-join {
    border-color: #a63b3b;
    color: #ffffff;
    background: #a63b3b;
    font-weight: 800;
}

.msm-site-mobile-nav {
    display: none;
}

.msm-site-footer {
    margin-top: 36px;
    padding: 34px 20px;
    color: #fff7f4;
    background: #400000;
}

.msm-site-footer-inner {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.msm-site-footer-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.msm-site-footer-kicker {
    color: #ffe4e4;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.msm-site-footer h2 {
    max-width: 430px;
    margin: 8px 0 0;
    color: #ffffff;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1;
}

.msm-site-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 16px;
    max-width: 510px;
}

.msm-site-footer a {
    color: #fff7f4;
    text-decoration: none;
}

.msm-site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.msm-site-footer p {
    max-width: 980px;
    margin: 18px 0 0;
    color: #f5dada;
    font-size: 13px;
    line-height: 1.8;
}

.msm-site-footer-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 22px;
    font-size: 12px;
}

.msm-site-payment {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 8px;
    border-radius: 6px;
    background: #ffffff;
}

.msm-site-payment img {
    height: 15px;
    width: auto;
}

.msm-site-adult-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    color: #ffffff;
    font-size: 11px;
    font-weight: 800;
}

/* Shared single-column content layout for migrated legacy pages. */
.msm-single-column {
    width: min(1180px, calc(100% - 32px));
    max-width: 1180px !important;
    margin: 30px auto 0 !important;
    padding: 0 !important;
}

.msm-single-column .w3-row,
.msm-single-column .w3-row-padding {
    margin: 0 !important;
}

.msm-sc-intro {
    margin: 0 0 24px;
    color: #ffffff;
}

.msm-sc-intro h1 {
    margin: 0;
    color: #ffffff !important;
    font-size: clamp(38px, 5vw, 54px);
    line-height: 1;
}

.msm-sc-intro p {
    max-width: 760px;
    margin: 12px 0 0;
    color: #ffe4e4;
    font-size: 16px;
    line-height: 1.75;
}

.msm-sc-intro a {
    color: #ffffff;
    font-weight: 800;
}

.msm-sc-card {
    margin: 0 0 18px !important;
    padding: 28px !important;
    border: 1px solid var(--msm-line);
    border-radius: 20px !important;
    background: var(--msm-card) !important;
    box-shadow: var(--msm-shadow) !important;
}

.msm-sc-card h2,
.msm-sc-card h3,
.msm-sc-card h4,
.msm-sc-card h5,
.msm-sc-card h6 {
    color: var(--msm-deep) !important;
}

.msm-sc-card h6 {
    margin: 22px 0 6px;
    font-size: 20px;
}

.msm-sc-card p {
    color: var(--msm-muted);
    line-height: 1.8;
}

.msm-single-column.msm-narrow {
    max-width: 760px !important;
}

.msm-sc-related {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 0 0 18px !important;
    padding: 16px 20px !important;
    border-radius: 16px !important;
    background: #fff1f1 !important;
    border: 1px solid var(--msm-line);
    line-height: 1.9;
}

/* Join page (join.php). */
.msm-join-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 18px;
}

.msm-join-benefits span {
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.msm-join-reasons {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 8px;
}

.msm-join-reasons li {
    position: relative;
    padding-left: 26px;
    color: var(--msm-muted);
    line-height: 1.5;
}

.msm-join-reasons li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    top: 0;
    font-weight: 800;
    color: #167802;
}

/* Simple stacked form (customersupport.php and similar). */
.msm-stack-form .field-label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 700;
    font-size: 14px;
    color: var(--msm-text);
}

.msm-stack-form .field-label:first-child {
    margin-top: 0;
}

/* FAQ accordion (faq.php) — native <details>, no JS. */
.msm-faq details {
    margin-bottom: 10px;
    border: 1px solid var(--msm-line);
    border-radius: 14px;
    background: #fff1f1;
    overflow: hidden;
}

.msm-faq details[open] {
    background: #ffffff;
}

.msm-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 18px;
    list-style: none;
    cursor: pointer;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 21px;
    line-height: 1.2;
    color: var(--msm-deep);
}

.msm-faq summary::-webkit-details-marker { display: none; }

.msm-faq summary::after {
    content: "+";
    flex: none;
    font-size: 24px;
    line-height: 1;
    color: var(--msm-accent);
}

.msm-faq details[open] summary::after { content: "\2212"; }

.msm-faq-body {
    padding: 0 18px 16px;
}

.msm-faq-body p {
    margin: 6px 0 0;
    color: var(--msm-muted);
}

/* Search landing (search.php). */
.msm-search-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 14px;
    align-items: end;
    margin-top: 6px;
}

.msm-search-form .w3-btn {
    grid-column: 1 / -1;
    justify-self: start;
}

.msm-search-form label {
    display: block;
    margin-bottom: 5px;
    color: var(--msm-muted);
    font-size: 13px;
    font-weight: 600;
}

.msm-search-form select {
    width: 100%;
    font-size: 16px !important;
}

.msm-search-form .w3-btn {
    height: 46px;
    padding: 0 30px;
}

@media (max-width: 600px) {
    .msm-search-form {
        grid-template-columns: 1fr;
    }
}

.msm-region-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.msm-region-grid a {
    display: block;
    padding: 14px 12px;
    border: 1px solid var(--msm-line);
    border-radius: 14px;
    background: #fff1f1;
    color: var(--msm-deep);
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    transition: transform .15s ease, background .15s ease;
}

.msm-region-grid a:hover {
    transform: translateY(-2px);
    background: #ffe1e1;
}

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

/* Teaser search-results grid (results.php). */
.msm-results-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.msm-result {
    display: block;
    overflow: hidden;
    border: 1px solid var(--msm-line);
    border-radius: 16px;
    background: #ffffff;
    color: var(--msm-text);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.msm-result:hover {
    transform: translateY(-2px);
    box-shadow: var(--msm-shadow);
}

.msm-result-photo {
    aspect-ratio: 1 / 1;
    background: #f1dfdf;
}

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

.msm-result-meta {
    padding: 10px 12px;
    font-size: 14px;
}

.msm-result-meta strong {
    display: block;
    margin-bottom: 2px;
}

.msm-result-meta span {
    color: var(--msm-muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .msm-results-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .msm-results-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

@media (max-width: 600px) {
    .msm-single-column {
        margin-top: 18px !important;
    }

    .msm-sc-card {
        padding: 20px !important;
    }
}

@media (max-width: 800px) {
    .msm-site-header-inner {
        width: min(100% - 28px, 1480px);
        min-height: 62px;
    }

    .msm-site-brand img {
        width: min(190px, 52vw);
    }

    .msm-site-brand span,
    .msm-site-nav {
        display: none;
    }

    .msm-site-mobile-nav {
        display: block;
        position: relative;
        margin-left: auto;
    }

    .msm-site-mobile-nav summary {
        display: flex;
        align-items: center;
        gap: 9px;
        min-height: 42px;
        padding: 0 14px;
        border: 1px solid rgba(255, 255, 255, 0.24);
        border-radius: 999px;
        color: #fff7f4;
        cursor: pointer;
        font-size: 14px;
        font-weight: 800;
        list-style: none;
    }

    .msm-site-mobile-nav summary::-webkit-details-marker {
        display: none;
    }

    .msm-site-menu-icon,
    .msm-site-menu-icon:before,
    .msm-site-menu-icon:after {
        display: block;
        width: 17px;
        height: 2px;
        border-radius: 999px;
        background: currentColor;
    }

    .msm-site-menu-icon {
        position: relative;
    }

    .msm-site-menu-icon:before,
    .msm-site-menu-icon:after {
        content: "";
        position: absolute;
        left: 0;
    }

    .msm-site-menu-icon:before { top: -5px; }
    .msm-site-menu-icon:after { top: 5px; }

    .msm-site-mobile-nav nav {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        width: min(290px, calc(100vw - 28px));
        padding: 10px;
        border: 1px solid rgba(255, 255, 255, 0.20);
        border-radius: 18px;
        background: rgba(40, 0, 0, 0.98);
        box-shadow: 0 18px 40px rgba(20, 0, 0, 0.34);
    }

    .msm-site-mobile-nav nav a {
        display: block;
        padding: 13px 14px;
        border-radius: 12px;
        color: #fff7f4;
        font-size: 15px;
        font-weight: 700;
        text-decoration: none;
    }

    .msm-site-mobile-nav nav a + a { margin-top: 3px; }
    .msm-site-mobile-nav nav .msm-site-join { margin-top: 9px; text-align: center; }

    .msm-site-footer-top {
        flex-direction: column;
    }

    .msm-site-footer-links {
        justify-content: flex-start;
    }
}

/* Reusable "create a free account" popup — pure CSS :target, no JS. */
.msm-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(40, 0, 0, 0.82);
}

.msm-modal:target {
    display: flex;
}

.msm-modal-card {
    width: min(460px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    padding: 26px;
    border: 1px solid var(--msm-line);
    border-radius: 20px;
    background: var(--msm-card);
    box-shadow: var(--msm-shadow);
    color: var(--msm-text);
}

.msm-modal-card .eyebrow {
    display: inline-block;
    margin-bottom: 8px;
    color: var(--msm-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.13em;
    text-transform: uppercase;
}

.msm-modal-card h3 {
    margin: 0 0 6px;
    font-size: 28px;
}

.msm-modal-card p {
    margin: 0 0 14px;
    color: var(--msm-muted);
    line-height: 1.6;
}

.msm-modal-card label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    font-weight: 700;
}

.msm-modal-card input[type="email"],
.msm-modal-card input[type="text"] {
    width: 100%;
}

.msm-modal-card input[type="submit"] {
    width: 100%;
    margin-top: 12px;
}

.msm-modal-close {
    float: right;
    margin: -6px -6px 0 0;
    color: var(--msm-muted);
    font-size: 14px;
    text-decoration: none;
}

.msm-modal-close:hover {
    color: var(--msm-deep);
}

.msm-modal-fineprint {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--msm-muted);
}
