@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@300;400;500;600&family=Montserrat:wght@200;300;400;500;600&display=swap');

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

:root {
    --gold: #ffd36a;
    --dark-gold: #e0ad3c;
    --pure-black: #000000;
    --rich-black: #0a0a0a;
    --card-black: #0d0d0d;
    --text-gold: #ffe9a6;
    --border-gold: rgba(255, 211, 106, 0.35);
    --donate-highlight: #ff3366;
    --donate-bg-deep: #050a1a;
    --donate-bg-soft: #10162a;
    --donate-border: rgba(255, 211, 106, 0.4);
}

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--pure-black);
    color: var(--text-gold);
    overflow-x: hidden;
    line-height: 1.6;
}

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

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

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

h1, h2, h3 {
    font-family: 'Playfair Display', serif;
    font-weight: 300;
}

.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-gold);
}

 .nav-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2px 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0; /* убираем вертикальный зазор между строками шапки */
}

 .brand {
    font-size: 12px; /* +20% относительно 10px */
    color: var(--gold);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    line-height: 1.05; /* минимальный межстрочный интервал в шапке */
    text-align: center;
}

 .header-top-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

 .header-row-main {
    gap: 10px; /* чуть ближе друг к другу: адрес / телефон / языки */
    justify-content: center;
    width: 100%;
}

.header-contacts-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Фиксированные пропорции для одной строки: телефон + заявка + языки */
.header-address {
    flex: 0 0 auto;
}

.header-contacts-row {
    flex: 0 0 auto;
}

.header-contacts-row .phone-link,
.header-contacts-row .cta-header-btn {
    white-space: nowrap;
}

.lang-switcher {
    flex: 0 0 auto;
}

.main-menu {
    display: flex;
    gap: 12px;
    margin-left: 12px;
}

.main-menu a {
    font-size: 10px;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--gold);
    text-decoration: none;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-gold);
    background: rgba(13, 13, 13, 0.9);
    text-align: center;
    transition: all 0.3s ease;
}

.main-menu a:hover {
    color: var(--pure-black);
    background: var(--gold);
    border-color: var(--gold);
    text-decoration: none;
}

.main-menu-below {
    max-width: 1600px;
    margin: 0 auto;
    padding: 8px 40px 4px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    border-bottom: 1px solid var(--border-gold);
}

@media (max-width: 768px) {
    .main-menu-below {
        padding: 8px 16px 4px;
    }
}

.lang-switcher {
    display: flex;
    gap: 1px;
    background: var(--rich-black);
    padding: 1.6px;
    border-radius: 10px;
    border: 1px solid var(--border-gold);
}

.lang-btn {
    background: transparent;
    border: none;
    color: var(--gold);
    cursor: pointer;
    font-size: 7.2px;
    font-weight: 500;
    padding: 3.2px 6px;
    transition: all 0.4s;
    letter-spacing: 1.2px;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    text-decoration: none;
    display: inline-block;
}

.lang-btn.active {
    background: var(--gold);
    color: var(--pure-black);
}

.lang-btn:hover:not(.active) {
    color: var(--gold);
}

.phone-link {
    color: var(--gold);
    text-decoration: none;
    font-size: 13px; /* крупнее номер телефона */
    letter-spacing: 1.8px;
    font-weight: 400;
    transition: all 0.3s;
    padding: 4px 10px; /* чуть меньше вертикальный отступ, чтобы ряд был компактнее */
    border: 1px solid var(--border-gold);
    border-radius: 2px;
    display: inline-block;
    white-space: nowrap;
}

.phone-link:hover {
    color: var(--pure-black);
    background: var(--gold);
    border-color: var(--gold);
}

.messenger-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.messenger-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-block;
    border: none;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* предполагаем, что svg-иконки лежат в папке img рядом со страницами */
.messenger-viber {
    background-image: url('img/viber.svg');
}

.messenger-whatsapp {
    background-image: url('img/whatsapp.svg');
}

.messenger-telegram {
    background-image: url('img/telegram.svg');
}

