/* Основные стили */
:root {
    --header-color: #1e5631;       /* Темно-зеленый для хедера */
    --primary-color: #2e8b57;      /* Основной зеленый */
    --secondary-color: #4caf50;    /* Ярко-зеленый */
    --accent-color: #388e3c;       /* Акцентный зеленый */
    --projects-bg: #a5d6a7;        /* Светло-зеленый фон для проектов */
    --text-color: #263238;         /* Темно-серый для текста */
    --light-text: #ffffff;         /* Белый */
    --bg-color: #e8f5e9;           /* Очень светлый зеленый фон */
    --card-bg: #ffffff;            /* Белый для карточек */
    --border-color: #c8e6c9;       /* Светло-зеленая граница */
    --shadow-color: rgba(46, 125, 50, 0.2);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

.container {
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 2rem;
    position: relative;
    text-align: center;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--header-color);
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

.header__inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo img {
    height:30px;
    transition: transform 0.3s;
}

.header__logo:hover img {
    transform: scale(1.05);
}

.header__nav {
    display: flex;
    gap: 30px;
}

.nav__link {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 600;
    transition: all 0.3s;
    position: relative;
}

.nav__link:hover {
    color: #a5d6a7;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--light-text);
    transition: width 0.3s;
}

.nav__link:hover::after {
    width: 100%;
}

.header__phone a {
    text-decoration: none;
    color: var(--light-text);
    font-weight: 700;
    transition: color 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header__phone a:hover {
    color: #a5d6a7;
}

/* Burger Menu */
.burger-btn {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

.burger-btn span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--light-text);
    margin: 5px 0;
    transition: all 0.3s;
}

/* Main Section */
.main-section {
    position: relative;
    background: url('i/bg1.jpg') no-repeat center center/cover;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--light-text);
    padding: 100px 0;
    margin-top: 80px;
}

.main-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    line-height: 1.2;
}

.main-subtitle {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 3rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Features Section */
.features-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 50px auto 0;
    max-width: 1200px;
    background: transparent;
}

.feature-card {
    flex: 1 1 300px;
    background: transparent;
    padding: 0;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-img {
    max-width: 100%;
    height: auto;
    margin-bottom: 20px;
    object-fit: contain;
}

.feature-caption {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--light-text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* About Section */
.about-section {
    background: var(--bg-color);
}

.about-container {
    display: flex;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px var(--shadow-color);
}

.about-text {
    flex: 1;
    padding: 50px;
}

.about-description p {
    margin-bottom: 20px;
    text-align: justify;
}

.about-map {
    flex: 1;
    min-height: 600px;
}

/* Village Section */
.village {
    text-align: center;
    background: var(--card-bg);
    padding: 60px 0;
}

.plan-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

/* Documents Section */
.docs-section {
    background: var(--bg-color);
}

.docs-container {
    max-width: 900px;
    margin: 0 auto;
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.doc-item {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 25px 15px;
    box-shadow: 0 3px 15px var(--shadow-color);
    transition: all 0.3s;
    text-align: center;
    border: 1px solid var(--border-color);
}

.doc-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    border-radius: 50%;
    color: var(--light-text);
    font-size: 24px;
}

.doc-name {
    font-weight: 500;
    color: var(--text-color);
    transition: color 0.3s;
}

.doc-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-color);
    border-color: var(--primary-color);
}

.doc-item:hover .doc-name {
    color: var(--primary-color);
}

/* Projects Section */
.projects-section {
    background: var(--projects-bg);
    padding: 100px 0;
    text-align: center;
}

.projects-row {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 80px;
    margin-top: 60px;
    flex-wrap: wrap;
}

.project-card {
    display: flex;
    flex-direction: column;
    max-width: 350px;
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px var(--shadow-color);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-10px);
}

.project-image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.project-card:hover .project-image {
    transform: scale(1.05);
}

.project-title {
    font-size: 1.5rem;
    color: var(--text-color);
    margin: 20px 0 10px;
    padding: 0 20px;
    line-height: 1.4;
    font-weight: 600;
}

.project-description {
    color: var(--text-color);
    padding: 0 20px 25px;
    font-size: 1rem;
    line-height: 1.5;
    margin-top: 0;
}

