﻿/* Root variables for the color palette */
:root {
    --tomato-jam: #d72a2eff;
    --bright-marine: #0070b7ff;
    --bright-sky: #4ebae6ff;
    --alabaster-grey: #e3e3e6ff;
    --onyx: #0c0b0cff;
    --racing-red: #ea272bff;
    --thistle: #d8bed8ff;
    --charcoal: #544f54ff;
    --tangerine-dream: #f98c48ff;
    --vintage-lavender: #6e6e8cff;
}

/* Main section styling */
.section-space-top-half30 {
    padding: clamp(30px, 5vw, 60px) 0;
    background: linear-gradient(135deg, var(--alabaster-grey) 0%, #f1f5f9 100%);
    position: relative;
    overflow-x: hidden;
}

    /* Section Title Dark - Update colors */
    .section-space-top-half30 .section-title-dark {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: clamp(16px, 4vw, 24px);
        padding: clamp(20px, 4vw, 30px) clamp(20px, 5vw, 40px);
        margin-bottom: clamp(20px, 4vw, 40px);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
        text-align: center;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.5);
    }

        .section-space-top-half30 .section-title-dark span i {
            color: #fecc27;
            font-size: 2.5rem;
            display: inline-block;
        }

        .section-space-top-half30 .section-title-dark p {
            margin-top: 12px;
            color: var(--charcoal);
            font-size: clamp(13px, 3vw, 15px);
            line-height: 1.6;
            max-width: 800px;
            margin-left: auto;
            margin-right: auto;
        }

    /* Tab Navigation */
    .section-space-top-half30 .nav-pills {
        border-radius: 60px;
        background: #ffffff;
        padding: 6px;
        gap: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
        flex-wrap: wrap;
    }

    .section-space-top-half30 .nav-item {
        flex: 1;
        min-width: fit-content;
        border-radius: 50px;
    }

    .section-space-top-half30 .nav-link {
        border-radius: 50px !important;
        padding: clamp(10px, 3vw, 14px) clamp(15px, 4vw, 24px);
        font-weight: 600;
        font-size: clamp(13px, 3.5vw, 15px);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border: none;
        color: var(--charcoal);
        white-space: nowrap;
        position: relative;
        overflow: hidden;
    }

    /* Active tab colors using your palette */
    .section-space-top-half30 .nav-item.gray .nav-link.active {
        background: linear-gradient(135deg, var(--charcoal), var(--onyx));
        color: white;
        box-shadow: 0 4px 12px rgba(84, 79, 84, 0.3);
    }

    .section-space-top-half30 .nav-item.yellow .nav-link.active {
        background: linear-gradient(135deg, var(--tangerine-dream), var(--tomato-jam));
        color: white;
        box-shadow: 0 4px 12px rgba(249, 140, 72, 0.3);
    }

    .section-space-top-half30 .nav-item.red .nav-link.active {
        background: linear-gradient(135deg, var(--racing-red), var(--tomato-jam));
        color: white;
        box-shadow: 0 4px 12px rgba(234, 39, 43, 0.3);
    }

    .section-space-top-half30 .nav-link:not(.active):hover {
        background: var(--thistle);
        color: var(--onyx);
        transform: translateY(-1px);
    }

    /* Tab Content Container */
    .section-space-top-half30 .tab-content {
        margin-top: clamp(25px, 5vw, 40px);
    }

    .section-space-top-half30 .tab-pane {
        background: white;
        border-radius: clamp(20px, 5vw, 28px);
        padding: clamp(15px, 3vw, 25px);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.05);
        transition: all 0.3s ease;
    }

        /* SMALLER CARD STYLING */
        .section-space-top-half30 .tab-pane .row {
            margin: 0 -clamp(6px, 1.5vw, 10px);
        }

        .section-space-top-half30 .tab-pane [class*="col-"] {
            margin-bottom: clamp(12px, 3vw, 20px);
            padding: 0 clamp(6px, 1.5vw, 10px);
        }

    /* Decision Cards - COMPACT SIZE */
    .section-space-top-half30 .card.news {
        background: white;
        border-radius: 12px;
        overflow: hidden;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        height: 100%;
        border: 1px solid var(--alabaster-grey);
        position: relative;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    }

        .section-space-top-half30 .card.news:hover {
            transform: translateY(-3px);
            box-shadow: 0 8px 20px -6px rgba(0, 0, 0, 0.12);
            border-color: var(--bright-sky);
        }

        /* Card image - SMALLER */
        .section-space-top-half30 .card.news img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s ease;
        }

        .section-space-top-half30 .card.news:hover img {
            transform: scale(1.03);
        }

        /* Card title - COMPACT */
        .section-space-top-half30 .card.news .card-title {
            font-size: 16px;
            font-weight: 700;
            margin-bottom: 6px;
            color: var(--onyx);
            line-height: 1.3;
        }

            .section-space-top-half30 .card.news .card-title a {
                color: inherit;
                text-decoration: none;
                transition: color 0.3s ease;
            }

                .section-space-top-half30 .card.news .card-title a:hover {
                    color: var(--bright-marine);
                }

        /* Date styling */
        .section-space-top-half30 .card.news .date {
            padding: 6px 8px;
            font-size: 11px;
            color: var(--charcoal);
        }

            .section-space-top-half30 .card.news .date i {
                margin-right: 5px;
                color: var(--bright-sky);
            }

            .section-space-top-half30 .card.news .date span {
                color: var(--charcoal);
            }

        /* Tags styling */
        .section-space-top-half30 .card.news .tags {
            padding: 6px 8px;
            font-size: 11px;
            color: var(--charcoal);
        }

            .section-space-top-half30 .card.news .tags span {
                background: linear-gradient(135deg, rgba(78, 186, 230, 0.1), rgba(110, 110, 140, 0.1));
                padding: 3px 10px;
                border-radius: 20px;
                display: inline-block;
                font-size: 12px;
                font-weight: 600;
                color: var(--bright-marine);
            }

        /* Compact row inside card */
        .section-space-top-half30 .card.news .row.m-0 {
            margin: 0 !important;
        }

            .section-space-top-half30 .card.news .row.m-0 [class*="col-"] {
                padding: 0 !important;
            }

        /* Align items start - smaller padding */
        .section-space-top-half30 .card.news .align-items-start {
            padding: 8px 0 4px 0;
        }

            .section-space-top-half30 .card.news .align-items-start h4 {
                margin-bottom: 4px;
                margin:5px;
            }

