/* ═══════════════════════════════════════════════════════════
   Media Center (المركز الإعلامي) — hub page
   RTL-first. Self-contained CSS — mirrors trust-grid slider
   pattern from frontpage.css without pulling the whole file.
   =══════════════════════════════════════════════════════════ */

.mc-page {
    /* Brand-consistent palette using theme vars where available */
    --mc-brand:      var(--brand, #27ae60);
    --mc-brand-dark: #1a8f4a;
    --mc-gold:       #f59e0b;
    --mc-gold-dark:  #b8860b;
    --mc-ink:        #1a2438;
    --mc-ink-muted:  #4a5568;
    --mc-line:       #e5e7eb;
    --mc-card:       #ffffff;
    --mc-bg:         #f7f9fc;
    --mc-shadow:     0 12px 28px rgba(15, 23, 42, 0.08);
    --mc-shadow-lg:  0 24px 48px rgba(15, 23, 42, 0.14);

    background: var(--mc-bg);
    color: var(--mc-ink);
    padding-bottom: 80px;
    position: relative;
    overflow: hidden;
    font-family: 'Tajawal', 'Cairo', system-ui, -apple-system, sans-serif;
    direction: rtl;
}

/* ─── Decorative bg shapes ─── */
.mc-deco { position: absolute; pointer-events: none; z-index: 0; }
.mc-deco--blob-1 {
    top: -140px; inset-inline-end: -140px;
    width: 420px; height: 420px; border-radius: 50%;
    background: radial-gradient(circle, rgba(39, 174, 96, 0.20), transparent 65%);
    filter: blur(80px);
}
.mc-deco--blob-2 {
    bottom: 10%; inset-inline-start: -160px;
    width: 380px; height: 380px; border-radius: 50%;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.18), transparent 65%);
    filter: blur(80px);
}
.mc-deco--grid {
    inset: 0;
    background-image:
        linear-gradient(to right,  rgba(15, 23, 42, 0.04) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(15, 23, 42, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 70% 55% at 50% 40%, #000, transparent 90%);
}

.mc-page > * { position: relative; z-index: 1; }

/* ═════ Hero ═════ */
.mc-hero {
    position: relative;
    padding: clamp(70px, 10vw, 130px) 0 clamp(90px, 10vw, 140px);
    text-align: center;
    color: #fff;
    /* Rich brand-teal gradient with warm accents */
    background:
        radial-gradient(ellipse 80% 100% at 100% 0%,  rgba(245, 158, 11, 0.32), transparent 55%),
        radial-gradient(ellipse 70% 90%  at 0%  100%, rgba(39, 174, 96, 0.42),  transparent 55%),
        radial-gradient(ellipse 60% 80%  at 50% 50%,  rgba(6, 182, 212, 0.20),  transparent 65%),
        linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0e4d3a 100%);
    isolation: isolate;
    overflow: hidden;
}
.mc-hero::before {
    /* Dotted mesh pattern behind everything */
    content: '';
    position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.12) 1.4px, transparent 1.4px);
    background-size: 26px 26px;
    mask-image: radial-gradient(ellipse 70% 65% at 50% 50%, #000, transparent 90%);
    z-index: 0;
    pointer-events: none;
}
.mc-hero > .container { position: relative; z-index: 2; }

/* Wave separator at the bottom of the hero */
.mc-hero__wave {
    position: absolute; left: 0; right: 0; bottom: -1px;
    width: 100%; height: 90px;
    color: var(--mc-bg);
    z-index: 3;
    pointer-events: none;
}

