body {
    font-family: 'Inter', sans-serif;
    background-color: #F8F9FA; /* Off-White / Alabaster */
    color: #1B2A2C; /* Dark Grey for readability */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.text-accent { color: #34D399; }
.bg-accent { background-color: #34D399; }
.prose { max-width: 90ch; color: #1B2A2C; }
.prose h1 { font-size: 2.5rem; font-weight: 900; line-height: 1.2; margin-bottom: 1rem; color: #1B2A2C; letter-spacing: -0.02em; }
.prose h2 { font-size: 2rem; font-weight: 800; margin-top: 4rem; margin-bottom: 0.4rem; padding-bottom: 0.75rem; border-bottom: 3px solid #34D399; line-height: 1.3; color: #1B2A2C; letter-spacing: -0.01em; }
.prose h3 { font-size: 1.25rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 0.5rem; color: #1B2A2C; }
.prose .list-header {
    margin-top: 1.8rem;
    margin-bottom: -0.5rem;
    font-weight: 700;
    color: #1B2A2C;
}
.prose p { font-size: 1.125rem; line-height: 1.6; color: #4A5568; margin-top: 0.6em; margin-bottom: 1.25em; }
.prose p small { line-height: 1.2; }
.prose ul { list-style: none; padding-left: 1em; margin-top: 0.75em; margin-bottom: 1.5em; }
.prose li { font-size: 1.125rem; line-height: 1.6; color: #4A5568; margin-top: 0.4em; margin-bottom: 0.4em; padding-left: 1.5em; position: relative; }
.prose li::before { content: '•'; color: #34D399; font-weight: 900; position: absolute; left: 0; top: 0.1em; font-size: 1.5em; line-height: 1; }
.image-container { margin: 3rem 0; text-align: center; }
.image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 1rem; /* iOS style rounded corners */
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08); /* Soft shadow */
    display: block;
    margin-left: auto;
    margin-right: auto;
}
@media (min-width: 768px) {
    .image-container img {
        border-radius: 1.5rem;
    }
}
.image-caption { margin-top: 1.5rem; font-size: 0.875rem; color: #718096; }
.contact-card {
    background-color: white;
    border-radius: 1rem;
    padding: 3rem;
    margin-top: 4rem;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0,0,0,0.02);
}
@media (min-width: 768px) {
    .contact-card {
        border-radius: 2rem;
    }
}
/* Убираем стандартный маркер для <details> */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
.prose table { width: 100%; border-collapse: collapse; margin-top: 2em; margin-bottom: 2em; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.75rem 1rem; text-align: left; }
.prose th { background-color: #f3f4f6; font-weight: 600; }
.prose tbody tr:nth-child(odd) { background-color: #ffffff; }
.prose tbody tr:nth-child(even) { background-color: #f9fafb; }

.prose a {
    color: #059669; /* emerald-600 */
    text-decoration: underline;
    text-decoration-color: rgba(5, 150, 105, 0.3);
    transition: all 0.2s ease;
}
.prose a:hover {
    color: #047857; /* emerald-700 */
    text-decoration-color: rgba(4, 120, 87, 0.8);
}

/* Modern Glass Buttons */
.btn-glass {
    position: relative;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-glass-accent {
    background: linear-gradient(135deg, rgba(52, 211, 153, 0.9), rgba(16, 185, 129, 0.9));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.2),
        0 4px 6px -1px rgba(16, 185, 129, 0.2),
        0 2px 4px -1px rgba(16, 185, 129, 0.1);
}

.btn-glass-accent:hover {
    background: linear-gradient(135deg, rgba(52, 211, 153, 1), rgba(16, 185, 129, 1));
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.3),
        0 10px 15px -3px rgba(16, 185, 129, 0.3),
        0 4px 6px -2px rgba(16, 185, 129, 0.1);
}

.btn-glass-dark {
    background: linear-gradient(135deg, rgba(31, 41, 55, 0.9), rgba(17, 24, 39, 0.9));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.1),
        0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-glass-dark:hover {
    background: linear-gradient(135deg, rgba(31, 41, 55, 1), rgba(17, 24, 39, 1));
    transform: translateY(-1px);
    box-shadow:
        inset 0 1px 0 0 rgba(255, 255, 255, 0.15),
        0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Gradient Section Background */
.bg-gradient-glass {
    background: linear-gradient(145deg, #ffffff 0%, #f0fdf4 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 20px 40px -10px rgba(16, 185, 129, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
}
.prose strong {
    font-weight: 700;
}

/* Контейнер для видео и скриншота */
.media-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    align-items: center; /* Центрируем дочерние элементы на мобильных */
}

@media (min-width: 768px) {
    .media-container {
        flex-direction: row;
        align-items: stretch; /* Выравниваем элементы по высоте */
    }
}

.video-wrapper {
    flex: 1;
    min-width: 0; /* Для корректной работы flexbox с элементами, которые могут переполняться */
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.25);
}


.screenshot-wrapper {
    flex-shrink: 0; /* Запрещаем сжатие блока со скриншотом */
    width: 300px; /* Фиксированная ширина для скриншота, можно будет адаптировать */
    position: relative;
    overflow: hidden;
    border-radius: 1rem; /* Увеличиваем скругление углов */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}
@media (min-width: 768px) {
    .screenshot-wrapper {
        border-radius: 2rem;
    }
}

.screenshot-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Изображение будет покрывать всю область, сохраняя пропорции */
    transition: transform 0.3s ease-in-out;
}

.screenshot-wrapper:hover img {
    transform: scale(1.05); /* Эффект приближения при наведении */
}

.screenshot-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 4rem); /* Делаем плашку уже */
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.25); /* Полупрозрачный белый фон */
    backdrop-filter: blur(10px); /* Эффект размытия */
    -webkit-backdrop-filter: blur(10px); /* Для поддержки Safari */
    border: 1px solid rgba(255, 255, 255, 0.3); /* Тонкая белая рамка */
    border-radius: 0.5rem; /* Скругленные углы */
    text-align: center;
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    transition: background-color 0.3s ease;
}

.screenshot-wrapper:hover .screenshot-overlay {
    background-color: rgba(255, 255, 255, 0.4);
}

/* Стили для интерактивных изображений с зумом и лайтбоксом */
.image-zoom-wrapper {
    overflow: hidden; /* Обрезаем все, что выходит за рамки */
    border-radius: 0.5rem; /* Скругляем углы как у изображения */
    cursor: pointer;
    display: block;
}

.image-zoom-wrapper img {
    transition: transform 0.3s ease-in-out;
}

.image-zoom-wrapper:hover img {
    transform: scale(1.05); /* Эффект приближения */
}

/* Стили для лайтбокса (модальное окно) */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    overflow: hidden; /* Добавим, чтобы предотвратить прокрутку страницы за лайтбоксом */
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    /* Удаляем max-width и max-height, чтобы изображение могло быть больше экрана */
    display: flex; /* Используем flex для центрирования */
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.lightbox-content img {
    /* Удаляем object-fit, width и height, чтобы управлять через transform */
    cursor: grab; /* Курсор для перетаскивания */
    transition: transform 0.2s ease-out; /* Плавный переход для transform */
    max-width: none; /* Сбрасываем ограничение */
    max-height: none; /* Сбрасываем ограничение */
}

.lightbox-content img.panning {
    cursor: grabbing; /* Курсор во время перетаскивания */
}

.lightbox-close {
    position: absolute;
    top: 1rem; /* Располагаем ближе к краю */
    right: 1.5rem; /* Располагаем ближе к краю */
    color: white;
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    z-index: 1010; /* Убедимся, что кнопка поверх изображения */
}