/**
 * Component Styles
 * تنسيقات خاصة بالمكونات المشتركة (Sidebar, Footer)
 */

/* ===== استيراد ملف الخطوط الموحد ===== */
@import url('global-fonts.css');

/* ===== استيراد أنماط بلوكات السايدبار ===== */
@import url('sidebar-blocks.css');

/* ===== Sidebar Styles ===== */
.sidebar-card {
    background: white;
    border-radius: var(--border-radius, 12px);
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.sidebar-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-color, #2d5f3f);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid var(--accent-color, #66bb6a);
    padding-bottom: 10px;
}

.sidebar-title i {
    color: var(--accent-color, #66bb6a);
    font-size: 1.3rem;
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: padding-right 0.3s ease;
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list li:hover {
    padding-right: 10px;
}

.sidebar-list li a {
    color: var(--text-color, #333);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.05rem; /* تكبير الخط */
    font-weight: 700; /* جعل الخط عريض */
    transition: color 0.3s ease;
}

.sidebar-list li a:hover {
    color: var(--primary-color, #2d5f3f);
}

.sidebar-list li a i {
    color: var(--secondary-color, #4a9d6b);
    font-size: 0.9rem;
}

/* زر في الشريط الجانبي */
.sidebar-card .btn {
    width: 100%;
    text-align: center;
    padding: 12px;
    margin-top: 10px;
}

.sidebar-card .btn i {
    margin-left: 8px;
}

/* أيقونات التواصل الاجتماعي في الشريط الجانبي */
.social-icons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color, #2d5f3f), var(--secondary-color, #4a9d6b));
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 1.1rem;
}

.social-icon:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 5px 15px rgba(45, 95, 63, 0.3);
}

/* ===== Footer Styles ===== */
.site-footer {
    background: linear-gradient(135deg, var(--primary-color, #2d5f3f) 0%, var(--primary-dark, #1a3a27) 100%);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section {
    animation: fadeInUp 0.6s ease;
}

.footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--accent-color, #66bb6a);
}

.footer-title i {
    font-size: 1.4rem;
}

.footer-description {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links li a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 5px 0;
}

.footer-links li a:hover {
    color: var(--accent-color, #66bb6a);
    padding-right: 10px;
}

.footer-links li a i {
    font-size: 0.9rem;
}

/* أيقونات التواصل في الفوتر */
.footer-social {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-social-icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.footer-social-icon:hover {
    background: var(--accent-color, #66bb6a);
    border-color: white;
    transform: translateY(-5px) rotate(360deg);
}

.footer-contact {
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.footer-contact a {
    color: var(--accent-color, #66bb6a);
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}

/* حقوق النشر */
.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    text-align: center;
}

.footer-bottom p {
    margin: 5px 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-dev-link {
    color: var(--accent-color, #66bb6a);
    text-decoration: none;
    font-weight: 600;
}

.footer-dev-link:hover {
    text-decoration: underline;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   ANIMATED SIDEBAR BLOCKS
======================================== */

.sidebar-animated-block {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sidebar-animated-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.sidebar-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.sidebar-view-all {
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: transform 0.3s;
}

.sidebar-view-all:hover {
    transform: translateX(-3px);
}

.animated-content-wrapper {
    height: 300px;
    overflow: hidden;
    position: relative;
    background: #fff;
}

.animated-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.animated-item {
    flex-shrink: 0;
}

.animated-link {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #ffffff;
    border-radius: 0;
    text-decoration: none;
    color: #333;
    font-size: 1.05rem; /* تكبير الخط */
    font-weight: 700; /* جعل الخط عريض */
    transition: all 0.3s;
    line-height: 1.5;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.animated-link:hover {
    background: rgba(0, 0, 0, 0.02);
    transform: translateX(-5px);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

/* Scroll Up Animation */
@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.scroll-up {
    animation: scrollUp 30s linear infinite;
}

.animated-content-wrapper:hover .scroll-up {
    animation-play-state: paused;
}

/* Scroll Down Animation */
@keyframes scrollDown {
    0% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(0);
    }
}

.scroll-down {
    animation: scrollDown 30s linear infinite;
}

.animated-content-wrapper:hover .scroll-down {
    animation-play-state: paused;
}

/* Sidebar Menu List Styles */
.sidebar-menu-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 0;
}

.sidebar-menu-list .animated-item {
    margin: 0;
}

.sidebar-menu-list .animated-link {
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    font-size: 1.1rem; /* تكبير الخط */
    font-weight: 700; /* جعل الخط عريض */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-menu-list .animated-link:hover {
    background: #e9ecef;
    transform: translateX(-5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sidebar-menu-list .animated-link span {
    flex: 1;
}

/* Nested menu items */
.sidebar-menu-list .animated-item[style*="padding-right"] .animated-link {
    font-size: 0.9rem;
    background: #ffffff;
    border-right: 3px solid #e9ecef;
}

.sidebar-menu-list .animated-item[style*="padding-right"] .animated-link:hover {
    border-right-color: var(--primary-color, #2c5f2d);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .about-section,
    .contact-section {
        grid-column: span 2;
    }

    .footer-section {
        text-align: center;
    }

    .footer-title,
    .footer-links li a,
    .footer-contact {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .sidebar-card {
        padding: 15px;
    }

    .sidebar-title {
        font-size: 1.1rem;
    }

    .sidebar-animated-block {
        padding: 15px;
        margin-bottom: 20px;
    }

    .animated-content-wrapper {
        height: 250px;
    }

    .sidebar-title {
        font-size: 1rem;
    }

    .animated-link {
        font-size: 0.85rem;
        padding: 8px;
    }

    .sidebar-view-all {
        font-size: 0.8rem;
    }
}

/* ===== Online Visitors Styles ===== */
.online-visitors-card {
    background: linear-gradient(135deg, #f8fafc 0%, #e0e7ef 65%, #c7d2fe 100%);
    color: #1e293b;
    border: 1px solid #e0e7ef;
    box-shadow: 0 8px 24px rgba(100, 116, 139, 0.12);
}

.online-visitors-card .sidebar-title {
    color: #334155;
    border-bottom-color: #c7d2fe;
}

.online-visitors-card .sidebar-title i {
    color: #fbbf24;
    animation: pulse-globe 2s ease-in-out infinite;
}

@keyframes pulse-globe {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.online-visitors-container {
    margin-top: 15px;
}

.total-visitors {
    background: #e0e7ef;
    border-radius: 12px;
    padding: 18px;
    text-align: center;
    margin-bottom: 18px;
    border: 1px solid #c7d2fe;
}

.total-visitors i {
    font-size: 2rem;
    margin-bottom: 8px;
    display: block;
    color: #fbbf24;
}

.visitors-count {
    font-size: 2.5rem;
    font-weight: 800;
    display: block;
    color: #334155;
    text-shadow: 0 2px 8px #c7d2fe;
}

.visitors-label {
    font-size: 0.95rem;
    opacity: 0.9;
    display: block;
    margin-top: 5px;
}

.visitors-by-country {
    max-height: 250px;
    overflow-y: auto;
    padding: 5px;
}

.visitors-by-country::-webkit-scrollbar {
    width: 6px;
}

.visitors-by-country::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.visitors-by-country::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.visitors-by-country::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.country-item {
    background: #f1f5f9;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.25s ease;
    border: 1px solid #c7d2fe;
}

.country-item:hover {
    background: #e0e7ef;
    transform: translateX(-5px);
    box-shadow: 0 4px 12px #c7d2fe;
}

.country-flag {
    font-size: 1.8rem;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 50%;
    border: 2px solid #c7d2fe;
    box-shadow: 0 2px 6px #c7d2fe;
}

.country-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.country-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: #334155;
}

.country-visitors {
    font-size: 0.85rem;
    opacity: 0.8;
    color: #64748b;
}

.country-count {
    background: #e0e7ef;
    border: 1px solid #c7d2fe;
    padding: 4px 12px;
    border-radius: 14px;
    font-weight: 700;
    font-size: 0.95rem;
    min-width: 35px;
    text-align: center;
    box-shadow: 0 1px 2px #c7d2fe;
}

.loading-visitors {
    text-align: center;
    padding: 30px 20px;
    color: white;
    opacity: 0.8;
}

.loading-visitors i {
    font-size: 2rem;
    margin-bottom: 10px;
    display: block;
}

.no-visitors {
    text-align: center;
    padding: 20px;
    color: white;
    opacity: 0.7;
}

.no-visitors i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    display: block;
    opacity: 0.5;
}

/* تأثير متحرك للعناصر الجديدة */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.country-item.new-visitor {
    animation: slideInRight 0.5s ease-out;
}