/* Button styling with new palette */
.btn-ghost-to-fill {
    display: inline-block;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    border-radius: 50px;
    transition: all 0.3s ease-in-out;
    cursor: pointer;
    background: transparent;
    border: 2px solid var(--bright-marine);
    color: var(--bright-marine);
}

    .btn-ghost-to-fill:hover {
        background: var(--bright-marine);
        color: white;
        border-color: var(--bright-marine);
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(0, 112, 183, 0.3);
    }

/* Responsive adjustments */
@media (max-width: 768px) {
    .section-space-top-half30 .card.news img {
        height: 100px;
    }

    .section-space-top-half30 .card.news .card-title {
        font-size: 13px;
    }

    .btn-ghost-to-fill {
        padding: 8px 20px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .section-space-top-half30 .card.news img {
        height: 80px;
    }

    .section-space-top-half30 .card.news .card-title {
        font-size: 12px;
    }

    .section-space-top-half30 .card.news .date,
    .section-space-top-half30 .card.news .tags {
        font-size: 10px;
        padding: 4px 6px;
    }

        .section-space-top-half30 .card.news .tags span {
            font-size: 9px;
            padding: 2px 8px;
        }
}

/* Large screens - 4 cards per row */
@media (min-width: 1200px) {
/*    .section-space-top-half30 .tab-pane .col-lg-6 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
*/}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .section-space-top-half30 {
        background: linear-gradient(135deg, var(--onyx), #1a1a2e);
    }

        .section-space-top-half30 .section-title-dark {
            background: rgba(30, 41, 59, 0.95);
        }

            .section-space-top-half30 .section-title-dark p {
                color: var(--alabaster-grey);
            }

        .section-space-top-half30 .nav-pills {
            background: var(--onyx);
        }

        .section-space-top-half30 .nav-link {
            color: var(--alabaster-grey);
        }

            .section-space-top-half30 .nav-link:not(.active):hover {
                background: var(--charcoal);
                color: white;
            }

        .section-space-top-half30 .tab-pane,
        .section-space-top-half30 .card.news {
            background: var(--onyx);
            border-color: var(--charcoal);
        }

            .section-space-top-half30 .card.news .card-title {
                color: var(--alabaster-grey);
            }

            .section-space-top-half30 .card.news .date,
            .section-space-top-half30 .card.news .tags {
                color: var(--thistle);
            }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-space-top-half30 .tab-pane {
    animation: fadeIn 0.5s ease;
}









































/* ========================================
    Enhanced News Tabs Section
    ======================================== */

/* Add smooth transition between tabs */
.section-space-top-half30 .tab-pane {
    animation: tabFadeIn 0.4s ease;
}

@keyframes tabFadeIn {
    from {
        opacity: 0.6;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Section Title with animated underline */
.section-space-top-half30 .section-title-dark {
    position: relative;
    overflow: hidden;
}

    .section-space-top-half30 .section-title-dark::after {
        content: '';
        position: absolute;
        bottom: 15px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 3px;
        background: linear-gradient(90deg, var(--bright-marine), var(--tangerine-dream), var(--bright-marine));
        border-radius: 3px;
        transition: width 0.4s ease, height 0.3s ease;
    }

    .section-space-top-half30 .section-title-dark:hover::after {
        width: 120px;
        height: 4px;
    }

    /* Icon pulse effect */
    .section-space-top-half30 .section-title-dark span i {
        animation: iconPulse 3s ease-in-out infinite;
        display:none;
    }

@@keyframes iconPulse {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.section-space-top-half30 .section-title-dark:hover span i {
    animation: none;
    transform: scale(1.15);
}

/* Tab underline indicator */
.section-space-top-half30 .nav-link {
    position: relative;
}

    .section-space-top-half30 .nav-link::after {
        content: '';
        position: absolute;
        bottom: 4px;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
        transition: width 0.3s ease;
    }

    .section-space-top-half30 .nav-link.active::after {
        width: 30px;
        background: rgba(255, 255, 255, 0.6);
    }

/* Card decorative accent line */
.section-space-top-half30 .card.news {
    position: relative;
}

    .section-space-top-half30 .card.news::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        width: 3px;
        height: 100%;
        background: linear-gradient(180deg, var(--bright-marine), var(--bright-sky));
        transform: scaleY(0);
        transform-origin: top;
        transition: transform 0.4s ease;
        z-index: 2;
    }

    .section-space-top-half30 .card.news:hover::before {
        transform: scaleY(1);
    }

    /* Card image overlay on hover */
    .section-space-top-half30 .card.news .col-md-4 {
        position: relative;
        overflow: hidden;
    }

        .section-space-top-half30 .card.news .col-md-4::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, rgba(0, 112, 183, 0.2), rgba(249, 140, 72, 0.1));
            opacity: 0;
            transition: opacity 0.3s ease;
            pointer-events: none;
        }

    .section-space-top-half30 .card.news:hover .col-md-4::after {
        opacity: 1;
    }

    /* Date and Tags row enhancement */
    .section-space-top-half30 .card.news .row.m-0:last-child {
        border-top: 1px solid rgba(227, 227, 230, 0.5);
        margin-top: 4px;
    }

    .section-space-top-half30 .card.news .date {
        border-right: 1px solid rgba(227, 227, 230, 0.5);
    }

    /* Tags span hover effect */
    .section-space-top-half30 .card.news .tags span {
        transition: all 0.3s ease;
    }

    .section-space-top-half30 .card.news:hover .tags span {
        background: linear-gradient(135deg, var(--bright-marine), var(--bright-sky)) !important;
        color: white !important;
    }

/* View All button enhancement */
.btn-ghost-to-fill {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

    .btn-ghost-to-fill::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, var(--bright-marine), var(--bright-sky));
        transition: left 0.4s ease;
        z-index: -1;
    }

    .btn-ghost-to-fill:hover::before {
        left: 0;
    }

    .btn-ghost-to-fill:hover {
        color: white;
        border-color: transparent;
    }

/* Tab content container shadow enhancement */
.section-space-top-half30 .tab-pane {
    transition: box-shadow 0.3s ease;
}

    .section-space-top-half30 .tab-pane:hover {
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
    }

    /* Empty state styling */
    .section-space-top-half30 .tab-pane:empty::after {
        content: "لا توجد عناصر";
        display: block;
        text-align: center;
        padding: 40px;
        color: var(--charcoal);
        font-size: 1rem;
        opacity: 0.6;
    }

/* RTL Support */
html[lang="ar"] .section-space-top-half30 .card.news::before {
    left: auto;
    right: 0;
}

html[lang="ar"] .section-space-top-half30 .card.news .date {
    border-right: none;
    border-left: 1px solid rgba(227, 227, 230, 0.5);
}

    html[lang="ar"] .section-space-top-half30 .card.news .date i {
        margin-right: 0;
        margin-left: 5px;
    }

html[lang="ar"] .btn-ghost-to-fill::before {
    left: auto;
    right: -100%;
}

html[lang="ar"] .btn-ghost-to-fill:hover::before {
    right: 0;
}

/* Loading state for tab switching */
.section-space-top-half30 .tab-pane.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Focus states for accessibility */
.section-space-top-half30 .nav-link:focus-visible {
    outline: 2px solid var(--bright-marine);
    outline-offset: 2px;
}

.section-space-top-half30 .card.news a:focus-visible {
    outline: 2px solid var(--bright-marine);
    outline-offset: 2px;
    border-radius: 4px;
}


/* ========================================
    Section Title Dark - Glass Card Style
    ======================================== */

.section-title-dark {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 30px 40px;
    margin-bottom: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

    .section-title-dark:hover {
        transform: translateY(-3px);
        box-shadow: 0 15px 40px rgba(0, 112, 183, 0.12);
        border-color: rgba(0, 112, 183, 0.3);
    }

    /* Title styling */
    .section-title-dark h2,
    .section-title-dark h3 {
        font-size: 2rem !important;
        font-weight: 800 !important;
        background: linear-gradient(135deg, #1a1a2e, #0070b7);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        margin-bottom: 12px;
    }

    /* Icon styling */
    .section-title-dark span i {
        font-size: 2.2rem;
        background: linear-gradient(135deg, #f39c12, #f1c40f);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
        margin: 10px 0;
        display: inline-block;
        transition: transform 0.4s ease;
    }

    .section-title-dark:hover span i {
        transform: rotate(8deg) scale(1.1);
    }

    /* Description text */
    .section-title-dark p {
        color: #64748b;
        font-size: 1rem;
        line-height: 1.7;
        max-width: 700px;
        margin: 12px auto 0;
    }

    /* Animated underline */
    .section-title-dark::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 4px;
        background: linear-gradient(90deg, transparent, #0070b7, #f39c12, #0070b7, transparent);
        border-radius: 4px;
        transition: width 0.4s ease, height 0.3s ease;
    }

    .section-title-dark:hover::after {
        width: 160px;
        height: 5px;
    }

    /* Subtle top accent */
    .section-title-dark::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(90deg, #0070b7, #f39c12, #0070b7);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .section-title-dark:hover::before {
        opacity: 1;
    }

@media (max-width: 576px) {

    span.card-title{
        height:30px;
    }
}