/* ===== Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: #fff;
    color: #222;
    line-height: 1.5;
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    overflow-x: hidden;
}

/* ===== Header ===== */
.header {
    background: #fff;
    color: #222;
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 14px 0;
    gap: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #222;
    flex-shrink: 0;
}

.logo::before {
    content: "";
    display: block;
    width: 54px;
    height: 54px;
    background: url("images/logo.svg") no-repeat center / contain;
    flex-shrink: 0;
}

.logo-text-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.logo-text {
    font-size: 1.05rem;
    font-weight: 600;
    color: #222;
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 0.7rem;
    font-weight: 400;
    color: #888;
    margin-top: 2px;
}

.tagline {
    color: #8a97a8;
    font-size: 0.85rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-links a {
    text-decoration: none;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: #222;
}

.btn-cta {
    background: #c8a45e;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s, transform 0.15s;
    border: none;
    cursor: pointer;
}

.nav-links a.active {
    background: #c8a45e;
    color: #fff;
    padding: 10px 22px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
}

/* Иконка телефона в хедере */
.header-phone {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #2d5a8e;
    color: #fff !important;
    padding: 10px 18px;
    border-radius: 50px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(45, 90, 142, 0.25);
}

.header-phone:hover {
    background: #1a3d63;
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(45, 90, 142, 0.35);
}

.header-phone-icon {
    font-size: 1.1rem;
    display: inline-block;
}

.header-phone-text {
    white-space: nowrap;
}

.btn-cta:hover {
    background: #d4b36e;
    transform: translateY(-1px);
}

/* ===== Hero ===== */
.hero {
    position: relative;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    min-height: 480px;
}

.hero-img {
    width: 100%;
    height: 480px;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,35,50,0.72) 0%, rgba(26,35,50,0.25) 100%);
    display: flex;
    align-items: flex-start;
    padding: 80px 0 60px;
}

.hero-text {
    max-width: 640px;
}

.hero-text h1 {
    font-size: 2.4rem;
    font-weight: 700;
    color: #fff;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-text p {
    font-size: 1.05rem;
    color: #c5ced8;
    line-height: 1.5;
}

/* ===== Section Titles ===== */
.section-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #222;
    margin: 40px 0 24px;
}

.subhead {
    color: #777;
    font-size: 1rem;
    margin-bottom: 28px;
}

/* ===== Catalog Header ===== */
.catalog-header {
    padding: 40px 0 8px;
}

.catalog-title {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px;
}

.catalog-subtitle {
    color: #777;
    font-size: 1.05rem;
    margin: 0;
    line-height: 1.5;
}

/* ===== Cards Grid ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

/* ===== Card ===== */
.card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    transition: transform 0.25s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid #e8e8e8;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: #e0e4ea;
}

.card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    background: #2d5a8e;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    letter-spacing: 0.2px;
    text-transform: none;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #222;
    margin-bottom: 8px;
    line-height: 1.3;
}

.price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    margin: 8px 0 4px;
}

.price small {
    font-size: 0.8rem;
    font-weight: 500;
    color: #777;
}

.details {
    display: flex;
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: #666;
}

.detail-item {
    background: #f2f2f2;
    padding: 3px 10px;
    border-radius: 6px;
}

.address {
    font-size: 0.82rem;
    color: #888;
    margin: 6px 0 12px;
}

.btn {
    background: #2d5a8e;
    color: #fff;
    border: none;
    padding: 11px 0;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    text-decoration: none;
    display: block;
    width: 100%;
    margin-top: auto;
}

.btn:hover {
    background: #234a75;
}

/* ===== Footer ===== */
footer {
    background: #f5f5f5;
    color: #777;
    text-align: center;
    padding: 28px 20px;
    font-size: 0.85rem;
    border-top: 1px solid #e8e8e8;
}

footer p {
    margin: 4px 0;
}

/* ===== Page: Details ===== */
.details-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.details-content {
    flex: 1;
    padding: 40px 0;
}

.detail-hero {
    position: relative;
    margin-bottom: 32px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(26,35,50,0.1);
    max-width: 100%;
}

.details-content {
    max-width: 100%;
    overflow-x: hidden;
}

.detail-hero-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.detail-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(26,35,50,0.8));
    padding: 40px 24px 20px;
    color: #fff;
}

.detail-hero-overlay h1 {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 8px 0;
}

