/* Google Fonts - преміальна типографіка */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&family=Playfair+Display:wght@700&display=swap');

:root {
    --gold: #a3895d;
    --dark: #1a1a1a;
    --light: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

img, video, iframe {
    max-width: 100%;
    height: auto;
}

html { scroll-behavior: smooth; overflow-x: hidden; width: 100%; }

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    background: #e8e8e8;
}

h1, h2, h3, .logo span { font-family: 'Playfair Display', serif; }

/* Навігація */
.navbar {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
}

.navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    padding: 10px 5%;
}

.navbar .logo { display: flex; align-items: center; gap: 10px; }
.navbar .logo img { height: 70px; }
.navbar ul { display: flex; list-style: none; gap: 25px; }
.navbar ul li a {
    text-decoration: none;
    color: var(--dark);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    transition: var(--transition);
}
.navbar ul li a:hover { color: var(--gold); }

/* Burger Menu */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.burger-menu span {
    width: 100%;
    height: 3px;
    background: var(--dark);
    transition: all 0.3s;
    border-radius: 2px;
}

.burger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger-menu.active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Hero Section з відео */
.hero-video {
    position: relative;
    height: 65vh;
    display: flex; align-items: center; justify-content: center;
    color: var(--white);
    text-align: center;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
    overflow: hidden;
}

.video-container {
    position: absolute; top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1; overflow: hidden;
}

#bg-video {
    width: 100%; height: 100%;
    object-fit: cover;
}

.hero-overlay {
    background: rgba(0, 0, 0, 0.4);
    width: 100%; height: 100%;
    display: flex; flex-direction: column; justify-content: center;
    padding: 0 10%;
}

.hero-logo {
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.hero-logo img {
    max-width: 300px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.4));
}

.hero-logo::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 3px;
    transform: translateX(-50%);
    width: 80%;
    max-width: 400px;
    height: 25%;
    background: radial-gradient(ellipse at center, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.25) 45%, rgba(255,255,255,0) 70%);
    filter: blur(6px);
    opacity: 0.9;
    pointer-events: none;
    z-index: 0;
}

.hero-logo img {
    position: relative;
    z-index: 1;
}

.hero-overlay h1 { display: none; }
.hero-overlay p { display: none; }
.hero-overlay .btn-gold { display: none; }

/* Кнопки */
.btn-gold {
    display: inline-block;
    padding: 15px 40px;
    background: var(--gold);
    color: var(--white);
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    transition: var(--transition);
    border: none;
    border-radius: 6px;
}
.btn-gold:hover { background: #8a734d; transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* Секції */
.section-padding { padding: 100px 5%; overflow-x: hidden; }
.section-title { 
    font-size: 3rem; 
    text-align: center;
    color: #a3895d;
    margin-bottom: 60px; 
    position: relative;
    overflow-wrap: break-word;
}
.section-title::after {
    content: ''; 
    display: block; 
    width: 40%;
    min-width: 60px;
    max-width: 1200px; 
    height: 3px; 
    background: var(--gold); 
    margin: 20px auto;
}

.container { 
    max-width: 1200px; 
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

/* Основна обгортка контенту з тінню */
.content-wrapper {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    background: var(--white);
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
}

.bg-light { background: var(--light); }

/* Опис сайту */
#about.section-padding { padding-top: 60px; }
body.page-about #about.section-padding { padding-top: 100px; }
#about .section-title { margin-bottom: 30px; }
#about .section-description { margin-bottom: 30px; }
.section-description {
    text-align: center;
    font-size: 18px;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #555;
}

.about-quick-links {
    margin-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.about-link-btn {
    display: inline-block;
    padding: 12px 24px;
    background: transparent;
    color: #2f8f58;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 6px;
    border: 2px solid #2f8f58;
    transition: var(--transition);
}

.about-link-btn:hover {
    background: #2f8f58;
    color: var(--white);
    transform: translateY(-3px);
}

/* Плитка (Grid Container) */
.grid-container {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 24px;
    margin-top: 30px;
}

/* Інфраструктура: компактна плитка, без білого фону */
#infrastructure .grid-container {
    grid-template-columns: repeat(5, minmax(140px, 1fr));
    gap: 22px;
}

#infrastructure .grid-item {
    background: transparent;
    box-shadow: none;
    padding: 12px 8px;
}

#infrastructure .grid-item:hover {
    transform: translateY(-4px);
    box-shadow: none;
}

#infrastructure .grid-item img {
    max-height: 110px;
    margin-bottom: 12px;
}

#infrastructure .grid-item h3 {
    font-size: 13px;
    letter-spacing: 0.8px;
}

.grid-item {
    text-align: center;
    padding: 20px 14px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: none;
    transition: var(--transition);
}

.grid-item:hover {
    transform: translateY(-8px);
    box-shadow: none;
}

