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

/* --- Header: single row, centered logo (yolki-style) --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    box-shadow: 0 2px 16px rgba(20,30,50,0.06);
    transition: background 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

/* On the front page the header starts transparent, floating over the hero,
   and becomes solid once the user scrolls (see .is-scrolled, toggled in app.js) */
.site-header--overlay {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: transparent;
    box-shadow: none;
    color: #fff;
}
.site-header--overlay.is-scrolled {
    background: #fff;
    color: var(--color-text);
    box-shadow: 0 2px 16px rgba(20,30,50,0.06);
}

.site-header__inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    padding: 16px 0;
}

.site-header__left,
.site-header__right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.site-header__right { justify-content: flex-end; }

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
}
.header-logo:hover { color: inherit; }

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

/* Two logo variants: white for the transparent overlay header,
   blue/dark for the solid header (other pages and after scroll). */
.header-logo__img--white { display: none; }
.header-logo__img--scroll { display: block; }

.site-header--overlay .header-logo__img--white { display: block; }
.site-header--overlay .header-logo__img--scroll { display: none; }

.site-header--overlay.is-scrolled .header-logo__img--white { display: none; }
.site-header--overlay.is-scrolled .header-logo__img--scroll { display: block; }

/* Near-footer state: header blends to #92afc4 — show white logo, drop shadow */
.site-header.is-near-footer .header-logo__img--scroll { display: none; }
.site-header.is-near-footer .header-logo__img--white { display: block; }
.site-header.is-near-footer { box-shadow: none !important; }

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

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

/* Buttons in header — pill shape regardless of page.
   Double class selectors (.hp-btn.site-header__cta) so these win over the
   generic .hp-btn rules further down in this file, regardless of order. */
.hp-btn.site-header__cta {
    border-radius: var(--radius-pill, 999px);
    padding: 12px 24px;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}
.hp-btn.site-header__cta--secondary {
    background: transparent;
    border: 1px solid currentColor;
    border-color: currentColor;
    color: inherit;
}
.hp-btn.site-header__cta--secondary:hover {
    color: inherit;
    background: rgba(127,127,127,0.1);
    border-color: currentColor;
}

.site-header__phone {
    color: inherit;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.site-header__phone:hover { color: inherit; opacity: 0.8; }
.site-header__phone a {
    color: inherit;
    font: inherit;
    text-decoration: none;
}
.site-header__phone a:hover { opacity: 0.8; }

.hp-btn.site-header__call {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    background: transparent;
    color: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.hp-btn.site-header__call:hover {
    color: inherit;
    background: rgba(127,127,127,0.1);
}

/* Burger */
.burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    flex-shrink: 0;
}
.burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: currentColor;
    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); }

/* Menu overlay (opened by burger on any page/screen size) */
.mobile-menu {
    display: none;
    position: fixed;
    inset: 0;
    background: #fff;
    color: var(--color-text);
    z-index: 199;
    padding-top: 100px;
    overflow-y: auto;
}
.mobile-menu.is-open { display: block; }

.mobile-nav-list {
    list-style: none;
    padding: 20px;
    margin: 0;
    max-width: 1240px;
    margin: 0 auto;
}
.mobile-nav-list li a {
    display: block;
    padding: 16px 0;
    color: var(--color-text);
    font-size: clamp(24px, 4vw, 40px);
    font-weight: 700;
    border-bottom: 1px solid #eee;
    text-decoration: none;
}
.mobile-menu__phone {
    display: block;
    padding: 20px;
    max-width: 1240px;
    margin: 0 auto;
    color: var(--color-accent);
    font-size: 20px;
    font-weight: 600;
    text-decoration: none;
}
.mobile-menu__social {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px;
    max-width: 1240px;
    margin: 0 auto;
}
.mobile-menu__social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 50%;
    color: var(--color-text-light);
    transition: all 0.2s;
}
.mobile-menu__social a:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
}

/* --- Hero: full-width slider --- */
.hp-hero {
    background: #ffffff;
    padding: 30px 0;
}

/* 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: clamp(420px, 70vh, 760px);
    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; }

/* 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;
}

/* --- 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) {
    .houses-photos, .houses-texts, .news-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .site-header__phone { display: none; }
    .site-header__cta--secondary { display: none; }
    .site-header__cta span { display: none; }
    .site-header__cta { padding: 12px; }

    .header-logo__img { max-height: 80px !important; }
    .header-logo { transform: translateX(-7%); }

    .hero-slide__media { min-height: clamp(360px, 60vh, 560px); }
    .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;
}

/* 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);
}

/* Manager entry link — subtle, only visible on hover */
.footer-manager-entry {
    text-align: center;
    padding: 6px 0 10px;
}
.footer-manager-entry a {
    font-size: 11px;
    color: rgba(255,255,255,0.12);
    text-decoration: none;
    transition: color 0.2s;
}
.footer-manager-entry a:hover { color: rgba(255,255,255,0.35); }
