/* ===== EDITORIAL LAYOUT: CLEAN CONTENT HIERARCHY ===== */

/* Premium Grid Container - 12-Column System */
.editorial-featured,
.editorial-latest,
.editorial-discover {
    --grid-columns: 12;
    --grid-gap: 24px;        /* Consistent 24px gutter */
    --content-padding: 40px; /* Strict 8px-based padding */
    scroll-margin-top: 80px; /* Smooth scroll offset */
}

/* POETIC: Loading state voor sections - Ink Wash Effect */
.editorial-featured.loading,
.editorial-latest.loading,
.editorial-discover.loading {
    opacity: 1;
    pointer-events: none;
    position: relative;
}

.editorial-featured.loading::after,
.editorial-latest.loading::after,
.editorial-discover.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(212, 146, 90, 0.05) 20%,
        rgba(212, 146, 90, 0.08) 50%,
        rgba(212, 146, 90, 0.05) 80%,
        transparent 100%);
    background-size: 200% 100%;
    animation: inkWash 2.5s ease-in-out infinite;
    pointer-events: none;
}

@keyframes inkWash {
    0% {
        background-position: -200% 0;
        opacity: 0;
    }
    20% {
        opacity: 1;
    }
    80% {
        opacity: 1;
    }
    100% {
        background-position: 200% 0;
        opacity: 0;
    }
}

/* Shared Editorial Header - Minimalist Typography */
.editorial-header {
    margin-bottom: 88px;  /* MASTER: Verhoogd voor consistency met 40px gaps */
    display: flex;
    flex-direction: column;
    gap: 12px;             /* MASTER: Verhoogd van 8px naar 12px voor breathing */
}

.editorial-label {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.05em;  /* MASTER: Respects Arabic connected letters */
    text-transform: uppercase;
    color: var(--color-accent-primary);
    opacity: 1;
}

.editorial-title {
    font-family: var(--font-display);
    font-size: clamp(36px, 6vw, 56px);
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: var(--color-text-title);
    letter-spacing: -0.02em;
}

/* ===== SECTION 1: UITGELICHT - Hero Featured ===== */
.editorial-featured {
    padding: 140px var(--grid-margin) 140px;  /* MASTER: Consistent 140px vertical breathing */
    max-width: var(--grid-max-width);
    margin: 0 auto;
    background: var(--color-canvas);   /* Pure ivory base */
    position: relative;
}

/* MASTER DESIGN: Dramatic separator with momentum */
.editorial-featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 240px;  /* Dominant presence, not lazy 120px */
    height: 4px;   /* Stronger statement */
    background: linear-gradient(90deg, 
        transparent 0%,
        rgba(212, 146, 90, 0.2) 15%,
        var(--color-accent-primary) 50%,
        rgba(212, 146, 90, 0.2) 85%,
        transparent 100%);
    border-radius: 2px;
    /* separatorPulse animation removed */
}
}

@keyframes separatorPulse {
    0%, 100% {
        opacity: 0.7;
        transform: translateX(-50%) scaleX(1);
    }
    50% {
        opacity: 1;
        transform: translateX(-50%) scaleX(1.05);
    }
}

/* Subtle ambient glow for storytelling atmosphere */
.editorial-featured::after {
    content: '';
    position: absolute;
    top: -80px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 160px;
    background: radial-gradient(ellipse at center,
        rgba(212, 146, 90, 0.08) 0%,
        rgba(212, 146, 90, 0.02) 50%,
        transparent 100%);
    pointer-events: none;
    filter: blur(40px);
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;  /* MASTER: Premium 40px gap voor luxury gevoel */
}

