/*
   Repository-wide responsive safeguards.
   This file is deliberately limited to sizing behavior so each site keeps its
   own typography, palette, spacing, and component design.
*/

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

img,
svg,
video,
canvas,
iframe {
    max-width: 100%;
}

img,
video,
canvas {
    height: auto;
}

input,
select,
textarea,
button {
    max-width: 100%;
}

table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
}

pre,
code,
input,
textarea,
.mobile-menu-contact a {
    overflow-wrap: anywhere;
}

/* Prevent long content from widening common flex and grid layouts. */
.grid > *,
.cards > *,
.footer-grid > *,
.content-grid > *,
.hero-grid > *,
.split > *,
.desktop-navigation > *,
.mobile-navigation > * {
    min-width: 0;
}

/* Keep the primary header action recognisable as a button on every page. */
.desktop-navigation a[data-page="booking"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    margin-inline-start: 4px;
    padding: 10px 16px;
    border: 1px solid var(--nav-gold-light, #f0c45a);
    border-radius: 999px;
    background: var(--nav-gold-light, #f0c45a);
    color: #101010;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(212, 166, 55, 0.24);
}

.desktop-navigation a[data-page="booking"]::after {
    display: none;
}

.desktop-navigation a[data-page="booking"]:hover,
.desktop-navigation a[data-page="booking"]:focus-visible {
    border-color: #fff1a6;
    background: #fff1a6;
    color: #101010;
    transform: translateY(-1px);
}


/* Stack the mobile calls to action and keep their labels readable. */
.mobile-menu-cta:not(a) {
    display: grid;
    gap: 12px;
}

.mobile-menu-cta a {
    width: 100%;
    min-width: 0;
    padding-inline: 18px;
    text-align: center;
    white-space: nowrap;
}

.mobile-menu-cta .mobile-menu-booking {
    border: 1px solid var(--nav-gold-light, #f0c45a);
    background: transparent;
    color: var(--nav-gold-light, #f0c45a);
}

@media (max-width: 650px) {
    .desktop-navigation a[data-page="booking"] {
        margin-inline-start: 0;
    }
}


/* BAM mobile polish 2026-09-24
   Shared phone-size improvements for the main public site. */
@media (max-width: 760px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .site-header {
        min-height: 72px;
    }

    .header-container {
        width: 100%;
        min-width: 0;
        min-height: 72px;
        padding-inline: 16px !important;
        gap: 12px !important;
    }

    .site-brand,
    .mobile-menu-brand {
        min-width: 0;
        max-width: calc(100% - 72px);
    }

    .brand-text strong,
    .site-brand strong {
        font-size: clamp(1.4rem, 7vw, 1.85rem) !important;
        line-height: 1 !important;
    }

    .brand-text small,
    .site-brand small {
        font-size: clamp(.52rem, 2.6vw, .68rem) !important;
        letter-spacing: .14em !important;
        white-space: nowrap;
    }

    .menu-toggle {
        flex: 0 0 48px;
        width: 48px !important;
        height: 48px !important;
        margin-left: auto;
    }

    .mobile-menu {
        width: 100% !important;
        max-width: none !important;
        height: 100dvh !important;
        padding:
          0
          18px
          calc(24px + env(safe-area-inset-bottom)) !important;
        overscroll-behavior: contain;
    }

    .mobile-menu-header {
        /* Keep the brand and close button flush with the viewport while links scroll. */
        top: 0;
        flex-shrink: 0;
        min-height: calc(70px + env(safe-area-inset-top));
        margin-inline: -18px;
        padding: env(safe-area-inset-top) 18px 0;
        gap: 12px;
    }

    .mobile-menu-close {
        flex: 0 0 48px;
        width: 48px !important;
        height: 48px !important;
    }

    .mobile-navigation {
        width: 100%;
    }

    .mobile-navigation a {
        width: 100%;
        min-width: 0;
        min-height: 56px;
        gap: 14px;
        padding-block: 10px !important;
        padding-inline: 4px !important;
        white-space: normal !important;
    }

    .mobile-navigation .mobile-link-icon {
        flex: 0 0 42px !important;
        width: 42px !important;
        height: 42px !important;
    }

    .mobile-language-section,
    .mobile-theme-section,
    .mobile-menu-cta,
    .mobile-menu-contact {
        width: 100%;
        min-width: 0;
    }

    .mobile-menu-cta a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        white-space: normal !important;
        line-height: 1.25;
    }

    .mobile-menu-contact a {
        font-size: .88rem !important;
        line-height: 1.45;
    }

    main,
    .home-container,
    .content-section,
    .portfolio-page,
    .templates-page,
    .pricing-section,
    .reviews-page,
    .contact-page,
    .founder-preview,
    .final-cta {
        max-width: 100%;
    }

    .content-section,
    .portfolio-page,
    .templates-page,
    .pricing-section,
    .reviews-page,
    .contact-page {
        padding-inline: 16px !important;
    }

    .hero {
        min-height: auto !important;
        padding: 72px 18px 58px !important;
    }

    .hero-content {
        width: 100% !important;
        max-width: 620px !important;
        margin-inline: auto !important;
    }

    .hero h1 {
        font-size: clamp(2.35rem, 11vw, 3.45rem) !important;
        line-height: 1.02 !important;
        overflow-wrap: anywhere;
    }

    .hero p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .hero-buttons,
    .home-actions,
    .review-cta-buttons,
    .contact-actions {
        width: 100%;
        max-width: 430px;
        margin-inline: auto;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .hero-buttons a,
    .home-actions a,
    .review-cta-buttons a,
    .contact-actions a,
    .btn,
    .primary-button,
    .secondary-button,
    .home-button,
    .home-button-secondary,
    .price-button,
    .portfolio-button,
    .template-plan-button {
        width: 100%;
        min-height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.25;
    }

    .home-grid,
    .portfolio-grid,
    .template-grid,
    .pricing-grid,
    .services-grid,
    .reviews-grid,
    .footer-grid,
    .process-grid,
    .portfolio-preview {
        grid-template-columns: 1fr !important;
    }

    .home-grid,
    .portfolio-grid,
    .template-grid,
    .pricing-grid,
    .services-grid,
    .reviews-grid,
    .portfolio-preview {
        gap: 18px !important;
    }

    .home-card,
    .portfolio-card,
    .template-card,
    .price-card,
    .service-card,
    .review-summary-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    .portfolio-card {
        grid-template-columns: 1fr !important;
        overflow: hidden;
    }

    .portfolio-image-wrapper,
    .portfolio-home-visual,
    .template-preview {
        width: 100%;
        min-width: 0;
    }

    .portfolio-image-wrapper img,
    .portfolio-home-visual img,
    .template-preview img {
        width: 100%;
        max-width: 100%;
        object-fit: cover;
    }

    .portfolio-card-content,
    .template-card-body,
    .price-card,
    .service-card {
        padding: 20px !important;
    }

    /* Cards already supply the side inset; do not add button margins to 100% width. */
    .pricing-grid > .price-card > .price-button {
        width: 100%;
        max-width: 100%;
        margin-inline: 0;
    }

    .portfolio-card-content h2,
    .template-card h2,
    .price-card h2,
    .service-card h3 {
        overflow-wrap: anywhere;
    }

    .portfolio-features,
    .feature-list {
        padding-left: 20px;
    }

    .service-row {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        align-items: start !important;
    }

    .service-row > strong {
        justify-self: start;
        text-align: left !important;
    }

    .paypal-button-wrap {
        width: 100% !important;
        max-width: 320px !important;
        margin-inline: auto !important;
    }

    .google-reviews-widget iframe {
        width: 100% !important;
        min-height: 620px;
    }

    .footer-grid {
        gap: 28px !important;
        text-align: left;
    }

    .home-footer {
        padding-inline: 18px !important;
    }

    .bam-social-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px 18px;
    }
}

@media (max-width: 390px) {
    .header-container {
        padding-inline: 12px !important;
    }

    .content-section,
    .portfolio-page,
    .templates-page,
    .pricing-section,
    .reviews-page,
    .contact-page {
        padding-inline: 12px !important;
    }

    .hero {
        padding-inline: 14px !important;
    }

    .portfolio-card-content,
    .template-card-body,
    .price-card,
    .service-card {
        padding: 18px !important;
    }
}
