/**
 * Events Post Template Styles
 */

/* Global styles for event posts */
body.single-event,
body.category-events {
    background: #E0D5CF !important;
    direction:ltr;
    font-family: 'Heebo', sans-serif;
}

.event-post {
    background: #E0D5CF;
    direction: rtl;
    font-family: 'Heebo', sans-serif;
    min-height: 100vh;
}

/* === HERO SECTION === */
.event-hero {
    padding: 0;
    background: #E0D5CF;
    margin-top: 30px;
}

.event-hero-content {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 104px;
}

.event-hero-image-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 77px;
    width: 100%;
    max-width: 1234px;
    margin: 0 auto;
    direction: ltr;
}

.event-hero-image {
    width: 734px;
    height: 450px;
    object-fit: cover;
    border-radius: 24px;
    flex-shrink: 0;
    order: 2; /* В RTL: order 2 = слева визуально */
}

/* Meta Content on Right */
.event-meta-overlay {
    position: static;
    padding: 0;
    max-width: 423px;
    width: 423px;
    flex-shrink: 0;
    order: 1; /* В RTL: order 1 = справа визуально */
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* В RTL flex-start = справа */
    text-align: right;
    margin-left: auto; /* Прижимает к правому краю в RTL */
}

/* Breadcrumbs */
.event-breadcrumbs {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* В RTL flex-start = справа */
    gap: 6px;
    margin-bottom: 35px;
    width: 100%;
}

.event-breadcrumb-home,
.event-category {
    font-family: 'Heebo', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #003346;
    line-height: 22px;
    text-decoration: none;
}

.event-breadcrumb-home:hover,
.event-category:hover {
    text-decoration: underline;
}

.event-breadcrumb-separator {
    display: flex;
    align-items: center;
    transform: rotate(180deg);
}

.event-breadcrumb-current {
    font-family: 'Heebo', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #003346;
    line-height: 22px;
}

/* Event Title */
.event-title {
    font-family: 'FbMatador', 'Heebo', sans-serif;
    font-size: 42px;
    font-weight: 700;
    line-height: 56px;
    color: #003346;
    text-align: left;
    margin: 0 0 71px 0;
    max-width: 320px;
    width: 100%;
    margin-top: 20px;
}

/* Meta Info */
.event-meta-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start; /* В RTL flex-start = справа */
    width: 100%;
}

.event-meta-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    align-items: flex-start; /* В RTL flex-start = справа */
}

.event-author {
    font-family: 'Heebo', sans-serif;
    font-size: 16px;
    line-height: 21px;
    color: #003346;
    font-weight: 700; /* ЖИРНЫЙ */
    text-align: left;
    width: 100%;
}

.event-date {
    font-family: 'Heebo', sans-serif;
    font-size: 16px;
    line-height: 21px;
    color: #003346;
    font-weight: 400; /* ОБЫЧНЫЙ */
    text-align: left;
    width: 100%;
}

/* Social Sharing */
.event-social {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start; /* В RTL flex-start = справа */
    width: 100%;
}

.event-social-label {
    font-family: 'Heebo', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 27px;
    color: #003346;
    text-align: right;
    margin: 0;
}

.event-social-buttons {
    display: flex;
    gap: 8px;
    flex-direction: row; /* В RTL обычный порядок = справа налево */
    justify-content: flex-start; /* В RTL flex-start = справа */
}

.event-social-btn {
    width: 32px;
    height: 32px;
    border-radius: 64px;
    background: #E8E3DD;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.event-social-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0px 4px 12px rgba(0, 51, 70, 0.15);
}

.event-social-btn img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* === ARTICLE CONTENT SECTION === */
.event-article-content {
    padding: 80px 0;
    background: #E0D5CF;
}

.event-article-wrapper {
    max-width: 1232px;
    margin: 0 auto;
    padding: 0 104px;
}

.event-article-inner {
    max-width: 768px;
    margin: 0 auto;
    text-align: left;
    direction: ltr;
}

.event-section-title {
    font-family: 'Heebo', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 38px;
    color: #003346;
    text-align: left;
    direction: ltr;
    margin: 0 0 24px 0;
}

.event-text-content {
    margin-bottom: 40px;
}

