/* ========================================
   Council Justifications Page Styles
   مسوغات المجلس
======================================== */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800;900&display=swap');

:root {
    /* Council Brand Colors */
    --cj-primary: #263370;
    --cj-primary-dark: #1a2350;
    --cj-primary-darkk: #1a2350;
    --cj-secondary: #0c7fae;
    --cj-accent: #42b07a;
    --cj-accent-light: #5bc98f;
    --cj-white: #ffffff;
    --cj-text-light: rgba(255, 255, 255, 0.9);
    --cj-overlay: rgba(38, 51, 112, 0.7);
    --cj-gradient: linear-gradient(135deg, #263370 0%, #0c7fae 100%);
    --cj-gradient-accent: linear-gradient(135deg, #42b07a 0%, #0c7fae 100%);
}


/* ========================================
   Vertical Accordion Section
======================================== */
.cj-vertical-section {
    /*background: var(--cj-primary-darkk);*/
    padding: 60px 20px;
    background: linear-gradient(180deg, transparent 0%, rgba(12, 127, 174, 0.9) 100%),var(--cj-primary-darkk);
    position: relative;
    z-index: 2;
}

.cj-vertical-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* Vertical Accordion - Desktop */
.cj-vertical-accordion {
    display: flex;
    gap: 15px;
    height: 500px;
    direction: ltr;
}

.cj-vertical-item {
    position: relative;
    flex: 1;
    min-width: 80px;
    height: 100%;
    border-radius: 100px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cj-vertical-item:hover,
.cj-vertical-item.active {
    flex: 5;
    border-radius: 30px;
}

.cj-vertical-item .cj-item-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s ease;
}

.cj-vertical-item:hover .cj-item-bg,
.cj-vertical-item.active .cj-item-bg {
    transform: scale(1.08);
}

.cj-vertical-item .cj-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(12, 127, 174, 0.95) 0%,
        rgba(38, 51, 112, 0.6) 50%,
        rgba(38, 51, 112, 0.3) 100%
    );
    transition: all 0.5s ease;
}

.cj-vertical-item:hover .cj-item-overlay,
.cj-vertical-item.active .cj-item-overlay {
    background: linear-gradient(
        to top,
        rgba(12, 127, 174, 0.9) 0%,
        rgba(38, 51, 112, 0.3) 60%,
        rgba(38, 51, 112, 0.1) 100%
    );
}

.cj-vertical-item .cj-item-number {
    position: absolute;
    top: 20px;
    right: 50%;
    transform: translateX(50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--cj-white);
    border: 2px solid rgba(12, 127, 174, 0.5);
    z-index: 3;
    transition: all 0.4s ease;
}

.cj-vertical-item:hover .cj-item-number,
.cj-vertical-item.active .cj-item-number {
    background: var(--cj-secondary);
    border-color: var(--cj-secondary);
    transform: translateX(50%) scale(1.1);
    right: 30px;
}

/* Vertical Item Content - Desktop */
.cj-vertical-item .cj-item-content {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    padding: 40px;
    z-index: 3;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.5s ease 0.2s;
    direction: rtl;
    text-align: right;
}

.cj-vertical-item:hover .cj-item-content,
.cj-vertical-item.active .cj-item-content {
    opacity: 1;
    transform: translateY(0);
}

.cj-vertical-item .cj-item-category {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(12, 127, 174, 0.3);
    backdrop-filter: blur(10px);
    padding: 8px 20px;
    border-radius: 25px;
    color: #7dd3fc;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 15px;
    border: 1px solid rgba(12, 127, 174, 0.4);
}

.cj-vertical-item .cj-item-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--cj-white);
    line-height: 1.6;
    max-width: 500px;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.cj-vertical-item .cj-item-text {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
    max-width: 450px;
}

