/* ============================================================
   GridLink — Frontend Styles  v1.0.0  |  ict.com.tn
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700&display=swap');

/* ── Wrapper ─────────────────────────────────────────────── */

.gl-wrapper {
    width: 100%;
    box-sizing: border-box;
}

.gl-wrapper.gl-layout-boxed .gl-grid,
.gl-wrapper.gl-layout-boxed .gl-carousel {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
}

/* ── Grid ────────────────────────────────────────────────── */

.gl-grid {
    display: grid;
    grid-template-columns: repeat(var(--gl-cols, 4), 1fr);
    gap: var(--gl-gap, 0px);
}

/* ── Carousel ────────────────────────────────────────────── */

.gl-carousel {
    position: relative;
    overflow: hidden;
}

.gl-carousel-track {
    display: flex;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    /* transition injected by JS */
}

.gl-carousel-track.gl-dragging {
    cursor: grabbing;
}

.gl-carousel-slide {
    flex-shrink: 0;
    /* width set by JS: 100 / visible % */
}

/* Nav buttons */
.gl-carousel-prev,
.gl-carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgb(255 255 255 / 28%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
    color: #1C3D71;
    padding: 0;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.gl-carousel-prev { left: 14px; }
.gl-carousel-next { right: 14px; }

.gl-carousel-prev:hover,
.gl-carousel-next:hover {
    background: #ffffff;
    color: #1C3D71;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    transform: translateY(-50%) scale(1.06);
}

/* ── Shared cell ─────────────────────────────────────────── */

.gl-item {
    display: block;
    overflow: hidden;
}

.gl-item-inner {
    position: relative;
    aspect-ratio: var(--gl-ratio, 4/3);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #1c1c2e;
    overflow: hidden;
}

/* ── Default overlay ─────────────────────────────────────── */

.gl-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.04) 0%,
        rgba(0, 0, 0, 0.18) 45%,
        rgba(0, 0, 0, 0.72) 100%
    );
    display: flex;
    align-items: flex-end;
    padding: 26px 22px;
    transition: opacity 0.35s ease;
}

/* When a detail panel exists, fade out the default overlay on hover */
.gl-item-inner:hover .gl-item-overlay.gl-has-detail {
    opacity: 0;
}

.gl-item-content {
    color: #fff;
    width: 100%;
}

.gl-item-title {
	font-family:'Sora';
    margin: 0 0 6px;
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.gl-item-desc {
	font-family:'Sora';
    margin: 0 0 14px;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.88);
}

/* ── Hover Detail Panel ──────────────────────────────────── */

.gl-item-detail {
    position: absolute;
    inset: 0;
    background: #1c3d71c7;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 26px;
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
    font-family: 'Sora', sans-serif;
}

.gl-item-inner:hover .gl-item-detail {
    opacity: 1;
    pointer-events: auto;
}

/* Detail title */
.gl-detail-title {
    margin: 0 0 10px;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

span.gl-meta-text {
    font-size: 15px;
}

/* Detail description */
.gl-detail-desc {
    margin: 0 0 18px;
    font-family: 'Sora', sans-serif;
    font-size: clamp(0.82rem, 0.95vw, 0.95rem);
    font-weight: 300;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.78);
}

/* Meta list */
.gl-meta-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.gl-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-family: 'Sora', sans-serif;
    font-size: clamp(0.88rem, 1vw, 1rem);
    font-weight: 400;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.90);
}

.gl-meta-icon {
    font-size: 1.1em;
    flex-shrink: 0;
    line-height: 1.3;
    margin-top: 1px;
}

.gl-meta-text {
    flex: 1;
}

.gl-meta-text strong {
    font-weight: 700;
    color: #fff;
    font-family: 'Sora', sans-serif;
}

/* Detail footer */
.gl-detail-footer {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.gl-detail-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
    transition: gap 0.2s, opacity 0.2s;
}


/* ── Buttons (default overlay) ───────────────────────────── */

.gl-item-btn {
    display: inline-block;
    padding: 8px 22px;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.25s, color 0.25s, border-color 0.25s;
    cursor: pointer;
}

.gl-btn-outline {
    color: #fff;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.80);
}
.gl-btn-outline:hover { background: #fff; color: #222; border-color: #fff; }

.gl-btn-solid {
    color: #222;
    background: #fff;
    border: 2px solid #fff;
}
.gl-btn-solid:hover { background: transparent; color: #fff; }

.gl-btn-ghost {
    color: #fff;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.50);
    backdrop-filter: blur(4px);
}
.gl-btn-ghost:hover { background: rgba(255, 255, 255, 0.28); border-color: #fff; }

.gl-btn-link {
    color: #fff;
    background: none;
    border: none;
    padding: 0;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.gl-btn-link:hover { opacity: 0.75; }

/* ── img icon in meta ────────────────────────────────────── */

.gl-meta-img-icon {
    width: 22px;
    height: 22px;
    object-fit: contain;
    flex-shrink: 0;
    margin-top: 1px;
    border-radius: 2px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 1100px) {
    .gl-grid { grid-template-columns: repeat(3, 1fr) !important; }
}

@media (max-width: 768px) {
    .gl-grid          { grid-template-columns: repeat(2, 1fr) !important; }
    .gl-item-overlay  { padding: 14px 12px; }
    .gl-carousel-prev { left: 8px; }
    .gl-carousel-next { right: 8px; }

    /* Titres */
    .gl-item-title   { font-size: 1.05rem; }
    .gl-detail-title { font-size: 1rem; }

    /* Icônes & méta */
    .gl-meta-icon     { font-size: 0.95rem; }
    .gl-meta-img-icon { width: 18px; height: 18px; }
    .gl-meta-item     { font-size: 0.85rem; gap: 8px; }
    span.gl-meta-text { font-size: 13px; }
    .gl-detail-desc   { font-size: 0.82rem; }
}

.gl-item-detail{
	padding:60px;
}

/* Mobile */
@media (max-width: 768px) {
    .gl-item-detail { padding: 20px; }
}

@media (max-width: 480px) {
    /* Grid: 1 column */
    .gl-grid { grid-template-columns: 1fr !important; }

    /* Carousel nav buttons */
    .gl-carousel-prev,
    .gl-carousel-next {
        width: 34px;
        height: 34px;
    }

    .gl-carousel-prev svg,
    .gl-carousel-next svg {
        width: 16px;
        height: 16px;
    }

    .gl-carousel-prev { left: 6px; }
    .gl-carousel-next { right: 6px; }

    /* Titres encore plus petits */
    .gl-item-title   { font-size: 0.95rem; }
    .gl-detail-title { font-size: 0.9rem; }

    /* Icônes & méta */
    .gl-meta-icon     { font-size: 0.88rem; }
    .gl-meta-img-icon { width: 16px; height: 16px; }
    .gl-meta-item     { font-size: 0.8rem; gap: 7px; }
    span.gl-meta-text { font-size: 12px; }
    .gl-detail-desc   { font-size: 0.78rem; margin-bottom: 10px; }

    /* Padding panneau détail & overlay */
    .gl-item-detail  { padding: 14px; }
    .gl-item-overlay { padding: 10px 10px; }
    .gl-meta-list    { gap: 8px; }
}

body a:focus, body a:hover {
    color:#fff;
}
