:root {
    --color-bg: #f4f1ed;
    --color-surface: #fff;
    --color-text: #222;
    --color-text-secondary: #444;
    --color-muted: #666;
    --color-gold: #b28642;
    --color-gold-light: #be8b44;
    --color-gold-dark: #a06d2b;
    --color-accent: #a6722f;
    --color-border: #e5dfd8;
    --color-border-light: #ece7e0;
    --color-topbar-bg: linear-gradient(180deg, #2e2e2e, #1f1f1f);
    --color-footer-bg: linear-gradient(180deg, #242424, #161616);
    --color-footer-text: #d0d0d0;
    --font-serif: Georgia, 'Times New Roman', serif;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    --container-width: 1480px;
    --transition: 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-serif);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition);
}

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

.container {
    width: min(92%, var(--container-width));
    margin: 0 auto;
}

/* ========== TOPBAR ========== */

.topbar {
    height: 36px;
    background: var(--color-topbar-bg);
    color: #fff;
    font-family: var(--font-sans);
    font-size: 13px;
}

.topbar .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-left,
.top-right {
    display: flex;
    gap: 16px;
    align-items: center;
}

.dot {
    opacity: 0.5;
}

.top-link {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 12px;
    font-family: var(--font-sans);
    opacity: 0.85;
    transition: opacity var(--transition);
}

.top-link:hover {
    opacity: 1;
}

.top-link svg {
    vertical-align: middle;
    margin-right: 4px;
}

/* ========== HEADER ========== */

.header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.logo-icon {
    width: 58px;
    height: 78px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 100%;
    height: 100%;
}

.logo-text h1 {
    font-size: clamp(18px, 2.2vw, 26px);
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.logo-text p {
    margin-top: 4px;
    font-size: clamp(11px, 1.2vw, 14px);
    color: var(--color-text-secondary);
    line-height: 1.3;
}

/* ========== MENU ========== */

.menu {
    display: flex;
    gap: 38px;
    font-family: var(--font-sans);
    font-size: 15px;
}

.menu a {
    padding-bottom: 14px;
}

.menu a.active {
    color: #a06d2b;
    border-bottom: 2px solid #a06d2b;
}

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

.menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: var(--color-text);
    transition: transform var(--transition), opacity var(--transition);
}

/* ========== HERO ========== */

.hero {
    height: 560px;
    position: relative;
    overflow: hidden;
    background:
        linear-gradient(rgba(255,255,255,0.1), rgba(255,255,255,0.1)),
        url('https://images.unsplash.com/photo-1519125323398-675f0ddb6308?auto=format&fit=crop&w=1800&q=80');
    background-size: cover;
    background-position: center 30%;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        rgba(250,245,239,0.94) 0%,
        rgba(250,245,239,0.65) 40%,
        rgba(255,255,255,0.05) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 38px;
}

.hero h2 {
    font-size: 64px;
    font-weight: 400;
    margin-bottom: 10px;
}

.hero h3 {
    font-size: 24px;
    color: #a6722f;
    font-weight: 400;
    margin-bottom: 24px;
}

.hero p {
    font-family: var(--font-sans);
    width: 420px;
    font-size: 17px;
    line-height: 1.7;
}

.hero-buttons {
    margin-top: 34px;
    display: flex;
    gap: 18px;
}

/* ========== BUTTONS ========== */

.btn {
    height: 40px;
    min-width: 145px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
}

.btn.primary {
    background: var(--color-gold-light);
    color: #fff;
}

.btn.primary:hover {
    background: var(--color-gold-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(190,139,68,0.3);
}

.btn.light {
    background: var(--color-surface);
    border: 1px solid #ddd;
    color: var(--color-text);
}

.btn.light:hover {
    border-color: var(--color-gold);
    color: var(--color-gold-dark);
    transform: translateY(-1px);
}

/* ========== LEADERSHIP ========== */

.leadership {
    margin-top: -92px;
    position: relative;
    z-index: 5;
}

.lead-card {
    background: var(--color-surface);
    border-radius: 8px;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    display: grid;
    grid-template-columns: 220px 1fr 1fr 1fr;
    overflow: hidden;
}

.lead-title {
    padding: 32px 28px;
    border-right: 1px solid var(--color-border-light);
}

.lead-title h4 {
    font-size: 22px;
    line-height: 1.4;
    font-weight: 400;
}

.gold-line {
    width: 70px;
    height: 2px;
    background: var(--color-gold);
    margin-top: 18px;
}

.person {
    padding: 18px 30px;
    display: flex;
    align-items: center;
    gap: 22px;
    border-right: 1px solid var(--color-border-light);
}

.person:last-child {
    border-right: none;
}

.avatar {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: #d5d5d5;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-placeholder {
    font-size: 32px;
    opacity: 0.4;
}

.person h5 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.4;
    font-weight: 400;
}

.person p {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.5;
    color: var(--color-muted);
}

/* ========== CARDS SECTION ========== */

.cards {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    min-height: 290px;
    padding: 18px;
    display: flex;
    flex-direction: column;
}

