/* =====================================================================
 * Single apartment page. Paletă Ghica (tints doar pentru suprafețe/fundal).
 * ================================================================== */

.apt-single {
    /* accent */
    --accent: #EB6920;
    --accent-80: #EF874D;
    --accent-60: #F3A579;
    --accent-40: #F7C3A6;
    --accent-20: #FBE1D2;
    --accent-10: #FDF0E9;
    /* primary */
    --primary: #172843;
    --primary-80: #455369;
    --primary-60: #747E8E;
    --primary-40: #A2A9B4;
    --primary-20: #D7D7D7;
    --primary-10: #EBEBEB;
    /* dark */
    --dark: #1F1F1F;
    --dark-80: #4C4C4C;
    --dark-60: #797979;
    --dark-40: #A5A5A5;
    --dark-20: #D2D2D2;
    --dark-10: #E9E9E9;
    /* light + semantic */
    --light: #FDF0E9;
    --ok: #2E9E5B;
    --warn: #EB6920;
    --danger: #D64545;

    color: var(--primary);
}

.apt-single * {
    box-sizing: border-box;
}

.apt-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* =====================================================================
 * HERO
 * ================================================================== */
.apt-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
    padding: 48px 0 32px;
}

.apt-title {
    margin: 0;
    color: var(--primary);
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.15;
    font-weight: 400;
}

.apt-title-lead {
    color: var(--dark);
    font-weight: 700;
    display: inline;
}

.apt-hero-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
    gap: 16px;
}

/* Badge disponibilitate */
.apt-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--primary-10);
    color: var(--primary);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
}

.apt-badge-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--primary-40);
    flex: 0 0 auto;
}

.apt-badge--disponibil .apt-badge-dot { background: var(--ok); }
.apt-badge--rezervat .apt-badge-dot   { background: var(--warn); }
.apt-badge--vandut .apt-badge-dot      { background: var(--danger); }

.apt-hero-floors {
    color: var(--primary-60);
    font-size: 16px;
    font-weight: 600;
}

/* Preț */
.apt-price {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.apt-price-old {
    color: var(--primary-40);
    text-decoration: line-through;
    font-size: 15px;
    font-weight: 600;
}

.apt-price-main {
    color: var(--accent);
    font-size: 28px;
    font-weight: 700;
    line-height: 1.1;
}

.apt-price-main .apt-price-suffix {
    font-size: 15px;
    font-weight: 400;
    color: var(--accent-80);
}

.apt-price-vat {
    color: var(--primary-60);
    font-size: 14px;
    font-weight: 700;
}

.apt-price-vat .apt-price-suffix {
    font-weight: 400;
}

.apt-price-old .apt-price-suffix {
    font-weight: 400;
}

/* =====================================================================
 * ZONA 50/50
 * ================================================================== */
.apt-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    padding-bottom: 56px;
}

.apt-main-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Boxe imagini */
.apt-image-box {
    border: 1px solid var(--primary-20);
    border-radius: 14px;
    padding: 18px;
    background: #fff;
}

/* Pătrat (schița / nivele duplex) */
.apt-plan-stack {
    position: relative;
    aspect-ratio: 1 / 1;
}

.apt-plan-panel {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease;
}

.apt-plan-panel.is-active {
    opacity: 1;
    visibility: visible;
}

.apt-plan-panel a,
.apt-plan-panel img {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.apt-plan-panel img {
    object-fit: contain;
    cursor: zoom-in;
}

.apt-plan-label {
    display: none; /* vizibil doar pe mobil (vezi media query) */
}

/* Taburi duplex */
.apt-plan-tabs {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

.apt-plan-tab {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid var(--primary-20);
    border-radius: 999px;
    background: transparent;
    color: var(--primary-60);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.apt-plan-tab:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.apt-plan-tab.is-active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* Dreptunghi 2/1 (plan etaj) */
.apt-image-box--wide .apt-wide-inner {
    aspect-ratio: 2 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.apt-image-box--wide img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

/* =====================================================================
 * TABELA SUPRAFEȚE
 * ================================================================== */
.apt-main-right {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.apt-surfaces {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}

.apt-surfaces th,
.apt-surfaces td {
    padding: 12px 8px;
    border-bottom: 1px solid var(--primary-10);
    border-left: 0;
    border-right: 0;
}

.apt-surfaces th {
    text-align: left;
    font-weight: 400;
    color: var(--primary);
}

.apt-surfaces td {
    text-align: right;
    white-space: nowrap;
    color: var(--dark);
    font-weight: 400;
}

.apt-surfaces td sup {
    font-size: 0.7em;
}

/* Rând-label (fără valoare) */
.apt-surfaces .apt-row-label th {
    font-weight: 700;
    color: var(--dark);
}

/* Suprafață utilă / totală — evidențiate */
.apt-surfaces .apt-row-highlight th,
.apt-surfaces .apt-row-highlight td {
    background: var(--accent-10);
    color: var(--primary);
    border-bottom-color: var(--accent-20);
    font-weight: 700;
}

/* Buton */
.apt-actions {
    display: flex;
    justify-content: flex-start;
}

.apt-btn {
    display: inline-block;
    padding: 13px 26px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.apt-btn:hover,
.apt-btn:focus {
    background: var(--accent-80);
    color: #fff;
}

/* =====================================================================
 * APARTAMENTE SIMILARE
 * ================================================================== */
.apt-similar {
    background: var(--light);
    padding: 56px 0;
}

.apt-similar-title {
    margin: 0 0 24px;
    color: var(--primary);
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 700;
}

.apt-table-scroll {
    overflow-x: auto;
}

.apt-similar-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    font-size: 15px;
}

.apt-similar-table th,
.apt-similar-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid var(--primary-10);
    border-left: 0;
    border-right: 0;
}

.apt-similar-table thead th {
    color: var(--primary-60);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.apt-similar-table tbody tr:last-child td {
    border-bottom: 0;
}

.apt-similar-table .apt-col-pret {
    font-weight: 700;
    color: var(--primary);
}

.apt-similar-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}

.apt-similar-link:hover {
    text-decoration: underline;
}

/* =====================================================================
 * CONTACT
 * ================================================================== */
.apt-contact {
    padding: 56px 0;
}

.apt-contact-title {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: clamp(22px, 2.4vw, 32px);
    font-weight: 700;
}

.apt-contact-subtitle {
    margin: 0;
    color: var(--primary-60);
    font-size: 17px;
}

/* =====================================================================
 * RESPONSIVE
 * ================================================================== */
@media (max-width: 767px) {
    .apt-hero,
    .apt-main {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    /* Pe mobil, coloana din dreapta a hero-ului revine la stânga */
    .apt-hero-side {
        align-items: flex-start;
        text-align: left;
    }

    /* Duplex: pe mobil se văd ambele imagini, cu label înainte; fără taburi */
    .apt-plan-tabs {
        display: none;
    }

    .apt-plan-stack {
        position: static;
        aspect-ratio: auto;
        display: flex;
        flex-direction: column;
        gap: 20px;
    }

    .apt-plan-panel {
        position: static;
        opacity: 1;
        visibility: visible;
        flex-direction: column;
        align-items: stretch;
    }

    .apt-plan-label {
        display: block;
        margin-bottom: 8px;
        color: var(--primary-60);
        font-weight: 600;
        font-size: 14px;
    }

    .apt-similar-link span {
        display: none; /* rămâne doar „Vezi" */
    }
}