/* Large Editorial Card - TEXT-FIRST DESIGN (No Images!) */
.featured-card {
    background: linear-gradient(135deg, 
        #FFFFFF 0%, 
        #FFFBF7 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-medium);  /* MASTER: More weight for featured content */
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    min-height: 480px;  /* MASTER: Verhoogd naar 480px voor dominant presence */
    position: relative;
    border: 1px solid rgba(212, 146, 90, 0.08);
    /* MASTER: Keyboard navigation support */
    outline: none;
    text-decoration: none;
    color: inherit;
}

/* Elegant accent bar instead of image */
.featured-card-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--color-accent-primary) 20%,
        var(--color-accent-primary) 80%,
        transparent 100%);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.featured-card:hover .featured-card-accent {
    opacity: 1;
}

.featured-card:hover {
    transform: translateY(-8px);  /* MASTER: 8px voor waarneembare impact */
    box-shadow: var(--shadow-strong);  /* Dramatic elevation */
}

/* MASTER: Focus state voor keyboard navigation */
.featured-card:focus-visible {
    outline: 3px solid var(--color-accent-primary);
    outline-offset: 4px;
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

/* REMOVED: No image - pure text design */

.featured-card-content {
    padding: 48px;  /* MASTER: Moedige 48px voor premium luxury */
    display: flex;
    flex-direction: column;
    gap: 20px;      /* Verhoogde breathing room */
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.featured-card-category {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;  /* MASTER: Arabic-optimized */
    text-transform: uppercase;
    color: var(--color-accent-primary);
}

.featured-card-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 4.5vw, 38px);  /* Larger for text-first */
    font-weight: 700;
    line-height: 1.5;  /* MASTER: Verhoogd naar 1.5 voor Arabische scripts */
    color: var(--color-text-title);
    margin: 0;
    min-height: 3.5em;  /* MASTER: Genereuze 3.5em voor breathing room */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-excerpt {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 4;  /* Show more text without image */
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: auto;
    font-style: italic;  /* Poetic feel */
    min-height: 7em;  /* MASTER: Consistent excerpt space */
}

.featured-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;             /* FIXED: 12px icon-to-text gap */
    margin-top: 16px;      /* FIXED: 16px top margin */
    padding-top: 16px;     /* FIXED: 16px top padding */
    border-top: 1px solid var(--color-border);
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ===== SECTION 2: NIEUW - Latest Additions ===== */
.editorial-latest {
    padding: 140px var(--grid-margin) 140px;  /* MASTER: Consistent breathing room */
    max-width: var(--grid-max-width);
    margin: 0 auto;
    background: var(--color-canvas-warm);  /* Warm secondary surface */
    position: relative;
}

/* Subtle divider at top */
.editorial-latest::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--color-divider) 20%, var(--color-divider) 80%, transparent);
}

/* MASTER DESIGN: 2 Columns for dramatic storytelling impact */
.latest-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;  /* Premium gap voor luxe gevoel */
}

/* MASTER DESIGN: Dominant Editorial Card - Larger Storytelling Presence */
.latest-card {
    background: linear-gradient(135deg, 
        #FFFFFF 0%, 
        #FFFBF7 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    min-height: 380px;
    position: relative;
    border: 1px solid rgba(212, 146, 90, 0.06);
    /* MASTER: Keyboard navigation support */
    outline: none;
    text-decoration: none;
    color: inherit;
}

/* Elegant accent bar */
.latest-card-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--color-accent-primary) 30%,
        var(--color-accent-primary) 70%,
        transparent 100%);
    opacity: 0.4;
    transition: opacity 0.3s ease;
}

.latest-card:hover .latest-card-accent {
    opacity: 1;
}

.latest-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

/* MASTER: Focus state voor keyboard navigation */
.latest-card:focus-visible {
    outline: 3px solid var(--color-accent-primary);
    outline-offset: 4px;
    transform: translateY(-8px);
    box-shadow: var(--shadow-medium);
}

/* REMOVED: No image */

.latest-card-content {
    padding: 48px;  /* MASTER: Premium 48px padding consistency */
    display: flex;
    flex-direction: column;
    gap: 16px;      /* Optimized spacing */
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Header with category and status badge */
.latest-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.latest-card-category {
    font-family: var(--font-ui);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--color-accent-primary);
}

