:root {
    --primary-color: #0057B8; /* UA Blue */
    --primary-dark: #004494;
    --accent-color: #FFD700; /* UA Yellow/Gold */
    --text-dark: #2c3e50;
    --text-light: #5f6c7b;
    --bg-light: #f8faff;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 87, 184, 0.15);
    --shadow-hover: 0 15px 35px rgba(0, 87, 184, 0.25);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --radius: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: 'Open Sans', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}

/* FIX GOOGLE TRANSLATE BANNER */
body { top: 0 !important; }
.goog-te-banner-frame { display: none !important; }
.goog-tooltip { display: none !important; }
.goog-te-gadget-icon { display: none !important; }

h1, h2, h3, h4 { font-family: 'Merriweather', serif; color: var(--text-dark); margin-bottom: 1rem; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 100px 0; position: relative; }
.bg-light { background-color: var(--bg-light); }
.bg-pattern { background-color: #fff; background-image: radial-gradient(#e1e8f0 1px, transparent 1px); background-size: 20px 20px; }

.section-title {
    text-align: center; font-size: 2.5rem; margin-bottom: 4rem; position: relative;
    font-weight: 700;
}
.section-title::after {
    content: ''; position: absolute; bottom: -15px; left: 50%; transform: translateX(-50%);
    width: 80px; height: 4px; background: var(--accent-color);
    border-radius: 2px;
}

/* --- ANIMATIONS --- */
.reveal, .reveal-left, .reveal-right, .reveal-up {
    opacity: 0;
    transition: all 1s ease;
}
.reveal { transform: translateY(30px); }
.reveal-left { transform: translateX(-50px); }
.reveal-right { transform: translateX(50px); }
.reveal-up { transform: translateY(50px); }

.active.reveal, .active.reveal-left, .active.reveal-right, .active.reveal-up {
    opacity: 1; transform: translate(0);
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

/* --- HEADER --- */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.05);
    position: fixed; width: 100%; top: 0; z-index: 1000;
    transition: var(--transition);
}
.header.scrolled { padding: 5px 0; box-shadow: 0 5px 20px rgba(0,0,0,0.1); }

.header-container { display: flex; justify-content: space-between; align-items: center; height: 80px; }

.logo { display: flex; align-items: center; }
.logo-img { 
    height: 65px; 
    width: auto; 
    border-radius: 50%; 
    transition: transform 0.3s ease;
}
.logo:hover .logo-img { transform: scale(1.05); }

.nav-list { display: flex; gap: 30px; align-items: center; }
.nav-link {
    font-weight: 600; font-size: 0.95rem; position: relative; color: var(--text-dark);
}
.nav-link::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: -5px; left: 0;
    background-color: var(--primary-color); transition: var(--transition);
}
.nav-link:hover { color: var(--primary-color); }
.nav-link:hover::after { width: 100%; }

/* --- LANGUAGE SWITCH STYLES --- */
.lang-switch-li {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-left: 15px;
    background: #f0f4f8;
    padding: 5px 12px;
    border-radius: 20px;
}
.lang-btn {
    font-weight: 700;
    font-size: 0.9rem;
    color: #8898aa;
    cursor: pointer;
    transition: var(--transition);
}
.lang-btn:hover { color: var(--primary-color); }
.lang-btn.active-lang { color: var(--primary-color); }
.lang-sep { color: #cbd5e0; font-size: 0.9rem; }

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: url('img/Kirche.jpg') no-repeat center center/cover;
    background-attachment: fixed;
    position: relative;
    display: flex; align-items: center; justify-content: center; text-align: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.35); 
}

.hero-content {
    position: relative; z-index: 2; max-width: 900px; padding: 20px;
}

.hero-text-box {
    padding: 40px;
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    margin-bottom: 30px;
}

.sub-title {
    display: block; font-size: 1.1rem; margin-bottom: 15px; 
    font-weight: 600; letter-spacing: 3px; text-transform: uppercase; 
    color: var(--accent-color);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero h1 {
    font-size: 3.8rem; 
    color: var(--white); 
    margin-bottom: 20px; 
    font-weight: 900;
    text-shadow: 0 4px 15px rgba(0,0,0,0.4);
    line-height: 1.2;
}

.hero .divider {
    height: 3px;
    width: 100px;
    background: var(--accent-color);
    margin: 20px auto;
    border-radius: 2px;
}

.hero p {
    font-size: 1.3rem; margin-bottom: 0; color: #fff;
    font-weight: 400; text-shadow: 0 2px 5px rgba(0,0,0,0.5);
}

.hero-buttons {
    display: flex; gap: 15px; justify-content: center; flex-wrap: wrap;
}

.btn {
    display: inline-block; padding: 16px 40px; border-radius: 50px; font-weight: 600;
    transition: var(--transition); margin: 5px; cursor: pointer; border: none; font-size: 1rem;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}
.btn-primary {
    background: var(--primary-color); color: var(--white);
    background-image: linear-gradient(120deg, transparent 0%, transparent 50%, rgba(255,255,255,0.2) 50%);
    background-size: 220%;
}
.btn-primary:hover { background-position: 100%; transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,87,184,0.4); }
.btn-outline { background: rgba(255,255,255,0.1); backdrop-filter: blur(4px); color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary-color); transform: translateY(-3px); }