.cta-header-btn {
    background: var(--gold);
    color: var(--pure-black);
    text-decoration: none;
    font-size: 9.9px;
    letter-spacing: 0.45px;
    font-weight: 500;
    padding: 4.5px 10px;
    border-radius: 2px;
    display: inline-block;
    white-space: normal;
    text-align: center;
    line-height: 1.3;
    transition: all 0.3s;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
}

.cta-header-btn:hover {
    background: rgba(201, 169, 97, 0.9);
    transform: translateY(-1px);
}

.header-address {
    width: auto;
    text-align: left;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.header-address a {
    color: var(--gold);
    text-decoration: none;
    font-size: 11px;
    letter-spacing: 1.5px;
}

.header-address a:hover {
    text-decoration: underline;
}

main {
    padding-top: 90px;
}

.hero {
    min-height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 120px 40px 60px;
    background: var(--pure-black);
}

/* Специальная палитра только для страниц донатов */
body.donate-page {
    background: radial-gradient(circle at top, rgba(255, 51, 102, 0.06), transparent 55%),
                radial-gradient(circle at bottom, rgba(255, 211, 106, 0.08), transparent 60%),
                var(--donate-bg-deep);
    color: var(--text-gold);
}

/* Герой-блок на донат-страницах чуть светлее и теплее */
body.donate-page .hero {
    background: linear-gradient(135deg, rgba(16, 22, 42, 0.96), rgba(5, 10, 26, 0.98));
    border-bottom: 1px solid rgba(255, 211, 106, 0.25);
}

/* Карточки с мягким акцентом */
body.donate-page .service-card {
    background: linear-gradient(145deg, rgba(16, 22, 42, 0.96), rgba(5, 10, 26, 0.98));
    border-color: var(--donate-border);
}

body.donate-page .service-card:hover {
    box-shadow: 0 0 26px rgba(255, 51, 102, 0.35);
}

/* Заголовки на донат-страницах чуть контрастнее */
body.donate-page h1,
body.donate-page .section-title {
    color: #ffeeb0;
}

body.donate-page .section-label {
    color: rgba(255, 211, 106, 0.9);
}

/* CTA-кнопка на донат-страницах чуть крупнее и ярче */
body.donate-page .cta-button {
    padding: 16px 36px;
    box-shadow: 0 0 40px rgba(255, 51, 102, 0.9);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, var(--border-gold) 50%, transparent 100%);
    opacity: 0.3;
}

.hero-content {
    text-align: center;
    z-index: 1;
    max-width: 1400px;
    width: 100%;
}

.hero-header {
    margin-bottom: 40px;
    padding-top: 20px;
}

h1 {
    font-size: clamp(28px, 3.5vw, 48px);
    font-weight: 300;
    margin-bottom: 15px;
    line-height: 1.1;
    color: var(--gold);
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: clamp(12px, 1.3vw, 16px);
    color: var(--gold);
    margin-bottom: 0;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
}

/* Мобильная адаптация шапки и меню */
@media (max-width: 768px) {
    .nav-container {
        padding: 8px 16px 6px;
        align-items: stretch;
    }

    .brand {
        text-align: left;
    }

    .header-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .header-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        width: 100%;
    }

    .main-menu {
        flex-wrap: wrap;
        margin-left: 0;
        margin-top: 4px;
        gap: 6px;
    }

    .header-contacts-row {
        flex-wrap: wrap;
        gap: 4px;
    }

    .main-menu a {
        font-size: 9px;
        padding: 4px 6px;
    }

    .phone-link,
    .cta-header-btn {
        padding: 4px 8px;
        font-size: 9px;
    }

    .phone-link {
        margin-top: 4px;
    }

    .header-address {
        margin-top: 4px;
        padding-top: 4px;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1px;
    max-width: 1400px;
    margin: 0 auto;
}

.service-card {
    background: var(--card-black);
    border: 1px solid var(--border-gold);
    padding: 24px 24px 26px;
    position: relative;
    transition: all 0.4s ease;
    cursor: default;
}

.service-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(201, 169, 97, 0.15);
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.service-number {
    font-size: 11px;
    letter-spacing: 3px;
    color: var(--gold);
    text-transform: uppercase;
}

