/* ==========================================================================
   Front Page - News Portal Style
   ========================================================================== */

/* --- Layout --- */
.fp-wrap {
    margin: 0 auto;
    max-width: 1170px;
    padding: 0 15px;
}

/* --- Section --- */
.fp-section {
    margin-bottom: 40px;
}

.fp-section-title {
    font-family: "Yandex Sans Text", "Roboto Condensed", sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #2c5282;
}

/* ==========================================================================
   BLOCK 1: Featured News (Carousel + List)
   ========================================================================== */
.fp-featured {
    margin-bottom: 40px;
}

.fp-featured-inner {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* --- Carousel (2/3) --- */
.fp-carousel {
    flex: 0 0 66.666%;
    max-width: 66.666%;
    position: relative;
    overflow: hidden;
    background: #1a365d;
}

.fp-carousel-slides {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
}

.fp-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.fp-slide--active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.fp-slide-link {
    display: block;
    width: 100%;
    height: 100%;
}

.fp-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.fp-slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 25px 25px;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 60%, transparent 100%);
    color: #fff;
    z-index: 2;
}

.fp-slide-cat {
    display: inline-block;
    background: #2c5282;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 3px;
    text-decoration: none;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fp-slide-cat:hover {
    background: #1a365d;
    color: #fff;
    text-decoration: none;
}

.fp-slide-title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px;
}

.fp-slide-title a {
    color: #fff;
    text-decoration: none;
}

.fp-slide-title a:hover {
    text-decoration: underline;
}

.fp-slide-excerpt {
    font-size: 14px;
    line-height: 1.5;
    margin: 0;
    opacity: 0.9;
}

/* Carousel dots */
.fp-carousel-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.fp-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, border-color 0.3s;
}

.fp-dot:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.5);
}

.fp-dot--active {
    background: #fff;
    border-color: #fff;
}

/* --- Featured List (1/3) --- */
.fp-featured-list {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    display: flex;
    flex-direction: column;
}

.fp-featured-item {
    flex: 1;
    padding: 15px 20px;
    border-bottom: 1px solid #e8ecf1;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.fp-featured-item:last-child {
    border-bottom: none;
}

.fp-featured-item:hover {
    background: #f0f7ff;
}

.fp-featured-item--active {
    background: #e6f2ff;
    border-left: 3px solid #2c5282;
}

.fp-featured-item-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 4px;
    color: #1a365d;
}

.fp-featured-item--active .fp-featured-item-title {
    color: #2c5282;
}

.fp-featured-item-cat {
    font-size: 12px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}


/* ==========================================================================
   BLOCKS 2 & 3: News / Publications Grid (4 cols x 2 rows)
   ========================================================================== */
.fp-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.fp-card {
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s, transform 0.2s;
}

.fp-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.fp-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.fp-card-image {
    width: 100%;
    aspect-ratio: 16/10;
    overflow: hidden;
    background: #e8ecf1;
}

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

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

.fp-card-body {
    padding: 12px 14px;
}

.fp-card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
    color: #1a365d;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fp-card-link:hover .fp-card-title {
    color: #2c5282;
}

.fp-card-date {
    font-size: 12px;
    color: #a0aec0;
}


/* ==========================================================================
   BLOCK 4: All Materials (Content + Sidebar)
   ========================================================================== */
.fp-all-section {
    margin-bottom: 60px;
}

.fp-all-inner {
    display: flex;
    gap: 30px;
}

/* --- Main content (2/3) --- */
.fp-all-content {
    flex: 0 0 calc(66.666% - 15px);
    max-width: calc(66.666% - 15px);
}

/* Horizontal card */
.fp-hcard {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid #e8ecf1;
}

.fp-hcard:first-child {
    padding-top: 0;
}

.fp-hcard-image {
    flex: 0 0 200px;
    display: block;
    border-radius: 4px;
    overflow: hidden;
    background: #e8ecf1;
}

.fp-hcard-image img {
    width: 200px;
    height: 130px;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

.fp-hcard-image:hover img {
    opacity: 0.85;
}

.fp-hcard-body {
    flex: 1;
    min-width: 0;
}

.fp-hcard-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 3px;
    text-decoration: none;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #e6f2ff;
    color: #2c5282;
}

.fp-hcard-badge:hover {
    background: #2c5282;
    color: #fff;
    text-decoration: none;
}

