/* Navorina Page Styles - Complete Stylesheet */

/* ========================================
   MAIN CONTENT LAYOUT
   ======================================== */

/* Main content offset for sidebar */
.main-content {
    margin-left: auto;
    margin-right: auto;
    min-height: 100vh;
    padding-top: 0;
    padding-left: 280px;
    padding-right: 280px;
    max-width: calc(1200px + 280px + 280px);
    padding-bottom: 104px;
    color: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
}

/* Medium Article стили наследуются из CaseStudiesContent.css */

/* Desktop Navigation (768px+) */
@media (min-width: 768px) {
    .main-content {
        padding-left: 280px;
        padding-right: 280px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Обычный десктоп (не самый широкий) - уменьшенные паддинги на 24px */
/* Применяется для экранов 768px - 1919px */
@media (min-width: 768px) and (max-width: 1919px) {
    .main-content {
        padding-left: 256px;
        padding-right: 256px;
        max-width: calc(1200px + 256px + 256px);
    }
}

/* Mobile Navigation (до 767px) */
@media (max-width: 767px) {
    .main-content {
        padding-top: 80px;
        padding-left: 16px;
        padding-right: 16px;
        margin-left: 0;
    }
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .main-content {
        margin-left: auto;
        margin-right: auto;
        padding-left: 0;
        padding-top: 80px;
        max-width: none;
    }
}

/* Экраны до 1200px - уменьшенный паддинг слева на 24px */
@media (max-width: 1200px) {
    .article-sidebar-nav {
        display: none;
    }
    
    .main-content {
        padding-right: 0;
        padding-left: 256px; /* Уменьшено на 24px для обычного десктопа */
        max-width: calc(1200px + 256px);
    }
}

/* ========================================
   HERO IMAGE
   ======================================== */

.hero-image-section {
    width: 100%;
    height: auto;
    margin: 0 0 24px 0;
    padding: 0;
    box-sizing: border-box;
    border-radius: 16px;
    overflow: hidden;
}

/* Обычный десктоп (не самый широкий) - уменьшенные отступы */
/* Применяется для экранов 768px - 1919px */
@media (min-width: 768px) and (max-width: 1919px) {
    /* Уменьшаем отступ от H1 до картинки */
    .article-content .hero-header-wrapper .article-header,
    .main-content .article-content .hero-header-wrapper .article-header,
    .medium-article .article-content .hero-header-wrapper .article-header,
    .hero-header-wrapper .article-header {
        margin-bottom: 0 !important;
    }
    
    /* Уменьшаем отступ от картинки до контента */
    .article-content .hero-header-wrapper,
    .main-content .article-content .hero-header-wrapper,
    .medium-article .article-content .hero-header-wrapper,
    .hero-header-wrapper {
        padding-bottom: 32px !important;
    }
    
    /* Дополнительно уменьшаем отступ после hero-image-section */
    .hero-header-wrapper .hero-image-section,
    .article-content .hero-header-wrapper .hero-image-section {
        margin-bottom: 8px !important;
    }
    
    /* Уменьшаем отступ снизу у H2 заголовков (например, Key Decisions) */
    .article-content .article-section h2,
    .article-section h2 {
        margin-bottom: 8px !important; /* Уменьшено с 16px на 8px */
    }
}

.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: auto !important;
    object-fit: cover;
    object-position: left center;
    border-radius: 0 !important;
    border: none;
}

/* ========================================
   ARTICLE HEADER
   ======================================== */

/* Article header and title styles moved to ../CSS/CaseStudiesContent.css */

.article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.author-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.author-name {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1A1A1A;
}

.publish-date {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    color: #8e8c8c;
}

/* ========================================
   ARTICLE CONTENT
   ======================================== */

/* Типографика наследуется из Typography.css */

/* Typography and content styles moved to ../CSS/CaseStudiesContent.css */

/* ========================================
   IMAGE GALLERY
   ======================================== */

.image-gallery {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0;
}

.image-item {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.case-image {
    width: 100%;
    height: auto;
    border-radius: 0;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    display: block;
}

.case-image:hover {
    transform: scale(1.02);
}

.image-caption {
    font-family: 'Inter', sans-serif !important;
    font-size: 14px !important;
    line-height: 17px !important;
    letter-spacing: 0.2px !important;
    color: #a0a0a0 !important;
    font-style: normal !important;
    text-align: center !important;
    margin: 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    font-style: normal !important;
}

/* Featured Image Styles */
.featured-image {
    width: 100%;
    margin: 32px 0;
    height: auto;
    border-radius: 0 !important;
    border: none;
}

/* Desktop: Single column for image gallery */
@media (min-width: 768px) {
    .image-gallery {
        display: flex;
        flex-direction: column;
        gap: 32px;
        margin: 40px 0;
    }
    
    .image-item {
        margin: 0;
        display: flex;
        flex-direction: column;
    }
}

/* ========================================
   RESULTS TABLE (if needed)
   ======================================== */

/* Results Table Styles - Inherited from CSS/CaseStudiesContent.css */

/* ========================================
   FINAL CTA SECTION
   ======================================== */

.article-section:has(.final-cta) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 48px;
    gap: 48px;
    background: #FFFFFF;
    border-radius: 32px;
}

/* Стили типографики для .article-section:has(.final-cta) удалены - используются из Typography.css */
.article-section:has(.final-cta) h2 {
    margin: 0 0 15px 0;
    align-self: stretch;
}

.article-section:has(.final-cta) p {
    margin: 0;
    align-self: stretch;
}

.final-cta {
    text-align: left;
    margin: 0;
    width: 100%;
}

/* CTA Button Styles - стили перенесены в CaseStudiesContent.css для унификации */

/* ========================================
   MODAL STYLES
   ======================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    margin: auto;
    padding: 0;
    width: 90%;
    max-width: 800px;
    top: 50%;
    transform: translateY(-50%);
    /* Радиус на контейнере, он обрезает изображение */
    border-radius: 16px;
    overflow: hidden;
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 0 !important;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 0 !important;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    cursor: pointer;
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    transition: all 0.3s ease;
    padding: 0;
}

