:root {
    --brand: #3D0E17;
    --brand-soft: #68404c;
    --brand-light: #f3e6ea;
    --paper: #f9f5f7;
    --text-main: #161616;
}

/* GLOBAL */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    background: #ffffff;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
}

/* HEADER */
.site-header {
    background-color: var(--brand);
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-inner {
    width: 100%;
    max-width: 1100px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    font-size: 22px;
    letter-spacing: 1px;
}

.logo {
    width: 42px;
    height: auto;
}

.brand {
    font-weight: 600;
}

/* simple nav */
.main-nav {
    display: flex;
    gap: 16px;
}

.main-nav a {
    font-size: 14px;
    color: #f7dfe7;
    padding: 6px 10px;
    border-radius: 999px;
    transition: background 0.2s ease, transform 0.2s ease;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

/* GREY STRIP */
.sub-header {
    background-color: #d4d4d4;
    height: 40px;
    width: 100%;
}

/* MAIN PAGE WRAPPER */
.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 80px;
}

/* BREADCRUMB */
.breadcrumb {
    font-size: 12px;
    text-transform: uppercase;
    margin-bottom: 16px;
    letter-spacing: 0.1em;
    color: #7d7d7d;
}



/* JOURNAL OFFICIEL HERO */

.rtl {
    direction: rtl;
}

.gazette-section {
    margin-bottom: 40px;
}

.gazette-card {
    display: block;
    background: #f9f5f7;
    border-radius: 24px;
    padding: 20px 24px 18px;
    color: var(--brand);
    box-shadow:
        0 18px 40px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(61, 14, 23, 0.06);
    position: relative;
    overflow: hidden;
    text-decoration: none;      /* remove blue link style */
    border: 1px solid rgba(61, 14, 23, 0.08);
}

/* subtle background ornament */
.gazette-card::before {
    content: "";
    position: absolute;
    inset: -40%;
    background: radial-gradient(circle at 0% 0%, rgba(61, 14, 23, 0.12), transparent 55%);
    opacity: 0.9;
    pointer-events: none;
}

.gazette-card > * {
    position: relative;
    z-index: 1;
}

/* TOP ROW */
.gazette-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 10px;
}

.gazette-label {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(61, 14, 23, 0.8);
    margin-bottom: 4px;
}

.gazette-title {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
}

.gazette-date {
    margin: 0;
    font-size: 13px;
    color: rgba(61, 14, 23, 0.8);
}

/* CTA pill */
.gazette-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #3D0E17;
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 8px 20px rgba(61, 14, 23, 0.35);
    transform: translateY(0);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gazette-cta-text {
    font-weight: 500;
}

.gazette-cta-arrow {
    font-size: 14px;
}

/* divider line */
.gazette-divider {
    height: 1px;
    background: linear-gradient(to left, rgba(61, 14, 23, 0), rgba(61, 14, 23, 0.35), rgba(61, 14, 23, 0));
    margin: 12px 0 14px;
}

/* BOTTOM GRID */
.gazette-bottom {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.gazette-column h3 {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(61, 14, 23, 0.9);
}

.gazette-column p {
    margin: 0;
    font-size: 13px;
    color: rgba(61, 14, 23, 0.9);
}

/* HOVER STATE */
.gazette-card:hover {
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.14),
        0 0 0 1px rgba(61, 14, 23, 0.12);
    transform: translateY(-3px);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.gazette-card:hover .gazette-cta {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(61, 14, 23, 0.55);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .gazette-card {
        padding: 18px 16px 16px;
    }

    .gazette-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .gazette-bottom {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}









/* CARDS WRAPPER */
.cards-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 12px;
}

/* Base card style */
.category-card {
    position: relative;
    width: 100%;
    border-radius: 26px;
    overflow: hidden;
    height: 220px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateY(24px);
    opacity: 0;
    transition:
        transform 0.35s ease,
        opacity 0.35s ease,
        box-shadow 0.25s ease;
}

.category-card .card-link {
    display: block;
    height: 100%;
}

/* gradient overlay */
.category-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.1),
        rgba(0, 0, 0, 0.7)
    );
}

/* overlay content */
.card-overlay {
    position: relative;
    z-index: 1;
    color: #fff;
    height: 100%;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

/* internal layout */
.card-main {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    transition: transform 0.3s ease;
}

.card-text-left {
    flex: 1;
}

.card-text-right {
    flex: 0 0 40%;
    text-align: right;
}

/* right titles */
.card-text-right h3 {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.card-text-right p {
    margin: 0;
    font-size: 15px;
}

/* left description */
.card-description {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transform: translateX(-18px);
    transition:
        opacity 0.3s ease,
        max-height 0.3s ease,
        transform 0.3s ease;
}

/* CARD HOVER EFFECTS */
.category-card:hover {
    box-shadow:
      0 24px 50px rgba(0, 0, 0, 0.35),
      0 0 0 1px rgba(255, 255, 255, 0.12);
    transform: translateY(6px);
}

.category-card:hover .card-main {
    transform: translateX(-6px);
}

/* Direction-based hover slide */
.category-card[data-direction="left"]:hover .card-main {
    transform: translateX(6px);
}

/* show description on hover */
.category-card:hover .card-description {
    opacity: 1;
    max-height: 200px;
    transform: translateX(0);
}

/* BACKGROUND IMAGES – adjust to your actual files */
.card-constitution {
    background-image: url("images/c1.jpg");
}

.card-preamble {
    background-image: url("images/c2.webp");
}

.card-codes {
    background-image: url("images/c3.webp");
}

.card-doctrine {
    background-image: url("images/c4.webp");
}

.card-jurisprudence {
    background-image: url("images/c2.webp");
}

.card-parlement {
    background-image: url("images/c3.webp");
}

/* FOOTER */
.site-footer {
    background-color: var(--brand);
    height: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content {
    width: 100%;
    max-width: 1100px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.flag {
    width: 28px;
    border-radius: 4px;
}

.footer-text {
    color: #fff;
    font-size: 16px;
}

/* SCROLL REVEAL ANIMATIONS */
.reveal {
    opacity: 0;
    transform: translateY(40px);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal.visible.category-card[data-direction="right"] {
    animation: floatInRight 0.55s ease forwards;
}

.reveal.visible.category-card[data-direction="left"] {
    animation: floatInLeft 0.55s ease forwards;
}

@keyframes floatInRight {
    from {
        opacity: 0;
        transform: translateX(40px) translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

@keyframes floatInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px) translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0) translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .site-header {
        height: auto;
    }

    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 16px 10px;
    }

    .main-nav {
        gap: 10px;
    }

    .gazette-card {
        padding: 20px 18px 16px;
    }

    .gazette-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .gazette-meta {
        flex-direction: column;
    }

    .category-card {
        height: auto;
        min-height: 220px;
    }

    .card-overlay {
        padding: 18px 18px;
    }

    .card-main {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-text-right {
        flex: unset;
        text-align: left;
    }

    .card-description {
        opacity: 1;
        max-height: 260px;
        transform: translateX(0);
    }

    .site-footer {
        height: auto;
        padding: 14px 0;
    }
}
