/* -------------------------------------------------------------
   Section 1 & Grid Layout Styles
   ------------------------------------------------------------- */

/* Outer Wrapper Stretch Layout */
.main-content-wrapper {
    display: flex;
    justify-content: center;
    align-items: stretch;
    width: 100%;
    max-width: 1920px;
    margin: 0 auto;
    container-type: inline-size; /* Container query scope isolated here to avoid body scrollbars */
}

/* Left Margin Block (Fixed 50px) */
.block-left-margin {
    width: 50px;
    min-width: 50px;
    max-width: 50px;
    flex: 0 0 50px;
}

/* Right Margin Block (Dynamically subtracts the JS-calculated scrollbar variable from script.js) */
.block-right-margin {
    width: calc(50px - var(--scrollbar-width, 0px));
    min-width: calc(50px - var(--scrollbar-width, 0px));
    max-width: calc(50px - var(--scrollbar-width, 0px));
    flex: 0 0 calc(50px - var(--scrollbar-width, 0px));
}

/* -------------------------------------------------------------
   Locks Right Margin at 50px on Ultra-Wide Displays (>= 1920px)
   ------------------------------------------------------------- */
@container (min-width: 1920px) {
    .block-right-margin {
        width: 50px;
        min-width: 50px;
        max-width: 50px;
        flex: 0 0 50px;
    }
}

/* Central Page Section */
.grid-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-grow: 1;
    padding: 0;
    box-sizing: border-box;
    row-gap: 15px;
}

/* Breadcrumbs Container - Keeps text flush left and clears fixed header */
.breadcrumbs-container {
    width: 100%;
    text-align: left;
    padding-top: 58px; /* Pushes text down from underneath fixed nav header */
    padding-bottom: 10px;
}

/* Max Width Calculated Directly Against 100vw minus 100px Total Side Margins */
.grid-block {
    box-sizing: border-box;
    max-width: calc(100vw - 100px);
}

/* Header Block Styling */
.block-heading {
    width: 728px;
    height: auto;
    text-align: center;
    padding-bottom: 35px;
}

/* Header Specific Visual Effects (Typography base inherited globally from style.css) */
.block-heading h1 {
    margin: 0;
    -webkit-box-reflect: below -14px linear-gradient(to top, rgba(0,0,0,0.08) 0%, transparent 70%);
}

/* Header Reflection Adjustments for Mobile Viewports */
@media screen and (max-width: 767px) {
    .block-heading h1 {
        -webkit-box-reflect: below -23px linear-gradient(to top, rgba(0,0,0,0.08) 0%, transparent 45%);
    }
}

/* Header Reflection Adjustments for iOS Devices */
html.ios-device .block-heading h1 {
    -webkit-box-reflect: below -28px linear-gradient(to top, rgba(0,0,0,0.08) 0%, transparent 70%);
}

/* Subheading Block Styling */
.block-subheading {
    width: 364px;
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    font-family: UIFont;
    font-size: 1rem;
    line-height: 1.2em;
    color: #2d4a64;
    margin-top: -5px;
    /* Dynamically matches exactly 2 lines of body text height, neutralizing the 15px flex row-gap */
    margin-bottom: calc((var(--main-font-size) * var(--main-lh) * 2) - 15px);
    text-transform: lowercase;
}

/* Subheading Divider Line Graphic */
.block-subheading img {
    max-width: min(100%, 80vw);
    height: auto;
    opacity: 0.6;
    margin-bottom: 10px;
}

@media screen and (min-width: 1025px) {
    .block-subheading {
        font-size: 1.25rem;
    }
}

/* Dedicated Flexible Logo Wrapper */
.block-logo {
    width: 364px;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.block-logo img#studio-logo {
    max-width: 250px;
    height: auto;
    display: block;
}

/* Logo Shadow Styling */
.logo-shadow {
    mix-blend-mode: darken;
    opacity: 0.25;
    max-width: 100%;
    height: auto;
    margin-top: 20px;
}

/* Bottom Row Grid */
.bottom-row-grid {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Fixed Primary Content Blocks */
.block-left-column {
    min-height: 250px;
    width: 364px;
    flex-shrink: 0;
    font-family: UIFont;
    font-size: 1rem;
    text-transform: lowercase;
}

/* Container shrink-wraps to the image width and centers its contents */
.map-container {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    width: fit-content;
}

/* Map Graphic Styling */
.map-container img#map {
    max-width: 100%;
    border: 2px solid #2d4a64;
    padding: 3px;
    display: block;
}

/* Caption Text Styling */
.map-caption {
    text-align: center;
    color: #051736;
    margin-top: 6px;
}

.block-center-column {
    background: rgba(250, 250, 250, 0.6);
    min-height: auto;
    width: 546px;
    flex-shrink: 0;
    padding-left: clamp(0px, calc(50vw - 303px), 20px);
    padding-right: clamp(0px, calc(50vw - 303px), 20px);
}

/* -------------------------------------------------------------
   Right Column Business Details
   ------------------------------------------------------------- */
.block-right-column {
    width: 364px;
    min-height: 250px;
    flex-shrink: 0;
    font-family: UIFont;
    font-size: 1rem;
    color: #051736;
    text-transform: lowercase;
}

.business-details-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    width: 100%;
    justify-content: flex-start;
    gap: 25px;
}

