/* ===== BLOG PAGE STYLES ===== */

/* Blog Section */
.blog {
    padding: 6rem 0;
    background-color: var(--background-light);
}

/* ===== HERO VISUAL - INFO CUBE ===== */
.info-cube {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 80px auto;
    transform-style: preserve-3d;
    animation: rotateCube 20s linear infinite;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(42,93,187,0.3);
    backdrop-filter: blur(10px);
    border: 2px solid var(--primary-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    gap: 10px;
    transition: all 0.3s ease;
}

.cube-face i {
    font-size: 3rem;
}

.front { transform: translateZ(100px); }
.back { transform: rotateY(180deg) translateZ(100px); }
.right { transform: rotateY(90deg) translateZ(100px); }
.left { transform: rotateY(-90deg) translateZ(100px); }
.top { transform: rotateX(90deg) translateZ(100px); }
.bottom { transform: rotateX(-90deg) translateZ(100px); }

/* ===== ANIMATIONS ===== */
@keyframes rotateCube {
    from { transform: rotateX(0) rotateY(0); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

/* ===== UNIVERSAL MODAL ===== */
.universal-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    font-family: inherit;
}

.universal-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.universal-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: modalOverlayFade 0.3s ease;
}

@keyframes modalOverlayFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.universal-modal .modal-container {
    position: relative;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideUp 0.4s ease;
}

@keyframes modalSlideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    color: #333;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close-btn:hover {
    background: var(--accent-color);
    color: white;
    transform: rotate(90deg);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    max-height: 90vh;
    overflow: auto;
}

.modal-image-area {
    position: relative;
    background: var(--background-light);
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.modal-image-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.modal-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-dark);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-content-area {
    padding: 2rem;
    overflow-y: auto;
}

.modal-date {
    display: block;
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.modal-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.modal-body {
    color: #666;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.modal-body p {
    margin-bottom: 1rem;
}

.modal-footer {
    margin-top: auto;
    text-align: center;
}

.modal-pdf-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--primary-dark);
    color: white;
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.modal-pdf-link:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-light);
}

.modal-navigation {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.modal-nav-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-dark);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.modal-nav-btn:hover:not(:disabled) {
    background: var(--accent-color);
    color: white;
}

.modal-nav-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== SIMPLE TIMELINE DETAILS ===== */
.blog--timeline-simple {
    background: #ffffff;
    padding: 5rem 0;
}

.timeline-simple-container {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    margin-top: 3rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    min-height: 500px;
    overflow: hidden;
    
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Left Timeline Navigation */
.timeline-simple-nav {
    background: #f8f9fa;
    padding: 2rem 0;
    border-radius: 12px 0 0 12px;
    border-right: 1px solid #e9ecef;
    overflow-y: auto;
    max-height: 600px;
}

.timeline-simple-item {
    padding: 1.2rem 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    position: relative;
}

.timeline-simple-item:hover {
    background: #ffffff;
}

.timeline-simple-item.active {
    background: #ffffff;
    border-left-color: var(--accent-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.timeline-simple-year {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-dark);
    display: block;
    margin-bottom: 0.2rem;
}

.timeline-simple-title {
    font-size: 0.95rem;
    color: #666;
    display: block;
    margin-right: 30px;
}

.timeline-simple-icon {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
    opacity: 0.5;
}

.timeline-simple-item.active .timeline-simple-icon {
    opacity: 1;
    color: var(--accent-color);
}

/* Right Content Area */
.timeline-simple-content {
    padding: 2rem;
    overflow-y: auto;
    max-height: 600px;
}

.content-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.content-date {
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

.content-title {
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.content-category {
    display: inline-block;
    padding: 0.3rem 1rem;
    background: #f0f0f0;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #666;
}

.content-body {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 2rem;
    margin-bottom: 2rem;
}

.content-text {
    color: #444;
    line-height: 1.7;
}

.content-text p {
    margin-bottom: 1rem;
}

/* Working image styles */
.content-image {
    width: 100%;
    height: 150px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    
    /* Critical overrides */
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 150px !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
    position: relative !important;
}

.content-image img {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    max-height: 100% !important;
    min-width: 50px !important;
    min-height: 50px !important;
    object-fit: contain !important;
    position: relative !important;
}

.content-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.content-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-dark);
    color: white;
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 6px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.content-btn:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--primary-light);
}

/* Empty state */
.content-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: #999;
}

.content-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-image-area {
        min-height: 200px;
    }
    
    .modal-title {
        font-size: 1.5rem;
    }
    
    .modal-navigation {
        position: static;
        justify-content: center;
        margin-top: 1rem;
    }
    
    .timeline-simple-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .timeline-simple-nav {
        border-radius: 12px;
        border-right: none;
        border: 1px solid #e9ecef;
        padding: 1rem 0;
        max-height: 300px;
    }
    
    .timeline-simple-item {
        padding: 1rem 1.5rem;
        border-left: none;
        border-bottom: 1px solid #e9ecef;
    }
    
    .timeline-simple-item:last-child {
        border-bottom: none;
    }
    
    .timeline-simple-item.active {
        border-left: none;
        background: rgba(255,107,0,0.05);
    }
    
    .timeline-simple-item .timeline-simple-icon {
        opacity: 1;
        color: var(--accent-color);
    }
    
    .timeline-simple-item::after {
        content: '👆';
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        font-size: 1rem;
        opacity: 0.3;
    }
    
    .timeline-simple-item.active::after {
        opacity: 1;
    }
    
    .timeline-simple-content {
        display: none;
    }
    
    .content-body {
        grid-template-columns: 1fr;
    }
    
    .content-image {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .timeline-simple-item {
        padding: 0.8rem 1rem;
    }
    
    .timeline-simple-year {
        font-size: 1rem;
    }
    
    .timeline-simple-title {
        font-size: 0.85rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .info-cube {
        animation: none !important;
    }
}

/* ===== BLOG SECTION TITLE ===== */
.blog .blog__title {
    font-size: 2.5rem;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
    display: block;
    animation: fadeInLeft 0.8s ease-out forwards;
}

.blog .blog__title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--primary-dark);
    border-radius: 3px;
}

.blog .section-subtitle {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 576px) {
    .blog--timeline-simple{
        padding: 3.5rem 1rem;
    }
}