/* Hero decorative floaters */
.mc-hero__deco { position: absolute; z-index: 1; pointer-events: none; }
.mc-hero__deco--ring-1 {
    top: 12%; inset-inline-end: 8%;
    width: 120px; height: 120px; border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, 0.25);
    animation: mc-spin-slow 30s linear infinite;
}
.mc-hero__deco--ring-2 {
    bottom: 20%; inset-inline-start: 6%;
    width: 90px; height: 90px; border-radius: 50%;
    border: 2px solid rgba(245, 158, 11, 0.35);
    animation: mc-spin-slow 22s linear infinite reverse;
}
.mc-hero__deco--dot-1 { top: 18%; inset-inline-start: 12%; width: 10px; height: 10px; border-radius: 50%; background: var(--mc-gold); box-shadow: 0 0 22px rgba(245, 158, 11, 0.9); animation: mc-bob 4s ease-in-out infinite; }
.mc-hero__deco--dot-2 { top: 60%; inset-inline-end: 15%; width:  8px; height:  8px; border-radius: 50%; background: #06b6d4; box-shadow: 0 0 18px rgba(6, 182, 212, 0.9); animation: mc-bob 5s ease-in-out infinite reverse; }
.mc-hero__deco--dot-3 { top: 30%; inset-inline-end: 25%; width:  6px; height:  6px; border-radius: 50%; background: #fff; box-shadow: 0 0 14px rgba(255, 255, 255, 0.9); animation: mc-bob 6s ease-in-out infinite; }
.mc-hero__deco--star-1,
.mc-hero__deco--star-2 { color: var(--mc-gold); animation: mc-spin 6s ease-in-out infinite; filter: drop-shadow(0 0 12px rgba(245, 158, 11, 0.65)); }
.mc-hero__deco--star-1 { top: 8%;  inset-inline-start: 32%; width: 22px; height: 22px; }
.mc-hero__deco--star-2 { bottom: 30%; inset-inline-end: 35%; width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.7)); animation-delay: 2s; }

.mc-hero__inner {
    max-width: 820px;
    margin: 0 auto;
    position: relative;   /* anchor for the tilted flags on either side */
    --mc-flag-tilt: 14deg;
}

/* Wrapper: invisible on desktop, becomes the flex row on mobile */
.mc-hero__flags { display: contents; }

/* Tilted decorative flags flanking the hero content (right + left) */
.mc-hero__flag {
    position: absolute;
    top: 50%;
    height: clamp(200px, 24vw, 320px);
    width: auto;
    opacity: 0.95;
    z-index: 1;
    pointer-events: none;
    filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5));
    animation: mc-flag-sway 6s ease-in-out infinite;
}
.mc-hero__flag--right {
    inset-inline-end: -80px;
    transform: translateY(-50%) rotate(calc(var(--mc-flag-tilt) * -1));
}
.mc-hero__flag--left {
    inset-inline-start: -80px;
    /* Mirror + flip tilt so both flags "lean toward" the centered text */
    transform: translateY(-50%) rotate(var(--mc-flag-tilt)) scaleX(-1);
    animation-delay: -3s;
}
@keyframes mc-flag-sway {
    0%, 100% { filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.5)); }
    50%      { filter: drop-shadow(0 22px 36px rgba(0, 0, 0, 0.6)); }
}

/* Breadcrumb */
.mc-breadcrumb {
    position: relative; z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    border-radius: 99px;
    font-size: 13px; font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 28px;
}
.mc-breadcrumb__link {
    display: inline-flex; align-items: center; gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}
.mc-breadcrumb__link:hover { color: var(--mc-gold); }
.mc-breadcrumb__sep {
    display: inline-flex; opacity: 0.6;
    transform: rotate(180deg);   /* RTL flip */
}
.mc-breadcrumb__current {
    color: var(--mc-gold);
    font-weight: 800;
    font-size: 20px;
}

/* Hero badge */
.mc-hero__badge {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(10px);
    border-radius: 99px;
    font-size: 13.5px; font-weight: 800;
    letter-spacing: 0.01em;
    margin-bottom: 22px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.30);
}
.mc-hero__badge-dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--mc-gold);
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
    animation: mc-pulse 1.8s ease-out infinite;
}
@keyframes mc-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7); }
    100% { box-shadow: 0 0 0 10px rgba(245, 158, 11, 0); }
}

