/* ============================================================
   СТИЛИ ДЛЯ САЙТА ХРАМА
   Версия: 2.0 (раздельная структура)
   ============================================================ */

/* ===== СБРОС ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f5f2ed;
    color: #1e1e2a;
    line-height: 1.7;
    padding: 20px;
}

/* ===== ГЛАВНЫЙ КОНТЕЙНЕР ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 40px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.06);
    padding: 30px 40px 50px;
    transition: 0.3s;
}

/* ===== ШАПКА ===== */
header {
    text-align: center;
    padding: 20px 0 10px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 3.2rem;
    font-weight: 400;
    letter-spacing: 2px;
    background: linear-gradient(135deg, #b8860b, #d4a54a);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 6px;
}

header h1 i {
    font-size: 0.7em;
    margin-right: 12px;
    background: none;
    -webkit-text-fill-color: #b8860b;
}

header .subhead {
    font-size: 1.15rem;
    color: #7a6a5c;
    font-weight: 300;
    letter-spacing: 1px;
}

header .subhead i {
    margin-right: 6px;
}

/* ===== МЕНЮ (ВКЛАДКИ) ===== */
.tabs {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 12px 32px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #4a3f36;
    cursor: pointer;
    border-radius: 60px;
    transition: 0.25s ease;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.tab-btn i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.tab-btn:hover {
    background: #f0ebe5;
    color: #1e1e2a;
}

.tab-btn.active {
    background: linear-gradient(135deg, #d4a54a, #b8860b);
    color: #fff;
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.25);
}

/* ===== КОНТЕНТ ВКЛАДОК ===== */
.tab-content {
    display: none;
    padding: 30px 0 10px;
    animation: fadeUp 0.4s ease;
}

.tab-content.active {
    display: block;
}

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

h2 {
    font-size: 2.2rem;
    font-weight: 400;
    color: #1e1e2a;
    margin-bottom: 28px;
    letter-spacing: -0.5px;
    position: relative;
}

h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #d4a54a, #b8860b);
    border-radius: 4px;
    margin-top: 8px;
}

/* ===== РАЗДЕЛ "О ХРАМЕ" ===== */
.hero-photo {
    position: relative;
    margin: 0 0 28px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(30, 30, 42, 0.12);
}

.hero-photo img {
    display: block;
    width: 100%;
    height: 440px;
    object-fit: cover;
    object-position: center 35%;
}

.hero-photo figcaption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    padding: 80px 32px 22px;
    background: linear-gradient(to top, rgba(30, 24, 12, 0.72), rgba(30, 24, 12, 0));
    color: #fff;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.3px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-photo .photo-credit,
.hero-photo .photo-credit a {
    color: rgba(255, 255, 255, 0.75);
}

.photo-credit {
    font-size: 0.75rem;
    color: #a09080;
    white-space: nowrap;
}

.photo-credit a {
    color: inherit;
    text-decoration: none;
}

.photo-credit a:hover {
    text-decoration: underline;
}


.info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 30px;
}

.info-item {
    display: flex;
    flex-direction: column;
    background: #f8f6f3;
    padding: 28px 26px 24px;
    border-radius: 24px;
    border-top: 4px solid #e8d3a6;
    transition: 0.25s ease;
}

.info-item:hover {
    transform: translateY(-4px);
    border-top-color: #d4a54a;
    box-shadow: 0 12px 32px rgba(184, 134, 11, 0.08);
}

.info-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a54a, #b8860b);
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.25);
    margin-bottom: 18px;
}

.info-icon i {
    font-size: 1.3rem;
    color: #fff;
}

.info-item strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1e1e2a;
    margin-bottom: 10px;
}

.info-item p {
    margin: 0 0 8px;
    color: #4a3f36;
    line-height: 1.6;
}

.info-item .nowrap {
    white-space: nowrap;
}

/* Ссылка внизу плитки — прижата к низу, чтобы плитки выглядели ровно */
.info-link {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #ece3d6;
    color: #b8860b;
    text-decoration: none;
    font-weight: 500;
}

.info-link i {
    width: 18px;
    margin-right: 8px;
}

.info-link:hover {
    color: #8f6808;
}

.info-hours {
    margin: 0 0 12px;
}

.info-hours div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    color: #4a3f36;
}

.info-hours dd {
    color: #b8860b;
    font-weight: 600;
    white-space: nowrap;
}

.info-schedule {
    margin: 0 0 12px;
    color: #4a3f36;
}

.info-schedule dt {
    font-weight: 600;
    color: #1e1e2a;
    margin-top: 6px;
}

.info-schedule dt:first-child {
    margin-top: 0;
}