/* Показываем крестик только когда модальное окно открыто */
.modal[style*="display: block"] .close,
.modal.show .close {
    display: flex !important;
}

.close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
}

.close:hover {
    opacity: 0.7;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */

/* Fade-in animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Animate content on scroll */
.article-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.article-section.fade-in {
    opacity: 1;
    transform: translateY(0);
}

.article-section p,
.article-section h2,
.article-section h3,
.article-section ul,
.article-section .image-gallery,
.article-section .hero-image,
.article-section .gallery-item {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.article-section.fade-in p,
.article-section.fade-in h2,
.article-section.fade-in h3,
.article-section.fade-in ul,
.article-section.fade-in .image-gallery,
.article-section.fade-in .hero-image,
.article-section.fade-in .gallery-item {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for list items */
.article-section.fade-in ul li:nth-child(1) {
    transition-delay: 0.1s;
}

.article-section.fade-in ul li:nth-child(2) {
    transition-delay: 0.2s;
}

.article-section.fade-in ul li:nth-child(3) {
    transition-delay: 0.3s;
}

.article-section.fade-in ul li:nth-child(4) {
    transition-delay: 0.4s;
}

.article-section.fade-in ul li:nth-child(5) {
    transition-delay: 0.5s;
}

.article-section.fade-in ul li:nth-child(6) {
    transition-delay: 0.6s;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .hero-image {
        height: auto;
    }
}

@media (max-width: 767px) {
    .hero-image {
        height: auto;
    }
    
    /* Типографика наследуется из Typography.css */
    
    .article-section p {
        font-size: 16px;
    }
    
    .article-section ul li {
        font-size: 16px;
    }
    
    .lead-paragraph {
        font-size: 20px !important;
        line-height: 30px !important;
    }
    
    .image-gallery {
        gap: 12px;
        margin: 24px 0;
    }
    
    /* Results Table mobile styles inherited from CSS/CaseStudiesContent.css */
    
    .image-caption {
        font-size: 11px !important;
        padding: 0 8px !important;
        color: #a0a0a0 !important;
        font-style: italic !important;
    }
}

/* ========================================
   MEDIA RADIUS — 16px (Navorina)
   Контейнеры скругляем, медиа — без скругления
   ======================================== */
.hero-image-section,
.article-image,
.video-wrapper,
.media-frame {
    border-radius: 16px !important;
    overflow: hidden !important;
}

.hero-image,
.hero-video,
.case-image,
.case-video,
.featured-image,
.video-wrapper video,
.video-wrapper iframe,
.article-image img:not(.featured-image),
.media-frame img,
.media-frame video,
.media-frame iframe {
    border-radius: 0 !important;
}