.mc-hero__title {
    font-size: clamp(32px, 5.2vw, 60px);
    font-weight: 900;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin: 0 0 20px;
    color: #fff;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
}
.mc-hero__title-and {
    display: inline-block;
    color: rgba(255, 255, 255, 0.55);
    font-weight: 700;
    margin: 0 6px;
}
.mc-hero__title-hl {
    display: inline-block;
    background: linear-gradient(120deg, #fde68a 20%, var(--mc-gold) 55%, #fb923c 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
    position: relative;
}
.mc-hero__title-hl::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -0.14em;
    height: 6px; border-radius: 6px;
    background: linear-gradient(90deg, transparent, rgba(245, 158, 11, 0.6), transparent);
}
.mc-hero__lead {
    max-width: 720px; margin: 0 auto 34px;
    font-size: clamp(15.5px, 1.7vw, 18px);
    line-height: 2;
    color: rgba(255, 255, 255, 0.86);
}
.mc-hero__lead strong {
    color: #fff;
    background: linear-gradient(180deg, transparent 60%, rgba(245, 158, 11, 0.35) 60%);
    padding: 0 4px;
}

/* Hero stat pills */
.mc-hero__stats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 30px;
}
.mc-hero__stat {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    border-radius: 99px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, background 0.25s ease;
}
.mc-hero__stat:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.13); }
.mc-hero__stat-num { font-size: 22px; font-weight: 900; color: var(--mc-gold); }
.mc-hero__stat-lbl { font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }

@keyframes mc-spin-slow { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes mc-spin      { 0%,100% { opacity: 0.4; transform: rotate(0)   scale(0.9); }
                          50%     { opacity: 1;   transform: rotate(180deg) scale(1.15); } }
@keyframes mc-bob       { 0%,100% { transform: translateY(0); }
                          50%     { transform: translateY(-14px); } }

/* ═════ Sections ═════ */
.mc-section { padding: 60px 0 40px; position: relative; }
.mc-section__head { margin-bottom: 34px; text-align: center; }
.mc-section__head .mc-section__title { justify-content: center; }
.mc-section__title {
    display: inline-flex; align-items: center; gap: 12px;
    font-size: clamp(22px, 3vw, 30px); font-weight: 900;
    margin: 0 0 8px; color: var(--mc-ink);
    position: relative; padding-bottom: 10px;
}
.mc-section__title::after {
    content: ''; position: absolute;
    left: 50%; transform: translateX(-50%);   /* direction-agnostic center */
    bottom: 0;
    width: 60px; height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--mc-brand), var(--mc-brand-dark));
}
.mc-section--works .mc-section__title::after {
    background: linear-gradient(90deg, var(--mc-gold), var(--mc-gold-dark));
}
.mc-section__title-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 12px;
    background: rgba(39, 174, 96, 0.12);
    color: var(--mc-brand);
}
.mc-section--works .mc-section__title-icon {
    background: rgba(245, 158, 11, 0.14); color: var(--mc-gold);
}
.mc-section__lead { color: var(--mc-ink-muted); font-size: 15px; margin: 0; }

/* ═════ List / items ═════ */
.mc-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
}
.mc-item {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 32px;
    background: var(--mc-card);
    border-radius: 22px;
    padding: 22px;
    box-shadow: var(--mc-shadow);
    align-items: center;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.35s ease;
}
.mc-item:hover { transform: translateY(-3px); box-shadow: var(--mc-shadow-lg); }

.mc-item__media { position: relative; }

/* ── Slider (mirrors .trust-slider pattern) ── */
.mc-slider {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    border-radius: 16px;
    overflow: hidden;
    background: #0f172a;
}
.mc-slider img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s ease;
    display: block;
}
.mc-slider img.active { opacity: 1; }

.mc-dots {
    display: flex; justify-content: center; gap: 8px;
    margin-top: 14px;
}
.mc-dot {
    width: 10px; height: 10px; border-radius: 50%;
    background: #d1d5db; border: 0; padding: 0; cursor: pointer;
    transition: width 0.35s ease, background 0.25s ease;
}
.mc-dot.active { background: var(--mc-brand); width: 28px; border-radius: 5px; }
.mc-section--works .mc-dot.active { background: var(--mc-gold); }