.info-schedule dd {
    display: flex;
    gap: 10px;
    line-height: 1.6;
}

.info-schedule dd span {
    flex: 0 0 44px;
    color: #b8860b;
    font-weight: 600;
}

/* ===== КАРТА ===== */
.map-container {
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    margin-top: 8px;
}

.map-container iframe {
    width: 100%;
    height: 300px;
    border: none;
    display: block;
}

/* ===== ИСТОРИЯ ===== */
.history-text {
    font-size: 1.05rem;
    background: #f8f6f3;
    padding: 30px 35px;
    border-radius: 28px;
    line-height: 1.8;
}

.history-text img {
    max-width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    margin: 16px 0;
}

.history-text .img-left {
    float: left;
    margin: 0 24px 12px 0;
    max-width: 44%;
}

.history-text .img-right {
    float: right;
    margin: 0 0 12px 24px;
    max-width: 44%;
}

.history-text p {
    margin-bottom: 16px;
    color: #2a2a3a;
}

.history-text strong {
    color: #1e1e2a;
    font-weight: 600;
}

.history-text .clear {
    clear: both;
}

.history-intro p {
    margin-bottom: 0;
}

.history-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 28px 0 12px;
}

.history-facts .fact {
    background: #f8f6f3;
    border-radius: 24px;
    padding: 22px 24px;
    text-align: center;
}

.history-facts .fact-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 600;
    color: #b8860b;
    line-height: 1.2;
    margin-bottom: 6px;
}

.history-facts .fact-label {
    font-size: 0.95rem;
    color: #4a3f36;
}

.history-figure {
    margin: 0 0 24px;
}

.history-figure img {
    display: block;
    width: 100%;
    max-height: 420px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.08);
}

.history-figure figcaption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: #7a6a5c;
}

.history-figure .photo-credit {
    display: block;
    margin-top: 2px;
    white-space: normal;
}

.history-figure-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.history-figure-pair img {
    height: 420px;
    max-height: none;
    object-position: center top;
}

.history-era {
    font-size: 1.5rem;
    font-weight: 500;
    color: #1e1e2a;
    margin: 40px 0 20px;
}

.history-era i {
    color: #b8860b;
    margin-right: 12px;
    font-size: 0.9em;
}

.timeline {
    list-style: none;
    position: relative;
    padding-left: 32px;
    border-left: 3px solid #ecdcb8;
    margin-left: 8px;
}

.timeline li {
    position: relative;
    margin-bottom: 24px;
}

.timeline li:last-child {
    margin-bottom: 0;
}

.timeline li::before {
    content: '';
    position: absolute;
    left: -42px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, #d4a54a, #b8860b);
    box-shadow: 0 0 0 4px #fff;
}

.timeline .tl-date {
    display: inline-block;
    font-weight: 600;
    color: #b8860b;
    font-size: 1rem;
    margin-bottom: 4px;
}

.timeline p {
    color: #2a2a3a;
    font-size: 1.02rem;
    line-height: 1.75;
}

.timeline strong {
    color: #1e1e2a;
    font-weight: 600;
}

.history-sources {
    margin-top: 44px;
    background: #f8f6f3;
    border-radius: 24px;
    padding: 22px 28px;
    font-size: 0.95rem;
    color: #4a3f36;
}

.history-sources strong i {
    color: #b8860b;
    margin-right: 8px;
}

.history-sources ul {
    margin: 10px 0 0 20px;
}

.history-sources a {
    color: #b8860b;
    text-decoration: none;
}

.history-sources a:hover {
    text-decoration: underline;
}

/* ===== СОБЫТИЯ ===== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.event-card {
    background: #f8f6f3;
    border-radius: 28px;
    overflow: hidden;
    transition: 0.3s ease;
}

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.06);
}

.event-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
    display: block;
}

.event-card .event-body {
    padding: 20px 24px 28px;
}

.event-card .event-title {
    font-weight: 600;
    font-size: 1.2rem;
    color: #1e1e2a;
    margin-bottom: 4px;
}

.event-card .event-date {
    font-size: 0.9rem;
    color: #b8860b;
    font-weight: 500;
    margin-bottom: 10px;
}

.event-card .event-date i {
    margin-right: 6px;
}

.event-card .event-desc {
    color: #4a3f36;
    font-size: 0.98rem;
}

.placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #f8f6f3;
    border-radius: 28px;
    padding: 48px 32px;
    text-align: center;
}

.placeholder .info-icon {
    width: 64px;
    height: 64px;
}

.placeholder .info-icon i {
    font-size: 1.6rem;
}

.placeholder h3 {
    font-size: 1.5rem;
    font-weight: 500;
    color: #1e1e2a;
    margin-bottom: 12px;
}

.placeholder p {
    max-width: 520px;
    color: #4a3f36;
    margin-bottom: 8px;
}

.placeholder-btn {
    display: inline-block;
    margin-top: 20px;
    background: linear-gradient(135deg, #d4a54a, #b8860b);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 60px;
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.25);
    transition: 0.25s ease;
}

.placeholder-btn i {
    margin-right: 10px;
}

.placeholder-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(184, 134, 11, 0.35);
}

.add-hint {
    margin-top: 28px;
    text-align: center;
    color: #7a6a5c;
    font-size: 0.95rem;
}

.add-hint i {
    color: #b8860b;
    margin-right: 8px;
}

.add-hint code {
    background: #f0ebe5;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}

/* ===== РАСПИСАНИЕ (КАЛЕНДАРЬ) ===== */
.schedule-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.schedule-status {
    background: #f8f6f3;
    border-radius: 24px;
    padding: 28px;
    text-align: center;
    color: #7a6a5c;
}

