/* تنسيقات خاصة بقسم الرعاة */
.sponsor-card {
    border: 1px solid #e9ecef;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background-color: #ffffff;
    height: 100%;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.sponsor-card::before {
    content: '';
    position: absolute;
    top: -100%;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(3, 80, 200, 0.15) 0%, rgba(255, 255, 255, 0.15) 50%, rgba(3, 80, 200, 0.05) 100%);
    transform: rotate(45deg);
    transition: all 0.7s ease;
}

.sponsor-card:hover::before {
    top: 100%;
    left: 100%;
}

.sponsor-card:hover {
    border-color: #0350c8;
    box-shadow: 0 10px 20px rgba(3, 80, 200, 0.25);
    transform: translateY(-5px);
}

.sponsor-card img {
    transition: all 0.5s ease;
    max-height: 80px;
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
    object-fit: contain;
    filter: grayscale(15%);
}

.sponsor-card:hover img {
    transform: scale(1.08);
    filter: grayscale(0%);
}

.sponsor-card span {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    transition: all 0.3s ease;
    margin-top: 8px;
    text-align: center;
}

.sponsor-card:hover span {
    color: #0350c8;
}

/* تأثيرات مختلفة لكل راعي */
.sponsor-card:nth-child(3n+1) {
    animation: sponsor-pulse 3s infinite alternate;
    border-left: 3px solid #0350c8;
}

.sponsor-card:nth-child(3n+2) {
    animation: sponsor-float 4s infinite alternate;
    border-bottom: 3px solid #045DE9;
}

.sponsor-card:nth-child(3n+3) {
    animation: sponsor-shine 5s infinite alternate;
    border-right: 3px solid #09C6F9;
}

@keyframes sponsor-pulse {
    0% {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }
    100% {
        box-shadow: 0 5px 15px rgba(3, 80, 200, 0.45), 0 0 5px rgba(3, 80, 200, 0.2);
    }
}

@keyframes sponsor-float {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-7px);
        box-shadow: 0 10px 25px rgba(4, 93, 233, 0.3);
    }
}

@keyframes sponsor-shine {
    0% {
        border-color: #e9ecef;
    }
    100% {
        border-color: rgba(3, 80, 200, 0.7);
        box-shadow: 0 0 15px rgba(9, 198, 249, 0.25);
    }
}

/* تأثيرات مختلفة لصور الرعاة */
.sponsor-card:nth-child(3n+1) img {
    animation: img-rotate 5s infinite alternate;
    filter: drop-shadow(0 3px 3px rgba(3, 80, 200, 0.1));
}

.sponsor-card:nth-child(3n+2) img {
    animation: img-scale 4s infinite alternate;
    filter: drop-shadow(0 3px 3px rgba(4, 93, 233, 0.1));
}

.sponsor-card:nth-child(3n+3) img {
    animation: img-shadow 6s infinite alternate;
    filter: drop-shadow(0 3px 3px rgba(9, 198, 249, 0.1));
}

@keyframes img-rotate {
    0% {
        transform: rotate(-3deg);
    }
    100% {
        transform: rotate(3deg);
    }
}

@keyframes img-scale {
    0% {
        transform: scale(0.92);
    }
    100% {
        transform: scale(1.08);
    }
}

@keyframes img-shadow {
    0% {
        filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0));
    }
    100% {
        filter: drop-shadow(0 7px 12px rgba(3, 80, 200, 0.45));
    }
}

/* تعديل الأحجام بناءً على حجم الشاشة */
@media (max-width: 767.98px) {
    .sponsor-card {
        min-height: 110px;
        padding: 10px;
    }
    
    .sponsor-card img {
        max-height: 60px;
    }
}

@media (max-width: 575.98px) {
    .sponsor-card {
        min-height: 100px;
    }
    
    .sponsor-card img {
        max-height: 50px;
    }
    
    .sponsor-card span {
        font-size: 0.75rem;
    }
}

/* تنسيقات إضافية لقسم الرعاة */
.sponsors-section {
    border: none;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    background: linear-gradient(to right, rgba(3, 80, 200, 0.03), rgba(255, 255, 255, 0.01), rgba(9, 198, 249, 0.02));
}

.sponsors-section::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    z-index: 0;
    background: radial-gradient(ellipse at center, rgba(3, 80, 200, 0.08) 0%, rgba(255, 255, 255, 0) 70%);
    animation: sponsors-bg-rotate 30s infinite linear;
}

