/* Основной контент на очень маленьких экранах */
    main {
        padding-top: 0.75rem; /* Минимальный отступ */
    }
    
    .container:first-of-type,
    .loading-content:first-of-type {
        margin-top: 0.5rem; /* Минимальный отступ */
    }/* css/header-footer.css - Дополнительные стили для header и footer */

/* =============== HEADER STYLES =============== */

/* Основной контент */
main {
    padding-top: 2rem; /* Увеличили отступ от header для широких экранов */
}

/* Если есть breadcrumbs, убираем дублирующий отступ */
.breadcrumbs + main {
    padding-top: 1rem;
}

/* Контейнер после header */
.container:first-of-type,
.loading-content:first-of-type {
    margin-top: 1.5rem;
}

/* Мобильное меню */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.3s ease;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    align-self: center; /* Центрируем по вертикали */
    vertical-align: middle;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

.mobile-menu-toggle.active {
    transform: rotate(180deg);
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-light);
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(26, 26, 46, 0.98);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.mobile-menu.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-link-mobile {
    color: #e4e4e7;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: left;
    display: block;
    font-size: 1rem;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
}

.nav-link-mobile:hover {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
}

.lang-switcher-mobile {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-switcher-mobile .lang-btn {
    text-align: left;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    color: #e4e4e7;
    text-decoration: none;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 0.5rem;
}

.lang-switcher-mobile .lang-btn:hover {
    background: rgba(255, 215, 0, 0.3);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.5);
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(255, 215, 0, 0.2);
}

.lang-switcher-mobile .lang-btn.active {
    background: rgba(255, 215, 0, 0.2);
    color: #ffd700;
    border-color: rgba(255, 215, 0, 0.4);
    font-weight: bold;
}

/* Breadcrumbs */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.5rem 0;
    margin-top: 0; /* Убираем отступ сверху */
}

.breadcrumbs .container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-gold);
}

.breadcrumbs span {
    color: var(--text-muted);
}

/* =============== FOOTER STYLES =============== */

.footer {
    margin-top: 4rem;
    background: linear-gradient(135deg, 
        rgba(26, 26, 46, 0.95) 0%, 
        rgba(22, 33, 62, 0.95) 50%, 
        rgba(15, 52, 96, 0.95) 100%
    );
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--glass-border);
    color: var(--text-light);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem 1rem;
}

.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--primary-gold);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    color: var(--primary-gold);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.footer-section ul li::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 0;
    background: var(--primary-gold);
    transition: height 0.3s ease;
    border-radius: 2px;
}

.footer-section ul li:hover::before {
    height: 60%;
}

.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    padding: 0.25rem 0;
}

.footer-section ul li a:hover {
    color: var(--primary-gold);
    transform: translateX(5px);
}

.footer-stats {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.footer-stats span {
    background: var(--glass-bg);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--primary-gold);
    border: 1px solid var(--glass-border);
}

/* Newsletter */
.footer-newsletter {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 237, 74, 0.1));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 3rem;
    text-align: center;
}

.newsletter-content h4 {
    color: var(--primary-gold);
    margin-bottom: 0.5rem;
}

.newsletter-content p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    background: var(--glass-bg);
    color: var(--text-light);
    font-size: 1rem;
}

.newsletter-form input::placeholder {
    color: var(--text-muted);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.2);
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(45deg, var(--primary-gold), var(--light-gold));
    color: var(--dark-blue);
    border: none;
    border-radius: 25px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4);
}

.newsletter-form button.loading {
    pointer-events: none;
    opacity: 0.7;
}

.newsletter-form button.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer Bottom */
.footer-bottom {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-bottom h5 {
    color: var(--primary-gold);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.social-links, .lang-links, .app-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links a, .lang-links a, .app-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid transparent;
}

.social-links a:hover, .lang-links a:hover, .app-links a:hover {
    color: var(--primary-gold);
    background: var(--glass-bg);
    border-color: var(--glass-border);
    transform: translateX(5px);
}

/* Copyright */
.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

.copyright-main p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.copyright-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1rem 0;
    flex-wrap: wrap;
}

.copyright-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.copyright-links a:hover {
    color: var(--primary-gold);
}

.copyright-tech {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 1rem;
}

.copyright-tech strong {
    color: var(--primary-gold);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: linear-gradient(45deg, var(--primary-gold), var(--light-gold));
    color: var(--dark-blue);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    z-index: 1000;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
}

/* =============== RESPONSIVE DESIGN =============== */