.schedule-status i {
    color: #b8860b;
    margin-right: 10px;
}

.schedule-embed {
    background: #f8f6f3;
    border-radius: 28px;
    padding: 8px;
}

.schedule-embed iframe {
    width: 100%;
    height: 560px;
    border: none;
    border-radius: 24px;
    display: block;
    background: #fff;
}

.schedule-day {
    display: flex;
    gap: 24px;
    background: #f8f6f3;
    border-radius: 24px;
    padding: 20px 28px;
    border-left: 4px solid transparent;
}

.schedule-day.is-feast {
    border-left-color: #d4a54a;
}

.schedule-day.is-today {
    background: #fbf3e2;
    box-shadow: 0 8px 24px rgba(184, 134, 11, 0.12);
}

.schedule-date {
    flex: 0 0 auto;
    width: 116px;
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.schedule-daynum {
    font-size: 2rem;
    font-weight: 600;
    color: #b8860b;
}

.schedule-month {
    font-size: 0.95rem;
    color: #4a3f36;
}

.schedule-weekday {
    font-size: 0.85rem;
    color: #7a6a5c;
    margin-top: 4px;
}

.schedule-day.is-today .schedule-weekday {
    color: #b8860b;
    font-weight: 600;
}

.schedule-body {
    flex: 1;
    min-width: 0;
}

.schedule-feast {
    font-weight: 600;
    color: #1e1e2a;
    margin-bottom: 6px;
}

.schedule-service {
    display: flex;
    gap: 16px;
    color: #2a2a3a;
    padding: 3px 0;
}

.schedule-time {
    flex: 0 0 52px;
    font-weight: 600;
    color: #b8860b;
}

.schedule-note {
    margin-top: 18px;
    font-size: 0.95rem;
    color: #7a6a5c;
    text-align: center;
}

.schedule-note i {
    margin-right: 8px;
    color: #b8860b;
}

/* ===== ПОЖЕРТВОВАНИЯ ===== */
.donate-intro {
    font-size: 1.1rem;
    color: #4a3f36;
    max-width: 760px;
    margin-bottom: 28px;
}

.donate-purposes {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.donate-purpose {
    background: #f8f6f3;
    border-radius: 24px;
    padding: 24px;
}

.donate-purpose .info-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 14px;
}

.donate-purpose .info-icon i {
    font-size: 1.1rem;
}

.donate-purpose strong {
    display: block;
    font-weight: 600;
    color: #1e1e2a;
    margin-bottom: 4px;
}

.donate-purpose p {
    font-size: 0.95rem;
    color: #7a6a5c;
    line-height: 1.5;
}

.donate-pay {
    display: flex;
    gap: 32px;
    background: #f8f6f3;
    border-radius: 28px;
    padding: 32px;
    border-top: 4px solid #d4a54a;
}

.donate-qr {
    flex: 0 0 240px;
    text-align: center;
}

.donate-qr-code {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 240px;
    background: #fff;
    border-radius: 20px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.donate-qr-code img,
.donate-qr-code svg {
    width: 100%;
    height: 100%;
    display: block;
}

.donate-qr-code.is-empty {
    flex-direction: column;
    gap: 10px;
    color: #c4b49c;
    border: 2px dashed #e8d3a6;
    box-shadow: none;
}

.donate-qr-code.is-empty i {
    font-size: 3rem;
}

.donate-qr-caption {
    margin-top: 14px;
    font-size: 0.95rem;
    color: #4a3f36;
}

.donate-details {
    flex: 1;
    min-width: 0;
}

.donate-details-title {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e1e2a;
    margin-bottom: 14px;
}

.donate-rows {
    margin-bottom: 18px;
}

.donate-row {
    display: flex;
    gap: 16px;
    padding: 8px 0;
    border-bottom: 1px solid #ece3d6;
}

.donate-row dt {
    flex: 0 0 150px;
    color: #7a6a5c;
    font-size: 0.95rem;
}

.donate-row dd {
    flex: 1;
    min-width: 0;
    color: #1e1e2a;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.donate-pending {
    color: #4a3f36;
    margin-bottom: 8px;
}

.donate-pending i {
    color: #b8860b;
    margin-right: 8px;
}

.copy-btn {
    background: #fff;
    border: 1px solid #e8d3a6;
    color: #b8860b;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 60px;
    cursor: pointer;
    transition: 0.2s ease;
    margin: 0 8px 8px 0;
}

.copy-btn i {
    margin-right: 8px;
}

.copy-btn:hover {
    background: #fbf3e2;
}

.copy-btn.is-copied {
    background: linear-gradient(135deg, #d4a54a, #b8860b);
    border-color: transparent;
    color: #fff;
}

.blessing {
    text-align: center;
    margin-top: 32px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #1e1e2a;
}

.blessing i {
    color: #b8860b;
    margin-right: 10px;
}

/* ===== ФУТЕР ===== */
footer {
    text-align: center;
    margin-top: 50px;
    padding-top: 24px;
    border-top: 1px solid #f0ebe5;
    color: #a09080;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

footer i {
    margin-right: 8px;
    color: #b8860b;
}

/* ============================================================
   АДАПТИВНОСТЬ
   ============================================================ */

/* Ноутбуки: плитки «О храме» в две колонки */
@media (max-width: 1100px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Планшеты и маленькие ноутбуки */
@media (max-width: 768px) {
    body {
        padding: 12px;
    }
    .container {
        padding: 20px 20px 30px;
        border-radius: 28px;
    }
    header h1 {
        font-size: 2.2rem;
    }
    .tab-btn {
        padding: 10px 20px;
        font-size: 0.95rem;
        flex: 1 1 auto;
    }
    .tab-btn i {
        margin-right: 6px;
    }
    .info-grid {
        grid-template-columns: 1fr;
    }
    .history-text {
        padding: 20px 22px;
    }
    .hero-photo img {
        height: 300px;
    }
    .hero-photo figcaption {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 60px 20px 16px;
    }
    .hero-title {
        font-size: 1.15rem;
    }
    .hero-photo .photo-credit {
        white-space: normal;
    }
    .history-figure-pair img {
        height: 300px;
    }
    .timeline {
        padding-left: 24px;
        margin-left: 4px;
    }
    .timeline li::before {
        left: -33px;
    }
    .history-era {
        font-size: 1.3rem;
    }
    .history-text .img-left,
    .history-text .img-right {
        float: none;
        max-width: 100%;
        margin: 12px 0;
    }
    .events-grid {
        grid-template-columns: 1fr 1fr;
    }
    .schedule-day {
        padding: 18px 20px;
        gap: 16px;
    }
    .schedule-date {
        width: 96px;
    }
    .donate-purposes {
        grid-template-columns: 1fr;
    }
    .donate-pay {
        flex-direction: column;
        align-items: center;
        padding: 24px 20px;
    }
    .donate-qr {
        flex-basis: auto;
    }
    .donate-details {
        width: 100%;
    }
}

/* Телефоны */
@media (max-width: 480px) {
    /* Шрифт заголовка уменьшается вместе с экраном, чтобы «Преображенский» помещался целиком */
    header h1 {
        font-size: clamp(1.5rem, 9vw, 2.2rem);
        letter-spacing: 1px;
        overflow-wrap: break-word;
    }
    .tabs {
        flex-direction: column;
        align-items: stretch;
    }
    .tab-btn {
        border-radius: 40px;
        text-align: center;
        padding: 12px;
    }
    .events-grid {
        grid-template-columns: 1fr;
    }
    .schedule-day {
        flex-direction: column;
        gap: 10px;
    }
    .schedule-date {
        flex-direction: row;
        align-items: baseline;
        gap: 8px;
        width: auto;
    }
    .schedule-daynum {
        font-size: 1.6rem;
    }
    .schedule-weekday {
        margin-top: 0;
    }
    h2 {
        font-size: 1.8rem;
    }
    .hero-photo img {
        height: 240px;
    }
    .history-figure-pair {
        grid-template-columns: 1fr;
    }
    .history-figure-pair img {
        height: 360px;
    }
    .donate-row {
        flex-direction: column;
        gap: 2px;
    }
    .donate-row dt {
        flex-basis: auto;
    }
    .copy-btn {
        width: 100%;
    }
}