/* =========================================
   1. SPLIT SCREEN LAYOUT
   ========================================= */

.dashboard-split-layout {
    display: flex;
    gap: 40px;
    /* align-items: flex-start is CRITICAL for position: sticky to work */
    align-items: flex-start; 
    position: relative;
    padding-bottom: 60px;
}

/* LEFT SIDE: Scrollable Text Content */
.layout-text-side {
    flex: 1; /* Takes up remaining space */
    min-width: 0; /* Prevents flex overflow issues */
}

/* RIGHT SIDE: Sticky Image Container */
.layout-image-side {
    width: 48%; /* Takes up roughly half the screen */
    position: -webkit-sticky; /* Safari support */
    position: sticky;
    top: 110px; /* Distance from top of browser window */
    z-index: 10;
}

/* =========================================
   2. DASHBOARD IMAGE STYLING
   ========================================= */

.dashboard-preview {
    background: #fff;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.dashboard-preview:hover {
    transform: translateY(-5px);
}

.dashboard-img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
    cursor: zoom-in; /* Indicates clickability */
    transition: filter 0.2s;
}

.dashboard-img:hover {
    filter: brightness(0.96);
}

.img-caption {
    margin-top: 12px;
    text-align: center;
    font-size: 0.85rem;
    color: #94a3b8;
    font-weight: 500;
}

.img-caption i {
    margin-right: 5px;
}

/* =========================================
   3. ANNOTATION POINTS (Left Side)
   ========================================= */

.annotation-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.annotation-item {
    background: #fff;
    border: 1px solid #f1f5f9;
    border-radius: 10px;
    padding: 24px;
    display: flex;
    gap: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    align-items: flex-start;
    position: relative;
}

.annotation-item:hover {
    transform: translateX(8px); /* Slide effect */
    border-color: #cbd5e1;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Red Number Badge */
.marker-badge {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: #ef4444; /* Brand Red */
    color: white;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
    margin-top: 2px;
}

.item-content h4 {
    font-size: 1.1rem;
    margin-bottom: 6px;
    color: #0f172a;
    font-weight: 700;
}

.item-content p {
    font-size: 0.95rem;
    color: #64748b;
    margin: 0;
    line-height: 1.65;
}

/* =========================================
   4. LIGHTBOX (Zoom Effect)
   ========================================= */

.lightbox-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-overlay.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.lightbox-overlay.active .lightbox-content {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ef4444;
    transform: rotate(90deg);
}
/* --- SPLIT LAYOUT STRUCTURE --- */
.dashboard-split-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    margin-top: 20px;
}

.layout-text-side {
    flex: 1;
}

.layout-image-side {
    width: 60%;
    position: sticky;
    top: 20px;
}

/* Specific override for Categories page (Tall image) */
.page-categories .layout-image-side {
    width: 50%; 
}

/* --- IMAGE STYLES --- */
.dashboard-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
    cursor: zoom-in;
    transition: transform 0.2s;
    background-color: #fff;
}

.dashboard-img:hover {
    transform: scale(1.01);
}

.img-caption {
    margin-top: 10px;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
}

/* --- ANNOTATION MARKERS (Red Circles) --- */
.annotation-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.annotation-item {
    display: flex;
    gap: 16px;
}

.marker-badge {
    background: #dc3545; /* Red matches your screenshot */
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 2px;
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.item-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: #1f2937;
}

.item-content p {
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* --- LIGHTBOX OVERLAY --- */
.lightbox-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.lightbox-overlay.active {
    display: flex;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 20px; right: 40px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: #dc3545;
}

/* --- RESPONSIVE --- */
@media (max-width: 991px) {
    .dashboard-split-layout {
        flex-direction: column-reverse;
    }
    
    .layout-image-side, 
    .page-categories .layout-image-side {
        width: 100%;
        position: static;
        margin-bottom: 30px;
    }
}

/* =========================================
   5. RESPONSIVE MEDIA QUERIES
   ========================================= */

@media (max-width: 1200px) {
    /* On laptops/tablets, stack vertical */
    .dashboard-split-layout {
        flex-direction: column-reverse; /* Image on top, Text bottom */
        gap: 30px;
    }
    
    .layout-text-side, 
    .layout-image-side {
        width: 100%;
        position: static; /* Remove sticky */
    }

    .layout-image-side {
        margin-bottom: 20px;
    }

    .dashboard-preview {
        max-width: 800px;
        margin: 0 auto; /* Center image */
    }
}

@media (max-width: 768px) {
    /* Mobile adjustments */
    .annotation-item {
        padding: 16px;
        gap: 12px;
    }

    .marker-badge {
        width: 28px;
        height: 28px;
        font-size: 0.8rem;
    }

    .item-content h4 {
        font-size: 1rem;
    }
}