/**
 * Shared Sections CSS
 *
 * Styles for template parts used across multiple pages (Sellers, Buyers, etc.)
 * Includes: Browse Market, FAQ Cards, Two-Column Dots, Four-Row Dots sections
 *
 * @package CoreyShirley
 * @since January 2025
 */

/* =================================================================
   BROWSE MARKET LISTINGS SECTION
   ================================================================= */

.browse-market-section {
    background: var(--color-light-gray);
    padding: 100px 40px;
    width: 100%;
}

.browse-market-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 40px;
    padding: 0 80px;
}

.browse-market-title {
    font-family: 'Playfair Display', serif;
    font-size: 52px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: #2b2b2b;
    margin: 0;
    line-height: 1.2;
}

.browse-market-button {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 20px 50px;
    border: 2px solid #2b2b2b;
    background: transparent;
    color: #2b2b2b;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: inline-block;
}

.browse-market-button:hover {
    background: #2b2b2b;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .browse-market-container {
        padding: 0 40px;
        gap: 30px;
    }

    .browse-market-title {
        font-size: 42px;
    }

    .browse-market-button {
        padding: 18px 40px;
        font-size: 15px;
    }
}

/* Mobile Responsive (below 768px) */
@media (max-width: 768px) {
    .browse-market-section {
        padding: 60px 0;
        box-sizing: border-box;
    }

    .browse-market-container {
        flex-direction: column;
        padding: 0;
        margin: 0 auto;
        gap: 30px;
        text-align: center;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .browse-market-title {
        font-size: 32px;
        text-align: center;
        padding: 0 20px;
        margin: 0 auto;
        width: 100%;
        box-sizing: border-box;
    }

    .browse-market-button {
        padding: 16px 36px;
        font-size: 14px;
        width: auto;
        max-width: 280px;
        margin: 0 auto;
    }
}

/* Extra Small Mobile (below 480px) */
@media (max-width: 480px) {
    .browse-market-title {
        font-size: 28px;
    }

    .browse-market-button {
        padding: 14px 32px;
        font-size: 13px;
    }
}

/* =================================================================
   TEXT + IMAGE SECTION (Two Column Layout)
   ================================================================= */

.property-worth-section {
    background: var(--color-light-gray);
    padding: var(--section-padding-y-xl) 0;
}

.property-worth-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 80px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.property-worth-content {
    padding-right: 20px;
}

.property-worth-title {
    font-family: var(--heading-font);
    font-size: clamp(32px, 4vw, 42px);
    font-weight: var(--heading-weight);
    text-transform: uppercase;
    letter-spacing: var(--heading-spacing);
    color: var(--color-primary);
    margin: 0 0 32px 0;
    line-height: 1.2;
}

.property-worth-text {
    font-family: var(--body-font);
    font-size: 16px;
    line-height: var(--body-line-height);
    color: #6f6f6f;
    margin: 0 0 20px 0;
}

.property-worth-text:last-child {
    margin-bottom: 0;
}

.property-worth-image {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.property-worth-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .property-worth-container {
        padding: 0 40px;
        gap: 40px;
    }
}

/* Mobile Responsive (below 768px) */
@media (max-width: 768px) {
    .property-worth-container {
        grid-template-columns: 1fr;
        padding: 0 24px;
        gap: 30px;
    }

    .property-worth-content {
        padding-right: 0;
    }

    .property-worth-image {
        min-height: 300px;
    }
}

/* =================================================================
   FAQ CARDS SECTION (3-Column Grid)
   ================================================================= */

.sellers-faq-section {
    background: #ffffff;
    padding: var(--section-padding-y-xl) 0;
}

.sellers-faq-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 80px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 0;
}

.faq-card {
    background: #ffffff;
    border: 1px solid #000000;
    padding: 48px 40px;
    text-align: left;
    transition: none; /* No hover effects for clean design */
}

.faq-question {
    font-family: var(--heading-font);
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #000000;
    margin: 0 0 24px 0;
    line-height: 1.3;
}

.faq-answer {
    font-family: var(--body-font);
    font-size: 15px;
    line-height: 1.75;
    color: #333333;
    margin: 0;
    font-weight: 300;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .sellers-faq-section {
        padding: var(--section-padding-y-lg) 0;
    }

    .sellers-faq-container {
        padding: 0 40px;
    }
}