/* NEW BUTTON STYLE FOR NEWS */
.btn-outline-dark {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}
.btn-outline-dark:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
}

/* --- SCHEDULE --- */
.schedule-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 40px; }
.schedule-card {
    background: var(--white); padding: 40px; border-radius: var(--radius);
    box-shadow: var(--shadow); position: relative; overflow: hidden;
    border-top: 5px solid var(--primary-color);
    display: flex; flex-direction: column;
}
.schedule-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.card-icon {
    font-size: 2rem; color: var(--primary-color); margin-bottom: 20px;
    background: #eef4fc; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; border-radius: 50%;
}
.time-list li {
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px 0; border-bottom: 1px dashed #eee;
}
.time-list li:last-child { border-bottom: none; }
.time { font-weight: 700; color: var(--primary-color); min-width: 60px; font-size: 1.1rem; }
.event { text-align: right; }

.schedule-note-box {
    margin-top: 20px; padding-top: 20px; border-top: 2px solid #f0f0f0;
    display: flex; align-items: flex-start; gap: 10px; color: var(--text-dark);
}
.schedule-note-box i { color: var(--accent-color); font-size: 1.2rem; margin-top: 4px; }

.special-announcement {
    background: #fff9e6; border-left: 5px solid var(--accent-color);
    padding: 25px; margin-top: 40px; border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* --- CARDS (News & Community) --- */
.cards-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card {
    background: var(--white); border-radius: var(--radius); overflow: hidden;
    box-shadow: var(--shadow); transition: var(--transition); display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }

.card-img-container {
    height: 220px; width: 100%; display: flex; align-items: center; justify-content: center;
    background-color: #eee; position: relative; overflow: hidden;
}
.card-photo { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.card:hover .card-photo { transform: scale(1.05); }

.icon-bg-blue { background-color: #e3f2fd; }
.icon-bg-orange { background-color: #fff3e0; }
.icon-bg-green { background-color: #e8f5e9; }
.icon-bg-gray { background-color: #f1f5f9; }
.card-placeholder-icon { font-size: 4rem; opacity: 0.8; color: var(--primary-color); }
.icon-bg-orange i { color: #e65100; } .icon-bg-green i { color: #2e7d32; }

.card-content { padding: 30px; flex-grow: 1; display: flex; flex-direction: column; }
.card-content h3 { font-size: 1.3rem; margin: 10px 0; line-height: 1.4; }
.news-date { font-size: 0.8rem; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.card-content p { color: var(--text-light); flex-grow: 1; margin-bottom: 20px; }

.read-more {
    background: none; border: none; color: var(--primary-color); font-weight: 700; cursor: pointer;
    display: inline-flex; align-items: center; gap: 5px; font-size: 0.95rem; transition: var(--transition);
}
.read-more:hover { gap: 10px; color: var(--primary-dark); }

/* --- ARCHIVE PAGE STYLES --- */
.archive-header {
    margin-top: 80px; /* offset for fixed header */
    background: var(--bg-light);
    padding: 60px 0;
    text-align: center;
    border-bottom: 1px solid #e1e8f0;
}
.archive-title { font-size: 2.5rem; margin-bottom: 10px; }
.btn-back {
    display: inline-flex; align-items: center; gap: 8px;
    color: var(--text-light); font-weight: 600;
    margin-bottom: 20px;
}
.btn-back:hover { color: var(--primary-color); }


/* --- CONTACT SECTION --- */
.contact-wrapper {
    display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start;
}
.contact-item {
    display: flex; align-items: center; gap: 20px; background: var(--white);
    padding: 25px; border-radius: var(--radius); box-shadow: var(--shadow);
    margin-bottom: 20px; transition: var(--transition);
}
.contact-item:hover { transform: translateX(10px); }

.icon-box {
    width: 50px; height: 50px; background: #eef4fc; color: var(--primary-color);
    border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
    flex-shrink: 0;
}
.details h4 { margin-bottom: 5px; font-size: 1.1rem; }
.details p { color: var(--text-light); margin-bottom: 5px; line-height: 1.4; }
.details a { color: var(--primary-color); font-weight: 600; }

.fb-bg { background: #1877F2; color: white; }
.btn-facebook {
    display: inline-block; background: #1877F2; color: white !important; font-size: 0.9rem;
    padding: 8px 16px; border-radius: 20px; margin-top: 5px; text-decoration: none;
}
.btn-facebook:hover { background: #1465c8; }

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

/* --- MODALS FIXED --- */
.modal {
    display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); backdrop-filter: blur(5px);
    overflow-y: auto;
}
.modal-content {
    background-color: #fff; 
    margin: 5% auto 50px auto;
    padding: 0; border-radius: var(--radius);
    width: 90%; max-width: 700px; position: relative; box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.4s ease;
}
@keyframes modalSlideIn { from {transform: translateY(50px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }

.modal-header { padding: 25px; background: var(--bg-light); display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; border-radius: var(--radius) var(--radius) 0 0; }
.modal-header h2 { margin: 0; font-size: 1.5rem; color: var(--primary-color); }
.close { font-size: 2rem; color: #999; cursor: pointer; transition: 0.3s; line-height: 1; }
.close:hover { color: var(--text-dark); }

.modal-body { padding: 30px; }
.modal-hero-img { width: 100%; height: 250px; object-fit: cover; }
.info-box { background: #f0f7ff; padding: 20px; border-radius: 8px; margin: 20px 0; border-left: 4px solid var(--primary-color); }
.check-list li { position: relative; padding-left: 25px; margin-bottom: 10px; }
.check-list li::before { content: '✔'; position: absolute; left: 0; color: var(--primary-color); }
.contact-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.btn-whatsapp { background: #25D366; color: white !important; padding: 10px 20px; border-radius: 50px; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 0.9rem;}
.btn-whatsapp:hover { background: #1ebc57; transform: translateY(-2px); }
.contact-hint { color: #777; font-size: 0.9rem; margin-top: 20px; border-top: 1px solid #eee; padding-top: 15px;}

/* --- GALLERY STYLES --- */
.gallery-section { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.gallery-section h4 { margin-bottom: 15px; }
.small-text { font-size: 0.9rem; color: #777; margin-bottom: 15px; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.gallery-item {
    width: 100%; height: 120px; object-fit: cover; border-radius: 8px;
    cursor: zoom-in; transition: transform 0.3s ease; border: 1px solid #eee;
}
.gallery-item:hover { transform: scale(1.05); z-index: 5; box-shadow: 0 5px 15px rgba(0,0,0,0.2); }

/* --- LIGHTBOX (IMAGE ZOOM) --- */
.lightbox {
    display: none; position: fixed; z-index: 3000; padding-top: 50px;
    left: 0; top: 0; width: 100%; height: 100%; overflow: auto;
    background-color: rgba(0,0,0,0.9);
    user-select: none; /* Щоб не виділявся текст при кліку */
}
.lightbox-content {
    margin: auto; display: block; width: 80%; max-width: 900px;
    max-height: 85vh; object-fit: contain;
    border-radius: 5px; box-shadow: 0 0 20px rgba(255,255,255,0.1);
    animation: zoom 0.3s;
}
@keyframes zoom { from {transform:scale(0.8); opacity: 0} to {transform:scale(1); opacity: 1} }
.lightbox-close {
    position: absolute; top: 20px; right: 35px; color: #f1f1f1;
    font-size: 40px; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 3002;
}
.lightbox-close:hover, .lightbox-close:focus { color: #bbb; text-decoration: none; cursor: pointer; }

/* LIGHTBOX ARROWS */
.lightbox-prev, .lightbox-next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background: transparent;
    border: none;
    z-index: 3001;
}

.lightbox-next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0, 0, 0, 0.6);
}

/* --- FOOTER --- */
.footer { background: #1a252f; color: #ecf0f1; padding: 40px 0; border-top: 5px solid var(--accent-color); }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 15px; text-align: center; }
.footer-links a { color: #bdc3c7; transition: 0.3s; }
.footer-links a:hover { color: var(--white); }
.separator { margin: 0 10px; color: #555; }

/* --- RESPONSIVE & MOBILE MENU --- */
.burger { display: none; cursor: pointer; z-index: 1001; }
.burger div { 
    width: 32px; height: 4px; 
    background-color: var(--text-dark); 
    margin: 6px; 
    transition: var(--transition); 
    border-radius: 4px;
}

@media (max-width: 768px) {
    /* Меню виїжджає гарно, не на весь екран */
    .nav-list {
        position: fixed; 
        right: 0; 
        height: 100vh; 
        top: 0; 
        background: rgba(255, 255, 255, 0.98); /* Майже непрозорий */
        backdrop-filter: blur(25px); /* Ефект розмиття фону */
        flex-direction: column; 
        align-items: center; 
        justify-content: center; /* Центрування пунктів по вертикалі */
        width: 65%; /* Не на весь екран, а на 80% */
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        box-shadow: -10px 0 30px rgba(0,0,0,0.15); /* Гарна тінь зліва */
        padding-top: 0; 
        z-index: 999;
    }
    
    .nav-link {
        font-size: 1.4rem; /* Більший шрифт для телефону */
        margin: 15px 0;
        display: block;
    }

    /* Мова в мобільному меню */
    .lang-switch-li {
        margin-left: 0;
        margin-top: 20px;
        transform: scale(1.2); /* Робимо кнопки більшими для пальця */
    }

    .burger { display: block; }
    .nav-active { transform: translateX(0%); }
    
    .contact-wrapper { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2.2rem; }
    .section-title { font-size: 2rem; }
    .lightbox-content { width: 95%; }
}
