:root {
    --gold: #b8945f;
    --gold-light: #d4b27e;
    --gold-dark: #8c6b2f;
    --navy: #1a2840;
    --navy-light: #243756;
    --dark: #1a1a1a;
    --bg: #faf7f0;
    --bg-alt: #f4f1e9;
    --white: #ffffff;
    --text: #333333;
    --text-muted: #6b6b6b;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.1);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'PT Sans', 'Segoe UI', Tahoma, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', 'Playfair Display', Georgia, serif;
    font-weight: 600;
    line-height: 1.3;
}

a {
    color: var(--gold-dark);
    transition: var(--transition);
}

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

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

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

section {
    padding: 90px 0;
}

.section-title {
    text-align: center;
    font-size: 38px;
    margin-bottom: 16px;
    color: var(--navy);
}

.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 16px;
    margin-bottom: 50px;
}

.section-title::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background: var(--gold);
    margin: 18px auto 0;
    border-radius: 2px;
}

/* ===== HEADER ===== */
.site-header {
    background: rgba(26, 40, 64, 0.97);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    padding-bottom: 16px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--gold-light);
    font-family: 'Cormorant Garamond', serif;
    font-size: 21px;
    font-weight: 700;
}

.logo svg {
    width: 32px;
    height: 32px;
    fill: var(--gold);
    flex-shrink: 0;
}

.logo:hover {
    color: var(--gold);
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.3px;
    position: relative;
    padding: 4px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--gold-light);
}

.nav-links a:hover::after {
    width: 100%;
}

.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.burger span {
    width: 26px;
    height: 2px;
    background: var(--gold-light);
    transition: var(--transition);
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== HERO ===== */
.hero {
    position: relative;
    height: 88vh;
    min-height: 540px;
    overflow: hidden;
    background: var(--navy);
}

.hero-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 30%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 40, 64, 0.3) 0%,
        rgba(26, 40, 64, 0.15) 40%,
        rgba(26, 40, 64, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding-bottom: 70px;
    color: white;
}

.hero h1 {
    font-size: 56px;
    color: white;
    margin-bottom: 12px;
    text-shadow: 0 2px 30px rgba(0, 0, 0, 0.5);
}

.hero h1 span {
    display: block;
    font-size: 22px;
    font-weight: 400;
    color: var(--gold-light);
    letter-spacing: 2px;
    margin-top: 6px;
}

.hero-divider {
    width: 80px;
    height: 2px;
    background: var(--gold);
    margin-top: 20px;
}

.scroll-hint {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    letter-spacing: 1px;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-8px); }
}

/* ===== ABOUT ===== */
#about {
    background: var(--bg);
}

.about-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 60px;
    align-items: start;
}

.about-text p {
    margin-bottom: 18px;
    font-size: 16px;
    color: #444;
    text-align: justify;
}

.about-text p:first-of-type::first-letter {
    font-family: 'Cormorant Garamond', serif;
    font-size: 56px;
    float: left;
    line-height: 0.9;
    margin: 6px 10px 0 0;
    color: var(--gold);
    font-weight: 700;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.feature-card {
    background: var(--white);
    padding: 30px 22px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    border-top: 3px solid transparent;
    transition: var(--transition);
}

.feature-card:hover {
    border-top-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 14px;
    color: var(--gold);
}

.feature-card h3 {
    font-size: 19px;
    margin-bottom: 8px;
    color: var(--navy);
}

.feature-card p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ===== SCHEDULE ===== */
#calendar {
    background: var(--white);
}

.schedule-box {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid #eee;
}

.schedule-table {
    width: 100%;
    border-collapse: collapse;
}

.schedule-table thead {
    background: var(--navy);
}

.schedule-table th {
    padding: 18px 20px;
    text-align: left;
    color: white;
    font-family: 'PT Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.schedule-table td {
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    font-size: 15px;
}

.schedule-table tbody tr:hover {
    background: var(--bg-alt);
}

.schedule-table td:first-child {
    font-weight: 600;
    color: var(--navy);
}

.schedule-table td:nth-child(2) {
    color: var(--gold-dark);
    font-weight: 600;
    white-space: nowrap;
}

.schedule-empty {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

.admin-only {
    display: none;
}

/* ===== ADMIN LOGIN ===== */
.admin-login {
    max-width: 400px;
    margin: 0 auto 30px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: none;
}

.admin-login.active {
    display: block;
}

.admin-login h3 {
    text-align: center;
    margin-bottom: 20px;
    color: var(--navy);
}

.admin-login-row {
    display: flex;
    gap: 10px;
}

.admin-login-row input {
    flex: 1;
}

.admin-login .btn {
    flex-shrink: 0;
}

.admin-badge {
    display: none;
    text-align: center;
    margin-bottom: 20px;
    color: var(--gold-dark);
    font-size: 14px;
    font-weight: 600;
}

.admin-badge.active {
    display: block;
}

.admin-badge a {
    color: #c0392b;
    text-decoration: underline;
    margin-left: 10px;
}

/* ===== ADMIN PANEL ENHANCED ===== */
.admin-panel {
    display: none;
    background: #fff8eb;
    padding: 28px;
    border: 1px solid var(--gold-light);
    border-radius: var(--radius);
    margin-top: 24px;
}

.admin-panel h3 {
    margin-bottom: 16px;
    color: var(--navy);
}

.source-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.source-tab {
    flex: 1;
    padding: 10px;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    transition: var(--transition);
}

.source-tab.active {
    background: var(--gold-dark);
    color: white;
    border-color: var(--gold-dark);
}

.source-tab:hover:not(.active) {
    border-color: var(--gold);
    color: var(--gold-dark);
}

.admin-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

input[type="text"],
input:not([type]) {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
}

input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(184, 148, 95, 0.15);
}