/* Status badges */
.latest-card-read-badge,
.latest-card-new-badge {
    font-family: var(--font-ui);
    font-size: var(--text-2xs);
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    letter-spacing: 0.02em;
}

.latest-card-new-badge {
    background: linear-gradient(135deg, var(--color-accent-primary) 0%, var(--color-accent-hover) 100%);
    color: #FFFFFF;
}

.latest-card-read-badge {
    background: rgba(93, 64, 55, 0.1);
    color: var(--color-text-muted);
}

.latest-card-title {
    font-family: var(--font-display);
    font-size: clamp(26px, 4vw, 34px);
    font-weight: 700;
    line-height: 1.5;
    color: var(--color-text-title);
    margin: 0;
    min-height: 3em;  /* Optimized for 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* MASTER: Excerpt voor storytelling depth */
.latest-card-excerpt {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;
    min-height: 5.25em;
    flex: 1;
}

/* Footer with dynamic relative time */
.latest-card-footer {
    display: flex;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid var(--color-divider);
    margin-top: auto;
}

.latest-card-posted-time {
    font-family: var(--font-ui);
    font-size: var(--text-2xs);
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
}

.latest-card-posted-time::before {
    content: '🕒';
    font-size: 15px;
    opacity: 0.75;
}

/* ===== SECTION 3: ONTDEK - Curated Discovery ===== */
.editorial-discover {
    padding: 140px var(--grid-margin) 140px;  /* MASTER: Consistency - 140px voor uniform breathing */
    max-width: var(--grid-max-width);
    margin: 0 auto;
    background: var(--color-canvas-deep);  /* Elevated deep surface */
    position: relative;
}

/* Premium top divider with accent */
.editorial-discover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--color-divider);
}

.editorial-discover::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 2px;
    background: var(--color-accent-primary);
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);  /* 3 compacte kolommen - elegant finale */
    gap: 40px;  /* MASTER: Premium 40px consistency met Featured */
    margin-bottom: 88px;   /* MASTER: Verhoogd voor meer breathing */
}

