/* ========================================
   Homepage Styles
   ======================================== */

/* --- Header: top bar #3b3a38 --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: #3b3a38;
}

.header-top__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    gap: 20px;
}

.header-top__left {
    flex-shrink: 0;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #fff;
}
.header-logo:hover { color: #fff; }

.header-logo__img {
    max-height: 40px;
    width: auto;
}

.header-logo__icon {
    color: var(--color-accent);
}

.header-logo__text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.header-top__center {
    flex: 1;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.header-top__center-text {
    font-size: 13px;
    color: rgba(255,255,255,0.7);
}

.header-top__btn {
    display: inline-block;
    padding: 6px 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.header-top__btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

.header-top__right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.header-top__right-text {
    color: #fff;
    font-size: 14px;
    font-weight: 500;
}
.header-top__right-text a {
    color: #fff;
    text-decoration: none;
    transition: color 0.2s;
}
.header-top__right-text a:hover { color: var(--color-accent); }

.header-top__social {
    display: flex;
    gap: 10px;
}
.header-top__social a {
    color: rgba(255,255,255,0.6);
    transition: color 0.2s;
}
.header-top__social a:hover { color: #fff; }

/* --- Header: nav white bg, bottom border #3b3a38 --- */
.header-nav {
    background: #ffffff;
    border-bottom: 0.75px solid #e1e1e1;
}

.header-nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0;
}

.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0;
}

.nav-list li a {
    display: block;
    padding: 14px 18px;
    color: #3b3a38;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s, background 0.2s;
    font-weight: 500;
}
.nav-list li a:hover,
.nav-list li.current-menu-item a {
    color: var(--color-accent);
    background: rgba(146,175,196,0.08);
}

/* Burger */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #3b3a38;
    transition: all 0.3s;
}
.burger.is-active span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* Mobile menu */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: #fff;
    z-index: 99;
    padding-top: 100px;
    overflow-y: auto;
}
.mobile-menu.is-open { display: block; }

.mobile-nav-list {
    list-style: none;
    padding: 20px;
    margin: 0;
}
.mobile-nav-list li a {
    display: block;
    padding: 14px 0;
    color: #3b3a38;
    font-size: 18px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
}
.mobile-menu__phone {
    display: block;
    padding: 20px;
    color: var(--color-accent);
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}

/* --- Hero: white bg, two sliders --- */
.hp-hero {
    background: #ffffff;
    padding: 30px 0;
}

.hero-split {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 20px;
    min-height: 480px;
}

/* Slider wrap — relative for arrows */
.hero-slider-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #e8ecf1;
    border: 0.75px solid #e1e1e1;
}

.hero-slider-inner {
    width: 100%;
    height: 100%;
}

.hero-slide {
    display: none;
    width: 100%;
    height: 100%;
}
.hero-slide.is-active { display: block; }

.hero-slide__media {
    width: 100%;
    height: 100%;
    min-height: 480px;
    background-size: cover;
    background-position: center;
    object-fit: cover;
}

.hero-slide__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #8899aa;
    font-size: 16px;
    gap: 6px;
}
.hero-slide__placeholder small {
    font-size: 13px;
    color: #aab;
}

/* Slider arrows */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    padding: 0;
}
.slider-arrow:hover {
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.slider-arrow img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}
.slider-arrow svg {
    width: 20px;
    height: 20px;
}
.slider-arrow--prev { left: 12px; }
.slider-arrow--next { right: 12px; }

/* Right slider — adjust arrow position for caption */
#heroRight .slider-arrow {
    top: 40%;
}

/* Right slider caption */
.hero-right .hero-slide {
    display: none;
    flex-direction: column;
}
.hero-right .hero-slide.is-active {
    display: flex;
}
.hero-right .hero-slide__media {
    flex: 1;
    min-height: 300px;
}
.hero-slide__caption {
    padding: 20px 24px;
    background: #fff;
}
.hero-slide__caption h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 6px 0;
    color: var(--color-text);
}
.hero-slide__caption p {
    font-size: 14px;
    color: var(--color-text-light);
    margin: 0;
    line-height: 1.5;
}

/* Slider dots */
.slider-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}
.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.8);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s;
}
.slider-dot.is-active {
    background: #fff;
}
#heroRight .slider-dots {
    position: relative;
    bottom: auto;
    left: 0;
    transform: none;
    justify-content: center;
    padding: 10px 0;
    background: #fff;
}
#heroRight .slider-dot {
    border-color: var(--color-border);
}
#heroRight .slider-dot.is-active {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

