/* Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V4 */
/**
 * Санкт-Петербургский Фехтовальный Клуб (fencing-club.ru)
 * Хаб «Мероприятия» — Вариант 2 (Playfair Display для главных заголовков + Ubuntu для карточек и текста)
 * Scoped Namespace: .club-events-hub--playfair
 */

/* ==========================================================================
   1. Base Hub Layout & Resets
   ========================================================================== */

.club-events-hub--playfair {
    box-sizing: border-box;
    font-family: 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #222222;
    line-height: 1.5;
    padding-top: 20px;
    padding-bottom: 70px;
    clear: both !important;
    float: none !important;
    width: 100% !important;
    display: block !important;
}

.club-events-hub--playfair *,
.club-events-hub--playfair *::before,
.club-events-hub--playfair *::after {
    box-sizing: inherit;
}

.club-events-hub--playfair h1,
.club-events-hub--playfair h2,
.club-events-hub--playfair h3,
.club-events-hub--playfair h4,
.club-events-hub--playfair p,
.club-events-hub--playfair div,
.club-events-hub--playfair section,
.club-events-hub--playfair header,
.club-events-hub--playfair nav,
.club-events-hub--playfair article {
    float: none;
}

/* ==========================================================================
   2. Page Header, Single-Row Format Filter & Intro Block
   ========================================================================== */

.club-events-hub--playfair .ceh-header {
    margin-bottom: 35px;
    display: block;
    width: 100%;
}

/* Main Section Heading: True heading in Playfair Display */
.club-events-hub--playfair .ceh-header__title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 46px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    line-height: 1.15;
    letter-spacing: -0.01em;
    display: block;
    width: 100%;
}

.club-events-hub--playfair .ceh-nav-types {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 26px;
    padding-bottom: 14px;
    border-bottom: 1px solid #E2E2E2;
    width: 100%;
    margin-bottom: 20px;
}

.club-events-hub--playfair .ceh-type-link {
    font-family: 'Ubuntu', sans-serif;
    font-size: 15px;
    font-weight: 500;
    color: #444444;
    text-decoration: none;
    padding: 6px 0;
    position: relative;
    transition: color 0.2s ease;
    white-space: nowrap;
    display: inline-block;
}

.club-events-hub--playfair .ceh-type-link:hover {
    color: #79272A;
    text-decoration: none;
}

.club-events-hub--playfair .ceh-type-link.is-active {
    color: #79272A;
    font-weight: 700;
}

.club-events-hub--playfair .ceh-type-link.is-active::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #79272A;
}

.club-events-hub--playfair .ceh-intro-text {
    font-size: 15px;
    line-height: 1.6;
    color: #555555;
    max-width: 900px;
    margin-top: 10px;
}

/* ==========================================================================
   3. Unified Events Grid (3 Columns) & Promo Banner (Span 2)
   ========================================================================== */

.club-events-hub--playfair .ceh-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px 30px;
    border-bottom: 1px solid #E2E2E2;
    padding-bottom: 45px;
    margin-bottom: 60px;
    width: 100%;
    align-items: stretch;
}

/* Promo Banner: Spans exactly 2 columns */
.club-events-hub--playfair .ceh-promo-banner {
    grid-column: span 2;
    display: flex;
    background-color: #79272A;
    color: #FFFFFF;
    border-radius: 4px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.24s ease;
}

.club-events-hub--playfair .ceh-promo-banner__content {
    flex: 1 1 50%;
    padding: 35px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
}

.club-events-hub--playfair .ceh-promo-banner__date {
    margin: 0 0 8px;
    color: inherit;
    font-family: var(--spbfc-heading-font);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    opacity: 0.9;
}

/* Featured Banner Title: True heading in Playfair Display */
.club-events-hub--playfair .ceh-promo-banner__title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.club-events-hub--playfair .ceh-promo-banner__title a {
    color: #FFFFFF !important;
    text-decoration: none;
}

.club-events-hub--playfair .ceh-promo-banner__desc {
    font-size: 14.5px;
    line-height: 1.5;
    opacity: 0.94;
    margin: 0;
}

.club-events-hub--playfair .ceh-promo-banner__details {
    margin-top: 10px;
    font-size: 12.5px;
    line-height: 1.4;
    opacity: 0.72;
}

.club-events-hub--playfair .ceh-promo-banner__media {
    flex: 1 1 50%;
    align-self: stretch;
    max-width: 50%;
    position: relative;
    min-height: 0;
    overflow: hidden;
    background-color: #FFFFFF;
}