.btn {
    background: var(--gold-dark);
    color: white;
    border: none;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.btn:hover {
    background: var(--navy);
}

.btn-del {
    background: #c0392b;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-family: inherit;
}

.btn-del:hover {
    background: #962d22;
}

/* ===== NOTES ===== */
#notes {
    background: var(--bg-alt);
}

.notes-wrapper {
    max-width: 860px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 50px;
}

.notes-text {
    text-align: center;
    margin-bottom: 30px;
}

.notes-text p {
    color: #555;
    font-size: 16px;
    margin-bottom: 10px;
}

.notes-tip {
    color: var(--gold-dark);
    font-size: 15px;
}

.notes-form {
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid #eee;
}

.notes-form iframe {
    display: block;
    width: 100%;
}

/* ===== DONATE ===== */
#donate {
    background: var(--white);
}

.donate-card {
    max-width: 720px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f9f6ef, #fffaf0);
    padding: 50px;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--gold-light);
}

.donate-card p.lead {
    font-size: 18px;
    margin-bottom: 30px;
    color: var(--navy);
}

.donate-details {
    text-align: left;
    font-size: 15px;
    line-height: 2;
    background: var(--white);
    padding: 28px 32px;
    border-radius: var(--radius-sm);
    border: 1px solid #eee;
}

.donate-details b {
    color: var(--navy);
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
}

.donate-details .label {
    color: var(--text-muted);
    display: inline-block;
    width: 90px;
}

/* ===== CONTACTS ===== */
#contacts {
    background: var(--bg-alt);
}

.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
}

.contact-card {
    background: var(--white);
    padding: 45px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.contact-card h3 {
    color: var(--gold-dark);
    font-size: 20px;
    margin-bottom: 8px;
}

.contact-card h3:not(:first-child) {
    margin-top: 26px;
}

.contact-card p {
    font-size: 16px;
    color: var(--text);
}

.contact-card a {
    text-decoration: none;
    color: var(--text);
}

.contact-card a:hover {
    color: var(--gold-dark);
}

.social-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.social-btn {
    flex: 1;
    text-align: center;
    padding: 13px;
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    color: white;
}

.social-btn.tg { background: #229ED9; }
.social-btn.vk { background: #4C75A3; }

.social-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.map-wrapper {
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 420px;
    box-shadow: var(--shadow-lg);
}

.map-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 420px;
    border: 0;
    display: block;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--navy);
    color: rgba(255, 255, 255, 0.7);
    padding: 50px 0 30px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
    color: var(--gold-light);
    font-family: 'Cormorant Garamond', serif;
    font-size: 20px;
    font-weight: 700;
}

.footer-nav {
    display: flex;
    gap: 22px;
    flex-wrap: wrap;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
}

.footer-nav a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    text-align: center;
    padding-top: 24px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
}

/* ===== NEWS PAGE ===== */
.news-header {
    background: var(--navy);
    color: white;
    padding: 80px 0 60px;
    text-align: center;
}

.news-header h1 {
    font-size: 42px;
    color: white;
}

.news-header h1::after {
    content: '';
    display: block;
    width: 70px;
    height: 3px;
    background: var(--gold);
    margin: 18px auto 0;
}

.news-header .back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    color: var(--gold-light);
    text-decoration: none;
    font-size: 14px;
}

.news-list {
    max-width: 860px;
    margin: 0 auto;
    padding: 60px 24px;
}

.news-card {
    background: var(--white);
    padding: 32px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
}

.news-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--navy);
}

.news-card .vk-preview {
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-top: 16px;
}

.news-card .vk-preview iframe {
    display: block;
    width: 100%;
    border: 0;
}

.error-message {
    color: #c0392b;
    font-size: 15px;
}

#loadingMessage {
    text-align: center;
    font-style: italic;
    color: var(--text-muted);
    padding: 40px;
}

/* ===== ANIMATIONS ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contacts-grid {
        grid-template-columns: 1fr;
    }

    .nav-links {
        position: fixed;
        top: 63px;
        left: 0;
        right: 0;
        background: var(--navy);
        flex-direction: column;
        padding: 24px;
        gap: 0;
        transform: translateY(-200%);
        transition: transform 0.4s ease;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }

    .nav-links.active {
        transform: translateY(0);
    }

    .nav-links a {
        padding: 14px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
        text-align: center;
    }

    .burger {
        display: flex;
    }
}

@media (max-width: 768px) {
    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 28px;
    }

    .hero {
        height: 70vh;
        min-height: 420px;
    }

    .hero h1 {
        font-size: 34px;
    }

    .hero h1 span {
        font-size: 16px;
    }

    .hero-content {
        padding-bottom: 50px;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    .notes-wrapper {
        padding: 28px 20px;
    }

    .notes-form iframe {
        height: 750px;
    }

    .donate-card {
        padding: 32px 24px;
    }

    .donate-details {
        padding: 22px 18px;
        font-size: 14px;
    }

    .contact-card {
        padding: 32px 24px;
    }

    .footer-top {
        flex-direction: column;
        text-align: center;
    }

    .footer-nav {
        justify-content: center;
    }

    .news-header h1 {
        font-size: 30px;
    }

    .news-list {
        padding: 40px 20px;
    }

    .news-card {
        padding: 24px 20px;
    }

    .schedule-table th,
    .schedule-table td {
        padding: 12px 14px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px;
    }

    .section-title {
        font-size: 24px;
    }

    .admin-row {
        flex-direction: column;
    }
}