/* --- Sections --- */
.hp-section {
    padding: 80px 0;
}
.hp-section--gray { background: var(--color-bg-gray); }
.hp-section--dark { background: #3b3a38; color: #fff; }

.hp-section__title {
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 700;
    margin: 0 0 40px 0;
    color: var(--color-text);
}
.hp-section--dark .hp-section__title { color: #fff; }

/* --- Buttons --- */
.hp-btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
    cursor: pointer;
    border: none;
}
.hp-btn--primary {
    background: var(--color-accent);
    color: #fff;
}
.hp-btn--primary:hover {
    background: var(--color-accent-hover);
    color: #fff;
}
.hp-btn--outline {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.hp-btn--outline:hover {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border-color: rgba(255,255,255,0.5);
}

/* --- В наших домах --- */
.houses-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.houses-card__img {
    border-radius: 16px;
    overflow: hidden;
    background: var(--color-bg-gray);
    aspect-ratio: 4/3;
}
.houses-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.houses-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aab;
    font-size: 16px;
    min-height: 200px;
}

.houses-texts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.houses-text h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.houses-text p {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.7;
    margin: 0;
}

/* --- News --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.news-card {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    transition: transform 0.25s, box-shadow 0.25s;
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.3);
    color: #fff;
}

.news-card__img {
    aspect-ratio: 16/10;
    overflow: hidden;
    background: rgba(255,255,255,0.08);
}
.news-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.news-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    min-height: 160px;
}

.news-card__body {
    padding: 20px 24px;
}
.news-card__excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255,255,255,0.8);
    margin: 0 0 12px 0;
}
.news-card__date {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
}

.news-more { text-align: left; }

/* --- Subscribe + Messengers --- */
.subscribe-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.subscribe-box {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
}
.subscribe-box__title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 10px 0;
}
.subscribe-box__text {
    font-size: 14px;
    color: var(--color-text-light);
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.newsletter-form {
    display: flex;
    gap: 10px;
}
.newsletter-form input[type="email"] {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.2s;
}
.newsletter-form input[type="email"]:focus {
    border-color: var(--color-accent);
}

.newsletter-msg {
    margin-top: 10px;
    font-size: 14px;
    color: #27ae60;
}

.messengers-list {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.messenger-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--color-text);
    text-decoration: none;
    transition: all 0.2s;
}
.messenger-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* --- Footer --- */
.site-footer {
    background: #3b3a38;
    color: rgba(255,255,255,0.8);
}

.footer-main {
    padding: 60px 0 40px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 40px;
}

.footer-col__title {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 20px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li { margin-bottom: 10px; }
.footer-links li a {
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links li a:hover { color: #fff; }

.footer-col--cta {
    display: flex;
    align-items: flex-start;
}

.footer-cta-btn {
    display: inline-block;
    padding: 14px 28px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}
.footer-cta-btn:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.5);
    color: #fff;
}

.footer-bottom { padding: 20px 0; }
.footer-bottom__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
}
.footer-bottom__copy { color: rgba(255,255,255,0.4); }
.footer-bottom__phone { color: rgba(255,255,255,0.7); font-weight: 600; }
.footer-bottom__text { color: rgba(255,255,255,0.4); }

.footer-disclaimer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 16px 0;
}
.footer-disclaimer p {
    font-size: 11px;
    color: rgba(255,255,255,0.3);
    line-height: 1.6;
    margin: 0;
}

/* =========== RESPONSIVE =========== */
@media (max-width: 1024px) {
    .header-top__center { display: none; }
    .hero-split { grid-template-columns: 1fr 1fr; }
    .houses-photos, .houses-texts, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .nav-list li a { padding: 14px 12px; font-size: 13px; }
}

@media (max-width: 768px) {
    .header-top__center { display: none; }

    .site-nav { display: none; }
    .burger { display: flex; }

    .hero-split {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    .hero-slide__media { min-height: 280px; }
    .slider-arrow { width: 36px; height: 36px; }
    .slider-arrow img, .slider-arrow svg { width: 16px; height: 16px; }

    .houses-photos, .houses-texts { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .subscribe-split { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom__inner { flex-direction: column; text-align: center; }
    .hp-section { padding: 50px 0; }
    .newsletter-form { flex-direction: column; }
}

/* --- Slider transitions --- */
.hero-slider-inner { position: relative; width: 100%; height: 100%; }

/* Fade */
.hero-slider-inner.transition-fade .hero-slide {
    display: block !important;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transition: opacity var(--slider-speed, 0.6s) ease;
    pointer-events: none;
}
.hero-slider-inner.transition-fade .hero-slide.is-active {
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Slide (horizontal) */
.hero-slider-inner.transition-slide .hero-slide {
    display: block !important;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    transform: translateX(100%);
    opacity: 0;
    transition: transform var(--slider-speed, 0.6s) ease, opacity var(--slider-speed, 0.6s) ease;
    pointer-events: none;
}
.hero-slider-inner.transition-slide .hero-slide.is-leaving {
    transform: translateX(-100%);
    opacity: 0;
}
.hero-slider-inner.transition-slide .hero-slide.is-active {
    transform: translateX(0);
    opacity: 1;
    position: relative;
    pointer-events: auto;
}

/* Zoom */
.hero-slider-inner.transition-zoom .hero-slide {
    display: block !important;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity var(--slider-speed, 0.6s) ease, transform var(--slider-speed, 0.6s) ease;
    pointer-events: none;
}
.hero-slider-inner.transition-zoom .hero-slide.is-active {
    opacity: 1;
    transform: scale(1);
    position: relative;
    pointer-events: auto;
}

/* None (instant) */
.hero-slider-inner.transition-none .hero-slide {
    display: none;
}
.hero-slider-inner.transition-none .hero-slide.is-active {
    display: block;
}

/* --- Right slider: fix caption visibility in transition modes --- */
.hero-right.transition-fade .hero-slide,
.hero-right.transition-slide .hero-slide,
.hero-right.transition-zoom .hero-slide {
    display: flex !important;
    flex-direction: column;
    height: 100%;
}
.hero-right.transition-fade .hero-slide:not(.is-active),
.hero-right.transition-slide .hero-slide:not(.is-active),
.hero-right.transition-zoom .hero-slide:not(.is-active) {
    display: flex !important;
}
.hero-right .hero-slide__media {
    flex: 1;
    min-height: 300px;
}
.hero-right .hero-slide__caption {
    position: relative;
    z-index: 2;
}

/* Footer CTA column — stack buttons vertically */
.footer-col--cta {
    flex-direction: column;
    gap: 12px;
}

/* Footer mail icon */
.footer-mail-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 50%;
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
    margin-top: 16px;
}
.footer-mail-link:hover {
    color: #fff;
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.08);
}
