/* Основные стили для лендинга аренды домика А-Фрейм */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    max-width: 100%;
    width: 100%;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Hero блок */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    object-fit: cover;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    background: rgba(0, 0, 0, 0.4);
    padding: 20px;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* Секции контента */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.content-block {
    margin-bottom: 3rem;
}

.content-block h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #34495e;
}

.content-block p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

.content-block ul {
    list-style: none;
    padding-left: 0;
}

.content-block li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.content-block li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Убираем галочку перед элементами с подзаголовками (когда strong является первым элементом) */
.content-block li:has(> strong:first-child):before {
    display: none;
}

/* Для подзаголовков оставляем небольшой отступ слева вместо галочки */
.content-block li:has(> strong:first-child) {
    padding-left: 0.5rem;
}

.content-block ul li {
    color: inherit;
}

/* Многоколоночные списки для десктопов */
.content-block .multi-column-list {
    column-count: 2;
    column-gap: 30px;
    column-rule: none;
}

.content-block .multi-column-list li {
    break-inside: avoid;
    page-break-inside: avoid;
    margin-bottom: 0.5rem;
}

/* Вложенные списки не должны быть многоколоночными */
.content-block .multi-column-list ul {
    column-count: 1;
    margin-top: 0.5rem;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .content-block .multi-column-list {
        column-count: 1;
    }
}

/* Галерея */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
}

/* Модуль бронирования */
.booking-section {
    background: #f8f9fa;
    padding: 60px 20px;
    border-radius: 10px;
    margin: 40px 0;
}

.booking-form {
    max-width: 800px;
    margin: 0 auto;
}

.calendar-container {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    justify-content: center;
}

.calendar-month {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 12px;
    color: #2c3e50;
    padding: 0 5px;
}

.calendar-header span {
    flex: 1;
}

.calendar-nav-btn {
    transition: transform 0.2s, color 0.2s;
}

.calendar-nav-btn:hover {
    transform: scale(1.2);
    color: #2980b9 !important;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}

.calendar-day-name {
    text-align: center;
    font-weight: bold;
    padding: 8px 4px;
    color: #7f8c8d;
    font-size: 0.85rem;
}

.calendar-day {
    text-align: center;
    padding: 8px 4px;
    border-radius: 4px;
    transition: background 0.2s;
    font-size: 0.9rem;
    min-height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-day:hover:not(.disabled):not(.blocked) {
    background: #ecf0f1;
}

.calendar-day.disabled {
    color: #bdc3c7;
}

.calendar-day.today {
    border: 2px solid #3498db !important;
    font-weight: bold;
    box-sizing: border-box;
}

.calendar-day.today.disabled {
    border-color: #3498db !important;
}

.calendar-day.blocked {
    background: #95a5a6;
    color: white;
    cursor: pointer;
}

.calendar-day.selected {
    background: #3498db;
    color: white;
}

.calendar-day.in-range {
    background: #3498db;
    color: white;
    opacity: 0.7;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.booking-summary {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    border: 2px solid #3498db;
}

.booking-summary h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ecf0f1;
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: bold;
    color: #27ae60;
    border-bottom: none;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 2px solid #27ae60;
}

.btn {
    padding: 14px 30px;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-primary:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
}

.btn-block {
    width: 100%;
}

.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: white;
    font-size: 1.2rem;
}

.error-message {
    background: #e74c3c;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
}

/* Блок контактов */
.contact-section {
    background: #2c3e50;
    color: white;
    padding: 80px 0;
    width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

.contact-content {
    display: flex;
    flex-direction: row;
    gap: 50px;
    margin-top: 40px;
    width: 100%;
    box-sizing: border-box;
}

.contact-left,
.contact-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-info {
    width: 100%;
}

.contact-info h3 {
    margin-bottom: 20px;
    margin-top: 30px;
    font-size: 1.5rem;
}

.contact-info h3:first-child {
    margin-top: 0;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.contact-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    color: #333;
}

.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s;
}

.contact-form textarea:focus {
    outline: none;
    border-color: #3498db;
}

.success-message {
    background: #27ae60;
    color: white;
    padding: 15px;
    border-radius: 6px;
    margin-top: 20px;
    text-align: center;
}

.map-container {
    width: 100%;
    max-width: 100%;
    height: 400px;
    min-height: 300px;
    margin-top: 30px;
    border-radius: 8px;
    overflow: hidden;
    box-sizing: border-box;
    position: relative;
}

/* Футер */
/* FAQ блок */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.3s;
}

.faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.faq-question {
    padding: 20px 25px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.05rem;
    color: #2c3e50;
    transition: background-color 0.3s;
    user-select: none;
}

.faq-question:hover {
    background-color: #f8f9fa;
}

.faq-icon {
    font-size: 0.9rem;
    color: #3498db;
    transition: transform 0.3s;
    flex-shrink: 0;
    margin-left: 15px;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    padding: 0 25px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 25px 20px 25px;
}

.faq-answer p {
    color: #555;
    line-height: 1.7;
    margin: 0;
}

/* Адаптивность для FAQ */
@media (max-width: 768px) {
    .faq-question {
        padding: 15px 18px;
        font-size: 0.95rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 0 18px 15px 18px;
    }
    
    .faq-answer {
        padding: 0 18px;
    }
}

.footer {
    background: #34495e;
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-links {
    margin-bottom: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    margin: 0 15px;
}

.footer-links a:hover {
    text-decoration: underline;
}

.footer-info {
    font-size: 0.9rem;
    opacity: 0.8;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
}

/* Подсказка выбора даты */
#date-selection-hint {
    text-align: center;
    font-size: 0.95rem;
    font-weight: 500;
    font-style: italic;
    color: #5a6c7d;
    margin-bottom: 20px;
    padding: 12px 20px;
    background: #f0f4f8;
    border-left: 3px solid #3498db;
    border-radius: 6px;
    box-shadow: none;
    letter-spacing: 0.3px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    position: relative;
}

#date-selection-hint::before {
    content: "💡";
    margin-right: 8px;
    font-style: normal;
}

/* Адаптивность */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .calendar-container {
        flex-direction: column;
    }
    
    .calendar-month {
        min-width: 100%;
        padding: 10px;
    }
    
    .calendar-header {
        font-size: 1rem;
        margin-bottom: 10px;
        padding: 0;
    }
    
    .calendar-grid {
        gap: 2px;
    }
    
    .calendar-day-name {
        padding: 6px 2px;
        font-size: 0.75rem;
    }
    
    .calendar-day {
        padding: 6px 2px;
        font-size: 0.85rem;
        min-height: 32px;
    }
    
    .calendar-nav-btn {
        font-size: 1.2rem !important;
        padding: 2px 8px !important;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        padding: 40px 0;
    }
    
    .contact-section .container {
        padding: 0 10px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-section {
        overflow-x: hidden;
    }
    
    .contact-content {
        flex-direction: column;
        gap: 30px;
        padding: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-left,
    .contact-right {
        width: 100%;
        max-width: 100%;
    }
    
    .contact-info {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .contact-form {
        width: 100%;
        max-width: 100%;
        padding: 20px;
        box-sizing: border-box;
        margin: 0;
    }
    
    .map-container {
        width: 100%;
        max-width: 100%;
        height: auto;
        min-height: 300px;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
        padding: 0;
    }
    
    #map {
        width: 100% !important;
        max-width: 100% !important;
        height: 300px !important;
        min-height: 300px !important;
        box-sizing: border-box;
        overflow: hidden;
    }
    
    .contact-form input,
    .contact-form textarea {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .gallery {
        grid-template-columns: 1fr;
    }
}