/* Mobile Responsive (below 768px) */
@media (max-width: 768px) {
    .sellers-faq-section {
        padding: var(--section-padding-y-md) 0;
    }

    .sellers-faq-container {
        padding: 0 24px;
    }

    .faq-grid {
        gap: 20px;
    }

    .faq-card {
        padding: 32px 24px;
    }

    .faq-question {
        font-size: 18px;
        margin-bottom: 16px;
    }

    .faq-answer {
        font-size: 14px;
        line-height: 1.7;
    }
}

/* Extra Small Mobile (below 480px) */
@media (max-width: 480px) {
    .faq-grid {
        gap: 16px;
    }

    .faq-card {
        padding: 28px 20px;
    }
}

/* =================================================================
   TWO-COLUMN DOTS SECTION (Two Rows with Vertical Divider)
   ================================================================= */

.valuation-performed {
    background: #ffffff;
    padding: var(--section-padding-y-xl) 0;
}

.vp-header {
    max-width: 1240px;
    margin: 0 auto 60px;
    padding: 0 80px;
    text-align: center;
}

.vp-main-title {
    font-family: var(--heading-font);
    font-size: clamp(36px, 5vw, 56px);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #000000;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.vp-subtitle {
    font-family: var(--body-font);
    font-size: 16px;
    font-weight: 400;
    color: #6f6f6f;
    margin: 0;
    letter-spacing: 0.02em;
}

.vp-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 80px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
    grid-template-rows: auto auto;
    column-gap: 64px;
    row-gap: 60px;
    align-items: start;
}

/* Staggered Grid Positioning */
.vp-left {
    grid-column: 1;
}

.vp-right {
    grid-column: 3;
}

.vp-divider {
    grid-column: 2;
    grid-row: 1 / span 2;
}

.vp-divider-spacer {
    grid-column: 2;
    grid-row: 2;
}

/* Button Side - Center vertically */
.vp-button-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.vp-right.vp-button-side {
    justify-content: flex-start;
}

/* Text Side */
.vp-text-side {
    text-align: left;
}

.vp-left.vp-text-side {
    text-align: right;
}

.vp-title {
    font-family: var(--heading-font);
    font-size: clamp(20px, 2.2vw, 24px);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    color: #000000;
    text-transform: uppercase;
    margin: 0 0 20px 0;
}

.vp-text {
    font-family: var(--body-font);
    font-size: 15px;
    line-height: 1.75;
    color: #333333;
    font-weight: 300;
    margin: 0;
}

.vp-btn {
    display: inline-block;
    margin: 0;
    padding: 14px 32px;
    background: #736357;
    color: #ffffff;
    font-family: var(--body-font);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-decoration: none;
    transition: all 0.3s ease;
}

.vp-btn:hover {
    background: #5a4d43;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(115, 99, 87, 0.3);
}

/* Fine‑tune vertical alignment so button centers line up with the dots */
.vp-right .vp-btn { /* Market Analysis (top/right) */
    transform: translateY(-6px);
}

.vp-left .vp-btn { /* Appraisals (bottom/left) */
    transform: translateY(-6px);
}

/* Center divider with line and dots */
.vp-divider {
    position: relative;
    height: 100%;
}

.vp-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -40px;
    bottom: 0;
    width: 2px;
    background: rgba(0, 0, 0, 0.12);
    transform: translateX(-50%);
}

.vp-dot {
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b8997a;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 0 6px rgba(184, 153, 122, 0.25);
    /* CRITICAL: Hide dots initially - JavaScript will show them after positioning */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .vp-header {
        padding: 0 40px;
    }

    .vp-container {
        padding: 0 40px;
        column-gap: 40px;
    }
}

/* Mobile Responsive (below 768px) */
@media (max-width: 768px) {
    .vp-header {
        padding: 0 24px;
        margin-bottom: 40px;
    }

    .vp-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        row-gap: 40px;
        padding: 0 24px;
    }

    /* Stack all items vertically on mobile */
    .vp-left,
    .vp-right {
        grid-column: 1;
    }

    .vp-divider,
    .vp-divider-spacer {
        display: none;
    }

    .vp-button-side {
        justify-content: center;
        display: flex;
        width: 100%;
    }

    .vp-left.vp-button-side,
    .vp-right.vp-button-side {
        justify-content: center;
        display: flex;
        width: 100%;
    }

    .vp-text-side {
        text-align: center;
    }

    .vp-left.vp-text-side {
        text-align: center;
    }

    .vp-title {
        text-align: center;
    }

    .vp-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        margin: 0 auto;
    }

    /* Reorder rows on mobile: button always appears above text */
    .vp-left.vp-button-side {
        order: 1;
    }

    .vp-right.vp-text-side {
        order: 2;
    }

    .vp-left.vp-text-side {
        order: 4;
    }

    .vp-right.vp-button-side {
        order: 3;
    }
}