/* ========================================
   Mobile Styles - Horizontal Scroll (First Section)
======================================== */
@media (max-width: 991px) {
    .cj-header {
        padding: 40px 15px 30px;
    }

    .cj-title {
        font-size: 32px;
    }

    .cj-description {
        font-size: 16px;
    }

    .cj-container {
        padding: 20px 0 40px;
    }

    .cj-wrapper {
        padding: 0;
    }

    .cj-section-title {
        font-size: 26px;
    }

    /* Horizontal Scroll Container - First Section */
    .cj-accordion {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        height: 420px;
        gap: 10px;
        padding: 0 15px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .cj-accordion::-webkit-scrollbar {
        display: none;
    }

    .cj-item {
        position: relative;
        flex: 0 0 90px;
        min-width: 90px;
        max-width: 90px;
        height: 100%;
        scroll-snap-align: center;
        border-radius: 50px;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .cj-item.active {
        flex: 0 0 80vw;
        min-width: 80vw;
        max-width: 80vw;
        border-radius: 25px;
    }

    .cj-item .cj-item-overlay {
        background: linear-gradient(
            to top,
            rgba(38, 51, 112, 0.9) 0%,
            rgba(38, 51, 112, 0.4) 100%
        );
        transition: all 0.4s ease;
    }

    .cj-item.active .cj-item-overlay {
        background: linear-gradient(
            to top,
            rgba(38, 51, 112, 0.95) 0%,
            rgba(38, 51, 112, 0.3) 50%,
            rgba(38, 51, 112, 0.1) 100%
        );
    }

    .cj-item-number {
        width: 45px;
        height: 45px;
        font-size: 18px;
        top: 50%;
        right: 50%;
        transform: translate(50%, -50%);
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .cj-item.active .cj-item-number {
        top: 20px;
        right: 20px;
        transform: translate(0, 0) scale(0.9);
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .cj-item-content {
        padding: 20px;
        padding-top: 70px;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease 0.1s;
    }

    .cj-item.active .cj-item-content {
        opacity: 1;
        transform: translateY(0);
    }

    .cj-item-category {
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 10px;
    }

    .cj-item-title {
        font-size: 17px;
        max-width: 100%;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .cj-item-text {
        font-size: 13px;
        max-width: 100%;
        line-height: 1.7;
    }

    .cj-item .cj-item-bg {
        transition: transform 0.5s ease;
    }

    .cj-item.active .cj-item-bg {
        transform: scale(1.05);
    }

    /* Vertical Accordion for Mobile - Stacked */
    .cj-vertical-section {
        padding: 40px 15px;
    }

    .cj-vertical-accordion {
        flex-direction: column;
        height: auto;
        gap: 12px;
        padding: 0;
    }

    .cj-vertical-item {
        flex: none;
        width: 100%;
        height: 85px;
        min-width: 100%;
        min-height: 85px;
        max-height: 85px;
        border-radius: 22px;
        transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        overflow: hidden;
    }

    .cj-vertical-item.active {
        height: auto;
        min-height: 320px;
        max-height: 400px;
        border-radius: 25px;
    }

    .cj-vertical-item .cj-item-number {
        position: absolute;
        top: 50%;
        right: 20px;
        left: auto;
        transform: translateY(-50%) translateX(0);
        width: 50px;
        height: 50px;
        font-size: 18px;
        transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    }

    .cj-vertical-item.active .cj-item-number {
        top: 20px;
        right: 20px;
        transform: translateY(0) translateX(0) scale(0.9);
        width: 45px;
        height: 45px;
        font-size: 16px;
    }

    .cj-vertical-item .cj-collapsed-title {
        position: absolute;
        display: block;
        bottom: auto;
        top: 50%;
        right: 85px;
        left: 20px;
        transform: translateY(-50%) rotate(0);
        white-space: nowrap;
        font-size: 17px;
        font-weight: 600;
        color: var(--cj-white);
        opacity: 1;
        z-index: 5;
        text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
        transition: all 0.3s ease;
    }

    .cj-vertical-item.active .cj-collapsed-title {
        opacity: 0;
        transform: translateY(-100%);
    }

    .cj-vertical-item .cj-item-content {
        position: relative;
        opacity: 0;
        padding: 20px;
        padding-top: 80px;
        transform: translateY(20px);
        transition: all 0.4s ease 0.15s;
        height: 0;
        overflow: hidden;
    }

    .cj-vertical-item.active .cj-item-content {
        opacity: 1;
        transform: translateY(0);
        height: auto;
    }

    .cj-vertical-item .cj-item-category {
        font-size: 12px;
        padding: 6px 14px;
        margin-bottom: 12px;
    }

    .cj-vertical-item .cj-item-title {
        font-size: 16px;
        max-width: 100%;
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .cj-vertical-item .cj-item-text {
        font-size: 13px;
        line-height: 1.7;
        max-width: 100%;
    }

    .cj-vertical-item .cj-item-overlay {
        background: linear-gradient(
            to top,
            rgba(12, 127, 174, 0.85) 0%,
            rgba(38, 51, 112, 0.5) 100%
        );
    }

    .cj-vertical-item.active .cj-item-overlay {
        background: linear-gradient(
            to top,
            rgba(12, 127, 174, 0.95) 0%,
            rgba(38, 51, 112, 0.3) 60%,
            rgba(38, 51, 112, 0.1) 100%
        );
    }
}

@media (max-width: 575px) {
    .cj-title {
        font-size: 26px;
    }

    .cj-section-title {
        font-size: 22px;
    }

    .cj-accordion {
        height: 380px;
        gap: 8px;
        padding: 0 12px;
    }

    .cj-item {
        flex: 0 0 70px;
        min-width: 70px;
        max-width: 70px;
        border-radius: 40px;
    }

    .cj-item.active {
        flex: 0 0 82vw;
        min-width: 82vw;
        max-width: 82vw;
        border-radius: 22px;
    }

    .cj-item-number {
        width: 38px;
        height: 38px;
        font-size: 15px;
    }

    .cj-item.active .cj-item-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
        top: 15px;
        right: 15px;
    }

    .cj-item-content {
        padding: 15px;
        padding-top: 60px;
    }

    .cj-item-category {
        font-size: 11px;
        padding: 5px 12px;
    }

    .cj-item-title {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 10px;
    }

    .cj-item-text {
        font-size: 12px;
        line-height: 1.6;
    }

    .cj-vertical-item {
        height: 65px;
        border-radius: 18px;
    }

    .cj-vertical-item.active {
        height: 300px;
        border-radius: 22px;
    }

    .cj-vertical-item .cj-item-number {
        width: 38px;
        height: 38px;
        font-size: 14px;
        right: 15px;
    }

    .cj-vertical-item.active .cj-item-number {
        top: 15px;
    }

    .cj-vertical-item .cj-item-content {
        padding: 15px;
        padding-top: 65px;
    }

    .cj-vertical-item .cj-item-title {
        font-size: 15px;
    }

    .cj-vertical-item .cj-item-text {
        font-size: 12px;
    }
}

/* ========================================
   Navigation & Back Button
======================================== */
.cj-nav {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 100;
}

.cj-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    color: var(--cj-white);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.cj-back-btn:hover {
    background: var(--cj-accent);
    border-color: var(--cj-accent);
    transform: translateX(5px);
}

.cj-back-btn i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.cj-back-btn:hover i {
    transform: translateX(5px);
}

/* ========================================
   Footer
======================================== */
.cj-footer {
    text-align: center;
    padding: 30px 20px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    position: relative;
    z-index: 2;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cj-footer a {
    color: var(--cj-accent);
    text-decoration: none;
}

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

.cj-item,
.cj-vertical-item {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.cj-item:nth-child(1), .cj-vertical-item:nth-child(1) { animation-delay: 0.1s; }
.cj-item:nth-child(2), .cj-vertical-item:nth-child(2) { animation-delay: 0.2s; }
.cj-item:nth-child(3), .cj-vertical-item:nth-child(3) { animation-delay: 0.3s; }
.cj-item:nth-child(4), .cj-vertical-item:nth-child(4) { animation-delay: 0.4s; }
.cj-item:nth-child(5), .cj-vertical-item:nth-child(5) { animation-delay: 0.5s; }
.cj-item:nth-child(6), .cj-vertical-item:nth-child(6) { animation-delay: 0.6s; }

/* Progress Indicator for Mobile */
.cj-scroll-indicator {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
    padding: 0 20px;
}

@media (max-width: 991px) {
    .cj-scroll-indicator {
        display: flex;
    }
}

.cj-scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.cj-scroll-dot.active {
    width: 24px;
    border-radius: 4px;
    background: var(--cj-accent);
}

/* Decorative Elements */
.cj-decoration {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.cj-decoration-1 {
    top: 10%;
    left: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(66, 176, 122, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
}

.cj-decoration-2 {
    bottom: 10%;
    right: 5%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(12, 127, 174, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(80px);
}

.cj-decoration-3 {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(38, 51, 112, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(100px);
}

/* Divider */
.cj-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.2) 50%, transparent 100%);
    margin: 20px 0;
}