.event-text-content p {
    font-family: 'Heebo', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: #003346;
    text-align: left;
    direction: ltr;
    margin: 0 0 16px 0;
}

.event-image-section {
    margin: 40px 0;
}

.event-content-image {
    width: 100%;
    max-width: 768px;
    height: 400px;
    object-fit: cover;
    border-radius: 14px;
    margin-bottom: 8px;
}

.event-image-caption-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* В RTL flex-start = справа */
    flex-direction: row-reverse; /* Полоска справа */
    gap: 8px;
    margin-top: 8px;
    margin-left: auto; /* Прижать к правому краю */
    width: fit-content;
    float: left;
}

.event-image-caption {
    font-family: 'Heebo', sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    color: #003346;
    text-align: right;
    margin: 0;
}

.event-image-caption-line {
    width: 2px;
    height: 18px;
    background-color: #003346;
    flex-shrink: 0;
}

/* === GALLERY SECTION === */
.event-gallery {
    padding: 0;
    background: #E0D5CF;
}

.event-gallery-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 104px;
}

.event-gallery-inner {
    width: 100%;
    position: relative;
}

.event-gallery-title {
    font-family: 'Heebo', sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 56px;
    color: #003346;
    text-align: left;
    margin: 0 0 40px 0;
}

.event-gallery-nav {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    gap: 15px;
    z-index: 10;
}

.gallery-nav-btn {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
}

.gallery-nav-btn img {
    width: 45px;
    height: 45px;
}

.event-gallery-container {
    overflow: hidden;
    width: 1232px;
    margin: 0 auto;
}

.event-gallery-track {
    display: flex;
    gap: 31px;
    transition: transform 0.4s ease-in-out;
    transform: translateX(1264px); /* Start position for infinite loop */
}

.gallery-item {
    flex: 0 0 285px;
    height: 285px;
    cursor: pointer;
    border-radius: 24px;
    overflow: hidden;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.event-gallery-decorative-line {
    width: 100%;
    height: 2px;
    background: linear-gradient(to left, #D7794C 240px, rgba(0, 51, 70, 0.4) 240px);
    margin: 40px 0 0 0;
}

/* === RELATED POSTS SECTION === */
.event-related-posts {
    padding: 80px 104px;
    background: #E0D5CF;
}

.event-related-wrapper {
    max-width: 1232px;
    margin: 0 auto;
    direction: ltr;
}

.event-related-header {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin-bottom: 80px;
}

.event-view-all-btn {
    background: transparent;
    border: 1px solid #003346;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: 'Heebo', sans-serif;
    font-size: 16px;
    font-weight: 400;
    color: #003346;
    cursor: pointer;
    margin-left: auto;
    order: 2;
}

.event-related-text {
    flex: 1;
    text-align: right;
    order: 1;
}

.event-related-title {
    font-family: 'Heebo', sans-serif;
    font-size: 40px;
    font-weight: 700;
    line-height: 56px;
    color: #003346;
    text-align: left;
    direction: ltr;
    margin: 0 0 16px 0;
}

.event-related-subtitle {
    font-family: 'Heebo', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: #003346;
    text-align: left;
    margin: 0;
}

.event-related-grid {
    display: flex;
    gap: 31px;
    justify-content: space-between;
}

.related-post-card {
    flex: 1;
    max-width: 368px;
}

.related-post-image {
    position: relative;
}

.related-image {
    width: 100%;
    height: 244px;
    object-fit: cover;
    border-radius: 14px;
}

.related-post-content {
    padding: 0;
    text-align: left;
    margin-top: 22px;
    direction: ltr;
}

.related-post-date-badge {
    display: inline-block;
    background: #D7794C;
    border-radius: 50px;
    padding: 4px 8px;
    font-family: 'Heebo', sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 21px;
    color: #003346;
    margin-bottom: 8px;
}

.related-post-title {
    font-family: 'Heebo', sans-serif;
    font-size: 22px;
    font-weight: 700;
    line-height: 27px;
    color: #003346;
    margin-bottom: 8px;
    text-align: left;
    margin-top: 10px;
}

.related-post-excerpt {
    font-family: 'Heebo', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 22px;
    color: #003346;
    margin-bottom: 22px;
    text-align: left;
}

.related-post-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Heebo', sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 24px;
    color: #003346;
    text-decoration: none;
}

.related-post-link svg {
    transform: rotate(180deg); /* Стрелка влево в RTL */
    transform: scaleX(1);
}

/* === LIGHTBOX === */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
   
}