@keyframes sponsors-bg-rotate {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.sponsors-container {
    position: relative;
    z-index: 1;
}

.sponsor-wrapper {
    transition: all 0.4s ease;
}

.sponsor-wrapper:hover {
    z-index: 5;
}

/* تأثيرات حركية إضافية بفئات مختلفة */
.sponsor-card.sponsor-animation-0 {
    transform-origin: center bottom;
    animation: sponsor-bounce 4s infinite alternate;
    border-top: 3px solid #0350c8;
}

.sponsor-card.sponsor-animation-1 {
    transform-origin: center;
    animation: sponsor-rotate 5s infinite alternate;
    border-right: 3px solid #045DE9;
}

.sponsor-card.sponsor-animation-2 {
    animation: sponsor-fade 4s infinite alternate;
    border-bottom: 3px solid #09C6F9;
}

.sponsor-card.sponsor-animation-3 {
    animation: sponsor-elevate 4s infinite alternate;
    border-left: 3px solid #0350c8;
}

@keyframes sponsor-bounce {
    0%, 100% {
        transform: translateY(0);
    }
    10% {
        transform: translateY(-3px);
    }
    20% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-2px);
    }
    40%, 100% {
        transform: translateY(0);
    }
}

@keyframes sponsor-rotate {
    0% {
        transform: rotate(-1deg);
    }
    100% {
        transform: rotate(1deg);
    }
}

@keyframes sponsor-fade {
    0% {
        opacity: 0.85;
    }
    100% {
        opacity: 1;
    }
}

@keyframes sponsor-elevate {
    0% {
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }
    100% {
        box-shadow: 0 12px 25px rgba(3, 80, 200, 0.4);
        transform: translateY(-5px) scale(1.02);
    }
}

/* تحسين ظهور اسم الراعي */
.sponsor-name {
    background: linear-gradient(to right, #333, #0350c8);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent !important;
    position: relative;
    z-index: 2;
    width: 100%;
    opacity: 0.9;
    transition: all 0.3s ease;
    font-weight: 700;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
}

.sponsor-card:hover .sponsor-name {
    opacity: 1;
    background: linear-gradient(to right, #0350c8, #045DE9);
    -webkit-background-clip: text;
    background-clip: text;
    font-weight: 700;
}

/* إضافة تأثير التوهج لبطاقات الرعاة */
.sponsor-glow-effect {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    border-radius: 12px;
    opacity: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(3, 80, 200, 0.25) 0%, rgba(3, 80, 200, 0) 70%);
    transition: opacity 0.5s ease;
    z-index: -1;
}

.sponsor-card:hover .sponsor-glow-effect {
    opacity: 1;
    animation: glow-pulse 2s infinite alternate;
}

@keyframes glow-pulse {
    0% {
        opacity: 0.2;
        transform: scale(0.95);
    }
    100% {
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* تعديل الألوان لتكون أكثر وضوحاً */
:root {
    --sponsor-primary: #0350c8;
    --sponsor-secondary: #045DE9;
    --sponsor-tertiary: #09C6F9;
    --sponsor-glow: rgba(3, 80, 200, 0.5);
}

.sponsor-active .sponsor-card {
    border-color: var(--sponsor-primary);
}

.sponsor-active .sponsor-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 2px solid var(--sponsor-primary);
    opacity: 0;
    animation: border-pulse 1.5s infinite alternate;
}

@keyframes border-pulse {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }
    100% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* تنسيقات خاصة لبطاقات المقالات */
.article-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    height: 100%;
    overflow: hidden;
    border-radius: 8px !important;
    position: relative;
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
}

.article-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(3, 80, 200, 0.12) !important;
}

.article-image {
    position: relative;
    overflow: hidden;
    height: 120px;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
    filter: brightness(1.05);
}

.article-content {
    padding: 0.9rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: calc(100% - 120px);
}