.service-toggle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 1px solid var(--border-gold);
    position: relative;
    cursor: pointer;
}

.service-toggle::before,
.service-toggle::after {
    content: '';
    position: absolute;
    background: var(--gold);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.service-toggle::before {
    width: 8px;
    height: 1px;
}

.service-toggle::after {
    width: 1px;
    height: 8px;
}

.service-title {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--gold);
}

.service-price {
    font-size: 16px;
    color: var(--gold);
    margin-bottom: 2px;
}

.service-price-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold);
    margin-bottom: 12px;
}

.service-description {
    font-size: 13px;
    color: var(--text-gold);
}

.section-header {
    text-align: center;
    margin: 80px auto 30px;
}

.section-label {
    font-size: 11px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}

.section-title {
    font-size: 28px;
    color: var(--gold);
    margin-bottom: 10px;
}

.section-description {
    font-size: 14px;
    color: var(--text-gold);
}

.contact-section {
    padding: 40px 20px 80px;
}

.contact-form {
    max-width: 600px;
    margin: 30px auto 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--text-gold);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border-radius: 2px;
    border: 1px solid var(--border-gold);
    background: #050505;
    color: var(--text-gold);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.cta-button {
    display: inline-block;
    padding: 15px 38px;
    background: radial-gradient(circle at 20% 0%, #ff8aa6 0, #ff3366 40%, #b8003c 100%);
    color: #ffffff;
    border-radius: 999px;
    border: 2px solid #ffffff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.6px;
    box-shadow: 0 0 40px rgba(255, 51, 102, 0.95);
    transition: all 0.3s ease;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.7);
}

.cta-button:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 0 45px rgba(255, 51, 102, 1);
    text-decoration: none;
}

.footer-menu a {
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--gold);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid var(--border-gold);
    background: rgba(13, 13, 13, 0.9);
    text-decoration: none;
}

.footer-menu a:hover {
    color: var(--pure-black);
    background: var(--gold);
}

.footer-brand {
    color: var(--gold);
    margin-bottom: 8px;
}

.footer-text a {
    color: var(--gold);
    text-decoration: none;
}

.footer-text a:hover {
    text-decoration: underline;
}

@media (max-width: 768px) {
    .nav-container {
        padding: 16px 16px;
        gap: 10px;
    }

    .brand {
        font-size: 9px;
        letter-spacing: 1.2px;
        line-height: 1.2;
    }

    .header-bottom {
        flex-direction: column;
        gap: 8px;
    }

    .hero {
        padding: 120px 20px 40px;
    }

    h1 {
        font-size: 22px;
        letter-spacing: 1px;
        line-height: 1.2;
    }
}

/* Diplomas gallery styles */
.diplomas-container {
    margin: 30px auto;
    max-width: 900px;
    padding: 0 20px;
}

.diplomas-gallery {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-behavior: smooth;
}

.diplomas-gallery::-webkit-scrollbar {
    height: 8px;
}

.diplomas-gallery::-webkit-scrollbar-track {
    background: var(--rich-black);
    border-radius: 10px;
}

.diplomas-gallery::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
}

.diplomas-gallery::-webkit-scrollbar-thumb:hover {
    background: var(--text-gold);
}

.diploma-item {
    flex: 0 0 280px;
    height: 350px;
    border-radius: 8px;
    border: 2px solid var(--border-gold);
    background: var(--card-black);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 211, 106, 0.1);
}

.diploma-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(255, 211, 106, 0.25);
    border-color: var(--gold);
}

.diploma-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.diploma-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), transparent);
    color: var(--gold);
    padding: 16px 12px 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Modal for enlarged diplomas */
.diploma-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.diploma-modal.active {
    display: flex;
}

.diploma-modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.diploma-modal-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    border: 2px solid var(--gold);
}

.diploma-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: var(--gold);
    font-size: 36px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2001;
}

.diploma-modal-close:hover {
    color: var(--text-gold);
    transform: rotate(90deg);
}

.diplomas-scroll-hint {
    text-align: center;
    color: var(--border-gold);
    font-size: 12px;
    letter-spacing: 1px;
    margin-top: 12px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}
