/*
Theme Name: ONews Apple Editorial
*/

/* 1. ТИПОГРАФИКА И ЧТЕНИЕ */
.prose-apple {
    max-width: 740px;
    margin: 0 auto;
}

.prose-apple p {
    font-size: 19px;
    line-height: 1.75;
    color: #1d1d1f;
    margin-bottom: 1.8rem;
}

.prose-apple h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.prose-apple img {
    border-radius: 24px;
    margin: 2rem 0;
}

/* 2. МЕТА-ДАННЫЕ, ТЕГИ И КАТЕГОРИИ */
header a[rel="tag"], 
.category-badge-link, 
.post-categories a {
    background: rgba(0, 113, 227, 0.08) !important;
    color: #0071e3 !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    display: inline-block !important;
    transition: all 0.2s ease;
}

header a[rel="tag"]:hover, 
.category-badge-link:hover, 
.post-categories a:hover {
    background: #0071e3 !important;
    color: #ffffff !important;
    transform: translateY(-1px);
}

/* 3. САЙДБАР И КНОПКА UZLOTIN */
.uzlotin-btn {
    display: block !important;
    text-align: center !important;
    background: #1d1d1f !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 16px !important;
    border-radius: 18px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
}

.uzlotin-btn:hover {
    background: #0071e3 !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 20px rgba(0, 113, 227, 0.2) !important;
}

.widget-title {
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #86868b;
    margin-bottom: 20px;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    padding: 12px 0;
    border-bottom: 1px solid #f5f5f7;
}

.widget ul li a {
    color: #1d1d1f;
    text-decoration: none;
    font-weight: 600;
}

.widget ul li a:hover {
    color: #0071e3;
}

/* 4. ПАГИНАЦИЯ (ИСПРАВЛЕННАЯ ПОД ГЕНЕРАЦИЮ WP) */
/* Эти стили теперь работают и для .pagination (главная) и для .navigation (категории) */
.pagination, .navigation.pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 8px !important;
    margin-top: 60px !important;
    margin-bottom: 60px !important;
}

.pagination .nav-links, .navigation .nav-links {
    display: flex !important;
    gap: 8px !important;
}

.page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 44px !important;
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: #1d1d1f !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 1px solid #f2f2f7 !important;
    transition: all 0.2s ease !important;
}

.page-numbers:hover {
    background: #f5f5f7 !important;
    border-color: #d2d2d7 !important;
}

.page-numbers.current {
    background: #0071e3 !important;
    color: #ffffff !important;
    border-color: #0071e3 !important;
}

.page-numbers.dots {
    background: transparent !important;
    border: none !important;
    color: #86868b !important;
}

/* 5. ФИКСЫ ДЛЯ ГЕРО-СЕКЦИИ */
.hero-article h2 a {
    color: white !important;
    text-decoration: none !important;
}

/* 6. АДАПТИВНОСТЬ */
@media (max-width: 768px) {
    .prose-apple p {
        font-size: 18px;
        line-height: 1.6;
    }
    header h1 {
        font-size: 32px !important;
    }
}
/* ССЫЛКИ ВНУТРИ ТЕКСТА ПОСТА */
.prose-apple a {
    color: #0071e3 !important; /* Фирменный синий Apple */
    text-decoration: underline !important;
    text-decoration-color: rgba(0, 113, 227, 0.3) !important; /* Полупрозрачное подчеркивание */
    text-underline-offset: 4px; /* Отступ подчеркивания от текста */
    transition: all 0.2s ease !important;
    font-weight: 500 !important;
}

.prose-apple a:hover {
    color: #005bbd !important; /* Чуть темнее при наведении */
    text-decoration-color: #005bbd !important; /* Яркое подчеркивание при наведении */
}

/* Исключение для изображений-ссылок, чтобы вокруг них не было синих линий */
.prose-apple a img {
    text-decoration: none !important;
    border: none !important;
}

/* УЛУЧШЕННАЯ ТИПОГРАФИКА ДЛЯ ТЕКСТА */
.prose-apple {
    max-width: 740px;
    margin: 0 auto;
    color: #1d1d1f;
}

/* Отступы между абзацами */
.prose-apple p {
    font-size: 19px;
    line-height: 1.75;
    margin-bottom: 1.5rem;
}

/* Маркированные списки (Bullets) */
.prose-apple ul {
    list-style-type: disc !important;
    margin-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.prose-apple ul li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    font-size: 18px;
    line-height: 1.6;
}

/* Нумерованные списки */
.prose-apple ol {
    list-style-type: decimal !important;
    margin-left: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.prose-apple ol li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
    font-size: 18px;
    line-height: 1.6;
}

/* Цитаты (Blockquotes) */
.prose-apple blockquote {
    border-left: 4px solid #0071e3;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #424245;
}

/* Подзаголовки внутри текста */
.prose-apple h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

/* ТАБЛИЦЫ В ТЕКСТЕ */
.prose-apple table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin: 2.5rem 0 !important;
    font-size: 16px !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    border: 1px solid #f2f2f7 !important;
}

.prose-apple th {
    background-color: #f5f5f7 !important;
    color: #1d1d1f !important;
    font-weight: 700 !important;
    text-align: left !important;
    padding: 16px !important;
    border-bottom: 2px solid #e5e5e7 !important;
}

.prose-apple td {
    padding: 16px !important;
    border-bottom: 1px solid #f2f2f7 !important;
    color: #424245 !important;
}

.prose-apple tr:last-child td {
    border-bottom: none !important;
}

.prose-apple tr:hover td {
    background-color: #fafafa !important;
}

/* Адаптивность для таблиц */
@media (max-width: 768px) {
    .prose-apple table {
        display: block !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
    }
}

/* ОТСТУП САЙДБАРА И ОСНОВНОГО КОНТЕНТА ОТ ФУТЕРА */
aside, 
.lg\:w-2\/3, 
.lg\:w-1\/3 {
    margin-bottom: 5rem !important; /* Большой отступ в 80px */
}

/* На мобильных устройствах, чтобы блоки не слипались */
@media (max-width: 1024px) {
    aside {
        margin-top: 2rem;
        margin-bottom: 4rem !important;
    }
}