.grid-item img {
    width: 100%;
    height: auto;
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 16px;
}

.grid-item h3 {
    font-size: 14px;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Котеджі - Карусель */
.houses-carousel {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.houses-track {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 10px 0 20px;
    scrollbar-width: none;
}

.houses-track::-webkit-scrollbar { display: none; }

.house-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    background: var(--white);
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: var(--transition);
    flex: 0 0 320px;
    scroll-snap-align: center;
}

.house-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.house-item img {
    width: 100%; height: 240px;
    object-fit: cover;
    transition: var(--transition);
}

.house-item:hover img { transform: scale(1.05); }

.house-info {
    position: absolute; bottom: 30px; left: 30px;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.house-info h3 { font-size: 24px; margin-bottom: 10px; }
.view-more { 
    display: inline-block; 
    padding: 8px 20px; 
    background: var(--gold); 
    border-radius: 4px; 
    font-size: 14px;
    margin-top: 10px;
}

.carousel-btn {
    background: transparent;
    border: none;
    font-size: 36px;
    color: #777;
    cursor: pointer;
    transition: var(--transition);
    padding: 0 6px;
}

.carousel-btn:hover { color: var(--gold); }

/* Модальне вікно (План котеджу) */
.modal {
    display: none;
    position: fixed; z-index: 2000;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    padding: 20px;
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 50px auto; 
    padding: 40px;
    width: 90%; 
    max-width: 1200px;
    position: relative;
    border-radius: 12px;
}

.modal-header {
    margin-bottom: 40px;
    text-align: center;
}

.modal-main-img {
    width: 100%;
    max-height: 180px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid #eee;
    background: #f8f8f8;
    cursor: pointer;
    transition: var(--transition);
}

.modal-main-img:hover {
    border-color: var(--gold);
    transform: scale(1.02);
}

.modal-grid {
    display: grid; 
    grid-template-columns: 1fr 2fr; 
    gap: 30px;
    align-items: start;
}

.modal-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.house-photo-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.house-photo-thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: var(--transition);
    background: #fff;
}

.house-photo-thumb:hover {
    border-color: var(--gold);
    transform: scale(1.02);
}

.plans-container {
    padding: 0;
    background: transparent;
    border-radius: 8px;
}

.plans-container h4 {
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(240px, 1fr));
    gap: 20px;
}

.plan-item {
    text-align: center;
}

.plan-number {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.plan-img {
    width: 100%;
    height: 320px;
    object-fit: contain;
    border: 1px solid #ddd;
    border-radius: 8px;
    transition: var(--transition);
    cursor: pointer;
    background: #fff;
}

.plan-img:hover {
    border-color: var(--gold);
    box-shadow: 0 4px 12px rgba(163, 137, 93, 0.2);
    transform: scale(1.02);
}

.no-plans {
    text-align: center;
    color: #999;
    padding: 20px;
    font-style: italic;
}

.house-description {
    margin-top: 24px;
}

.description-title {
    font-size: 18px;
    color: var(--gold);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.description-text {
    line-height: 1.8;
    color: #555;
}

.plan-info h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--dark);
}

.plan-info h4 {
    font-size: 18px;
    color: var(--gold);
    margin: 20px 0 10px;
}

.specs {
    line-height: 1.8;
    color: #555;
    margin-bottom: 20px;
}

.close {
    position: absolute; right: 20px; top: 10px;
    font-size: 40px; cursor: pointer; color: #aaa;
    transition: 0.3s;
}

.close:hover { color: #333; }

/* Фотогалерея - СЛАЙДЕР */
.gallery-slider-wrapper {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.gallery-slider {
    position: relative;
    width: 100%;
    height: 600px;
}

.gallery-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.gallery-slide.active {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.5s;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f5f5f5;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Кнопки навігації */
.gallery-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
    user-select: none;
}

.gallery-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.gallery-prev {
    left: 10px;
}

.gallery-next {
    right: 10px;
}

/* Точки навігації */
.gallery-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active,
.dot:hover {
    background: var(--gold);
}

/* Адаптивність */
@media (max-width: 768px) {
    .gallery-slider {
        height: 400px;
    }
    
    .gallery-btn {
        font-size: 18px;
        padding: 10px 15px;
    }
}

/* Відеоблоки */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
}

.video-item h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--dark);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Контакти */
.contact-grid { 
    display: grid; 
    grid-template-columns: 1fr 1.5fr; 
    gap: 50px; 
    align-items: stretch;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-item i {
    font-size: 30px;
    color: var(--gold);
}

.contact-item strong {
    display: block;
    font-size: 16px;
    margin-bottom: 5px;
    color: var(--dark);
}

.contact-item p {
    font-size: 18px;
    color: #555;
}

.social-links { 
    display: flex; 
    gap: 20px; 
    margin-top: 20px; 
}

.social-links a { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 24px;
    font-weight: bold;
    border-radius: 0;
    transition: transform 0.15s ease;
    text-decoration: none;
}

.social-links .social-icon {
    width: 45px;
    height: 45px;
    object-fit: contain;
    display: block;
}

.social-links a:hover { 
    transform: translateY(-1px);
}

.social-links a:active {
    transform: translate(2px, 2px);
}

.map-box {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    height: 500px;
    display: flex;
}

.map-box iframe {
    border-radius: 12px;
    width: 100%;
    height: 100%;
    flex: 1;
}

/* Футер */
.footer {
    padding: 50px 5%;
    text-align: center;
    background: var(--dark);
    color: rgba(255,255,255,0.6);
    font-size: 14px;
    max-width: 1200px;
    width: 100%;
    margin: 20px auto 0;
    box-shadow: 0 0 30px rgba(0,0,0,0.15);
}

.footer-socials {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: auto;
    padding: 0;
    background: transparent;
    color: inherit;
    font-size: 20px;
    font-weight: bold;
    border-radius: 0;
    transition: transform 0.15s ease;
    text-decoration: none;
}

.footer-socials .social-icon {
    width: 30px;
    height: 30px;
    object-fit: contain;
    display: block;
}

.icon-svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    display: block;
}