.card h3 {
    font-size: 16px;
    font-weight: 400;
    margin-bottom: 16px;
}

.thumb {
    width: 100%;
    height: 145px;
    background: #ddd;
    border-radius: 2px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thumb-icon {
    font-size: 40px;
    opacity: 0.5;
}

.card p {
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
}

.link {
    margin-top: 24px;
    color: var(--color-gold-dark);
    font-family: var(--font-sans);
    font-size: 14px;
    display: inline-block;
}

.list-item {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
}

.small-thumb {
    width: 72px;
    height: 48px;
    background: #d7d7d7;
    flex-shrink: 0;
}

.list-text {
    font-family: var(--font-sans);
    font-size: 13px;
    line-height: 1.4;
}

.direction {
    font-family: var(--font-sans);
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
}

/* ========== PAGE HERO ========== */

.page-hero {
    background: linear-gradient(135deg, #e8e0d6 0%, #ddd5cb 50%, #d5cdc3 100%);
    padding: 50px 0;
    border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 400;
}

.page-hero .gold-line {
    margin-top: 14px;
}

/* ========== PAGE CONTENT ========== */

.page-content {
    padding: 50px 0;
}

.page-content h2 {
    font-size: clamp(22px, 2.5vw, 30px);
    font-weight: 400;
    margin-bottom: 20px;
}

.page-content h3 {
    font-size: clamp(18px, 2vw, 22px);
    font-weight: 400;
    margin-bottom: 16px;
}

.page-content p {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 16px;
}

.section-intro {
    font-size: 17px !important;
    max-width: 700px;
    margin-bottom: 36px !important;
}

.content-section {
    margin-bottom: 40px;
}

/* ========== STATS ========== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.stat-item {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 42px;
    color: var(--color-gold);
    font-weight: 400;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-family: var(--font-sans);
    font-size: 14px;
    color: var(--color-muted);
}

/* ========== TEMPLES ========== */

.map-preview {
    margin-bottom: 40px;
}

.map-placeholder {
    background: linear-gradient(135deg, #e8e4de, #d5d0c8);
    border-radius: 8px;
    padding: 60px;
    text-align: center;
}

.map-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.map-placeholder p {
    max-width: 400px;
    margin: 0 auto 20px;
}

.temples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.temple-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.temple-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.temple-image {
    height: 180px;
    background: linear-gradient(135deg, #e0dad4, #d5d0c8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.temple-icon {
    font-size: 48px;
    opacity: 0.4;
}

.temple-info {
    padding: 20px;
}

.temple-info h3 {
    font-size: 18px;
    margin-bottom: 6px;
    font-weight: 400;
}

.temple-location {
    display: block;
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 10px;
}

.temple-info p {
    font-size: 14px;
    margin-bottom: 0;
}

/* ========== SERVICES ========== */

.services-list {
    display: grid;
    gap: 10px;
    margin-bottom: 30px;
}

.service-item {
    display: flex;
    gap: 20px;
    align-items: center;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 20px 24px;
    transition: box-shadow var(--transition);
}

.service-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.service-time {
    text-align: center;
    min-width: 80px;
}

.service-date {
    display: block;
    font-size: 13px;
    color: var(--color-muted);
    font-family: var(--font-sans);
}

.service-hour {
    display: block;
    font-size: 18px;
    color: var(--color-gold-dark);
    font-weight: 600;
}

.service-info h3 {
    font-size: 16px;
    margin-bottom: 0;
    font-weight: 400;
}

/* ========== NEWS ========== */

.news-grid {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.news-card {
    display: flex;
    gap: 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow var(--transition);
}

.news-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.news-thumb {
    width: 180px;
    min-height: 140px;
    flex-shrink: 0;
    background: linear-gradient(135deg, #e0dad4, #d5d0c8);
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-icon {
    font-size: 32px;
    opacity: 0.4;
}

.news-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
}

.news-date {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-muted);
    margin-bottom: 6px;
}

.news-body h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.news-body p {
    font-size: 14px;
    margin-bottom: 0;
    flex: 1;
}

/* ========== MINISTRY ========== */

.ministry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.ministry-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 28px;
    transition: box-shadow var(--transition), transform var(--transition);
}

.ministry-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.ministry-icon {
    font-size: 36px;
    margin-bottom: 16px;
}

.ministry-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.ministry-card p {
    font-size: 14px;
    margin-bottom: 0;
}

/* ========== PILGRIM ========== */

/* ========== PILGRIM ========== */

.pilgrim-intro {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: start;
}

.pilgrim-intro-text .section-intro {
    max-width: 100%;
}

.route-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.route-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow var(--transition), transform var(--transition);
}

.route-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.route-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.route-body {
    padding: 18px 20px;
}

.route-body h3 {
    font-size: 17px;
    margin-bottom: 8px;
}

.route-body p {
    font-size: 14px;
    margin-bottom: 12px;
}

.route-duration {
    font-family: var(--font-sans);
    font-size: 13px;
    color: var(--color-muted);
}

.shrines-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shrine-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 28px;
    text-align: center;
}

.shrine-icon {
    margin-bottom: 16px;
}

.shrine-card h3 {
    font-size: 17px;
    margin-bottom: 10px;
}

.shrine-card p {
    font-size: 14px;
    margin-bottom: 0;
}

.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 24px;
}

.info-card-icon {
    margin-bottom: 12px;
}

.info-card h4 {
    font-size: 16px;
    margin-bottom: 10px;
}

.info-card p {
    font-size: 14px;
    margin-bottom: 0;
}

/* ========== GALLERY ========== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-bottom: 30px;
}

.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 6px;
    overflow: hidden;
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0dad4, #d5d0c8);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

/* ========== CONTACTS ========== */

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

.contact-list {
    list-style: none;
    padding: 0;
    margin-bottom: 28px;
}

.contact-list li {
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.6;
    color: var(--color-text-secondary);
    padding: 6px 0;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-family: var(--font-sans);
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--color-text-secondary);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-family: var(--font-sans);
    font-size: 15px;
    transition: border-color var(--transition);
    background: var(--color-surface);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-gold);
    box-shadow: 0 0 0 2px rgba(178, 134, 66, 0.1);
}