.detail-hero-overlay .price-main {
    font-size: 1.5rem;
    font-weight: 700;
}

.detail-hero-overlay .price-main small {
    font-size: 0.85rem;
    opacity: 0.8;
}

.detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 28px;
    margin-bottom: 40px;
}

.detail-main-card {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

.detail-main-card h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e8e8e8;
}

.detail-main-card h2:not(:first-child) {
    margin-top: 24px;
}

.description-text {
    color: #444;
    line-height: 1.6;
    font-size: 0.92rem;
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.specs-table tr {
    border-bottom: 1px solid #f0f2f5;
}

.specs-table td {
    padding: 9px 8px;
    font-size: 0.88rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.specs-table td:first-child {
    color: #888;
    width: 40%;
}

.specs-table td:last-child {
    color: #222;
    font-weight: 500;
}

.detail-sidebar {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

.sidebar-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 14px;
}

.sidebar-card .highlight-price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
}

.sidebar-card .highlight-price small {
    display: block;
    font-size: 0.82rem;
    font-weight: 500;
    color: #777;
    margin-top: 3px;
}

.contact-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: #2d5a8e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    text-align: center;
    margin-top: 12px;
}

.contact-btn:hover {
    background: #234a75;
}

.badge-inline {
    display: inline-block;
    background: #2d5a8e;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.not-found {
    text-align: center;
    padding: 80px 20px;
}

.not-found h1 {
    font-size: 1.8rem;
    color: #222;
    margin-bottom: 14px;
}

.not-found p {
    color: #777;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    color: #2d5a8e;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.92rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* ===== FAQ Section ===== */
.faq-section {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
}

.faq-section h2 {
    margin: 0 0 24px 0;
    color: #1e3b5c;
    font-size: 1.5rem;
    font-weight: 700;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    border: 1px solid #e8edf2;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.faq-item:hover {
    border-color: #c8a45e;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #f8f9fb;
    cursor: pointer;
    font-weight: 600;
    color: #1e3b5c;
    font-size: 1rem;
    user-select: none;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #f0f2f6;
}

.faq-toggle {
    font-size: 1.4rem;
    font-weight: 300;
    color: #2d5a8e;
    transition: transform 0.25s;
    line-height: 1;
    min-width: 24px;
    text-align: center;
}

.faq-item.open .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    padding: 0 20px;
    color: #5a6d7e;
    font-size: 0.95rem;
    line-height: 1.6;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 600px;
    padding: 16px 20px;
}

/* ===== Page: Contacts ===== */
.contacts-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.contacts-content {
    flex: 1;
    padding: 40px 0;
}

.contacts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.contact-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    transition: transform 0.2s;
}

.contact-card:hover {
    transform: translateY(-3px);
}

.contact-icon {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px;
}

.contact-card p {
    margin: 3px 0;
    color: #666;
    font-size: 0.9rem;
}

.contact-card a {
    color: #2d5a8e;
    text-decoration: none;
}

.contact-card a:hover {
    text-decoration: underline;
}

.contact-form-section {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 560px;
    margin: 0 auto;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
}

.contact-form-section h2 {
    margin: 0 0 20px;
    color: #222;
    font-size: 1.3rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #222;
    font-size: 0.88rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2d5a8e;
}

.form-group textarea {
    resize: vertical;
    min-height: 90px;
}

.submit-btn {
    width: 100%;
    padding: 13px;
    background: #2d5a8e;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Inter', sans-serif;
}

.submit-btn:hover {
    background: #234a75;
}

.map-container {
    margin-top: 36px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(26,35,50,0.08);
    height: 320px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ===== Page: About ===== */
.about-page {
    min-height: 100vh;
    padding: 40px 0 60px;
}

.about-intro {
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.08);
    border: 1px solid #e8e8e8;
    margin-bottom: 28px;
}

.about-intro h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 16px;
}

.about-intro p {
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 8px 0;
}

.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.feature-card {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 22px;
    transition: transform 0.2s;
    border: 1px solid #e8e8e8;
}

.feature-card:hover {
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 8px;
}

.feature-card p {
    color: #666;
    font-size: 0.88rem;
    line-height: 1.5;
    margin: 0;
}

/* FAQ */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid #e8e8e8;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    text-align: left;
    font-family: 'Inter', sans-serif;
    transition: background 0.15s;
}

.faq-question:hover {
    background: #f5f6f8;
}

