/* Navorina Page Styles - Complete Stylesheet */

/* ========================================
   PRELOADER STYLES
   ======================================== */

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.8s ease-out, visibility 0.8s ease-out;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.preloader.fade-out {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    animation: contentFadeIn 1s ease-out;
}

.preloader-logo {
    width: 86px;
    height: 66px;
    animation: logoFadeIn 2s ease-out infinite;
}

@keyframes logoFadeIn {
    0% {
        opacity: 0.3;
        transform: scale(0.9);
    }
    50% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 0.3;
        transform: scale(0.9);
    }
}

@keyframes contentFadeIn {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hide content until preloader is done */
body:not(.loaded) .chat-container {
    opacity: 0;
    visibility: hidden;
}

body.loaded .chat-container {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

/* Preloader Spinner */
.preloader-spinner {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2B6489;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Body background */
html {
    background: #F0F3F5;
}

body {
    background: #F0F3F5;
    opacity: 0;
    transition: opacity 1s ease-out;
}

body.loaded {
    opacity: 1;
}

/* ========================================
   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 {
    padding-top: 0;
    max-width: 720px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
}

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

/* 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;
    }
}

@media (max-width: 1200px) {
    .article-sidebar-nav {
        display: none;
    }
    
    .main-content {
        padding-right: 0;
        max-width: calc(1200px + 280px);
    }
}

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

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

.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    min-height: auto !important;
    object-fit: cover;
    object-position: left center;
    border-radius: 32px !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
   ======================================== */

.article-content {
    line-height: 1.6;
    text-align: left;
}

.article-content p,
.article-content li,
.article-content span:not(.author-name):not(.publish-date) {
    font-family: 'Inter', sans-serif !important;
    font-size: 16px;
    line-height: 1.7;
    font-style: normal !important;
}

/* 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: 32px;
    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: 32px;
    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: 56px;
}

.article-section:has(.final-cta) h2 {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 29px;
    color: #1A1A1A;
    margin: 0;
    align-self: stretch;
}

.article-section:has(.final-cta) p {
    font-family: 'Inter', sans-serif;
    font-size: 24px;
    line-height: 36px;
    color: #616161;
    margin: 0;
    align-self: stretch;
}

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

/* CTA Button Styles */
.cta-button--black {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 13px 24px;
    gap: 16px;
    width: fit-content;
    min-width: fit-content;
    height: 47px;
    background: #262626f5;
    border-radius: 9999px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cta-button--black:hover {
    background: #1a1a1af5;
    transform: translateY(-2px);
}

.cta-button--black .button-text {
    width: auto;
    height: 21px;
    display: flex;
    align-items: center;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 0.015em;
    font-size: 16px;
    line-height: 1.3;
    color: #ffffff;
}

/* ========================================
   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%);
}

.modal-content img {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.modal-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    cursor: pointer;
    z-index: 1001;
    display: flex;
    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;
}

.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;
    }
    
    .article-title {
        font-family: 'Inter', sans-serif;
        font-size: 32px;
        font-weight: 700;
        line-height: 1.2;
        letter-spacing: -0.02em;
    }
    
    .article-section h2 {
        font-family: 'Poppins', sans-serif;
        font-size: 32px;
        font-weight: 900;
        line-height: 48px;
        letter-spacing: -2px;
    }
    
    .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;
    }
}