/* ── Body ── */
.mc-item__body { display: flex; flex-direction: column; gap: 14px; }

.mc-badge {
    display: inline-flex; align-items: center; gap: 6px;
    align-self: flex-start;
    padding: 5px 14px;
    font-size: 12.5px; font-weight: 800;
    border-radius: 99px;
    letter-spacing: 0.01em;
}
.mc-badge--news {
    background: rgba(39, 174, 96, 0.12);
    color: var(--mc-brand-dark);
    border: 1px solid rgba(39, 174, 96, 0.32);
}
.mc-badge--work {
    background: rgba(245, 158, 11, 0.14);
    color: var(--mc-gold-dark);
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.mc-item__title {
    margin: 0; font-size: clamp(19px, 2vw, 24px);
    font-weight: 900; line-height: 1.4; color: var(--mc-ink);
}
.mc-item__snippet {
    margin: 0; font-size: 15px; line-height: 1.9;
    color: var(--mc-ink-muted);
}

/* ── Buttons ── */
.mc-btn {
    display: inline-flex; align-items: center; gap: 8px;
    align-self: flex-start;
    padding: 12px 22px;
    font-size: 15px; font-weight: 800;
    border: 0; border-radius: 12px;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
    color: #fff;
}
.mc-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 24px rgba(0,0,0,0.15); }

.mc-btn--news {
    background: linear-gradient(135deg, var(--mc-brand), var(--mc-brand-dark));
    box-shadow: 0 6px 14px rgba(39, 174, 96, 0.30);
}
.mc-btn--work {
    background: linear-gradient(135deg, var(--mc-gold), var(--mc-gold-dark));
    box-shadow: 0 6px 14px rgba(245, 158, 11, 0.30);
}
.mc-btn--video {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    box-shadow: 0 6px 14px rgba(239, 68, 68, 0.30);
}
.mc-btn--social {
    background: linear-gradient(135deg, #6366f1, #4338ca);
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.30);
}
.mc-btn--website {
    background: linear-gradient(135deg, #0ea5e9, #0369a1);
    box-shadow: 0 6px 14px rgba(14, 165, 233, 0.30);
}

/* ── Empty state ── */
.mc-empty {
    padding: 40px; text-align: center;
    background: var(--mc-card); border-radius: 20px;
    color: var(--mc-ink-muted); border: 1px dashed var(--mc-line);
}

/* ═════ Modal ═════ */
.mc-modal {
    position: fixed; inset: 0;
    background: rgba(8, 15, 32, 0.72);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    padding: 24px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.25s ease;
}
.mc-modal[hidden] { display: none; }
.mc-modal.mc-modal--open { opacity: 1; pointer-events: auto; }

.mc-modal__card {
    position: relative;
    max-width: min(760px, 94vw);
    max-height: 88vh;
    overflow-y: auto;
    background: #fff;
    color: var(--mc-ink);
    border-radius: 22px;
    padding: clamp(22px, 4vw, 36px);
    box-shadow: 0 40px 80px rgba(0,0,0,0.4);
    transform: scale(0.95);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    direction: rtl;
}
.mc-modal.mc-modal--open .mc-modal__card { transform: scale(1); }

/* Close on the LEFT (inline-end in RTL) so it never sits over the title text. */
.mc-modal__close {
    position: absolute;
    top: 14px; inset-inline-end: 14px;
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 1px solid var(--mc-line);
    background: #fff;
    color: var(--mc-ink);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease, color 0.2s ease;
    z-index: 2;
}
.mc-modal__close:hover {
    background: var(--mc-brand); color: #fff; transform: scale(1.08);
    border-color: var(--mc-brand);
}

.mc-modal__title {
    margin: 0 0 18px;
    /* Title padding matches close-button side (LEFT in RTL = inline-end). */
    padding-inline-end: 56px;
    font-size: clamp(22px, 3vw, 30px); font-weight: 900;
    line-height: 1.35; color: var(--mc-ink);
}
.mc-modal__body {
    font-size: 16px; line-height: 2.0; color: var(--mc-ink-muted);
}
.mc-modal__body p:first-child { margin-top: 0; }
.mc-modal__body p:last-child  { margin-bottom: 0; }
.mc-modal__body img {
    max-width: 100%; height: auto; border-radius: 12px;
    margin: 14px 0;
}

/* ═════ Responsive ═════ */
@media (max-width: 900px) {
    .mc-item {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 18px;
    }
    .mc-slider { aspect-ratio: 4/3; }
    .mc-item__body { text-align: right; }
    .mc-btn { align-self: stretch; justify-content: center; }
}
@media (max-width: 560px) {
    .mc-hero { padding: 32px 0 24px; }
    .mc-section { padding: 30px 0 20px; }
    .mc-item__snippet { font-size: 14.5px; line-height: 1.85; }
    .mc-modal { padding: 12px; }
    .mc-modal__card { padding: 24px 18px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .mc-item, .mc-modal, .mc-modal__card, .mc-slider img { transition: none !important; }
    .mc-hero__deco, .mc-sw, .mc-hero__badge-dot { animation: none !important; }
}

/* ═════ Slider image is clickable → opens the image lightbox ═════ */
.mc-slider          { cursor: zoom-in; }
.mc-slider img      { cursor: zoom-in; }

/* ═════ Image lightbox (browse all images of one news item) ═════ */
.mc-lightbox {
    position: fixed; inset: 0;
    background: rgba(4, 8, 20, 0.94);
    backdrop-filter: blur(8px);
    z-index: 100000;
    display: flex; align-items: center; justify-content: center;
    padding: 32px;
    opacity: 0; pointer-events: none;
    transition: opacity 0.3s ease;
}
.mc-lightbox[hidden]        { display: none; }
.mc-lightbox.mc-lightbox--open {
    opacity: 1; pointer-events: auto;
}
.mc-lightbox::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 15% 15%, rgba(39, 174, 96, 0.20), transparent 55%),
        radial-gradient(circle at 85% 85%, rgba(245, 158, 11, 0.15), transparent 55%);
}