/* Category-specific badge colors */
.fp-badge--news { background: #e6f2ff; color: #2c5282; }
.fp-badge--publications { background: #f0fff4; color: #276749; }
.fp-badge--mitropoliya { background: #fef5e7; color: #975a16; }
.fp-badge--regional { background: #faf5ff; color: #6b46c1; }
.fp-badge--tradition { background: #fff5f5; color: #c53030; }
.fp-badge--propoved { background: #e6fffa; color: #285e61; }
.fp-badge--person { background: #fefcbf; color: #975a16; }
.fp-badge--culture { background: #fed7e2; color: #97266d; }

.fp-hcard-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 6px;
}

.fp-hcard-title a {
    color: #1a365d;
    text-decoration: none;
}

.fp-hcard-title a:hover {
    color: #2c5282;
    text-decoration: underline;
}

.fp-hcard-excerpt {
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
    margin: 0 0 6px;
}

.fp-hcard-date {
    font-size: 12px;
    color: #a0aec0;
}

/* Pagination */
.fp-pagination {
    margin: 30px 0 0;
    text-align: center;
}

.fp-pagination .page-numbers {
    display: inline-block;
    padding: 8px 14px;
    margin: 0 3px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    text-decoration: none;
    color: #2c5282;
    font-size: 14px;
    transition: all 0.2s;
}

.fp-pagination .page-numbers:hover {
    background: #e6f2ff;
    border-color: #2c5282;
}

.fp-pagination .page-numbers.current {
    background: #2c5282;
    color: #fff;
    border-color: #2c5282;
}

.fp-pagination .page-numbers.dots {
    border: none;
    padding: 8px 6px;
}


/* ==========================================================================
   Sidebar
   ========================================================================== */
.fp-sidebar {
    flex: 0 0 calc(33.333% - 15px);
    max-width: calc(33.333% - 15px);
}

.fp-sidebar-block {
    background: transparent;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: none;
}

.fp-sidebar-title {
    font-family: "Roboto Condensed", sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #1a365d;
    margin: 0 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2c5282;
}

.fp-sidebar-image {
    width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin-bottom: 10px;
}

.fp-sidebar-shop .fp-sidebar-image,
.fp-sidebar-tradition .fp-sidebar-image {
    width: 50%;
    margin-left: auto;
    margin-right: auto;
}

.fp-sidebar-image-link {
    display: block;
}

.fp-sidebar-text {
    font-size: 14px;
    line-height: 1.5;
    color: #4a5568;
    margin: 0 0 10px;
}

.fp-sidebar-text a {
    color: #2c5282;
    text-decoration: none;
}

.fp-sidebar-text a:hover {
    text-decoration: underline;
}

.fp-sidebar-more {
    display: inline-block;
    font-size: 14px;
    color: #2c5282;
    text-decoration: none;
    font-weight: 600;
}

.fp-sidebar-more:hover {
    text-decoration: underline;
    color: #1a365d;
}

.fp-sidebar-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.fp-sidebar-list li {
    list-style-type: none;
    padding: 8px 0;
    border-bottom: 1px solid #f0f4f8;
    font-size: 14px;
}

.fp-sidebar-list li:last-child {
    border-bottom: none;
}

.fp-sidebar-list li a {
    color: #2c5282;
    text-decoration: none;
}

.fp-sidebar-list li a:hover {
    text-decoration: underline;
    color: #1a365d;
}

/* Calendar widget - same white background as other sidebar blocks */

.fp-calendar-dates {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.fp-calendar-date {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.fp-calendar-day {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.fp-calendar-month {
    font-size: 14px;
    margin-top: 4px;
    opacity: 0.9;
}

.fp-calendar-style {
    font-size: 11px;
    opacity: 0.7;
    margin-top: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fp-calendar-divider {
    font-size: 32px;
    opacity: 0.4;
    font-weight: 300;
}


/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Tablet - large */
@media (max-width: 1200px) {
    .fp-wrap {
        max-width: 100%;
    }

    .fp-slide-title {
        font-size: 20px;
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .fp-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .fp-featured-inner {
        flex-direction: column;
    }

    .fp-carousel {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .fp-featured-list {
        flex: 0 0 100%;
        max-width: 100%;
        flex-direction: row;
        overflow-x: auto;
    }

    .fp-featured-item {
        flex: 0 0 auto;
        min-width: 200px;
        border-bottom: none;
        border-right: 1px solid #e8ecf1;
    }

    .fp-featured-item--active {
        border-left: none;
        border-bottom: 3px solid #2c5282;
    }

    .fp-all-inner {
        flex-direction: column;
    }

    .fp-all-content {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .fp-sidebar {
        flex: 0 0 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* Mobile - large */
@media (max-width: 768px) {
    .fp-slide-title {
        font-size: 18px;
    }

    .fp-slide-excerpt {
        display: none;
    }

    .fp-hcard {
        flex-direction: column;
    }

    .fp-hcard-image {
        flex: 0 0 auto;
    }

    .fp-hcard-image img {
        width: 100%;
        height: 200px;
    }
}

/* Mobile */
@media (max-width: 600px) {
    .fp-wrap {
        padding: 0 10px;
    }

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

    .fp-featured-list {
        flex-direction: column;
    }

    .fp-featured-item {
        min-width: auto;
        border-right: none;
        border-bottom: 1px solid #e8ecf1;
    }

    .fp-featured-item--active {
        border-bottom: none;
        border-left: 3px solid #2c5282;
    }

    .fp-slide-caption {
        padding: 30px 15px 15px;
    }

    .fp-slide-title {
        font-size: 16px;
    }

    .fp-section-title {
        font-size: 22px;
    }

    .fp-sidebar {
        grid-template-columns: 1fr;
    }

    .fp-carousel-slides {
        padding-bottom: 66%; /* Taller on mobile */
    }
}