/* Contacts Section */
.contacts-section {
    background: var(--card-bg);
}

.contacts-content {
    display: flex;
    gap: 50px;
    margin-top: 50px;
}

.contacts-list {
    flex: 1;
    list-style: none;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    font-size: 1.1rem;
}

.contact-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--light-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
}

.map-container {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .about-container {
        flex-direction: column;
    }
    
    .about-map {
        min-height: 500px;
    }
}

@media (max-width: 992px) {
    .header__nav {
        gap: 20px;
    }
    
    .main-title {
        font-size: 3rem;
    }
    
    .contacts-content {
        flex-direction: column;
    }
    
    .map-container {
        margin-top: 30px;
    }
    
    .projects-row {
        gap: 50px;
    }
    
    .project-image-container {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .header__nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: var(--header-color);
        flex-direction: column;
        align-items: center;
        padding: 20px 0;
        gap: 15px;
        transform: translateY(-150%);
        transition: transform 0.3s;
    }
    
    .header__nav.active {
        transform: translateY(0);
    }
    
    .burger-btn {
        display: block;
    }
    
    .burger-btn.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .burger-btn.active span:nth-child(2) {
        opacity: 0;
    }
    
    .burger-btn.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .main-title {
        font-size: 2.5rem;
    }
    
    .docs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projects-row {
        flex-direction: column;
        align-items: center;
        gap: 60px;
        margin-top: 40px;
    }
    
    .project-card {
        max-width: 100%;
        width: 100%;
    }
    
    .project-image-container {
        height: 250px;
    }
}

