body {
    font-family: "Inter", sans-serif;
    margin: 0;
    padding: 0;
    background: #f9f9f9;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}
.navbar {
    background: #222;
    padding: 1rem 0;
}
.navbar ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin: 0;
    padding: 0;
}
.navbar a {
    color: #eee;
    text-decoration: none;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: background 0.2s;
}
.navbar a.active,
.navbar a:hover {
    background: #10b981;
    color: #fff;
}
.footer {
    background: #222;
    color: #aaa;
    text-align: center;
    padding: 2rem 0 1rem 0;
    margin-top: 3rem;
}
.success {
    background: #d1fae5;
    color: #065f46;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.errors {
    background: #fee2e2;
    color: #991b1b;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}
.join-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}
.join-form label {
    display: flex;
    flex-direction: column;
    font-weight: bold;
}
.join-form input,
.join-form textarea {
    padding: 0.5rem;
    border-radius: 6px;
    border: 1px solid #ccc;
    margin-top: 0.3rem;
}
.join-form button {
    background: #10b981;
    color: #fff;
    border: none;
    padding: 0.7rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}
.join-form button:hover {
    background: #059669;
}

/* Hero and carousel helpers */
.home-hero { position: relative; }
.home-hero-bg-bottom-curve {
    position: absolute;
    left: 0;
    right: 0;
    /* lower the curve so it doesn't cover hero images and make it larger */
    bottom: -60px;
    height: 260px;
    /* Curve mask on the bottom: wider and deeper */
    clip-path: ellipse(120% 140% at 50% 110%);
    background: #ffffff; /* white band under the hero */
    z-index: -1;
    pointer-events: none;
}
.home-hero-slide,
.about-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    z-index: 0;
    transition: opacity 2s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.home-hero-slide.active,
.about-slide.active {
    opacity: 1;
    z-index: 1;
}
.page-hero-banner {
    min-height: 34vh;
}
.page-hero-banner .hero-banner-bg {
    transform: scale(1.02);
    transition: transform 18s ease;
}
.page-hero-banner:hover .hero-banner-bg {
    transform: scale(1.05);
}
.about-hero-carousel {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

/* Smooth cross-fade for about slides */
.about-slide {
    transform: none;
    transition: opacity 2s ease-in-out;
}

.about-slide.active {
    transform: none;
}

/* Hero controls */
.hero-prev,
.hero-next {
    opacity: 0.95;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 9999px;
    opacity: 0.6;
    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}
.hero-dot.active {
    transform: scale(1.15);
    opacity: 1;
    background: white;
}

/* hide manual controls and dots on homepage (requested) */
.hero-prev,
.hero-next,
.hero-dots {
    display: none !important;
}

/* ===== ФУТЕР ===== */

.site-footer {
    background: #1c1917;
    color: #d6d3d1;
    padding: 4rem 0 2rem 0;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-brand {
    align-items: flex-start;
    gap: 1rem;
}

.footer-logo {
    width: 100%;
    max-width: 180px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.footer-logo img {
    max-width: 100%;
    height: auto;
    display: block;
}

.footer-title {
    font-size: 1rem;
    font-weight: 600;
    color: #f5f5f4;
    line-height: 1.5;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.footer-nav-list a {
    color: #d6d3d1;
    text-decoration: none;
    transition: color 0.2s, padding-left 0.2s;
    display: inline-block;
}

.footer-nav-list a:hover {
    color: #10b981;
    padding-left: 0.5rem;
}

.footer-contacts,
.footer-address {
    gap: 0.75rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    color: #d6d3d1;
}

.footer-contact-item i {
    color: #10b981;
    font-size: 1rem;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.footer-contact-item a {
    color: #d6d3d1;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact-item a:hover {
    color: #10b981;
}

.footer-address p {
    margin: 0 0 0.75rem 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-2gis {
    margin-top: 0.25rem;
}

.btn-2gis {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #10b981;
    color: #fff;
    padding: 0.6rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background 0.2s, transform 0.2s;
}

.btn-2gis:hover {
    background: #059669;
    transform: translateY(-2px);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-brand {
        align-items: center;
        text-align: center;
    }
    
    .footer-logo {
        max-width: 150px;
    }
    
    .footer-title {
        font-size: 0.95rem;
    }
    
    .footer-heading {
        font-size: 0.95rem;
    }
}

/* Improve text readability with subtle shadow for contrast on any background */
.home-hero-content h1,
.home-hero-content h1 span {
    color: #fff !important;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 800;
}
.home-hero-content p {
    color: #fff;
    text-shadow:
        0 1px 4px rgba(0, 0, 0, 0.4),
        0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Hero CTA unified */
.hero-cta {
    min-width: 180px;
}

@media (max-width: 768px) {
    .page-hero-banner {
        min-height: 28vh;
    }
}

/* Cards: make them slightly wider by enforcing a min width per card
   so background images can be visible behind them while remaining responsive */
.cards-auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

/* ===== МОБИЛЬНОЕ МЕНЮ ===== */

/* Контейнер мобильного меню */
.mobile-menu {
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: flex;
}

.mobile-menu.active {
    display: flex;
}

/* Затемнение фона */
.mobile-menu-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    z-index: -1;
}

.mobile-menu.active .mobile-menu-overlay {
    background: rgba(0, 0, 0, 0.5);
}

/* Панель меню */
.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 280px;
    max-width: 100%;
    height: 100vh;
    background: white;
    border-left: 1px solid #e7e5e4;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active .mobile-menu-panel {
    transform: translateX(0);
}

/* Ссылки меню */
.mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.25rem;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #57534e;
    border-bottom: 1px solid #f5f5f4;
    transition: all 0.2s ease;
}

.mobile-menu-link:hover {
    background-color: #f5ede4;
    color: #10b981;
}

.mobile-menu-link.active {
    background-color: #f0fdf4;
    color: #10b981;
}

/* Элемент меню с подменю */
.mobile-menu-item {
    border-bottom: 1px solid #f5f5f4;
}

/* Кнопка для открытия подменю */
.mobile-submenu-toggle {
    gap: 0.5rem;
    padding: 1rem 1.25rem;
}

.mobile-submenu-toggle svg {
    transition: transform 0.3s ease;
}

.mobile-submenu-toggle.active svg {
    transform: rotate(180deg);
}

/* Подменю */
.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background-color: #fafaf9;
    display: none;
}

.mobile-submenu.active {
    display: block;
    max-height: 500px;
}

.mobile-submenu-link {
    display: block;
    padding: 0.75rem 1.25rem 0.75rem 2.5rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    text-decoration: none;
    color: #78716f;
    border-bottom: 1px solid #f5f5f4;
    transition: all 0.2s ease;
}

.mobile-submenu-link:hover {
    background-color: #f0fdf4;
    color: #10b981;
}

/* Предотвращение прокрутки страницы при открытом меню */
body.mobile-menu-open {
    overflow: hidden;
}