.lightbox-content {
    position: relative;
    margin: 5% auto;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

#lightboxImage {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

/* === CONTENT SECTION === */
.event-content {
    padding: 60px 0 80px;
    background: #E0D5CF;
}

.event-content-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 104px;
}

.event-content-inner {
    max-width: 768px;
    margin: 0 auto;
}

.event-content-inner p {
    font-family: 'Heebo', sans-serif;
    font-size: 20px;
    line-height: 30px;
    color: #003346;
    text-align: right;
    margin: 0 0 24px 0;
}

.event-content-inner h2 {
    font-family: 'FbMatador', 'Heebo', sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 42px;
    color: #003346;
    text-align: right;
    margin: 40px 0 20px 0;
}

.event-content-inner h3 {
    font-family: 'Heebo', sans-serif;
    font-size: 24px;
    font-weight: 600;
    line-height: 32px;
    color: #003346;
    text-align: right;
    margin: 30px 0 15px 0;
}

.event-content-inner img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    margin: 24px 0;
}

.event-content-inner ul,
.event-content-inner ol {
    text-align: right;
    padding-right: 30px;
    margin: 20px 0;
}

.event-content-inner li {
    font-family: 'Heebo', sans-serif;
    font-size: 20px;
    line-height: 30px;
    color: #003346;
    margin-bottom: 10px;
}

/* === RESPONSIVE === */

/* Tablet and below */
@media (max-width: 1400px) {
    .event-hero-content,
    .event-content-wrapper {
        padding: 0 40px;
    }
    
    .event-hero-image {
        width: 100%;
        max-width: 734px;
        height: auto;
    }
    
    .event-meta-overlay {
        max-width: 350px;
        padding: 30px;
    }
    
    /* Related posts */
    .event-related-posts {
        padding: 60px 40px;
    }
    
    .event-related-grid {
        gap: 20px;
    }
    
    .related-post-card {
        max-width: 320px;
    }
    
    /* Gallery */
    .event-gallery-wrapper {
        padding: 0 40px;
    }
    
    .event-gallery-container {
        width: 100%;
        max-width: 1000px;
    }
    
    .gallery-item {
        flex: 0 0 240px;
        height: 240px;
    }
    
    .event-gallery-track {
        gap: 20px;
        transform: translateX(1040px);
    }
}