@media (max-width: 576px) {
    .main-title {
        font-size: 2rem;
    }
    
    .main-subtitle {
        font-size: 1.2rem;
    }
    
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .project-image-container {
        height: 180px;
    }
    
    .project-title {
        font-size: 1.3rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
}


      /*PLAN CSS*/
        .m_plan {
            background: #E3ffB2;
            padding: 20px;
            border-radius: 8px;
            margin: 20px auto;
            max-width: 1200px;
        }

        .karta {
            padding-top: 6px;
            position: relative;
        }

        .plan_b {
            position: relative;
            display: inline-block;
            line-height: 0;
        }

        #planimage {
            max-width: 100%;
            height: auto;
            display: block;
        }

        #svgelem {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
        }

        .pol {
            opacity: 0.5;
            transition: opacity 0.2s;
            cursor: pointer;
        }

        .pol:hover {
            opacity: 0.3;
            border: 1px solid red;
        }

        #podskazka {
            display: none;
            position: absolute;
            background: white;
            padding: 12px;
            border: 1px solid #ddd;
            border-radius: 4px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.15);
            z-index: 1000;
            max-width: 280px;
            pointer-events: none;
            font-family: Arial, sans-serif;
            font-size: 14px;
            line-height: 1.5;
        }

        @media (max-width: 768px) {
            .pol {
                opacity: 0.3;
                touch-action: manipulation;
            }
            
            #podskazka {
                font-size: 16px;
                max-width: 90%;
            }
        }
        /*END PLAN CSS*/



            /* ----- Оверлей (затемнение) ----- */
    .overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.65);
      backdrop-filter: blur(4px);
      display: none; /* скрыт по умолчанию */
      align-items: center;
      justify-content: center;
      z-index: 9999;
      animation: fadeIn 0.3s ease-out;
    }

    .overlay.active {
      display: flex;
    }

    @keyframes fadeIn {
      from {
        opacity: 0;
      }
      to {
        opacity: 1;
      }
    }

    /* ----- Сам попап ----- */
    .popup {
      position: relative;
      background: linear-gradient(145deg, #fbf7f0 0%, #ede6da 100%);
      border-radius: 32px;
      padding: 2.5rem 2.8rem;
      max-width: 560px;
      width: 90%;
      box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 0 2px #b8a58b inset;
      text-align: center;
      animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
      border: 6px solid #dac09a;
    }

    @keyframes slideUp {
      from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
      }
      to {
        opacity: 1;
        transform: translateY(0) scale(1);
      }
    }

    /* Декоративная линия сверху */
    .popup::before {
      content: '';
      position: absolute;
      top: -4px;
      left: 20%;
      right: 20%;
      height: 8px;
      background: linear-gradient(90deg, transparent, #b8863a, #d4a55a, #b8863a, transparent);
      border-radius: 4px;
    }

    /* Кнопка закрытия (крестик) */
    .popup-close {
      position: absolute;
      top: 16px;
      right: 20px;
      background: none;
      border: none;
      font-size: 2.2rem;
      line-height: 1;
      color: #7a5d3c;
      cursor: pointer;
      padding: 0 6px;
      transition: transform 0.2s, color 0.2s;
      font-weight: 300;
    }

    .popup-close:hover {
      transform: rotate(90deg);
      color: #b35f3a;
    }

    /* Текст попапа */
    .popup-title {
      font-size: 3.2rem;
      font-weight: 900;
      text-transform: uppercase;
      letter-spacing: 4px;
      color: #b35f2a;
      text-shadow: 2px 2px 0 rgba(180, 100, 30, 0.2);
      margin-bottom: 0.4rem;
      font-family: 'Impact', 'Arial Black', sans-serif;
    }

    .popup-title span {
      display: inline-block;
      background: linear-gradient(180deg, #d48c3a, #a5661e);
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      background-clip: text;
    }

    .popup-sub {
      font-size: 1.4rem;
      font-weight: 500;
      color: #3e2c1b;
      margin: 0.8rem 0 0.2rem;
      letter-spacing: 1px;
    }

    .popup-price {
      font-size: 3.6rem;
      font-weight: 800;
      color: #1f5a2a;
      background: rgba(46, 125, 50, 0.10);
      padding: 0.2rem 1rem;
      border-radius: 60px;
      display: inline-block;
      margin: 0.6rem 0 0.2rem;
      border: 2px dashed #2e7d32;
      line-height: 1.3;
    }

    .popup-price small {
      font-size: 1.8rem;
      font-weight: 600;
      color: #2e5a2b;
    }

    .popup-footnote {
      font-size: 0.95rem;
      color: #6b5a45;
      margin-top: 1.2rem;
      border-top: 1px solid #dac09a;
      padding-top: 1rem;
      letter-spacing: 0.5px;
    }

    .popup-footnote i {
      font-style: normal;
      background: #b8863a;
      color: #fff;
      padding: 0 12px;
      border-radius: 20px;
      font-size: 0.8rem;
      display: inline-block;
      line-height: 1.8;
    }

    /* Кнопка закрытия (альтернативная) – на случай, если крестик не нажмут */
    .popup-btn-close {
      margin-top: 1.5rem;
      background: #7a5d3c;
      color: #f5f0e8;
      border: none;
      padding: 0.7rem 2.2rem;
      border-radius: 60px;
      font-size: 1.1rem;
      font-weight: 600;
      cursor: pointer;
      transition: background 0.2s, transform 0.15s;
      letter-spacing: 1px;
      box-shadow: 0 4px 0 #4d3822;
    }

    .popup-btn-close:hover {
      background: #5d4037;
      transform: translateY(-2px);
      box-shadow: 0 6px 0 #4d3822;
    }

    .popup-btn-close:active {
      transform: translateY(2px);
      box-shadow: 0 2px 0 #4d3822;
    }

    /* ----- Адаптив для мобильных ----- */
    @media (max-width: 600px) {
      .popup {
        padding: 2rem 1.5rem;
        border-radius: 24px;
        width: 92%;
        max-width: 400px;
      }

      .popup-title {
        font-size: 2.6rem;
        letter-spacing: 2px;
      }

      .popup-sub {
        font-size: 1.2rem;
      }

      .popup-price {
        font-size: 2.8rem;
        padding: 0.2rem 0.8rem;
      }

      .popup-price small {
        font-size: 1.4rem;
      }

      .popup-close {
        top: 12px;
        right: 16px;
        font-size: 1.8rem;
      }

      .popup-btn-close {
        font-size: 1rem;
        padding: 0.6rem 1.8rem;
      }

      .popup-footnote {
        font-size: 0.85rem;
      }
    }

    @media (max-width: 380px) {
      .popup-title {
        font-size: 2.2rem;
      }
      .popup-price {
        font-size: 2.4rem;
      }
      .popup-sub {
        font-size: 1rem;
      }
    }