/* ==========================================================================
   1. СБРОС И ГЛОБАЛЬНЫЕ ПЕРЕМЕННЫЕ (ПРАВОСЛАВНАЯ ПАЛИТРА)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Цветовая палитра (православная) */
    --gold: #FFD700;
    --dark-gold: #B8860B;
    --white: #FFFFFF;
    --blue: #0039A6;
    --red: #D52B1E;
    --dark-red: #8B0000;
    --black: #1A1A1A;
    --overlay-bg: rgba(10, 10, 20, 0.75);
}

body {
    font-family: 'PT Serif', 'Playfair Display', serif;
    color: var(--white);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    background-color: var(--black);
}

/* ==========================================================================
   2. ФОН-ФЛАГ РФ (НЕПОДВИЖНЫЙ)
   ========================================================================== */
.russian-flag-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -3;
    background: linear-gradient(180deg,
            var(--white) 0%,
            var(--white) 33.33%,
            var(--blue) 33.33%,
            var(--blue) 66.66%,
            var(--red) 66.66%,
            var(--red) 100%);
}

.russian-flag-layer::before,
.russian-flag-layer::after {
    display: none;
}

/* ===== ПРАВОСЛАВНЫЙ ОРНАМЕНТ (НЕПОДВИЖНЫЙ) ===== */
.ornament-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200" opacity="0.1"><path d="M100,20 L108,45 L135,45 L113,60 L122,87 L100,72 L78,87 L87,60 L65,45 L92,45 Z" fill="none" stroke="%23FFD700" stroke-width="1.5"/><circle cx="100" cy="100" r="20" fill="none" stroke="%23FFD700" stroke-width="1.5"/><path d="M100,80 L100,120 M80,100 L120,100" stroke="%23FFD700" stroke-width="1.5"/></svg>');
    background-repeat: repeat;
    background-size: 200px 200px;
    pointer-events: none;
    z-index: -2;
    opacity: 0.15;
    mix-blend-mode: overlay;
}

/* ==========================================================================
   3. КОНТЕЙНЕР И КОНТЕНТ
   ========================================================================== */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px 30px;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    z-index: 10;
}

/* ==========================================================================
   4. ШАПКА
   ========================================================================== */
.header {
    background: linear-gradient(rgba(10, 10, 20, 0.4), rgba(10, 10, 20, 0.5)), url('assets/images/hram.jpg');
    background-size: cover;
    background-position: center;
    backdrop-filter: blur(8px);
    border-radius: 40px 40px 40px 40px;
    padding: 40px 50px;
    margin-bottom: 30px;
    border: 2px solid var(--gold);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 215, 0, 0.3);
    text-align: center;
    border-bottom: 6px solid var(--gold);
}

.logo-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.logo-icon {
    width: 90px;
    height: 90px;
    background: rgba(139, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--gold);
    border: 4px solid var(--gold);
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.8), inset 0 0 20px rgba(255, 215, 0, 0.3);
    backdrop-filter: blur(4px);
}

.main-title {
    font-size: 4.5rem;
    font-weight: 900;
    font-family: 'Playfair Display', serif;
    background: linear-gradient(135deg, var(--gold), #FDB931, var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 2px;
    text-shadow: 2px 2px 15px rgba(0, 0, 0, 0.4);
}

.subtitle {
    font-size: 2rem;
    color: var(--gold);
    margin-bottom: 20px;
    font-weight: 400;
    border-bottom: 2px dashed rgba(255, 215, 0, 0.6);
    padding-bottom: 15px;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.3);
}

.project-description {
    max-width: 850px;
    margin: 0 auto;
    font-size: 1.3rem;
    background: rgba(20, 20, 30, 0.8);
    padding: 25px 40px;
    border-radius: 60px 20px 60px 20px;
    border-left: 8px solid var(--gold);
    border-right: 8px solid var(--gold);
    line-height: 1.8;
    color: #f5ebd2;
    backdrop-filter: blur(4px);
    box-shadow: inset 0 0 30px rgba(255, 215, 0, 0.2);
}

.project-description i {
    color: var(--gold);
    margin: 0 10px;
    font-size: 1.6rem;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}

/* ==========================================================================
   5. СТИХОТВОРЕНИЕ
   ========================================================================== */
.poem-memorial {
    text-align: center;
    max-width: 900px;
    margin: 30px auto 40px;
    padding: 45px 40px;
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(5px);
    border-radius: 70px 20px 70px 20px;
    border: 3px solid rgba(255, 215, 0, 0.5);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(255, 215, 0, 0.2);
}

.poem-memorial h3 {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 25px;
    text-shadow: 0 0 25px rgba(255, 215, 0, 0.6);
    line-height: 1.2;
}

.poem-memorial h3 i {
    margin: 0 10px;
}