/* ========== CALLOUT ========== */

.callout {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 3px solid var(--color-gold);
    border-radius: 4px;
    padding: 20px 24px;
    margin-top: 30px;
}

.callout p {
    margin-bottom: 0;
}

.callout a {
    color: var(--color-gold-dark);
    font-weight: 500;
}

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

/* ========== ERROR PAGE ========== */

.error-page {
    text-align: center;
    padding: 80px 0;
}

.error-content h2 {
    font-size: 32px;
    margin-bottom: 16px;
}

.error-content p {
    margin-bottom: 24px;
}

/* ========== FOOTER ========== */

.footer {
    background: var(--color-footer-bg);
    color: #fff;
}

.footer-inner {
    height: 118px;
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr 1fr 1fr;
    align-items: center;
    gap: 20px;
}

.footer-block {
    border-right: 1px solid rgba(255,255,255,0.15);
    padding-right: 20px;
}

.footer-block:last-child {
    border-right: none;
    text-align: right;
}

.muted {
    color: var(--color-footer-text);
    line-height: 1.6;
    font-size: 14px;
}

.muted em {
    font-style: italic;
}

.muted small {
    font-size: 12px;
    opacity: 0.7;
}

.social {
    display: flex;
    gap: 8px;
}

.social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: #fff;
    transition: opacity var(--transition);
}

.social a:hover {
    opacity: 0.8;
}

.social .vk { background: #2f6ebd; }
.social .tg { background: #3aa8e5; }
.social .ig { background: #cc4da0; }
.social .yt { background: #e53935; }

.copy small {
    opacity: 0.5;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1100px) {
    .lead-card {
        grid-template-columns: 1fr;
    }

    .lead-title {
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
        flex-direction: row;
        align-items: center;
        gap: 20px;
    }

    .lead-title .gold-line {
        margin-top: 0;
    }

    .person {
        border-right: none;
        border-bottom: 1px solid var(--color-border-light);
    }

    .person:last-child {
        border-bottom: none;
    }

    .footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .footer-block {
        border-right: none;
        padding-right: 0;
    }

    .footer-block:last-child {
        text-align: left;
    }
}

@media (max-width: 900px) {
    .cards {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    .menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-surface);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--color-border);
        box-shadow: 0 8px 24px rgba(0,0,0,0.08);
        gap: 0;
    }

    .menu.open {
        display: flex;
    }

    .menu a {
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border-light);
    }

    .menu a.active {
        color: var(--color-gold-dark);
        border-bottom: 1px solid var(--color-border-light);
    }

    .menu-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.open span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .top-left span:not(:first-child) {
        display: none;
    }

    .top-left .dot {
        display: none;
    }

    .hero {
        height: 400px;
    }

    .hero h2 {
        font-size: 32px;
    }

    .leadership {
        margin-top: 0;
        padding-bottom: 20px;
    }

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

    .news-card {
        flex-direction: column;
    }

    .news-thumb {
        width: 100%;
        height: 120px;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social {
        justify-content: center;
    }

    .header-inner {
        height: auto;
        min-height: 70px;
        padding: 8px 0;
    }

    .logo-icon {
        width: 40px;
        height: 52px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

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

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

    .service-item {
        flex-direction: column;
        text-align: center;
    }
}

/* ========== ANIMATIONS ========== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content {
    animation: fadeInUp 0.8s ease forwards;
}

.lead-card {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.card {
    animation: fadeInUp 0.5s ease both;
}

.card:nth-child(1) { animation-delay: 0.1s; }
.card:nth-child(2) { animation-delay: 0.2s; }
.card:nth-child(3) { animation-delay: 0.3s; }
.card:nth-child(4) { animation-delay: 0.4s; }
.card:nth-child(5) { animation-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
    }
}
