/* Overlapping Cards Layout - Main Styles */

.ocl-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background: transparent;
}

/* MAIN GRID - TechCrunch style: Clean 3 columns, no overlap */
.ocl-grid {
    display: grid;
    grid-template-columns: 680px 320px 360px;
    gap: 20px;
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
}

/* BASE CARD STYLES */
.ocl-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(96, 64, 255, 0.15);
    background: #000;
}

.ocl-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(96, 64, 255, 0.35);
    border-color: rgba(96, 64, 255, 0.4);
}

/* Mobile touch optimization */
@media (hover: none) and (pointer: coarse) {
    .ocl-card:hover {
        transform: none;
    }
    
    .ocl-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
}

.ocl-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.ocl-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #000;
    z-index: 0;
}

.ocl-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    /* Performance optimization for mobile */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.ocl-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 50%, rgba(0,0,0,0.4) 80%, transparent 100%);
    z-index: 1;
}

.ocl-category {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(96, 64, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 8px;
    border: 1px solid rgba(96, 64, 255, 0.5);
    font-size: 11px;
    font-weight: 700;
    color: #C4AEFF;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
}

.ocl-category-top {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 2;
    margin-bottom: 0;
}

.ocl-title {
    font-size: 20px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin: 0 0 12px 0;
}

/* Hero card gets larger title */
.ocl-card-hero .ocl-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.15;
}

.ocl-meta {
    font-size: 14px;
    color: #9CA3AF;
    font-weight: 400;
}

/* Card without image fallback */
.ocl-card-no-image {
    background: #0d1117;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    border: 1px solid rgba(96, 64, 255, 0.15);
}

.ocl-card-no-image .ocl-title {
    color: #ffffff;
}

/* OVERLAPPING CARD POSITIONS - This is where the magic happens! */

/* Hero card - Position 1: Large left column card */
.ocl-card-hero {
    grid-column: 1;
    grid-row: 1 / 3;
    height: 560px;
    z-index: 1;
}

/* Middle column top card - Position 2 */
.ocl-card-overlap-left {
    grid-column: 2;
    grid-row: 1;
    height: 270px;
    z-index: 1;
}

/* Middle column bottom card - Position 3 */
.ocl-card-overlap-right {
    grid-column: 2;
    grid-row: 2;
    height: 270px;
    z-index: 1;
}

/* Standard cards (4+) - Stack below in full width if more posts */
.ocl-card-standard {
    grid-column: 1 / 4;
    height: 300px;
    margin: 1rem 0;
}

/* SIDEBAR - Column 3, full height — placed last in DOM but pinned via explicit grid placement */
.ocl-sidebar {
    grid-column: 3;
    grid-row: 1 / 3;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ocl-headlines-box {
    background: transparent;
    border-radius: 0;
    padding: 0;
    border: none;
    height: 100%;
}

.ocl-headlines-box h3 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 2rem 0;
    color: #ffffff;
    letter-spacing: -0.5px;
}

.ocl-headline-item {
    padding: 0 0 1.5rem 0;
    border-bottom: none;
    margin-bottom: 0;
}

.ocl-headline-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.ocl-headline-item::before {
    content: "■";
    color: #6040FF;
    margin-right: 14px;
    font-size: 10px;
    vertical-align: middle;
}