@media (max-width: 1024px) {
    .footer-main {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-main .footer-section:first-child {
        grid-column: 1 / -1;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .footer-bottom {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* Header Mobile */
    .header {
        position: relative;
        min-height: 90px;
        max-height: 90px;
        overflow: visible;
    }
    
    .nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.75rem 1rem !important;
        min-height: 60px !important;
        max-height: 60px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }
    
    .logo {
        flex: 0 0 auto !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        padding: 0 !important;
        display: block !important;
        order: 1 !important;
    }
    
    .nav-menu {
        display: none !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: center !important;
        width: 40px !important;
        height: 40px !important;
        padding: 8px !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        position: static !important;
        order: 2 !important;
        flex-direction: column !important;
    }
    
    .mobile-menu-toggle span {
        display: block !important;
        width: 25px !important;
        height: 3px !important;
        background: var(--text-light) !important;
        margin: 3px 0 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-radius: 2px !important;
        transform-origin: center !important;
    }
    
    .lang-switcher {
        display: none !important;
    }
    
    /* Основной контент на мобильных */
    main {
        padding-top: 1rem; /* Меньший отступ на мобильных */
    }
    
    .container:first-of-type,
    .loading-content:first-of-type {
        margin-top: 0.75rem; /* Уменьшенный отступ */
    }
    
    /* Мобильное меню не влияет на высоту header */
    .mobile-menu {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        margin-top: 0;
    }
    
    /* Breadcrumbs Mobile */
    .breadcrumbs {
        margin-top: 0;
        padding: 0.4rem 0; /* Уменьшили вертикальный padding */
    }
    
    .breadcrumbs .container {
        font-size: 0.85rem; /* Меньший шрифт */
        gap: 0.4rem; /* Меньший отступ между элементами */
        padding: 0 1rem; /* Горизонтальные отступы */
    }
    
    /* Footer Mobile */
    .footer-content {
        padding: 2rem 1rem 1rem;
    }
    
    .footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .footer-stats {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .copyright-links {
        flex-direction: column;
        gap: 1rem;
    }
    
    .back-to-top {
        bottom: 1rem;
        right: 1rem;
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    /* Очень мобильные устройства */
    .header {
        min-height: 75px;
        max-height: 75px;
    }
    
    .nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 0.5rem 0.75rem !important;
        min-height: 55px !important;
        max-height: 55px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        flex-wrap: nowrap !important;
    }
    
    .logo {
        font-size: 1.3rem !important;
        line-height: 1.2 !important;
        margin: 0 !important;
        padding: 0 !important;
        flex: 0 0 auto !important;
        display: block !important;
        order: 1 !important;
    }
    
    .mobile-menu-toggle {
        display: flex !important;
        flex: 0 0 auto !important;
        align-items: center !important;
        justify-content: center !important;
        width: 35px !important;
        height: 35px !important;
        padding: 6px !important;
        margin: 0 !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        position: static !important;
        order: 2 !important;
        flex-direction: column !important;
    }
    
    .mobile-menu-toggle span {
        display: block !important;
        width: 22px !important;
        height: 2px !important;
        background: var(--text-light) !important;
        margin: 2px 0 !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        border-radius: 2px !important;
        transform-origin: center !important;
    }
    
    .mobile-menu-toggle span {
        width: 22px;
        height: 2px;
        margin: 2px 0;
    }
    
    .mobile-menu {
        padding: 0.5rem 0.75rem;
    }
    
    .nav-link-mobile,
    .lang-switcher-mobile .lang-btn {
        padding: 0.6rem 0.75rem;
        font-size: 0.95rem;
    }
    
    .footer-content {
        padding: 1.5rem 1rem 1rem;
    }
    
    .footer-newsletter {
        padding: 1.5rem;
    }
    
    .footer-stats {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-stats span {
        min-width: 120px;
        text-align: center;
    }
    
    .breadcrumbs {
        margin-top: 0;
        padding: 0.3rem 0; /* Еще меньший padding для очень маленьких экранов */
    }
    
    .breadcrumbs .container {
        font-size: 0.8rem; /* Еще меньший шрифт */
        gap: 0.3rem; /* Минимальный отступ */
        padding: 0 0.75rem; /* Меньшие горизонтальные отступы */
        line-height: 1.2; /* Уменьшили высоту строки */
    }
}

/* =============== ТЕМНАЯ/СВЕТЛАЯ ТЕМА =============== */

/* Светлая тема */
.theme-light {
    --primary-gold: #d4af37;
    --light-gold: #f4d03f;
    --dark-blue: #ffffff;
    --medium-blue: #f8f9fa;
    --light-blue: #e9ecef;
    --text-light: #212529;
    --text-muted: #6c757d;
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
    --shadow-gold: rgba(212, 175, 55, 0.3);
}

.theme-light body {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 50%, #e9ecef 100%);
}

.theme-light .header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.theme-light .footer {
    background: linear-gradient(135deg, 
        rgba(248, 249, 250, 0.95) 0%, 
        rgba(233, 236, 239, 0.95) 50%, 
        rgba(222, 226, 230, 0.95) 100%
    );
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Анимации для переключения темы */
body.theme-transitioning * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}

/* =============== ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ =============== */

/* Дополнительные отступы для контента */
.page-content,
.main-content {
    margin-top: 1.5rem;
}

/* Для sticky header добавляем отступ */
body {
    padding-top: 0; /* Убираем padding на body */
}

/* Первый элемент после header */
.header ~ *:not(.breadcrumbs) {
    margin-top: 1.5rem;
}

.header ~ .breadcrumbs ~ * {
    margin-top: 1rem;
}

/* Анимация появления элементов при прокрутке */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-section {
    animation: fadeInUp 0.6s ease forwards;
}

.footer-section:nth-child(1) { animation-delay: 0.1s; }
.footer-section:nth-child(2) { animation-delay: 0.2s; }
.footer-section:nth-child(3) { animation-delay: 0.3s; }
.footer-section:nth-child(4) { animation-delay: 0.4s; }
.footer-section:nth-child(5) { animation-delay: 0.5s; }

/* CSS с правильным базовым размером шрифта */
:root {
    --bible-font-size: 16px;
}

/* Устанавливаем нормальный размер по умолчанию */
#chapter-content {
    font-size: 16px; /* Базовый размер */
}

#chapter-content .verse {
    font-size: inherit;
}

#chapter-content .verse-text {
    font-size: inherit;
}

#chapter-content .verse-number {
    font-size: inherit;
}