/* ============================================
   NEWS DETAILS - ARABIC (RTL)
   ============================================ */

/* -----------------------------------------------------------
   1. GLOBAL & BOOTSTRAP OVERRIDES (From original Arabic file)
   ----------------------------------------------------------- */
body {
    direction: rtl;
    text-align: right;
}

.navbar-nav {
    padding-right: 0;
    padding-left: 0;
}

.me-auto {
    margin-right: auto !important;
    margin-left: initial !important;
}

.ms-auto {
    margin-left: auto !important;
    margin-right: initial !important;
}

.ms-lg-5 {
    margin-right: 3rem !important;
    margin-left: 0 !important;
}

.text-dir-start {
    text-align: right !important;
}

/* -----------------------------------------------------------
   2. MAIN STYLES (Mirrored from news-details-en.css)
   ----------------------------------------------------------- */

:root {
    --detail-green: #0b8f2a;
    --detail-gold: #ffb41e;
    --detail-soft: #eaf4e1;
}

.detail-hero {
    padding: 70px 0 40px;
    background: linear-gradient(180deg, #e9f8e9 0%, #f6f2e3 100%);
}

.detail-title {
    font-size: clamp(26px, 4vw, 40px);
    font-weight: 800;
    color: #24310b;
    margin-bottom: 16px;
    display: inline-block;
    position: relative;
}

.detail-title .about-title-mark {
    position: relative;
    display: inline-block;
    z-index: 1;
    color: inherit;
}

.detail-title .about-title-mark::after {
    content: "";
    position: absolute;
    /* Mirrored: left: -12px -> right: -12px */
    right: -12px;
    left: auto;
    bottom: -8px;
    margin-inline: auto;
    width: 110px;
    height: 10px;
    background: url("LandinPage/assets/images/shape/header-shape.png") no-repeat center / contain;
    pointer-events: none;
    opacity: 1;
    z-index: -1;
}

.detail-subtitle {
    max-width: 880px;
    margin: 0 auto 30px;
    color: #47523e;
    font-size: 16px;
    line-height: 1.9;
}

.detail-hero-image {
    position: relative;
    max-width: 1180px;
    margin: 0 auto;
    padding: 5px;
    /* Mirrored gradient direction: 90deg -> 270deg */
    background: linear-gradient(270deg, #ffc832 0%, #008c1b 100%);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
}

.detail-hero-image::after {
    display: none;
}

.detail-hero-image img {
    width: 100%;
    height: auto;
    aspect-ratio: 1180 / 440;
    object-fit: cover;
    border-radius: 24px;
    display: block;
}

.detail-section {
    background: #f8fbf5;
    padding: 60px 0;
    overflow: hidden;
}

.detail-section-title {
    font-size: clamp(22px, 3.5vw, 32px);
    font-weight: 800;
    color: #1f2a10;
    margin-bottom: 18px;
    text-align: center;
}

.detail-section-intro {
    max-width: 900px;
    margin: 0 auto 35px;
    color: #4a5741;
    line-height: 1.9;
    text-align: center;
}

.detail-list {
    display: grid;
    gap: 24px;
}

.detail-item {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px 26px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(11, 143, 42, 0.08);
    /* Added text-align right explicitly */
    text-align: right;
}

.detail-item h3 {
    font-size: 16px;
    font-weight: 800;
    color: var(--detail-green);
    margin-bottom: 10px;
}

.detail-item p {
    margin: 0;
    color: #4b4b4b;
    line-height: 1.9;
    font-size: 14px;
}

/* Decorative Lanterns (Same as English) */
.story-lantern {
    position: absolute;
    z-index: 0;
    pointer-events: none;
}

.lantern-right {
    right: -10px;
    top: 6%;
    width: 45px;
}

.lantern-left {
    left: -20px;
    bottom: 40%;
    width: 80px;
}

.lantern-top {
    right: 0;
    top: 20%;
    width: 70px;
}

.lantern-bottom {
    left: -10px;
    bottom: 8%;
    width: 130px;
}

@media (max-width: 1273px) {
    .story-lantern {
        display: none !important;
    }
}

/* OTHER ARTICLES */
.other-articles {
    background: var(--detail-soft);
    padding: 60px 0 80px;
    margin-bottom: 0;
}

.footer-wrap {
    margin-top: 0;
}

.footer.pt-5 {
    padding-top: 0 !important;
}

.idea-card {
    height: auto;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.06);
    transition:
        transform 0.5s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.idea-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.12);
}

.idea-media {
    position: relative;
    padding: 18px 18px 0;
    overflow: hidden;
}

.idea-media::before,
.idea-media::after {
    content: "";
    position: absolute;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.idea-media::before {
    top: 18px;
    /* Mirrored: left -> right */
    right: 18px;
    left: auto;
    width: 76px;
    height: 76px;
    background: #fff;
    /* Mirrored border-radius: 0 0 30px 0 -> 0 0 0 30px */
    border-radius: 0 0 0 30px;
}

.idea-media::after {
    top: 28px;
    /* Mirrored: left -> right */
    right: 28px;
    left: auto;
    width: 58px;
    height: 58px;
    background: #fff;
    border-radius: 50%;
}

.idea-card:hover .idea-media::before,
.idea-card:hover .idea-media::after {
    opacity: 1;
}

.idea-media img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 18px;
    display: block;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.idea-card:hover .idea-media img {
    transform: scale(1);
}

.idea-badge {
    position: absolute;
    /* Mirrored: right -> left */
    left: 17px;
    right: auto;
    bottom: 0;
    background: var(--detail-green);
    color: #fff;
    font-size: 13px;
    padding: 8px 12px;
    /* Mirrored bordering */
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 18px;
    border-top-left-radius: 0;
    white-space: nowrap;
    z-index: 5;
    transition: transform 0.5s ease;
}

.idea-card:hover .idea-badge {
    transform: translateY(-5px);
}

/* Mirror float button */
.idea-float-btn {
    position: absolute;
    top: 36px;
    /* Mirrored: left -> right */
    right: 36px;
    left: auto;
    z-index: 10;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #fff;
    display: grid;
    place-items: center;
    text-decoration: none;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
}

.idea-card:hover .idea-float-btn {
    background: var(--detail-green);
}

.idea-float-btn img.arrow-icon {
    width: 18px;
    height: 18px;
    transition: filter 0.5s ease;
    filter: invert(33%) sepia(86%) saturate(1200%) hue-rotate(95deg) brightness(90%) contrast(95%);
    /* Consider flipping the arrow icon if it points right? */
    /* Often specialized arrow icons need flipping in RTL */
    transform: scaleX(-1);
}

.idea-card:hover .idea-float-btn img.arrow-icon {
    filter: brightness(0) invert(1);
}

.idea-title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2a10;
}

.stretched-link {
    z-index: 2;
}

@media (max-width: 768px) {
    .detail-hero {
        padding: 60px 0 30px;
    }

    .detail-section {
        padding: 50px 0;
    }

    .other-articles {
        padding: 50px 0 0;
    }

    .detail-subtitle {
        font-size: clamp(14px, 4vw, 16px);
        text-wrap: balance;
        padding: 0 15px;
    }
}