.icon-svg--up {
    width: 22px;
    height: 22px;
}

.icon-svg--youtube {
    width: 26px;
    height: 20px;
}

.footer-socials a:hover {
    transform: translateY(-1px);
}

.footer-socials a:active {
    transform: translate(2px, 2px);
}

.footer-credits {
    margin-top: 15px;
    font-size: 13px;
    opacity: 0.7;
}

.footer-credits a {
    color: var(--gold);
    text-decoration: none;
    transition: 0.3s;
}

.footer-credits a:hover {
    color: var(--white);
    text-decoration: underline;
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gold);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background: var(--dark);
    transform: translateY(-5px);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 3000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: var(--gold);
}

.lightbox-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 3001;
}

.lightbox-btn:hover {
    background: rgba(0,0,0,0.85);
    transform: translateY(-50%) scale(1.05);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 6px 12px;
    border-radius: 999px;
    z-index: 3001;
}

/* Адаптивність */
@media (max-width: 992px) {
    .modal-grid,
    .contact-grid,
    .grid-forms {
        grid-template-columns: 1fr;
    }

    .grid-container {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

    #infrastructure .grid-container {
        grid-template-columns: repeat(4, minmax(140px, 1fr));
    }
    
    .plans-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .hero-overlay h1 { font-size: 3rem; }
    
    /* Мобільне меню */
    .burger-menu {
        display: flex;
        margin-right: 0;
    }
    
    .navbar-inner {
        padding: 10px 15px;
    }
    
    .navbar ul {
        position: fixed;
        top: 90px;
        right: -100%;
        width: 280px;
        max-width: 85vw;
        height: calc(100vh - 90px);
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 30px;
        gap: 0;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        transition: right 0.4s ease;
        overflow-y: auto;
    }
    
    .navbar ul.active {
        right: 0;
    }
    
    .navbar ul li {
        width: 100%;
        padding: 15px 0;
        border-bottom: 1px solid #eee;
    }
    
    .navbar ul li:last-child {
        border-bottom: none;
    }
    
    .navbar ul li a {
        font-size: 16px;
        display: block;
    }
}

@media (max-width: 768px) {
    .section-title { font-size: 2rem; }
    .hero-overlay h1 { font-size: 2rem; }
    .hero-logo::after {
        width: 90vw;
        max-width: 400px;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .house-item {
        flex: 0 0 260px;
    }

    .grid-container {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
        gap: 18px;
    }

    #infrastructure .grid-container {
        grid-template-columns: repeat(3, minmax(120px, 1fr));
        gap: 16px;
    }
    
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .map-box {
        min-height: 350px;
    }
    
    /* Покращена адаптивність модальних вікон */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        padding: 15px;
        margin: 10px auto;
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-grid {
        gap: 20px;
    }
    
    .close {
        right: 10px;
        top: 5px;
        font-size: 35px;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .plan-img {
        height: auto;
        max-height: 400px;
    }
    
    .modal-main-img {
        max-height: 150px;
    }
    
    .plan-info h3 {
        font-size: 22px;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 15px;
        right: 15px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .grid-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    #infrastructure .grid-container {
        grid-template-columns: repeat(2, minmax(110px, 1fr));
        gap: 12px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .navbar-inner {
        padding: 10px 10px;
    }

    .hero-logo::after {
        width: 90vw;
        max-width: 400px;
    }
    
    .scroll-to-top {
        width: 40px;
        height: 40px;
        bottom: 10px;
        right: 10px;
        font-size: 16px;
    }
}

/* Адмінка - специфічні стилі */
.admin-container { background: #f0f2f5; }