.article-title {
    font-size: 0.85rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-title a {
    color: #333;
    transition: all 0.3s ease;
}

.article-title a:hover {
    color: var(--sponsor-primary);
    text-decoration: none;
}

.article-excerpt {
    color: #666;
    font-size: 0.75rem;
    margin-bottom: 0.6rem;
    line-height: 1.3;
    flex: 1;
    max-height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.article-meta {
    font-size: 0.65rem;
    color: #888;
}

/* تعديلات عرض المقالات حسب حجم الشاشة */
@media (max-width: 991.98px) {
    .article-card {
        margin-bottom: 1.5rem;
    }
    
    .article-image {
        height: 110px;
    }
    
    .article-content {
        height: calc(100% - 110px);
    }
}

@media (max-width: 767.98px) {
    .article-title {
        font-size: 0.9rem;
    }
    
    .article-image {
        height: 100px;
    }
    
    .article-content {
        height: calc(100% - 100px);
        padding: 0.9rem;
    }
}

/* تحسين عرض كل القوائم والشاشة الرئيسية */
.container {
    max-width: 1200px;
    padding-left: 15px;
    padding-right: 15px;
}

.main-content {
    margin-top: 2rem;
    margin-bottom: 3rem;
}

/* مؤثرات للأزرار */
.btn-primary {
    background-color: var(--sponsor-primary);
    border-color: var(--sponsor-primary);
    transition: all 0.3s ease;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--sponsor-secondary);
    border-color: var(--sponsor-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(3, 80, 200, 0.2);
}

.btn-outline-primary {
    color: var(--sponsor-primary);
    border-color: var(--sponsor-primary);
    transition: all 0.3s ease;
}

.btn-outline-primary:hover, .btn-outline-primary:focus {
    background-color: var(--sponsor-primary);
    border-color: var(--sponsor-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(3, 80, 200, 0.1);
}

/* تنسيق العناوين الرئيسية */
h2.mb-4.border-bottom {
    font-weight: 700;
    color: #333;
    padding-bottom: 10px;
    position: relative;
}

h2.mb-4.border-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 3px;
    background-color: var(--sponsor-primary);
    border-radius: 3px;
}

/* إضافة تنسيقات خاصة للمقالات المميزة */
.featured-article .article-link {
    text-decoration: none;
    color: white;
    display: block;
    height: 100%;
    width: 100%;
    position: relative;
}

.featured-article .article-link:hover {
    color: white;
}

/* تحسين عرض قائمة الأقسام */
.category-list .list-group-item {
    transition: all 0.3s ease;
    border-right: 0px solid var(--sponsor-primary);
    padding: 0.8rem 1rem;
}

.category-list .list-group-item:hover {
    background-color: rgba(3, 80, 200, 0.03);
    border-right: 4px solid var(--sponsor-primary);
    padding-right: 1.2rem;
}

.category-link {
    display: block;
    width: 100%;
    transition: all 0.3s ease;
}

.category-link i {
    transition: all 0.3s ease;
}

/* تعديل ألوان أزرار المقالات */
.article-card .btn-sm {
    padding: 0.25rem 0.7rem;
    font-size: 0.75rem;
    border-radius: 20px;
}

/* إضافة تأثيرات للمقالات عند ظهورها */
.article-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* تحسين فاصل الأقسام */
.sponsors-section + .container {
    margin-top: 2rem;
}

/* تعديل القائمة بين الأقسام واستطلاعات الرأي */
.poll-container {
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
}

.poll-container .alert-light {
    border-right: 3px solid var(--sponsor-primary);
    background-color: rgba(3, 80, 200, 0.03);
}

.poll-form .form-check {
    padding: 0.6rem 1.8rem;
    margin-bottom: 0.6rem;
    border: 1px solid #eee;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.poll-form .form-check:hover {
    background-color: rgba(3, 80, 200, 0.03);
    border-color: #ccc;
}

.poll-form .form-check-input {
    margin-right: -1.5rem;
}

/* تحسين عرض القسم الرئيسي */
@media (min-width: 992px) {
    .row.g-4 {
        margin-left: -0.75rem;
        margin-right: -0.75rem;
    }
    
    .row.g-4 > [class*="col-"] {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        margin-bottom: 1.5rem;
    }
}

/* تحسين عرض عناوين الأقسام الرئيسية */
.card-header.bg-primary {
    background: linear-gradient(to left, var(--sponsor-primary), var(--sponsor-secondary)) !important;
    border: none;
}

.card-header .card-title {
    font-weight: 700;
}

/* تنسيق زر عرض المزيد */
.text-center.mt-4 .btn-primary {
    padding: 0.5rem 1.5rem;
    box-shadow: 0 4px 10px rgba(3, 80, 200, 0.15);
    border-radius: 20px;
    font-weight: 600;
}

.text-center.mt-4 .btn-primary:hover {
    box-shadow: 0 6px 15px rgba(3, 80, 200, 0.25);
}

/* تحسين ظهور بطاقات المقالات على الأجهزة المحمولة */
@media (max-width: 767.98px) {
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .row.g-4 > [class*="col-"] {
        margin-bottom: 20px;
    }
    
    h2.mb-4.border-bottom {
        font-size: 1.4rem;
    }
}

.featured-article .overlay a {
    transition: all 0.3s ease;
}

.featured-article .overlay a:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

.category-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    background-color: var(--sponsor-primary);
    color: white;
    padding: 3px 6px;
    border-radius: 15px;
    font-size: 0.6rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 2;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.category-badge:hover {
    background-color: var(--sponsor-secondary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
} 