/* Large Mobile / Small Tablet */
@media (max-width: 992px) {
    .event-hero-content,
    .event-content-wrapper {
        padding: 0 30px;
    }
    
    .event-hero-image-wrapper {
        display: flex;
        flex-direction: column;
    }
    
    .event-hero-image {
        width: 100%;
        height: auto;
        min-height: 300px;
    }
    
    .event-meta-overlay {
        position: static;
        max-width: 100%;
        padding: 30px 0;
        background: #E0D5CF;
    }
    
    .event-title {
        font-size: 32px;
        line-height: 42px;
        margin-bottom: 30px;
        max-width: 100%;
    }
    
    /* Related posts */
    .event-related-posts {
        padding: 50px 30px;
    }
    
    .event-related-header {
        flex-direction: column;
        align-items: flex-end;
        gap: 20px;
        margin-bottom: 50px;
    }
    
    .event-related-text {
        order: 1;
    }
    
    .event-view-all-btn {
        order: 2;
        margin-left: 0;
    }
    
    .event-related-title {
        font-size: 32px;
        line-height: 42px;
    }
    
    .event-related-grid {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .related-post-card {
        max-width: 400px;
        width: 100%;
    }
    
    .related-post-title {
        font-size: 20px;
        line-height: 28px;
    }
    
    /* Gallery */
    .event-gallery-wrapper {
        padding: 0 30px;
    }
    
    .event-gallery-title {
        font-size: 32px;
        line-height: 42px;
        margin-bottom: 30px;
    }
    
    .event-gallery-container {
        width: 100%;
        max-width: 800px;
    }
    
    .gallery-item {
        flex: 0 0 200px;
        height: 200px;
    }
    
    .event-gallery-track {
        gap: 15px;
        transform: translateX(860px);
    }
    
    .gallery-nav-btn img {
        width: 40px;
        height: 40px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .event-hero-content,
    .event-content-wrapper {
        padding: 0 20px;
    }
    
    .event-title {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 20px;
    }
    
    .event-social-label {
        font-size: 16px;
    }
    
    .event-content-inner p {
        font-size: 18px;
        line-height: 27px;
    }
    
    .event-content-inner h2 {
        font-size: 26px;
        line-height: 34px;
    }
    
    /* Related posts */
    .event-related-posts {
        padding: 40px 20px;
    }
    
    .event-related-header {
        margin-bottom: 40px;
    }
    
    .event-related-title {
        font-size: 28px;
        line-height: 36px;
    }
    
    .event-related-subtitle {
        font-size: 16px;
        line-height: 22px;
    }
    
    .event-view-all-btn {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .related-post-card {
        max-width: 100%;
    }
    
    .related-image {
        height: 200px;
    }
    
    .related-post-title {
        font-size: 18px;
        line-height: 24px;
    }
    
    .related-post-excerpt {
        font-size: 16px;
        line-height: 20px;
    }
    
    .related-post-link {
        font-size: 16px;
    }
    
    /* Gallery */
    .event-gallery-wrapper {
        padding: 0 20px;
    }
    
    .event-gallery-title {
        font-size: 28px;
        line-height: 36px;
        margin-bottom: 25px;
    }
    
    .event-gallery-container {
        width: 100%;
        max-width: 600px;
    }
    
    .gallery-item {
        flex: 0 0 160px;
        height: 160px;
    }
    
    .event-gallery-track {
        gap: 12px;
        transform: translateX(688px);
    }
    
    .gallery-nav-btn img {
        width: 35px;
        height: 35px;
    }
    
    .event-gallery-nav {
        gap: 10px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .event-hero-content,
    .event-content-wrapper {
        padding: 0 15px;
    }
    
    .event-title {
        font-size: 24px;
        line-height: 32px;
    }
    
    .event-meta-overlay {
        padding: 20px 0;
    }
    
    .event-breadcrumbs {
        flex-wrap: wrap;
    }
    
    .event-author-date {
        font-size: 14px;
        flex-wrap: wrap;
    }
    
    .event-social-buttons {
        gap: 6px;
    }
    
    .event-social-btn {
        width: 28px;
        height: 28px;
    }
    
    .event-social-btn img {
        width: 20px;
        height: 20px;
    }
    
    .event-content-inner p {
        font-size: 16px;
        line-height: 24px;
    }
    
    /* Related posts */
    .event-related-posts {
        padding: 30px 15px;
    }
    
    .event-related-header {
        margin-bottom: 30px;
        gap: 15px;
    }
    
    .event-related-title {
        font-size: 24px;
        line-height: 32px;
    }
    
    .event-related-subtitle {
        font-size: 14px;
        line-height: 20px;
    }
    
    .event-view-all-btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .event-related-grid {
        gap: 20px;
    }
    
    .related-image {
        height: 180px;
    }
    
    .related-post-title {
        font-size: 16px;
        line-height: 22px;
    }
    
    .related-post-excerpt {
        font-size: 14px;
        line-height: 18px;
    }
    
    .related-post-date-badge {
        font-size: 14px;
        padding: 3px 6px;
    }
    
    .related-post-link {
        font-size: 14px;
    }
    
    /* Gallery */
    .event-gallery-wrapper {
        padding: 0 15px;
    }
    
    .event-gallery-title {
        font-size: 24px;
        line-height: 32px;
        margin-bottom: 20px;
    }
    
    .event-gallery-container {
        width: 100%;
        max-width: 400px;
    }
    
    .gallery-item {
        flex: 0 0 120px;
        height: 120px;
    }
    
    .event-gallery-track {
        gap: 10px;
        transform: translateX(520px);
    }
    
    .gallery-nav-btn img {
        width: 30px;
        height: 30px;
    }
    
    .event-gallery-nav {
        gap: 8px;
    }
    
    .event-gallery-decorative-line {
        margin: 30px 0 0 0;
    }
}
