/* --- VARIABLES --- */
:root {
    --color-teal: #0A4F59;
    --color-teal-light: #2C8C99;
    --color-sand: #F7F3E8;
    --color-terracotta: #E07A5F;
    --color-text: #2D3142;
    --color-white: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Manrope', sans-serif;
    --transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    --header-height: 70px;
}

/* --- RESET & BASE --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--color-sand);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    padding-top: var(--header-height);
}

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 600; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(10, 79, 89, 0.98);
    backdrop-filter: blur(10px);
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.nav-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-serif);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1001;
    white-space: nowrap;
}

/* DESKTOP MENU DEFAULT */
.nav-menu {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-link:hover { color: var(--color-terracotta); }

/* Hamburger Button */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;
}
.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px 0;
    background: white;
    transition: var(--transition);
}

/* --- UI COMPONENTS --- */
.btn {
    display: inline-block;
    padding: 16px 35px;
    background-color: var(--color-terracotta);
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(224, 122, 95, 0.3);
    text-align: center;
}

.btn:hover {
    background-color: #c45d44;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(224, 122, 95, 0.5);
}

.btn-outline {
    border: 1px solid var(--color-teal);
    box-shadow: none;
}
.btn-outline:hover {
    background: var(--color-teal);
    color: white;
}

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

.section-title {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--color-teal);
    line-height: 1.2;
}

.section-subtitle {
    text-align: center;
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 4rem;
    max-width: 600px;
    margin: 0 auto 4rem auto;
}

.add {margin: 4rem auto auto;}

/* --- HERO & VIDEO --- */
.hero {
    height: 100vh;
    min-height: 600px;
    margin-top: calc(var(--header-height) * -1);
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    padding: 0 20px;
}

