/* 
* Основные стили для сайта Церкви МСЦ ЕХБ в г. Хадыженск
*/

/* Сброс стилей и основные настройки */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #7e2811;        /* Бордовый (как кирпичная кладка) */
    --secondary-color: #f5efe0;      /* Светло-бежевый */
    --text-color: #3a2a18;           /* Темно-коричневый */
    --text-light: #ffffff;           /* Белый */
    --accent-color: #5a1d0d;         /* Темно-бордовый */
    --gray-light: #f8f8f8;           /* Светло-серый */
    --gray: #e0e0e0;                 /* Серый */
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);  /* Тень */
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto Slab', serif;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.section {
    padding: 3rem 0;
}

/* Эффект рисующейся линии под заголовками */
.section-title {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
    text-align: center;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    animation: drawLine 1.5s ease-out 0.5s forwards;
}

@keyframes drawLine {
    to { width: 100%; }
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: 'Roboto Slab', serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-text {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
}

.nav-list {
    display: flex;
}

.nav-item {
    margin-left: 1.5rem;
}

.nav-item a {
    font-weight: 600;
}

.nav-item.active a {
    color: var(--accent-color);
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background-color: var(--secondary-color);
    padding: 1rem;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    z-index: 999;
    box-shadow: var(--shadow);
}

.mobile-nav-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray);
}

.mobile-nav-item:last-child {
    border-bottom: none;
}

.mobile-nav-item.active a {
    color: var(--accent-color);
    font-weight: 700;
}

/* Улучшенный баннер для всех размеров экрана */
.hero-section {
    position: relative;
    height: 80vh; /* Увеличиваем высоту для полного отображения церкви */
    min-height: 500px;
    margin-top: 60px; /* Отступ под фиксированным хедером */
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%; /* Смещает фокус изображения выше */
}

.hero-image::before,
.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    width: 25%; /* Ширина полупрозрачных боковых панелей */
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный черный */
}

.hero-image::before {
    left: 0;
}

.hero-image::after {
    right: 0;
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: var(--text-light);
    padding: 2rem 0;
    text-align: center;
}

/* Service Schedule - с эффектом выезжающих карточек */
.service-schedule {
    background-color: #f0e7d5; /* Чуть темнее, чем --secondary-color для контраста */
    padding: 3rem 0;
    text-align: center;
    overflow: hidden; /* Чтобы скрыть выезжающие элементы */
}

.service-times {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    position: relative;
}