.poem-text p {
    font-size: 1.5rem;
    line-height: 2.1;
    color: #f5e8d4;
    margin-bottom: 25px;
    font-family: 'PT Serif', serif;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.poem-text p:last-child {
    margin-bottom: 0;
}

.poem-text p:not(:last-child) {
    border-bottom: 2px dashed rgba(255, 215, 0, 0.25);
    padding-bottom: 20px;
}

/* ==========================================================================
   6. МОДАЛЬНОЕ ОКНО
   ========================================================================== */
.register-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 20, 0.98);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 100000;
    backdrop-filter: blur(20px);
    animation: fadeIn 0.5s ease;
}

.register-modal {
    background: #1A1A2E;
    border-radius: 70px 30px 70px 30px;
    padding: 60px;
    width: 90%;
    max-width: 520px;
    border: 5px solid var(--gold);
    box-shadow: 0 40px 90px rgba(0, 0, 0, 0.9), 0 0 100px rgba(255, 215, 0, 0.3);
    position: relative;
    animation: slideUp 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.close-register-modal {
    position: absolute;
    top: 25px;
    right: 25px;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: #2A2A3C;
    border: 3px solid var(--gold);
    color: var(--gold);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
}

.close-register-modal:hover {
    background: var(--gold);
    color: #1A1A2E;
    transform: rotate(180deg) scale(1.1);
    box-shadow: 0 0 30px var(--gold);
}

.register-modal h2 {
    text-align: center;
    color: var(--gold);
    margin-bottom: 40px;
    font-size: 3rem;
    font-weight: 700;
    border-bottom: 3px solid rgba(255, 215, 0, 0.5);
    padding-bottom: 20px;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.register-modal h2 i {
    color: var(--gold);
    margin-right: 15px;
    filter: drop-shadow(0 0 8px gold);
}

.form-group {
    margin-bottom: 35px;
}

.form-group label {
    display: block;
    color: var(--gold);
    margin-bottom: 15px;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.form-group label i {
    color: var(--gold);
    width: 35px;
    font-size: 1.8rem;
    filter: drop-shadow(0 0 5px rgba(255, 215, 0, 0.5));
}

.form-group input {
    width: 100%;
    padding: 20px 30px;
    border-radius: 60px;
    border: 3px solid var(--gold);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1.3rem;
    transition: all 0.3s ease;
    font-family: 'PT Serif', serif;
}

.form-group input:focus {
    outline: none;
    border-color: #FFD700;
    box-shadow: 0 0 0 6px rgba(255, 215, 0, 0.3), 0 0 30px rgba(255, 215, 0, 0.5);
    background: rgba(30, 30, 50, 0.7);
}

.form-group input::placeholder {
    color: rgba(255, 215, 0, 0.5);
    font-size: 1.2rem;
}

.register-submit-btn {
    width: 100%;
    padding: 22px;
    border-radius: 70px;
    border: none;
    background: linear-gradient(145deg, var(--gold), #B8860B);
    color: #1A1A2E;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 25px 0 15px;
    border: 3px solid #FFF0B5;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.3);
}

.register-submit-btn:hover {
    background: linear-gradient(145deg, #FFD700, #DAA520);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(255, 215, 0, 0.6);
}

.register-error,
.register-success {
    padding: 18px;
    border-radius: 40px;
    margin-bottom: 30px;
    display: none;
    font-size: 1.2rem;
    text-align: center;
    font-weight: 600;
}

.register-error {
    background: rgba(180, 60, 60, 0.3);
    border: 3px solid #b83b3b;
    color: #ffc1c1;
}

.register-success {
    background: rgba(76, 175, 80, 0.25);
    border: 3px solid #4CAF50;
    color: #c3e6cb;
}

.login-link {
    text-align: center;
    margin-top: 30px;
    font-size: 1.3rem;
    color: #e9d39c;
}

.login-link a {
    color: var(--gold);
    text-decoration: none;
    font-weight: 700;
    margin-left: 10px;
    border-bottom: 2px dotted var(--gold);
}

.login-link a:hover {
    color: #FFF0B5;
    border-bottom: 2px solid #FFF0B5;
}

/* ==========================================================================
   7. ОСНОВНОЙ БЛОК
   ========================================================================== */
.main-content {
    min-height: 200px;
}

.orthodox-welcome {
    text-align: center;
    padding: 50px 40px;
    background: linear-gradient(rgba(10, 10, 20, 0.2), rgba(10, 10, 20, 0.6)), url('assets/images/hero.jpg');
    background-size: cover;
    background-position: center;
    border-radius: 80px 20px 80px 20px;
    border: 3px solid var(--gold);
    margin: 30px 0 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), inset 0 0 40px rgba(255, 215, 0, 0.15);
}

.orthodox-welcome h3 {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 20px;
}

.orthodox-welcome p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 15px auto;
    color: #f5ebd2;
}

.orthodox-welcome .small-text {
    font-size: 1.2rem;
    color: var(--gold);
}

/* ==========================================================================
   8. ФУТЕР
   ========================================================================== */
.footer {
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 70px 70px 0 0;
    padding: 60px 60px 30px;
    margin-top: 60px;
    border-top: 6px solid var(--gold);
    box-shadow: 0 -30px 50px rgba(0, 0, 0, 0.5);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 2.3rem;
    color: var(--gold);
    margin-bottom: 25px;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.3);
}

.footer-logo i {
    font-size: 3rem;
    filter: drop-shadow(0 0 8px gold);
}

.footer-description {
    font-size: 1.2rem;
    color: #e0d2b0;
    margin-bottom: 25px;
    line-height: 1.8;
}

.footer-mission {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 215, 0, 0.1);
    padding: 15px 22px;
    border-radius: 60px;
    border: 1px solid var(--gold);
    font-size: 1.2rem;
    color: var(--gold);
}

.footer-title {
    color: var(--gold);
    font-size: 1.7rem;
    margin-bottom: 30px;
    border-bottom: 4px solid rgba(255, 215, 0, 0.4);
    padding-bottom: 12px;
}

.footer-nav {
    list-style: none;
}

.footer-nav li {
    margin-bottom: 18px;
}

.footer-nav a {
    color: #ecdba5;
    text-decoration: none;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.footer-nav a:hover {
    color: var(--gold);
    transform: translateX(12px);
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.contact-item {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.contact-item i {
    color: var(--gold);
    font-size: 1.6rem;
    width: 35px;
    filter: drop-shadow(0 0 5px gold);
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 1rem;
    color: #c4b386;
    margin-bottom: 4px;
}

.contact-details a,
.contact-details span {
    color: #f5e6b3;
    text-decoration: none;
    font-size: 1.2rem;
}

.social-description {
    color: #e0d2b0;
    margin-bottom: 15px;
}

.social-icons {
    display: flex;
    gap: 18px;
    margin: 25px 0;
    flex-wrap: wrap;
}

.social-icon {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: #2A2A3C;
    border: 3px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 2rem;
    transition: all 0.4s ease;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.social-icon:hover {
    background: var(--gold);
    color: #1A1A2E;
    transform: scale(1.15) rotate(8deg);
    border-color: white;
    box-shadow: 0 0 40px gold;
}

.newsletter p {
    color: #ecdba5;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.subscribe-form {
    display: flex;
    border: 3px solid var(--gold);
    border-radius: 70px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.2);
}

.subscribe-form input {
    flex: 1;
    padding: 18px 25px;
    border: none;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-size: 1.1rem;
}

.subscribe-form input::placeholder {
    color: #c4b386;
}

.subscribe-form button {
    background: var(--gold);
    border: none;
    padding: 0 30px;
    color: #1A1A2E;
    font-size: 1.6rem;
    cursor: pointer;
    transition: all 0.3s;
}

.subscribe-form button:hover {
    background: #FFD700;
    box-shadow: inset 0 0 20px rgba(255, 255, 255, 0.5);
}

.footer-bottom {
    border-top: 3px solid rgba(255, 215, 0, 0.3);
    padding-top: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 25px;
    font-size: 1.1rem;
}

.copyright {
    color: #e0d2b0;
}

.copyright-note i {
    color: var(--gold);
    margin: 0 6px;
}

.legal-links {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.legal-links a {
    color: #ecdba5;
    text-decoration: none;
    font-size: 1.1rem;
}

.legal-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

/* ==========================================================================
   9. СЧЕТЧИК В ФУТЕРЕ
   ========================================================================== */
.counter-section {
    text-align: center;
}

.counter-container {
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50px;
    padding: 25px 20px;
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

.counter-number {
    font-size: 5.5rem !important;
    font-weight: 900;
    color: #FFD700;
    line-height: 1;
    font-family: 'Playfair Display', serif;
    text-shadow: 0 0 20px rgba(255, 215, 0, 0.5);
    animation: counterPulse 2s infinite ease-in-out;
}

@keyframes counterPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* ==========================================================================
   10. АНИМАЦИИ
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   11. АДАПТИВ
   ========================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 30px 25px;
    }

    .main-title {
        font-size: 3.2rem;
    }

    .subtitle {
        font-size: 1.6rem;
    }

    .project-description {
        font-size: 1.2rem;
        padding: 20px;
    }

    .poem-memorial {
        padding: 35px 25px;
    }

    .poem-text p {
        font-size: 1.3rem;
    }

    .register-modal {
        padding: 40px;
    }

    .register-modal h2 {
        font-size: 2.3rem;
    }

    .footer {
        padding: 40px 25px 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .main-title {
        font-size: 2.5rem;
    }

    .logo-icon {
        width: 70px;
        height: 70px;
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.3rem;
    }

    .poem-memorial h3 {
        font-size: 2.5rem;
    }

    .poem-text p {
        font-size: 1.2rem;
        line-height: 1.8;
    }

    .orthodox-welcome h3 {
        font-size: 2.5rem;
    }

    .orthodox-welcome p {
        font-size: 1.2rem;
    }
}