.ocl-headline-item a {
    font-size: 16px;
    line-height: 1.5;
    color: #e2e8f0;
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

.ocl-headline-item a:hover {
    color: #9B7FFF;
}

/* RESPONSIVE DESIGN - Stack on tablets and mobile */
@media (max-width: 1440px) {
    .ocl-grid {
        grid-template-columns: 1fr 400px 360px;
        padding: 0 1rem;
    }
}

@media (max-width: 1200px) {
    .ocl-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .ocl-card-hero {
        grid-column: 1;
        grid-row: 1 / 3;
        height: 500px;
    }

    .ocl-card-hero .ocl-title {
        font-size: 36px;
    }

    .ocl-card-overlap-left,
    .ocl-card-overlap-right {
        grid-column: 2;
        height: 240px;
    }

    .ocl-sidebar {
        grid-column: 1 / 3;
        grid-row: 3;
    }
}

/* MOBILE OPTIMIZATION - TechCrunch style */
@media (max-width: 768px) {
    .ocl-container {
        padding: 1rem 0;
    }

    .ocl-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 1rem;
    }

    /* Hero card - full width, taller for impact */
    .ocl-card-hero {
        grid-column: 1;
        grid-row: auto;
        height: 420px;
        margin: 0;
        order: 1;
    }

    .ocl-card-hero .ocl-title {
        font-size: 28px;
        line-height: 1.2;
    }

    .ocl-card-hero .ocl-card-overlay {
        padding: 1.5rem;
    }

    /* Middle cards - stack vertically, shorter height */
    .ocl-card-overlap-left,
    .ocl-card-overlap-right {
        grid-column: 1;
        grid-row: auto;
        height: 280px;
        margin: 0;
    }

    .ocl-card-overlap-left {
        order: 2;
    }

    .ocl-card-overlap-right {
        order: 3;
    }

    .ocl-card-overlap-left .ocl-title,
    .ocl-card-overlap-right .ocl-title {
        font-size: 18px;
        line-height: 1.3;
    }

    .ocl-card-overlap-left .ocl-card-overlay,
    .ocl-card-overlap-right .ocl-card-overlay {
        padding: 1.25rem;
    }

    /* Sidebar - move to bottom, full width */
    .ocl-sidebar {
        grid-column: 1;
        grid-row: auto;
        margin-top: 0.5rem;
        order: 99;
    }

    .ocl-headlines-box h3 {
        font-size: 20px;
        margin-bottom: 1.5rem;
    }

    .ocl-headline-item a {
        font-size: 15px;
        line-height: 1.4;
    }

    .ocl-headline-item {
        padding-bottom: 1.25rem;
        border-bottom: 1px solid rgba(255,255,255,0.06);
        margin-bottom: 1.25rem;
    }

    .ocl-headline-item:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    /* Category badges - slightly smaller on mobile */
    .ocl-category {
        font-size: 10px;
        padding: 6px 12px;
        margin-bottom: 12px;
    }

    /* Meta text */
    .ocl-meta {
        font-size: 13px;
    }

    /* Standard cards on mobile */
    .ocl-card-standard {
        grid-column: 1;
        height: 280px;
        margin: 0;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .ocl-grid {
        padding: 0 0.75rem;
        gap: 0.875rem;
    }

    .ocl-card-hero {
        height: 380px;
    }

    .ocl-card-hero .ocl-title {
        font-size: 24px;
    }

    .ocl-card-overlap-left,
    .ocl-card-overlap-right {
        height: 260px;
    }

    .ocl-card-hero .ocl-card-overlay,
    .ocl-card-overlap-left .ocl-card-overlay,
    .ocl-card-overlap-right .ocl-card-overlay {
        padding: 1rem;
    }

    .ocl-headlines-box h3 {
        font-size: 18px;
    }

    .ocl-headline-item a {
        font-size: 14px;
    }
}

/* LIGHT MODE SUPPORT */
@media (prefers-color-scheme: light) {
    .ocl-card {
        background: #FFFFFF;
        border: 1px solid #E5E7EB;
    }

    .ocl-card:hover {
        box-shadow: 0 20px 60px rgba(96, 64, 255, 0.2);
        border-color: rgba(96, 64, 255, 0.3);
    }

    .ocl-card-no-image {
        background: #F9FAFB;
        border: 1px solid #E5E7EB;
    }

    .ocl-card-no-image .ocl-title {
        color: #111827;
    }

    .ocl-headlines-box h3 {
        color: #111827;
    }

    .ocl-headline-item a {
        color: #111827;
    }

    .ocl-headline-item a:hover {
        color: #6040FF;
    }

    .ocl-category {
        background: rgba(96, 64, 255, 0.1);
        border-color: rgba(96, 64, 255, 0.25);
        color: #5030EE;
    }

    .ocl-meta {
        color: #6B7280;
    }
}

/* Print styles */
@media print {
    .ocl-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .ocl-card {
        page-break-inside: avoid;
        margin: 0;
        height: auto !important;
    }

    .ocl-sidebar {
        display: none;
    }
}