.hero-video {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(10, 79, 89, 0.4);
    z-index: -1;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 900px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero h1 {
    font-size: 4.5rem;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 40px;
    font-weight: 300;
    opacity: 0.95;
}

/* --- WEATHER WIDGET (DEFAULT DESKTOP) --- */
.weather-widget {
    position: absolute;
    bottom: 40px;
    right: 40px;
    
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 25px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    gap: 25px;
    color: white;
    z-index: 10;
    transition: all 0.3s ease;
}

.widget-divider {
    height: 40px;
    border-right: 1px solid rgba(255,255,255,0.3);
}
.weather-city { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.9; }
.weather-temp { font-size: 1.4rem; font-weight: 600; white-space: nowrap; }
.w-poland { color: #f0f0f0; }
.w-italy { color: #FFD700; }

/* --- SECTIONS --- */
.why-us { padding: 100px 0; background: white; }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.flip-card { background-color: transparent; height: 420px; perspective: 1000px; cursor: pointer; }
.flip-card-inner { position: relative; width: 100%; height: 100%; text-align: center; transition: transform 0.8s; transform-style: preserve-3d; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border-radius: 8px; }
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back { position: absolute; width: 100%; height: 100%; backface-visibility: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 30px; border-radius: 8px; overflow: hidden; }
.flip-card-front img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; opacity: 0.95; }
.front-text { z-index: 2; background: white; padding: 15px 30px; font-family: var(--font-serif); font-size: 1.4rem; color: var(--color-teal); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.flip-card-back { background-color: var(--color-teal); color: white; transform: rotateY(180deg); }
.highlight { color: #FFD700; font-weight: bold; margin-top: 15px; display: block; }

.properties { padding: 100px 0; background-color: var(--color-sand); }
.toggle-container { display: flex; justify-content: center; align-items: center; margin-bottom: 50px; gap: 20px; flex-wrap: wrap; text-align: center; }
.toggle-label.active { color: var(--color-teal); font-weight: bold; }
.switch { position: relative; display: inline-block; width: 60px; height: 32px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 24px; width: 24px; left: 4px; bottom: 4px; background-color: white; transition: .4s; border-radius: 50%; }
input:checked + .slider { background-color: var(--color-terracotta); }
input:checked + .slider:before { transform: translateX(28px); }
.prop-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.prop-card { background: white; border-radius: 8px; overflow: hidden; transition: var(--transition); box-shadow: 0 5px 15px rgba(0,0,0,0.05); }
.prop-img-wrapper { height: 260px; overflow: hidden; }
.prop-img-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s; }
.prop-details { padding: 25px; }
.prop-title { font-size: 1.4rem; margin-bottom: 5px; color: var(--color-teal); font-family: var(--font-serif); }
.prop-price { font-size: 1.2rem; font-weight: 700; color: var(--color-terracotta); margin-bottom: 15px; }
.investor-data { display: none; color: var(--color-teal); font-weight: 600; font-size: 0.95rem; }
.life-data { display: block; color: #666; font-style: italic; font-size: 0.95rem; }

.services { padding: 100px 0; background-color: #fff; background-image: radial-gradient(#ddd 1px, transparent 1px); background-size: 20px 20px; }
.menu-paper { max-width: 800px; margin: 0 auto; background: var(--color-sand); padding: 60px; box-shadow: 0 15px 40px rgba(0,0,0,0.1); position: relative; }
.menu-paper::before { content: ''; position: absolute; top: 15px; bottom: 15px; left: 15px; right: 15px; border: 2px solid var(--color-teal); opacity: 0.3; pointer-events: none; }
.menu-item { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 25px; border-bottom: 1px dotted #aaa; padding-bottom: 5px; }
.menu-name { font-family: var(--font-serif); font-size: 1.3rem; color: var(--color-teal); font-weight: 600; }
.menu-name span {display: block; font-size: 1rem; color: #555;}
.menu-desc { font-size: 0.9rem; color: #555; text-align: right; max-width: 50%; }

.trip { padding: 100px 0; background-color: var(--color-sand); }
.timeline { position: relative; max-width: 800px; margin: 50px auto; }
.timeline::after { content: ''; position: absolute; width: 2px; background-color: var(--color-terracotta); top: 0; bottom: 0; left: 50%; margin-left: -1px; }
.timeline-item { padding: 10px 40px; position: relative; background-color: inherit; width: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 20px; height: 20px; right: -10px; background-color: white; border: 4px solid var(--color-terracotta); top: 15px; border-radius: 50%; z-index: 1; }
.left { left: 0; text-align: right; }
.right { left: 50%; }
.right::after { left: -10px; }
.timeline-content h3 { color: var(--color-terracotta); margin-bottom: 5px; }

.footer { background-color: #1a1a1a; color: var(--color-sand); padding: 80px 0; text-align: center; }
.contact-form { max-width: 500px; margin: 40px auto; display: flex; flex-direction: column; gap: 15px; }
input, select { padding: 18px; border: 1px solid rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); color: white; font-family: var(--font-sans); font-size: 1rem; border-radius: 4px; width: 100%; }
input:focus, select:focus { outline: 1px solid var(--color-terracotta); background: rgba(255,255,255,0.1); }
.copyright { font-size: 0.8rem; opacity: 0.5; margin-top: 50px; }

.prop-meta {
    border-top: 1px solid #eee;
    padding-top: 15px;
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: flex-start; 
    gap: 20px; 
}

.feature {
    display: flex;
    align-items: center;
    gap: 6px; 
    color: #555; 
    font-size: 0.95rem;
    font-weight: 500;
}

.feature svg {
    width: 20px;
    height: 20px;
    color: var(--color-teal);
    stroke-width: 1.5; /
}

/* --- CAROUSEL STYLES --- */

/* Контейнер карусели */
.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 260px; /* Высота как у других карточек */
    overflow: hidden;
}

/* Лента с изображениями */
.carousel-track {
    display: flex;
    width: 100%;
    height: 100%;
    overflow-x: auto; /* Разрешаем гориз. прокрутку */
    scroll-snap-type: x mandatory; /* Магнитная прокрутка */
    scroll-behavior: smooth; /* Плавность */
    
    /* Скрываем скроллбар */
    scrollbar-width: none; /* Firefox */
}
.carousel-track::-webkit-scrollbar { 
    display: none; /* Chrome/Safari */
}

/* Изображения внутри карусели */
.carousel-track img {
    flex: 0 0 100%; /* Каждое фото занимает 100% ширины */
    width: 100%;
    height: 100%;
    object-fit: cover;
    scroll-snap-align: start; /* Фото всегда встает ровно по краю */
    
    /* Отключаем старый зум при наведении, чтобы не ломать слайдер */
    transition: none; 
}

/* Кнопки навигации */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 5;
    font-size: 18px;
    color: var(--color-teal);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0; /* Скрыты по умолчанию */
    transition: opacity 0.3s ease, background 0.3s;
}

/* Показываем кнопки только при наведении на фото */
.prop-card:hover .carousel-btn {
    opacity: 1;
}

.carousel-btn:hover {
    background-color: white;
    color: var(--color-terracotta);
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* --- ADAPTIVE / RESPONSIVE --- */

@media (max-width: 992px) {
    .section-title { font-size: 2.5rem; }
    .hero h1 { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    /* 1. FIX MENU BLENDING */
    .hamburger { display: block; }
    
    .nav-menu {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--color-teal);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        border-top: 1px solid rgba(255,255,255,0.1);
    }
    
    .nav-menu.active {
        right: 0;
    }

    /* 2. HERO TYPOGRAPHY & LAYOUT */
    .hero {
        height: auto;
        min-height: 100vh;
        padding-top: 90px;
        padding-bottom: 40px;
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.4rem;
        line-height: 1.15;
        margin-bottom: 15px;
    }
    
    .hero p {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 15px;
        opacity: 0.9;
    }

    /* 3. MOBILE WIDGET (Compact Capsule) */
    .weather-widget {
        position: static;
        margin-top: 35px; /* Spacing below button */
        
        display: inline-flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 15px;
        
        width: auto;
        padding: 8px 20px;
        border-radius: 50px; /* Pill shape */
        background: rgba(0, 0, 0, 0.4);
        border: 1px solid rgba(255, 255, 255, 0.15);
        backdrop-filter: blur(8px);
        transform: none;
    }

    .weather-city {
        font-size: 0.6rem;
        margin-bottom: 2px;
        opacity: 0.7;
    }
    
    .weather-temp {
        font-size: 1rem;
        font-weight: 600;
    }
    
    .widget-divider {
        height: 25px;
        border-right: 1px solid rgba(255,255,255,0.2);
    }

    /* GENERAL FIXES */
    .section-title { font-size: 2rem; }
    .timeline::after { left: 20px; }
    .timeline-item { width: 100%; padding-left: 50px; padding-right: 20px; }
    .right { left: 0; }
    .left { left: 0; text-align: left; }
    .timeline-item::after { left: 10px; }
    .menu-paper { padding: 30px; }
    .menu-item { flex-direction: column; align-items: flex-start; gap: 5px; }
    .menu-desc { text-align: left; max-width: 100%; }
}
@media (min-width: 600px) and (max-width: 900px) {
    .cards-grid .flip-card:nth-child(3) {
        grid-column: 1 / -1; /* Rozciągnij od pierwszej do ostatniej linii */
    }
    
    .prop-grid .prop-card:nth-child(3) {
        grid-column: 1 / -1; /* Rozciągnij od pierwszej do ostatniej linii */
    }
}
/* --- COOKIE BANNER --- */
.cookie-banner {
    position: fixed;
    bottom: -100%; /* Скрыт за пределами экрана */
    left: 0;
    width: 100%;
    background-color: var(--color-teal);
    color: white;
    padding: 20px 0;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    transition: bottom 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.cookie-banner.show {
    bottom: 0; /* Выезжает снизу */
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.cookie-content p {
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
    max-width: 800px;
}

.cookie-content a {
    color: var(--color-sand);
}

.btn-sm {
    padding: 10px 25px;
    font-size: 0.85rem;
    white-space: nowrap;
    background-color: var(--color-terracotta);
    border: none;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

.btn-sm:hover {
    background-color: white;
    color: var(--color-text);
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* --- MODAL POPUP --- */
.modal {
    display: none; /* Скрыто по умолчанию */
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(10, 79, 89, 0.8); /* Затемнение фона (Teal с прозрачностью) */
    backdrop-filter: blur(5px); /* Размытие фона */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.modal-content {
    background-color: #fff;
    margin: auto;
    padding: 40px;
    border: 1px solid #888;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    text-align: center;
    position: relative;
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close-modal {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--color-terracotta);
}

.modal-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.modal-content h3 {
    color: var(--color-teal);
    margin-bottom: 15px;
    line-height: 1.3;
}

.modal-content p {
    color: #666;
    margin-bottom: 10px;
}

.btn-modal-close {
    margin-top: 20px;
    width: 100%;
}