/* RESET & BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: #F7F4EF;
    color: #1B1E23;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
    color: #1F3A5F;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }

a {
    color: #1F3A5F;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #162B46;
}

.text-muted { color: #6B7280; }
.text-secondary { color: #4B5563; }

/* MARKDOWN BODY */
.markdown-body {
    font-size: 1.125rem;
    line-height: 1.8;
}

.markdown-body h2 {
    margin-top: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E4DED5;
}

.markdown-body p {
    margin-bottom: 1.5rem;
}

.markdown-body ul, .markdown-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.markdown-body blockquote {
    border-left: 4px solid #2F6F6D;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #4B5563;
    font-style: italic;
}

/* BUTTONS */
.btn-primary, .btn-secondary, .btn-accent {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #1F3A5F;
    color: white;
}

.btn-primary:hover {
    background-color: #162B46;
    color: white;
}

.btn-secondary {
    background-color: #2F6F6D;
    color: white;
}

.btn-secondary:hover {
    background-color: #245956;
    color: white;
}

.btn-accent {
    background-color: #B88A2B;
    color: white;
}

.btn-accent:hover {
    background-color: #9A7425;
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ICONS */
[class^="icon-"] {
    display: inline-block;
    width: 24px;
    height: 24px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-small { width: 20px; height: 20px; }
.icon-large { width: 48px; height: 48px; }

/* HEADER */
.site-header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.site-brand {
    display: flex;
    flex-direction: column;
}

.parish-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F3A5F;
}

.parish-location {
    font-size: 0.875rem;
    color: #2F6F6D;
    margin-top: 0.25rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    display: block;
    height: 3px;
    width: 100%;
    background-color: #1F3A5F;
    border-radius: 2px;
    transition: 0.3s;
}

.main-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-top: 1px solid #E4DED5;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: #4B5563;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: #1F3A5F;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #1F3A5F;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.announcement-banner {
    background-color: #F3E7C7;
    padding: 0.75rem 1rem;
    text-align: center;
    position: relative;
}

.announcement-content {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1B1E23;
}

.announcement-close {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
}

/* HERO SECTION */
.parish-hero {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    max-width: 600px;
    color: white;
}

.hero-title {
    font-size: 3rem;
    color: white;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
}

/* QUICK INFO */
.quick-info-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border-top: 4px solid #2F6F6D;
    transition: transform 0.2s ease;
}

.info-card:hover {
    transform: translateY(-5px);
}

.info-card h3 {
    margin: 1rem 0;
    color: #1F3A5F;
}

.mass-times, .events-list {
    list-style: none;
    margin: 1.5rem 0;
}

.mass-times li, .events-list li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #E4DED5;
}

.event-date {
    display: inline-block;
    width: 60px;
    color: #2F6F6D;
    font-weight: 600;
}

.info-link {
    display: inline-block;
    color: #1F3A5F;
    font-weight: 600;
    margin-top: 1rem;
}

/* SECTION STYLES */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.badge-new {
    background-color: #F3E7C7;
    color: #B88A2B;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.announcements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.announcement-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #E4DED5;
    position: relative;
}

