@import url('./header-footer.css');

/* РћРїСЂРµРґРµР»СЏРµРј РїРµСЂРµРјРµРЅРЅСѓСЋ РґР»СЏ РІС‹СЃРѕС‚С‹ С…РµРґРµСЂР°, С‡С‚РѕР±С‹ РёСЃРїРѕР»СЊР·РѕРІР°С‚СЊ РµРµ РІ СЂР°Р·РЅС‹С… РјРµСЃС‚Р°С… */
:root {
    color-scheme: light;
    --header-height: 100px;
    --surface-bg: #fffaff;
    --surface-border: 1px solid #36afaa;
    --surface-radius: 8px;
    --surface-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    --page-title-image-width: 800px;
}

/* ==================
   РћР±С‰РёРµ СЃС‚РёР»Рё РґР»СЏ С‚РµР»Р°
   ================== */
body {
    /* Р”РѕР±Р°РІР»СЏРµРј РѕС‚СЃС‚СѓРї СЃРІРµСЂС…Сѓ, СЂР°РІРЅС‹Р№ РІС‹СЃРѕС‚Рµ С…РµРґРµСЂР°, С‡С‚РѕР±С‹ РєРѕРЅС‚РµРЅС‚ РЅРµ СѓРµР·Р¶Р°Р» РїРѕРґ РЅРµРіРѕ */
    padding-top: var(--header-height);
    background-color: #ededed;
}

/* ==================
   Page titles
   ================== */
.title {
    font-size: clamp(2.5rem, 5vw + 1rem, 5rem);
    font-weight: bold;
    text-align: center;
    margin-top: 40px;
    margin-bottom: 40px;
    color: #b37b506c;
    text-shadow:
        -1px -1px 1px rgba(49, 24, 0, 0.63),
        1px 1px 1px rgba(255, 255, 255, 0.075);
}

img[src^="/src/art/titles/"] {
    display: block;
    width: var(--page-title-image-width);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.schedule-block img[src^="/src/art/titles/"] {
    margin-bottom: 0.75rem;
}

/* ==================
   РЎС‚РёР»Рё РґР»СЏ РїСЂРµР»РѕР°РґРµСЂР°
   ================== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Р¦РІРµС‚ С„РѕРЅР°, РєР°Рє Сѓ Vanta, РґР»СЏ Р±РµСЃС€РѕРІРЅРѕРіРѕ РїРµСЂРµС…РѕРґР° */
    background-color: #36afaa;
    z-index: 99999; /* РџРѕРІРµСЂС… Р°Р±СЃРѕР»СЋС‚РЅРѕ РІСЃРµРіРѕ */
    display: flex;
    justify-content: center;
    align-items: center;
    /* РџР»Р°РІРЅРѕРµ РёСЃС‡РµР·РЅРѕРІРµРЅРёРµ */
    transition: opacity 0.75s ease, visibility 0.75s;
    visibility: visible;
    opacity: 1;
}

#preloader.loaded {
    opacity: 0;
    visibility: hidden; /* РЎРєСЂС‹РІР°РµРј РїРѕСЃР»Рµ Р°РЅРёРјР°С†РёРё, С‡С‚РѕР±С‹ РЅРµ РјРµС€Р°Р» */
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff; /* РћСЃРЅРѕРІРЅРѕР№ С†РІРµС‚ СЃ СЃР°Р№С‚Р° */
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Home page */
.home-page {
    background: #ededed;
    color: #222;
}

.home-page .home-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px 32px;
}

.home-page .title {
    margin: 0 auto 20px;
    text-align: center;
}

.home-page .home-tiles {
    display: grid;
    gap: 16px;
}

.home-page .tile {
    border: var(--surface-border);
    padding: 12px;
    background: var(--surface-bg);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    overflow: hidden;
}

.home-page .tile img {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
}

.home-page .tile-with-text {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
}

.home-page .tile-text {
    padding: 20px;
    background: transparent;
    color: #222;
    text-align: center;
}

.home-page .tile-text::before {
    content: '';
    display: block;
    width: calc(100% - 24px);
    height: 4px;
    margin: 0 auto 14px;
    background: #36afaa;
    border-radius: 2px;
}

.home-page .tile-with-text img {
    min-height: 280px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .home-page .tile-with-text img {
        min-height: 0;
        object-fit: contain;
    }
}

.home-page .tile-text h2 {
    margin: 0;
    font-weight: 100 !important;
    font-size: clamp(1.3rem, 2.5vw, 2.0rem);
    max-width: calc(100% - 32px);
    margin-inline: auto;
}

.home-page .tile-text p {
    margin: 0;
    font-size: clamp(1.1rem, 2.3vw, 1.8rem);
    max-width: calc(100% - 32px);
    margin-inline: auto;
    line-height: 1.5;
}

.home-page .middle-tiles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.home-page .middle-tiles .tile {
    padding: 0;
}

.home-page .home-gallery-grid {
    margin-top: 16px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.home-page .home-gallery-card {
    position: relative;
    display: block;
    aspect-ratio: 1 / 1;
    border: var(--surface-border);
    background: var(--surface-bg);
    border-radius: var(--surface-radius);
    box-shadow: var(--surface-shadow);
    overflow: hidden;
    text-decoration: none;
}

.home-page .home-gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.home-page .home-gallery-card.is-empty {
    background: var(--surface-bg);
    border: 1px dashed #b7b0a7;
}

@media (max-width: 900px) {
    .home-page .home-gallery-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-page .middle-tiles {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .home-page .home-gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Page-level inline style replacements */
#slideshow-container {
    display: none;
}

.honeypot-field {
    display: none;
}

.about-image-left {
    float: left;
    margin: 0 45px 10px 0;
    width: 250px;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

.clear-both {
    clear: both;
}