/* MASTER DESIGN: Compact Editorial Card - Elegant Closure */
.discover-card {
    background: linear-gradient(135deg, 
        #FFFFFF 0%, 
        #F9F6F2 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(26, 22, 20, 0.04),
                0 4px 12px rgba(26, 22, 20, 0.03);  /* MASTER: Subtiele shadow - minder gewicht */
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    cursor: pointer;
    min-height: 360px;  /* MASTER: Verhoogd van 300px naar 360px voor meer presence */
    position: relative;
    border: 1px solid rgba(212, 146, 90, 0.08);
    /* MASTER: Keyboard navigation support */
    outline: none;
    text-decoration: none;
    color: inherit;
}

/* Elegant accent bar */
.discover-card-accent {
    position: absolute;
    top: 0;
    right: 0;
    width: 3px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        var(--color-accent-primary) 25%,
        var(--color-accent-primary) 75%,
        transparent 100%);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.discover-card:hover .discover-card-accent {
    opacity: 1;
}

.discover-card:hover {
    transform: translateY(-6px);  /* MASTER: 6px - minder dramatisch dan featured */
    box-shadow: var(--shadow-soft);
}

/* MASTER: Focus state voor keyboard navigation */
.discover-card:focus-visible {
    outline: 3px solid var(--color-accent-primary);
    outline-offset: 4px;
    transform: translateY(-6px);
    box-shadow: var(--shadow-soft);
}

/* REMOVED: No image */

.discover-card-content {
    padding: 48px;  /* MASTER: Premium 48px - volledige consistency */
    display: flex;
    flex-direction: column;
    gap: 18px;  /* Verhoogd voor breathing */
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.discover-card-category {
    font-family: var(--font-ui);
    font-size: var(--text-2xs);
    font-weight: 600;
    letter-spacing: 0.05em;  /* MASTER: Arabic script optimization */
    text-transform: uppercase;
    color: var(--color-accent-primary);
}

.discover-card-title {
    font-family: var(--font-display);
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 700;
    line-height: var(--line-height-snug);
    color: var(--color-text-title);
    margin: 0;
    min-height: 2.75em;  /* MASTER: Baseline alignment - 2 lines consistent */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.discover-card-excerpt {
    font-family: var(--font-body);
    font-size: var(--text-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-style: italic;  /* Poetic feel */
    min-height: 5.25em;  /* MASTER: Consistent excerpt space */
}

/* Editorial CTA Button - Minimalist */
.editorial-cta {
    display: inline-flex;
    align-items: center;
    gap: 12px;              /* FIXED: 12px icon gap */
    padding: 16px 40px;     /* FIXED: 16px x 40px button padding */
    background: transparent;
    border: 2px solid var(--color-border-strong);
    border-radius: 50px;
    color: var(--color-text-title);
    font-family: var(--font-ui);
    font-size: var(--text-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    display: flex;
    width: fit-content;
}

.editorial-cta:hover {
    background: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    color: #FFFFFF;
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

/* MASTER: Focus state voor accessibility */
.editorial-cta:focus-visible {
    outline: 3px solid var(--color-accent-primary);
    outline-offset: 4px;
    background: var(--color-accent-primary);
    color: #FFFFFF;
}

.editorial-cta svg {
    transition: transform 0.3s ease;
}

.editorial-cta:hover svg {
    transform: translateX(-3px);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 48px;  /* FIXED: 48px for single column breathing */
    }
    
    .latest-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .discover-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 32px;
    }
    
    .editorial-title {
        font-size: clamp(32px, 5vw, 48px);
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .editorial-featured,
    .editorial-latest,
    .editorial-discover {
        padding: 80px 24px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .featured-grid,
    .latest-grid,
    .discover-grid {
        grid-template-columns: 1fr;
        gap: 32px;
        width: 100%;
        max-width: 100%;
    }
    
    .latest-card-content,
    .featured-card-content,
    .discover-card-content {
        padding: 32px;  /* Terug naar 32px op mobile voor space efficiency */
        width: 100%;
        box-sizing: border-box;
    }
    
    .featured-card-image,
    .discover-card-image {
        height: 240px;
        width: 100%;
    }
    
    .latest-card-image {
        height: 180px;
        width: 100%;
    }
    
    .editorial-title {
        font-size: clamp(28px, 6vw, 36px);
    }
    
    .editorial-cta {
        width: 100%;
        justify-content: center;
        max-width: 100%;
    }
}

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

/* Section fade-in on scroll */
@keyframes sectionFadeIn {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.editorial-featured,
.editorial-latest,
.editorial-discover {
    animation: sectionFadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

.editorial-latest {
    animation-delay: 0.1s;
}

.editorial-discover {
    animation-delay: 0.2s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.featured-card,
.latest-card,
.discover-card {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) backwards;
}

/* Staggered delays */
.featured-card:nth-child(1) { animation-delay: 0.1s; }
.featured-card:nth-child(2) { animation-delay: 0.2s; }
.featured-card:nth-child(3) { animation-delay: 0.3s; }

.latest-card:nth-child(1) { animation-delay: 0.05s; }
.latest-card:nth-child(2) { animation-delay: 0.1s; }
.latest-card:nth-child(3) { animation-delay: 0.15s; }
.latest-card:nth-child(4) { animation-delay: 0.2s; }

.discover-card:nth-child(1) { animation-delay: 0.1s; }
.discover-card:nth-child(2) { animation-delay: 0.15s; }
.discover-card:nth-child(3) { animation-delay: 0.2s; }
.discover-card:nth-child(4) { animation-delay: 0.25s; }
.discover-card:nth-child(5) { animation-delay: 0.3s; }
.discover-card:nth-child(6) { animation-delay: 0.35s; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .featured-card,
    .latest-card,
    .discover-card {
        animation: none;
    }
    
    .featured-card:hover,
    .latest-card:hover,
    .discover-card:hover {
        transform: none;
    }
}