.social-links-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.social-link,
.social-link:link,
.social-link:visited {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    color: #051736;
    text-decoration: none;
    font-family: UIFont;
    font-size: 1rem;
    letter-spacing: 0.025em;
    text-transform: lowercase;
    font-weight: 500;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: #afd141;
    font-family: UIFont;
}

.social-link:hover .social-text {
    color: #afd141;
}

.social-link img {
    width: 28px;
    height: 28px;
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.social-link:hover img {
    opacity: 0.5 !important;
}

.status-details-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    text-transform: lowercase;
    font-weight: normal;
    letter-spacing: 0.05em;
    font-size: 1rem;
    color: #051736;
}

.progress-bar-graphic {
    max-width: 180px;
    height: auto;
    display: block;
    margin: 2px 0;
}

#price-val {
    color: #afd141;
    font-weight: 700;
}

/* Fluid Buffer Columns (Desktop > 1536px) */
.block-left-whitespace,
.block-right-whitespace {
    min-height: 250px;
    flex: 1 1 0px;
    max-width: 273px;
    min-width: 91px;
}

/* -------------------------------------------------------------
   Reflows into 2-Row Grid Stack below 1536px (Flush Left)
   ------------------------------------------------------------- */
@media screen and (max-width: 1536px) {
    .grid-section {
        align-items: flex-start;
    }

    .block-heading {
        margin-left: 364px;
    }

    .block-subheading,
    .block-logo {
        margin-left: 546px;
    }

    .bottom-row-grid {
        display: grid;
        grid-template-columns: 364px 91px 546px;
        grid-template-rows: auto auto;
        justify-content: start;
        row-gap: calc(var(--main-font-size) * var(--main-lh) * 1);
    }

    .block-left-column     { grid-column: 1; grid-row: 1; width: 364px; }
    .block-left-whitespace { grid-column: 2; grid-row: 1; width: 91px; max-width: 91px; }

    .block-right-column { 
        grid-column: 1; 
        grid-row: 2; 
        width: 364px; 
        margin-top: 0; 
    }
    
    .block-right-whitespace { grid-column: 2; grid-row: 2; width: 91px; max-width: 91px; }

    .block-center-column    { grid-column: 3; grid-row: 1 / span 2; width: 546px; min-height: 100%; }

    /* Align right column content left when stacked under left column */
    .business-details-container,
    .social-links-wrapper,
    .status-details-wrapper {
        align-items: flex-start;
        text-align: left;
    }

    .social-link,
    .social-link:link,
    .social-link:visited {
        justify-content: flex-start;
    }

    /* Moves social icons to the left side of text links when stacked */
    .social-link img {
        order: -1;
    }
}

/* -------------------------------------------------------------
   Reflows into Single Column Stack below 1192px (Horizontally Centered)
   ------------------------------------------------------------- */
@media screen and (max-width: 1192px) {
    .grid-section {
        align-items: center;
    }

    .block-heading,
    .block-subheading,
    .block-logo {
        margin-left: 0;
    }

    .bottom-row-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        row-gap: calc(var(--main-font-size) * var(--main-lh) * 1);
    }

    .block-left-whitespace,
    .block-right-whitespace {
        display: none;
    }

    .block-center-column {
        order: 1;
        width: 546px;
        min-height: auto;
        margin-bottom: calc(var(--main-font-size) * var(--main-lh) * 1);
    }

    .block-left-column {
        order: 2;
        width: 364px;
        min-height: 250px;
        display: flex;
        flex-direction: column;
        align-items: center; /* Centers the map container horizontally */
    }

    .block-right-column {
        order: 3;
        width: 364px;
        min-height: 250px;
        margin-top: 0; 
    }

    /* Centered alignment when stacked on smaller screens */
    .business-details-container,
    .social-links-wrapper,
    .status-details-wrapper {
        align-items: center;
        text-align: center;
    }

    .social-link,
    .social-link:link,
    .social-link:visited {
        justify-content: center;
    }
}

/* -------------------------------------------------------------
   Heading Block Concedes / Scaled Fluidly below 828px
   ------------------------------------------------------------- */
@media screen and (max-width: 828px) {
    .block-heading {
        width: 100%;
        max-width: 728px;
        height: auto;
        min-height: 100px;
    }
}

/* -------------------------------------------------------------
   Center Column Block Concedes below 646px
   ------------------------------------------------------------- */
@media screen and (max-width: 646px) {
    .block-center-column {
        width: 100%;
        max-width: 546px;
    }
}

/* -------------------------------------------------------------
   Side Margins & Block Max Width Adjusted below 576px
   ------------------------------------------------------------- */
@media screen and (max-width: 576px) {
    .grid-block {
        max-width: calc(100vw - 40px);
    }

    .block-left-margin {
        width: clamp(20px, calc(11.72vw - 17.5px), 50px);
        min-width: clamp(20px, calc(11.72vw - 17.5px), 50px);
        max-width: clamp(20px, calc(11.72vw - 17.5px), 50px);
        flex: 0 0 clamp(20px, calc(11.72vw - 17.5px), 50px);
    }

    .block-right-margin {
        width: calc(clamp(20px, calc(11.72vw - 17.5px), 50px) - (100vw - 100cqw));
        min-width: calc(clamp(20px, calc(11.72vw - 17.5px), 50px) - (100vw - 100cqw));
        max-width: calc(clamp(20px, calc(11.72vw - 17.5px), 50px) - (100vw - 100cqw));
        flex: 0 0 calc(clamp(20px, calc(11.72vw - 17.5px), 50px) - (100vw - 100cqw));
    }
}