.announcement-badge {
    position: absolute;
    top: -10px;
    right: 1rem;
    background-color: #B42318;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.announcement-date {
    color: #2F6F6D;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

/* LIVESTREAM */
.section-livestream {
    background: linear-gradient(135deg, #1F3A5F 0%, #2F6F6D 100%);
    color: white;
    padding: 3rem 0;
    margin: 3rem 0;
    border-radius: 8px;
}

.livestream-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.livestream-content h2 {
    color: white;
    margin-bottom: 1rem;
}

.livestream-info {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.countdown-timer {
    display: flex;
    gap: 0.5rem;
}

.countdown-timer span {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem;
    border-radius: 4px;
    min-width: 40px;
    text-align: center;
    font-weight: 600;
}

.livestream-placeholder {
    background: rgba(0,0,0,0.2);
    aspect-ratio: 16/9;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-icon {
    font-size: 3rem;
    color: white;
    opacity: 0.7;
}

/* GALLERY */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.gallery-item {
    aspect-ratio: 4/3;
    background-size: cover;
    background-position: center;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.75rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* PRAYER */
.prayer-card {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    margin: 3rem 0;
    border-left: 6px solid #B88A2B;
}

.prayer-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.prayer-text {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #4B5563;
    margin: 2rem 0;
    quotes: "«" "»";
}

.prayer-text::before {
    content: open-quote;
    font-size: 3rem;
    color: #2F6F6D;
    vertical-align: -0.5em;
    margin-right: 0.25rem;
}

.prayer-author {
    text-align: right;
    color: #6B7280;
    font-style: italic;
}

/* VOLUNTEERS */
.section-volunteers {
    background-color: #2F6F6D;
    color: white;
    padding: 3rem;
    border-radius: 8px;
    margin: 3rem 0;
}

.section-volunteers h2 {
    color: white;
}

.volunteer-roles {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.role-tag {
    background: rgba(255,255,255,0.1);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

/* CONTENT GRID */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.content-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.content-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.card-image {
    height: 200px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.content-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.card-excerpt {
    color: #4B5563;
    margin-bottom: 1rem;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #6B7280;
    padding-top: 1rem;
    border-top: 1px solid #E4DED5;
}

/* PAGINATION */
.pagination-nav {
    margin: 3rem 0;
}

.pagination-list {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 0.5rem;
}

.pagination-link {
    padding: 0.5rem 1rem;
    border: 1px solid #E4DED5;
    border-radius: 4px;
    color: #4B5563;
    transition: all 0.2s ease;
}

.pagination-link:hover, .pagination-link.active {
    background-color: #1F3A5F;
    color: white;
    border-color: #1F3A5F;
}

/* BLOG */
.blog-section {
    padding: 3rem 0;
}

.blog-header {
    text-align: center;
    margin-bottom: 3rem;
}

.blog-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.blog-description {
    font-size: 1.25rem;
    color: #4B5563;
    max-width: 600px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

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

.blog-content {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.blog-date {
    color: #2F6F6D;
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
}

.blog-tag {
    background: #F3E7C7;
    color: #B88A2B;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.blog-post-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.blog-excerpt {
    color: #4B5563;
    margin-bottom: 1rem;
}

.blog-author {
    font-size: 0.875rem;
    color: #6B7280;
    padding-top: 1rem;
    border-top: 1px solid #E4DED5;
}

/* SINGLE ARTICLE */
.single-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.article-hero {
    margin-bottom: 3rem;
    border-radius: 8px;
    overflow: hidden;
}

.article-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.hero-caption {
    text-align: center;
    font-size: 0.875rem;
    color: #6B7280;
    margin-top: 0.5rem;
    padding: 0.5rem;
}

.article-container {
    background: white;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.article-header {
    margin-bottom: 3rem;
    text-align: center;
}

.article-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: #6B7280;
}

.article-date {
    color: #2F6F6D;
    font-weight: 600;
}

.article-categories {
    display: flex;
    gap: 0.5rem;
}

.category-link {
    background: #F3E7C7;
    color: #B88A2B;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.article-title {
    font-size: 3rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.article-description {
    font-size: 1.25rem;
    color: #4B5563;
    max-width: 600px;
    margin: 0 auto;
}

.article-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.article-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #E4DED5;
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.tags-label {
    color: #4B5563;
    font-weight: 600;
    margin-right: 0.5rem;
}

.article-tag {
    background: #E4DED5;
    color: #4B5563;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
}

.article-divider {
    border: none;
    height: 1px;
    background: #E4DED5;
    margin: 4rem auto;
    width: 100%;
    max-width: 800px;
}

/* RELATED ARTICLES */
.related-articles {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem 3rem;
}

.related-header {
    text-align: center;
    margin-bottom: 2rem;
}

.related-title {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.related-subtitle {
    color: #6B7280;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.related-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.2s ease;
}

.related-card:hover {
    transform: translateY(-5px);
}

.related-image {
    height: 150px;
    overflow: hidden;
}

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

.related-content {
    padding: 1.5rem;
}

.related-card-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
}

.related-excerpt {
    color: #4B5563;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.related-date {
    font-size: 0.75rem;
    color: #6B7280;
}

/* FOOTER */
.site-footer {
    background-color: #1F3A5F;
    color: white;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-title, .footer-subtitle {
    color: white;
    margin-bottom: 1rem;
}

.footer-subtitle {
    font-size: 1.125rem;
}

.footer-address {
    font-style: normal;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
}

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

.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: white;
    font-weight: bold;
    text-decoration: none;
    transition: background 0.2s ease;
}

.social-link:hover {
    background: rgba(255,255,255,0.2);
}

.copyright {
    font-size: 0.875rem;
    color: rgba(255,255,255,0.6);
    margin-top: auto;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
}

.footer-bottom a {
    color: rgba(255,255,255,0.7);
    font-size: 0.875rem;
}

.footer-bottom a:hover {
    color: white;
}

/* SKIP LINK */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #1F3A5F;
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 9999;
}

.skip-link:focus {
    top: 0;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-navigation {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
        border: none;
    }

    .main-navigation.active {
        max-height: 500px;
        padding: 1rem 0;
        border-top: 1px solid #E4DED5;
    }

    .nav-menu {
        flex-direction: column;
        gap: 0;
    }

    .nav-item {
        border-bottom: 1px solid #E4DED5;
    }

    .nav-link {
        display: block;
        padding: 0.75rem 0;
    }

    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .livestream-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .quick-info-section {
        grid-template-columns: 1fr;
    }

    .content-grid, .blog-grid {
        grid-template-columns: 1fr;
    }

    .article-container {
        padding: 2rem 1rem;
    }

    .article-title {
        font-size: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .content-grid, .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-info-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* UTILITY CLASSES */
.stretched-link::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    content: "";
}

.mb-5 { margin-bottom: 3rem; }
.my-5 { margin: 3rem 0; }
.my-4 { margin: 2rem 0; }
.mb-4 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }

/* ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.content-card, .info-card, .announcement-card {
    animation: fadeIn 0.3s ease-out;
}

/* === FIX: центрирование контейнера с .my-5/.my-4 === */
.container.my-5 { margin: 3rem auto !important; }
.container.my-4 { margin: 2rem auto !important; }

/* если контейнер — это именно <main class="container my-5"> */
main.container.my-5 { margin: 3rem auto !important; }
main.container.my-4 { margin: 2rem auto !important; }

/* === FIX: убрать липкий хедер === */
.site-header { position: static !important; top: auto !important; }
/* ===== FIX: stretched-link не должен накрывать весь сайт ===== */
/* Делаем карточки "контейнером" для stretched-link::after */
.info-card,
.announcement-card,
.blog-card,
.content-card,
.related-card {
    position: relative;
}

/* ===== FIX: убрать sticky, но оставить слой/стэкинг для хедера ===== */
.site-header {
    position: relative !important; /* не sticky, но срабатывает z-index */
    top: auto !important;
}

/* ===== FIX: my-* должны быть только вертикальными (иначе ломают centering .container) ===== */
.my-5 { margin-top: 3rem !important; margin-bottom: 3rem !important; }
.my-4 { margin-top: 2rem !important; margin-bottom: 2rem !important; }
/* =========================
   PAGINATION — FIX (layout + style)
   вставить в самый конец theme.css
   ========================= */

/* 1) Если пагинация оказалась внутри grid-контейнера — заставляем её занять всю строку */
.content-grid .pagination,
.content-grid nav.pagination,
.content-grid .pagination-nav,
.blog-grid .pagination,
.blog-grid nav.pagination,
.blog-grid .pagination-nav,
.announcements-grid .pagination,
.announcements-grid nav.pagination,
.announcements-grid .pagination-nav {
    grid-column: 1 / -1;
    justify-self: center;
    width: 100%;
}

/* 2) Делаем пагинацию горизонтальной для любых популярных разметок */
.pagination,
.pagination-nav,
nav.pagination,
.navigation.pagination {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin: 3rem 0 !important;
    width: 100%;
}

.pagination ul,
.pagination .nav-links,
.pagination-list,
ul.page-numbers {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: .5rem !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 3) “кнопки” страниц (и для твоих классов, и для bootstrap/wp-типичных) */
.pagination a,
.pagination span,
.page-numbers,
.page-link,
.pagination-link {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 .9rem;

    background: #FFFFFF;
    border: 1px solid #E4DED5;
    border-radius: 8px;

    color: #4B5563;
    text-decoration: none;
    font-weight: 600;
    line-height: 1;

    transition: background-color .15s ease, border-color .15s ease, color .15s ease, transform .05s ease;
}

/* hover */
.pagination a:hover,
a.page-numbers:hover,
.page-link:hover,
.pagination-link:hover {
    background: #1F3A5F;
    border-color: #1F3A5F;
    color: #FFFFFF;
}

/* active/current */
.page-numbers.current,
.pagination .current,
.pagination [aria-current="page"],
.pagination-link.active,
.page-item.active .page-link {
    background: #1F3A5F !important;
    border-color: #1F3A5F !important;
    color: #FFFFFF !important;
}

/* dots/ellipsis */
.page-numbers.dots,
.pagination .dots {
    background: transparent !important;
    border-color: transparent !important;
    min-width: auto;
    padding: 0 .25rem;
    color: #6B7280;
}

/* disabled */
.page-item.disabled .page-link,
.pagination [aria-disabled="true"] {
    opacity: .55;
    pointer-events: none;
}

/* keyboard focus */
.pagination a:focus-visible,
.page-link:focus-visible,
.page-numbers:focus-visible,
.pagination-link:focus-visible {
    outline: 3px solid rgba(47, 111, 109, .35);
    outline-offset: 2px;
}
/* =========================
   PAGINATION — убрать точки (li markers) + нормальный layout
   ========================= */

/* если пагинация — это САМ <ul class="pagination"> (bootstrap-стиль) */
ul.pagination,
ol.pagination,
ul.page-numbers {
    list-style: none !important;
    padding-left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* если пагинация — nav/div, а внутри ul/ol */
.pagination ul,
.pagination ol,
.pagination-nav ul,
.pagination-nav ol,
.navigation.pagination ul,
.navigation.pagination ol {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 !important;
}

/* на всякий случай: убираем маркеры и псевдо-разделители у li */
.pagination li,
ul.pagination > li,
ol.pagination > li,
ul.page-numbers > li,
.page-item {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.pagination li::marker,
ul.pagination > li::marker,
ol.pagination > li::marker,
ul.page-numbers > li::marker {
    content: "" !important;
}

.pagination li::before,
.pagination li::after {
    content: none !important;
}