/* Анимация для карточек, выезжающих с боков */
@keyframes slideInFromLeft {
    0% {
        transform: translateX(-150%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(150%);
        opacity: 0;
    }
    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Улучшенные стили для карточек с расписанием с эффектом выезда */
.service-time {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Усиленная тень */
    border: 1px solid rgba(126, 40, 17, 0.1); /* Тонкая рамка в цвет церкви */
    opacity: 0; /* Начинаем с невидимости */
}

/* Применяем разные анимации для первой и второй карточек */
.service-time:nth-child(1) {
    animation: slideInFromLeft 1s ease-out 0.5s forwards;
}

.service-time:nth-child(2) {
    animation: slideInFromRight 1s ease-out 0.8s forwards;
}

.service-time h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.service-time p {
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
    color: var(--accent-color);
}

.church-address {
    margin-top: 2rem;
    opacity: 0;
    animation: fadeIn 1s ease-out 1.2s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* CTA Section */
.cta-section {
    padding: 4rem 0;
    background-color: var(--gray-light);
}

.cta-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.cta-item {
    flex: 1;
    min-width: 300px;
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin-top: 1rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button-primary {
    background-color: var(--primary-color);
    color: var(--text-light);
}

.button-primary:hover {
    background-color: var(--accent-color);
    transform: translateY(-3px);
}

.button-secondary {
    background-color: var(--text-light);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.button-secondary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

/* Map Section */
.map-section {
    padding: 3rem 0;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

/* Page Header */
.page-header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 5rem 0 2rem;
    text-align: center;
    margin-top: 60px; /* Отступ под фиксированным хедером */
}

/* Beliefs Content */
.beliefs-content {
    padding: 3rem 0;
}

.belief-items {
    max-width: 800px;
    margin: 0 auto;
}

.belief-item {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--gray);
}

.belief-item:last-child {
    border-bottom: none;
}

.belief-item h2 {
    color: var(--primary-color);
}

/* Gifts Content */
.gifts-content {
    padding: 3rem 0;
}

.gift-intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.1rem;
}

.gift-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 3rem;
}

.gift-item {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gift-image {
    width: 200px;
    height: 280px;
    margin-bottom: 1.5rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gift-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.how-to-get {
    max-width: 800px;
    margin: 3rem auto;
}

.how-to-get h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.step {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.step-number {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: var(--text-light);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-info-box {
    background-color: var(--secondary-color);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contact-info-box h2 {
    margin-bottom: 1.5rem;
}

.contact-info-box p {
    margin-bottom: 1rem;
}

.contact-info-box i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* Модальное окно для визитки/информации */
.modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0; top: 0;
    width: 100%; height: 100%;
    overflow: auto;
    background: rgba(0,0,0,0.5);
    transition: opacity 0.3s;
}
.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-content {
    color: #222 !important; /* Чёрный текст */
    background: #fff;
    margin: auto;
    padding: 2rem 1.5rem 1.5rem 1.5rem;
    border-radius: 14px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    position: relative;
    text-align: center;
    animation: fadeInModal 0.4s;
}
.modal-content a {
    color: #7e2811;
}
@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(40px);}
    to { opacity: 1; transform: translateY(0);}
}
.close {
    position: absolute;
    right: 18px; top: 10px;
    font-size: 2rem;
    color: #888;
    cursor: pointer;
    transition: color 0.2s;
}
.close:hover { color: var(--primary-color); }
.modal-content h2 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}
.modal-content .button {
    margin-top: 1.5rem;
}

/* Галочки для списка в модальном окне */
.truth-list {
    text-align: left;
    margin: 0 auto 1em 1.5em;
    color: #222;
    font-size: 1.1em;
    list-style: none;
    padding-left: 0;
}
.truth-list li {
    position: relative;
    padding-left: 2em;
    margin-bottom: 0.5em;
}
.truth-list li::before {
    content: "✔";
    color: #2ecc40; /* Ярко-зелёная галочка */
    font-size: 1.2em;
    position: absolute;
    left: 0;
    top: 0;
    line-height: 1;
}

/* Стили для подвала - цвет 1 (тот же, что и заголовок) */
.footer {
    background-color: var(--color-1);
    color: white;
    padding: 3rem 0 1rem;
    position: relative;
    z-index: 0;
}

.footer-info h3, .footer-nav h3 {
    color: white;
}

.footer-info p, .footer-info a {
    color: white; /* Делаем весь текст и ссылки белыми */
    text-decoration: none; /* Убираем подчеркивание с ссылок */
}

.footer-info a:hover {
    text-decoration: underline; /* Добавляем подчеркивание при наведении */
}

.footer-nav ul li a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-nav ul li a:hover {
    color: white;
}

.footer-nav ul li a:hover {
    color: var(--secondary-color);
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
}

/* Кнопка "Правда" */
.truth-btn {
    background: #ffd600; /* Ярко-жёлтый */
    color: #7e2811;      /* Ваш бордовый */
    border: none;
    border-radius: 8px;
    padding: 0.6em 1.4em;
    font-size: 1.08em;
    font-weight: bold;
    margin-right: 1.5em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s;
    outline: none;
}
.truth-btn:hover, .truth-btn:focus {
    background: #fff176; /* светло-жёлтый при наведении */
    color: #5a1d0d;      /* чуть темнее бордовый */
}
@media (max-width: 900px) {
    .truth-btn {
        font-size: 1em;
        padding: 0.5em 1em;
        margin-right: 0.7em;
    }
}

/* Media Queries */
@media (max-width: 1600px) {
    .hero-image img {
        object-fit: cover; /* На меньших экранах возвращаемся к cover */
        width: 100%;
    }
    
    .hero-image::before,
    .hero-image::after {
        display: none; /* Убираем боковые затемнения на экранах меньше 1600px */
    }
}

@media (max-width: 992px) {
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .hero-section {
        height: 60vh;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .mobile-menu.active {
        display: block;
    }
    
    .hero-section {
        height: 40vh;
        min-height: 300px;
    }
    
    .service-time {
        min-width: 100%;
    }
    
    .step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
}

@media (max-width: 576px) {
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
    
    .hero-section {
        height: 35vh;
        min-height: 250px;
    }
    
    .cta-item {
        min-width: 100%;
    }
    
    .gift-item {
        min-width: 100%;
    }
}