.faq-arrow {
    font-size: 1.1rem;
    color: #2d5a8e;
    transition: transform 0.25s;
}

.faq-item.active .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 20px 18px;
}

.faq-answer p {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    text-align: center;
    padding: 20px 16px;
    background: #f8f8f8;
    border-radius: 12px;
    border: 1px solid #e8e8e8;
}

.team-avatar {
    font-size: 2.4rem;
    margin-bottom: 8px;
}

.team-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #222;
    margin: 0 0 4px;
}

.team-card > p {
    font-size: 0.82rem;
    color: #2d5a8e;
    font-weight: 500;
    margin: 0;
}

.team-desc {
    font-size: 0.8rem;
    color: #7a8a9a;
    margin: 4px 0 0 !important;
}

/* ===== Responsive ===== */

/* Планшет: сайдбар уходит вниз */
@media (max-width: 900px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .container {
        max-width: 100%;
        padding: 0 16px;
    }

    .gallery-main-wrapper {
        border-radius: 8px;
    }
}

/* Мобильный телефон */
@media (max-width: 680px) {
    * {
        max-width: 100vw;
        box-sizing: border-box;
    }

    body {
        overflow-x: hidden;
    }

    .container {
        max-width: 100%;
        padding: 0 12px;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 10px;
    }

    /* На мобильных показываем только иконку без текста */
    .header-phone-text {
        display: none;
    }

    .header-phone {
        padding: 10px 14px;
        border-radius: 50%;
    }

    /* Hero */
    .hero-img,
    .hero-overlay {
        min-height: 340px;
        height: 340px;
    }

    .hero-text h1 {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    /* Details: галерея без переполнения */
    .gallery-main-wrapper {
        border-radius: 8px;
        aspect-ratio: 4 / 3;
        max-height: 300px;
    }

    .gallery-main-img {
        object-fit: cover;
    }

    .gallery-nav-btn {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .gallery-nav-btn.prev { left: 8px; }
    .gallery-nav-btn.next { right: 8px; }

    .gallery-thumbs {
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .gallery-thumb {
        width: 56px;
        height: 42px;
    }

    /* Details: карточки без переполнения */
    .detail-main-card {
        padding: 16px;
    }

    .detail-main-card h2 {
        font-size: 1.1rem;
    }

    .description-text {
        font-size: 0.88rem;
    }

    .sidebar-card {
        padding: 16px;
    }

    .highlight-price {
        font-size: 1.2rem;
    }

    /* FAQ на мобильном */
    .faq-section {
        padding: 16px;
    }

    .faq-question {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .faq-answer {
        padding: 12px 14px;
        font-size: 0.85rem;
    }

    /* Описание квартиры */
    .apartment-description-section {
        padding: 16px;
    }

    .apartment-description-section h2 {
        font-size: 1.2rem;
    }

    .apartment-description p {
        font-size: 0.88rem;
        line-height: 1.6;
    }

    .apartment-description p:first-child::first-letter {
        font-size: 1.6rem;
    }

    /* Detail hero */
    .detail-hero-img {
        height: 200px;
    }

    .detail-hero-overlay h1 {
        font-size: 1.3rem;
    }
}

/* Маленькие телефоны */
@media (max-width: 400px) {
    .container {
        padding: 0 8px;
    }

    .hero-text h1 {
        font-size: 1.4rem;
    }

    .hero-text p {
        font-size: 0.85rem;
    }

    .catalog-title {
        font-size: 1.2rem;
    }

    .card {
        padding: 12px;
    }

    .card-price {
        font-size: 1.1rem;
    }
}


 /* Галерея изображений */
    .gallery-section {
      margin-bottom: 32px;
    }

    .gallery-main-wrapper {
      position: relative;
      margin-bottom: 12px;
      border-radius: 12px;
      overflow: hidden;
      background: #f5f7fa;
      aspect-ratio: 16 / 10;
      max-height: 520px;
    }

    .gallery-main-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      cursor: zoom-in;
      transition: transform 0.3s ease;
    }

    .gallery-main-img:hover {
      transform: scale(1.02);
    }

    .gallery-nav-btn {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(255, 255, 255, 0.9);
      border: none;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      cursor: pointer;
      font-size: 1.3rem;
      color: #1e3b5c;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      transition: all 0.2s;
      z-index: 2;
    }

    .gallery-nav-btn:hover {
      background: #fff;
      box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    }

    .gallery-nav-btn.prev { left: 12px; }
    .gallery-nav-btn.next { right: 12px; }

    .gallery-counter {
      position: absolute;
      bottom: 12px;
      right: 12px;
      background: rgba(0,0,0,0.6);
      color: #fff;
      padding: 4px 12px;
      border-radius: 16px;
      font-size: 0.85rem;
      z-index: 2;
    }

    .gallery-thumbs {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding: 4px 0;
      scroll-behavior: smooth;
      -ms-overflow-style: none;
      scrollbar-width: thin;
    }

    .gallery-thumbs::-webkit-scrollbar {
      height: 6px;
    }

    .gallery-thumbs::-webkit-scrollbar-thumb {
      background: #c5d0da;
      border-radius: 3px;
    }

    .gallery-thumb {
      flex-shrink: 0;
      width: 80px;
      height: 60px;
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      border: 3px solid transparent;
      transition: all 0.2s;
      opacity: 0.7;
    }

    .gallery-thumb:hover {
      opacity: 1;
      border-color: #a0b4c8;
    }

    .gallery-thumb.active {
      opacity: 1;
      border-color: #2563eb;
      box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
    }

    .gallery-thumb img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    /* Лайтбокс */
    .lightbox {
      display: none;
      position: fixed;
      inset: 0;
      background: rgba(0,0,0,0.92);
      z-index: 1000;
      align-items: center;
      justify-content: center;
      cursor: zoom-out;
    }

    .lightbox.show {
      display: flex;
    }

    .lightbox img {
      max-width: 92vw;
      max-height: 92vh;
      object-fit: contain;
      border-radius: 8px;
    }

    .lightbox-close {
      position: absolute;
      top: 16px;
      right: 20px;
      background: rgba(255,255,255,0.15);
      border: none;
      color: #fff;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      font-size: 1.5rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    .lightbox-close:hover {
      background: rgba(255,255,255,0.3);
    }

    .lightbox-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      background: rgba(255,255,255,0.15);
      border: none;
      color: #fff;
      width: 52px;
      height: 52px;
      border-radius: 50%;
      font-size: 1.5rem;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    .lightbox-nav:hover {
      background: rgba(255,255,255,0.3);
    }

    .lightbox-nav.prev { left: 20px; }
    .lightbox-nav.next { right: 20px; }

    .lightbox-counter {
      position: absolute;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      color: #fff;
      background: rgba(0,0,0,0.5);
      padding: 6px 16px;
      border-radius: 20px;
      font-size: 0.9rem;
    }

    /* Скрываем элементы навигации если только 1 фото */
    .gallery-single .gallery-thumbs,
    .gallery-single .gallery-nav-btn,
    .gallery-single .gallery-counter {
      display: none !important;
    }

/* ===== Контакты: карточка менеджера ===== */
.contact-card-manager {
    border: 2px solid #c8a45e;
    background: linear-gradient(135deg, #fff 0%, #fef9ed 100%);
}

.manager-name {
    font-weight: 600;
    color: #222;
    font-size: 1rem;
    margin: 8px 0 4px;
}

.phone-link {
    font-weight: 600;
    font-size: 1.05rem;
    color: #2d5a8e !important;
}

.phone-link:hover {
    text-decoration: none !important;
}

/* ===== Footer: кнопка звонка ===== */
.footer-contacts {
    margin: 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.call-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #c8a45e;
    color: #fff !important;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s, transform 0.15s;
    box-shadow: 0 2px 8px rgba(200, 164, 94, 0.3);
}

.call-btn:hover {
    background: #b8944e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(200, 164, 94, 0.4);
}

.call-btn-icon {
    font-size: 1.2rem;
}

.footer-phone {
    color: #c8a45e;
    font-weight: 500;
    font-size: 0.95rem;
}

/* ===== Секция подробного описания квартиры ===== */
.apartment-description-section {
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    margin-bottom: 12px;
}

.apartment-description-section h2 {
    margin: 0 0 24px 0;
    color: #1e3b5c;
    font-size: 1.5rem;
    font-weight: 700;
}

.apartment-description {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.apartment-description p {
    margin: 0;
    color: #444;
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: justify;
}

.apartment-description p:first-child::first-letter {
    font-size: 2rem;
    font-weight: 700;
    color: #2d5a8e;
    float: left;
    margin-right: 8px;
    line-height: 1;
}