/* =================================================================
   FOUR-ROW DOTS SECTION (Four Rows with Vertical Divider)
   ================================================================= */

.valuation-important {
    background: var(--color-light-gray);
    padding: var(--section-padding-y-xl) 0;
}

.vi-header {
    max-width: 1240px;
    margin: 0 auto 80px;
    padding: 0 24px;
    text-align: center;
}

.vi-main-title {
    font-family: var(--heading-font);
    font-size: clamp(36px, 4.5vw, 56px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
    color: #000000;
    text-transform: uppercase;
    margin: 0 0 16px 0;
}

.vi-subtitle {
    font-family: var(--body-font);
    font-size: clamp(16px, 1.8vw, 18px);
    color: #666666;
    font-weight: 400;
    margin: 0;
    letter-spacing: 0.02em;
}

.vi-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px minmax(0, 1fr);
    grid-template-rows: auto auto auto auto;
    column-gap: 64px;
    row-gap: 60px;
    align-items: start;
}

/* Staggered Grid Positioning */
.vi-left {
    grid-column: 1;
}

.vi-right {
    grid-column: 3;
}

.vi-divider {
    grid-column: 2;
    grid-row: 1 / span 4;
}

.vi-divider-spacer {
    display: none;
}

/* Button Side - Center vertically */
.vi-button-side {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.vi-right.vi-button-side {
    justify-content: flex-start;
}

/* Text Side Alignment */
.vi-text-side {
    text-align: left;
}

.vi-left.vi-text-side {
    text-align: right;
}

.vi-text {
    font-family: var(--body-font);
    font-size: 15px;
    line-height: 1.75;
    color: #333333;
    font-weight: 300;
    margin: 0;
}

.vi-btn {
    display: inline-block;
    margin: 0;
    padding: 14px 32px;
    background: #736357;
    color: #ffffff;
    font-family: var(--body-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #736357;
    cursor: pointer;
}

.vi-btn:hover {
    background: transparent;
    color: #736357;
}

/* Vertical Divider Line */
.vi-divider {
    position: relative;
    height: 100%;
}

.vi-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: -60px;
    bottom: -40px;
    width: 2px;
    background: rgba(0, 0, 0, 0.12);
    transform: translateX(-50%);
}

.vi-dot {
    position: absolute;
    left: 50%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #b8997a;
    transform: translate(-50%, -50%);
    z-index: 2;
    box-shadow: 0 0 0 6px rgba(184, 153, 122, 0.25);
    /* CRITICAL: Hide dots initially - JavaScript will show them after positioning */
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Tablet Responsive (768px - 1024px) */
@media (max-width: 1024px) {
    .vi-container {
        column-gap: 48px;
        row-gap: 50px;
    }
}

/* Mobile Responsive (below 768px) */
@media (max-width: 768px) {
    .vi-container {
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding: 0 24px;
    }

    .vi-divider,
    .vi-divider-spacer {
        display: none;
    }

    .vi-left,
    .vi-right {
        width: 100%;
    }

    .vi-text-side {
        text-align: center;
    }

    .vi-left.vi-text-side {
        text-align: center;
    }

    .vi-button-side {
        justify-content: center;
        display: flex;
        width: 100%;
    }

    .vi-btn {
        width: 100%;
        max-width: 300px;
        text-align: center;
        margin: 0 auto;
    }

    .vi-text {
        text-align: center;
        margin-bottom: 32px;
    }

    /* Reorder rows on mobile: button always appears above its text
       Row 1: left=button, right=text -> order 1, 2
       Row 2: left=text, right=button -> order 4, 3
       Row 3: left=button, right=text -> order 5, 6
       Row 4: left=text, right=button -> order 8, 7
    */
    .vi-row-1.vi-left { order: 1; }
    .vi-row-1.vi-right { order: 2; }
    .vi-row-2.vi-right { order: 3; }
    .vi-row-2.vi-left { order: 4; }
    .vi-row-3.vi-left { order: 5; }
    .vi-row-3.vi-right { order: 6; }
    .vi-row-4.vi-right { order: 7; }
    .vi-row-4.vi-left { order: 8; }
}

/* Extra Small Mobile (below 480px) */
@media (max-width: 480px) {
    .vi-btn {
        width: 100%;
        text-align: center;
    }
}