.mc-lightbox__stage {
    position: relative; z-index: 2;
    max-width: min(1200px, 92vw);
    max-height: 84vh;
    display: flex; align-items: center; justify-content: center;
    transform: scale(0.94);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.mc-lightbox--open .mc-lightbox__stage { transform: scale(1); }

.mc-lightbox__stage img {
    max-width: 100%;
    max-height: 84vh;
    width: auto; height: auto;
    border-radius: 14px;
    box-shadow:
        0 30px 80px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.10);
    display: block;
}

/* Close + nav buttons */
.mc-lightbox__close,
.mc-lightbox__nav {
    position: absolute;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: #fff;
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    z-index: 3;
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.mc-lightbox__close:hover,
.mc-lightbox__nav:hover {
    background: rgba(255, 255, 255, 0.26);
    border-color: rgba(255, 255, 255, 0.40);
    transform: scale(1.08);
}
.mc-lightbox__close {
    top: 24px; inset-inline-end: 24px;
}

.mc-lightbox__nav {
    top: 50%; transform: translateY(-50%);
}
.mc-lightbox__nav:hover { transform: translateY(-50%) scale(1.08); }
.mc-lightbox__nav[hidden] { display: none; }
.mc-lightbox__nav--prev { inset-inline-end: 24px; }   /* RTL: prev on the right */
.mc-lightbox__nav--next { inset-inline-start: 24px; } /* RTL: next on the left  */

/* Counter chip */
.mc-lightbox__counter {
    position: absolute;
    bottom: 24px; left: 50%; transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 8px 22px;
    border-radius: 99px;
    font-size: 13.5px; font-weight: 800;
    z-index: 3;
    border: 1px solid rgba(255, 255, 255, 0.15);
    letter-spacing: 0.02em;
}
.mc-lightbox__counter[hidden] { display: none; }

@media (max-width: 560px) {
    .mc-lightbox { padding: 12px; }
    .mc-lightbox__close { top: 12px; inset-inline-end: 12px; width: 44px; height: 44px; }
    .mc-lightbox__nav   { width: 44px; height: 44px; }
    .mc-lightbox__nav--prev { inset-inline-end: 8px; }
    .mc-lightbox__nav--next { inset-inline-start: 8px; }
    .mc-lightbox__counter { bottom: 14px; padding: 6px 16px; font-size: 12.5px; }
}

/* ═══════════════════════════════════════════════════════════
   Works section — DARK "software house" theme + card grid
   =══════════════════════════════════════════════════════════ */
.mc-section--works {
    margin-top: 40px;
    padding: clamp(60px, 8vw, 100px) 0 clamp(70px, 8vw, 110px);
    /* Deep indigo/tech gradient — distinct from the light bg above */
    background:
        radial-gradient(ellipse 80% 100% at 100% 0%,  rgba(139, 92, 246, 0.20), transparent 55%),
        radial-gradient(ellipse 70% 90%  at 0%  100%, rgba(6, 182, 212, 0.22),  transparent 55%),
        radial-gradient(ellipse 50% 70%  at 50% 50%,  rgba(59, 130, 246, 0.10), transparent 65%),
        linear-gradient(160deg, #0f0f2b 0%, #171948 50%, #0a0f22 100%);
    color: #f8fafc;
    overflow: hidden;
    isolation: isolate;
}
.mc-section--works::before {
    /* Wave separator on TOP to smoothly enter from the light bg */
    content: '';
    position: absolute;
    left: 0; right: 0; top: -1px;
    height: 60px;
    background: var(--mc-bg);
    -webkit-mask-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1440 60' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,0 C240,50 480,0 720,25 C960,55 1200,10 1440,35 L1440,0 Z' fill='%23000'/></svg>");
            mask-image: url("data:image/svg+xml;utf8,<svg viewBox='0 0 1440 60' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'><path d='M0,0 C240,50 480,0 720,25 C960,55 1200,10 1440,35 L1440,0 Z' fill='%23000'/></svg>");
    -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
    z-index: 4;
    pointer-events: none;
}
.mc-section--works .container { position: relative; z-index: 2; }

.mc-section__head--on-dark .mc-section__title       { color: #fff; }
.mc-section__head--on-dark .mc-section__title-icon  {
    background: rgba(139, 92, 246, 0.22);
    color: #a78bfa;
}
.mc-section__head--on-dark .mc-section__title::after {
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
    width: 80px;
}
.mc-section__head--on-dark .mc-section__lead {
    color: rgba(255, 255, 255, 0.72);
    max-width: 640px; margin: 0 auto;
}

/* ── Software-house floating decorations ── */
.mc-sw { position: absolute; z-index: 0; pointer-events: none; user-select: none; }
.mc-sw--brace {
    font-family: 'JetBrains Mono', 'Fira Code', ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.06);
    font-size: 88px;
    letter-spacing: -0.02em;
    line-height: 1;
    text-shadow: 0 0 30px rgba(139, 92, 246, 0.35);
}
.mc-sw--brace-1 { top:  8%; inset-inline-end:   6%; font-size: 130px; }
.mc-sw--brace-2 { top: 55%; inset-inline-start: 4%; font-size: 100px; color: rgba(6, 182, 212, 0.12); }
.mc-sw--brace-3 { top: 32%; inset-inline-start:14%; font-size:  70px; color: rgba(245, 158, 11, 0.10); }
.mc-sw--brace-4 { bottom: 8%; inset-inline-end: 20%; font-size:  56px; color: rgba(139, 92, 246, 0.12); }
.mc-sw--brace-5 { top: 68%; inset-inline-end:  10%; font-size:  64px; color: rgba(6, 182, 212, 0.10); }

.mc-sw--icon {
    color: rgba(255, 255, 255, 0.08);
    display: inline-flex;
}
.mc-sw--icon svg { width: 100%; height: 100%; }
.mc-sw--icon-code     { top:  6%; inset-inline-start: 8%;  width: 56px; height: 56px; color: rgba(139, 92, 246, 0.22); animation: mc-bob 5s ease-in-out infinite; }
.mc-sw--icon-terminal { top: 24%; inset-inline-end:  28%; width: 44px; height: 44px; color: rgba(6, 182, 212, 0.22); animation: mc-bob 7s ease-in-out infinite reverse; }
.mc-sw--icon-gear     { bottom: 12%; inset-inline-start: 30%; width: 62px; height: 62px; color: rgba(255, 255, 255, 0.08); animation: mc-spin-slow 30s linear infinite; }
.mc-sw--icon-monitor  { bottom: 22%; inset-inline-end:  4%; width: 60px; height: 60px; color: rgba(245, 158, 11, 0.15); }
.mc-sw--icon-cpu      { top: 45%; inset-inline-end:  40%; width: 42px; height: 42px; color: rgba(139, 92, 246, 0.16); animation: mc-bob 8s ease-in-out infinite; }

.mc-sw--grid {
    inset: 0;
    background-image:
        linear-gradient(to right,  rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: radial-gradient(ellipse 70% 65% at 50% 40%, #000, transparent 90%);
    z-index: 0;
}

/* ── Cards grid ── */
.mc-list--cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 28px;
}

/* Card variant of .mc-item */
.mc-list--cards .mc-item {
    display: block;                 /* stack vertically */
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(14px);
    padding: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}
.mc-list--cards .mc-item:hover {
    transform: translateY(-6px);
    border-color: rgba(139, 92, 246, 0.5);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(139, 92, 246, 0.3);
}

.mc-list--cards .mc-item__media { padding: 0; }
.mc-list--cards .mc-slider {
    border-radius: 0;
    aspect-ratio: 16 / 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mc-list--cards .mc-dots {
    margin: 12px 0 0; padding: 0 22px;
}
.mc-list--cards .mc-dot { background: rgba(255, 255, 255, 0.28); }
.mc-list--cards .mc-dot.active {
    background: linear-gradient(90deg, #8b5cf6, #06b6d4);
}

.mc-list--cards .mc-item__body {
    padding: 20px 22px 24px;
    gap: 12px;
}
.mc-list--cards .mc-item__title {
    color: #fff;
    font-size: 18.5px;
    line-height: 1.5;
}
.mc-list--cards .mc-item__snippet {
    color: rgba(255, 255, 255, 0.72);
    font-size: 14.5px;
    line-height: 1.85;
}
.mc-list--cards .mc-badge--work {
    background: rgba(139, 92, 246, 0.22);
    color: #c4b5fd;
    border-color: rgba(139, 92, 246, 0.4);
}

/* Button restyle inside cards */
.mc-list--cards .mc-btn {
    align-self: stretch;
    justify-content: center;
    padding: 12px 20px;
    border-radius: 10px;
}
.mc-list--cards .mc-btn--video {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    box-shadow: 0 8px 20px rgba(239, 68, 68, 0.35);
}
.mc-list--cards .mc-btn--website {
    background: linear-gradient(135deg, #06b6d4, #0284c7);
    box-shadow: 0 8px 20px rgba(6, 182, 212, 0.35);
}
.mc-list--cards .mc-btn--social {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.35);
}

/* Dark empty state */
.mc-empty--dark {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.6);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ── News item — light-mode polish (cross-highlight left border) ── */
.mc-section--news .mc-item {
    border-inline-end: 4px solid var(--mc-brand);
}

/* ═════ Load More button + hidden items ═════ */

.mc-item--hidden { display: none !important; }
.mc-item[hidden] { display: none !important; }

.mc-more-wrap {
    display: flex; justify-content: center;
    margin-top: 34px;
}
.mc-more {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 32px;
    background: #fff;
    color: var(--mc-brand-dark);
    border: 2px solid var(--mc-brand);
    border-radius: 99px;
    font-size: 15.5px; font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(39, 174, 96, 0.20);
    transition: transform 0.25s ease, background 0.25s ease,
                color 0.25s ease, box-shadow 0.25s ease;
    position: relative;
    overflow: hidden;
}
.mc-more:hover {
    background: var(--mc-brand); color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 18px 34px rgba(39, 174, 96, 0.35);
}
.mc-more__count {
    background: rgba(39, 174, 96, 0.14);
    color: var(--mc-brand-dark);
    padding: 2px 10px; border-radius: 99px;
    font-size: 12.5px; font-weight: 800;
    transition: background 0.25s ease, color 0.25s ease;
}
.mc-more:hover .mc-more__count { background: rgba(255,255,255,0.25); color: #fff; }
.mc-more svg { transition: transform 0.25s ease; }
.mc-more:hover svg { transform: translateY(3px); }
.mc-more:disabled,
.mc-more.is-done {
    opacity: 0.5; cursor: default; transform: none;
    box-shadow: none; background: #e5e7eb; color: #4b5563;
    border-color: transparent;
}

/* Dark variant for works section */
.mc-more--dark {
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(139, 92, 246, 0.40);
}
.mc-more--dark .mc-more__count {
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
}
.mc-more--dark:hover {
    background: linear-gradient(135deg, #7c3aed, #0891b2);
    color: #fff;
    box-shadow: 0 20px 36px rgba(139, 92, 246, 0.55);
}
.mc-more--dark:hover .mc-more__count { background: rgba(255,255,255,0.32); }

/* Responsive tweaks for the new pieces */
@media (max-width: 900px) {
    .mc-hero__stats { gap: 10px; }
    .mc-hero__stat { padding: 8px 14px; }
    .mc-hero__stat-num { font-size: 19px; }
    .mc-hero__stat-lbl { font-size: 12px; }
    .mc-sw--brace-1, .mc-sw--brace-2 { font-size: 70px; }
    .mc-sw--brace-3, .mc-sw--brace-4, .mc-sw--brace-5 { font-size: 46px; }
    .mc-list--cards { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 1100px) {
    /* Shrink the flags a bit so they don't crowd the title on medium screens */
    .mc-hero__flag        { height: clamp(160px, 20vw, 240px); }
    .mc-hero__flag--right { inset-inline-end: -40px; }
    .mc-hero__flag--left  { inset-inline-start: -40px; }
}
@media (max-width: 720px) {
    /* On phones: stack flags side-by-side BELOW the hero content */
    .mc-hero__inner {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .mc-hero__flags {
        display: flex;
        justify-content: center;
        align-items: flex-end;
        gap: 12px;
        margin-top: 32px;
        order: 100;   /* pushed to the very end of the flex column */
        width: 100%;
    }
    .mc-hero__flag {
        position: static;
        height: clamp(130px, 32vw, 190px);
        opacity: 1;
        animation: none;
        filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.4));
    }
    .mc-hero__flag--right {
        transform: rotate(calc(var(--mc-flag-tilt) * -1));
        transform-origin: center bottom;
    }
    .mc-hero__flag--left {
        transform: rotate(var(--mc-flag-tilt)) scaleX(-1);
        transform-origin: center bottom;
    }
}
@media (max-width: 560px) {
    .mc-hero__title { font-size: clamp(26px, 8vw, 34px); }
    .mc-hero__lead  { font-size: 14.5px; }
    .mc-hero__wave  { height: 60px; }
    .mc-sw--icon    { display: none; }   /* keep decorations subtle on mobile */
    .mc-hero__deco--ring-1,
    .mc-hero__deco--ring-2 { display: none; }
    .mc-more { padding: 12px 22px; font-size: 14.5px; }
}