.club-events-hub--playfair .ceh-promo-banner__media a {
    position: absolute;
    inset: 0;
    display: block;
}

.club-events-hub--playfair .ceh-promo-banner__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

/* ==========================================================================
   4. Clean Card Pattern: High Legibility with Ubuntu Typography
   ========================================================================== */

.club-events-hub--playfair .ceh-card {
    display: flex;
    flex-direction: column;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    transition: transform 0.24s ease;
}

@media (hover: hover) and (pointer: fine) {
    .club-events-hub--playfair .ceh-card:hover,
    .club-events-hub--playfair .ceh-promo-banner:hover {
        transform: translateY(-4px);
    }
}

.club-events-hub--playfair .ceh-card__media {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: 4px;
    background-color: #FFFFFF;
    margin-bottom: 12px;
    display: block;
}

.club-events-hub--playfair .ceh-card__media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    display: block;
}

.club-events-hub--playfair .ceh-card__info {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}

.club-events-hub--playfair .ceh-card__date {
    margin: 0 0 5px;
    color: #79272A;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
}

.club-events-hub--playfair .ceh-card__details {
    font-size: 12.5px;
    color: #777777;
    line-height: 1.3;
}

/* Ordinary Card Titles: Semantic H3 rendered in clean, legible Ubuntu */
.club-events-hub--playfair .ceh-card__title {
    font-family: 'Ubuntu', sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 6px;
    color: #1a1a1a;
}

.club-events-hub--playfair .ceh-card__title a {
    color: #1a1a1a !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

.club-events-hub--playfair .ceh-card__title a:hover {
    color: #79272A !important;
}

/* ==========================================================================
   5. History & Past Events Section
   ========================================================================== */

.club-events-hub--playfair .ceh-history-section {
    padding-top: 0;
    margin-top: 20px;
    width: 100%;
    display: block;
}

.club-events-hub--playfair .ceh-history-header {
    margin-bottom: 30px;
    display: block;
}

/* History Section Heading: True heading in Playfair Display */
.club-events-hub--playfair .ceh-history-title {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-size: 32px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 6px 0;
    line-height: 1.2;
}

.club-events-hub--playfair .ceh-history-lead {
    font-size: 15px;
    color: #666666;
}

.club-events-hub--playfair .ceh-history-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 35px 30px;
    width: 100%;
}

.club-events-hub--playfair .ceh-card--history .ceh-card__media {
    opacity: 0.92;
}

.club-events-hub--playfair .ceh-card--history:hover .ceh-card__media {
    opacity: 1;
}

/* ==========================================================================
   6. Responsive Queries
   ========================================================================== */

@media screen and (max-width: 1024px) {
    .club-events-hub--playfair .ceh-events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .club-events-hub--playfair .ceh-promo-banner {
        grid-column: span 2;
    }
    
    .club-events-hub--playfair .ceh-history-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media screen and (max-width: 768px) {
    .club-events-hub--playfair .ceh-header__title {
        font-size: 34px;
    }
    
    .club-events-hub--playfair .ceh-nav-types {
        display: flex;
        flex-wrap: wrap;
        gap: 8px 16px;
        padding: 0;
        margin-bottom: 15px;
        border-bottom: none;
        overflow-x: visible;
    }
    
    .club-events-hub--playfair .ceh-type-link {
        font-size: 13.5px;
        padding: 0;
        line-height: 1.35;
        border-bottom: none;
    }

    .club-events-hub--playfair .ceh-type-link.is-active::after {
        display: none;
    }
    
    .club-events-hub--playfair .ceh-intro-text {
        font-size: 14px;
    }
    
    .club-events-hub--playfair .ceh-events-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .club-events-hub--playfair .ceh-promo-banner {
        grid-column: span 1;
        flex-direction: column;
        height: auto;
        max-height: none;
        min-height: auto;
    }
    
    /* Mobile: Image comes before text in promo banner */
    .club-events-hub--playfair .ceh-promo-banner__media {
        order: -1;
        height: 240px;
        max-height: 240px;
        width: 100%;
        max-width: 100%;
        flex: 0 0 240px;
    }
    
    .club-events-hub--playfair .ceh-promo-banner__content {
        padding: 24px 20px;
    }
    
    .club-events-hub--playfair .ceh-history-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .club-events-hub--playfair .ceh-card__title {
        font-size: 15.5px;
    }
}
