/**
 * Homepage SEO Shortcodes - Base Styles
 * Version: 6.2.1
 * القواعد الأساسية المشتركة بين جميع البوكسات
 */

/* ===== Variables - الألوان الديناميكية يتم إضافتها من صفحة الإعدادات ===== */
:root {
    --hss-primary-color: #bc8456;
    --hss-primary-hover: #a6734a;
    --hss-secondary-color: #79cd77;
    --hss-secondary-hover: #8dd68a;
    /* الألوان الثابتة (غير قابلة للتخصيص) */
    --hss-bg-dark: #2c2c2c;
    --hss-bg-darker: #1f1f1f;
    --hss-bg-light: #ffffff;
    --hss-text-dark: #333333;
    --hss-text-light: #f5f5f5;
    --hss-text-muted: #999999;
    --hss-border-color: rgba(255, 255, 255, 0.08);
    --hss-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
    --hss-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --hss-shadow-lg: 0 8px 20px rgba(var(--hss-primary-color-rgb, 188, 132, 86), 0.25);
    --hss-shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(var(--hss-primary-color-rgb, 188, 132, 86), 0.2);
    --hss-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== Section Styles ===== */
.hss-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
    line-height: 0;
    font-size: 0;
}

.hss-section > * {
    line-height: normal;
    font-size: initial;
}

/* إزالة أي margin/padding من العناصر الداخلية */
.hss-section > *:first-child {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.hss-section > *:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* ===== Grid System - بطاقات صغيرة ومتوافقة - 6 في الصف ===== */
.hss-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    margin: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    width: 100%;
    box-sizing: border-box;
    line-height: 0;
}

.hss-grid > * {
    line-height: normal;
}

/* إزالة الفراغ من آخر عنصر في grid */
.hss-grid::after {
    content: '';
    display: none;
}

.hss-grid::before {
    content: '';
    display: none;
}

/* Desktop - شاشات كبيرة */
@media (min-width: 1200px) {
    .hss-grid {
        grid-template-columns: repeat(6, 1fr);
        gap: 15px;
    }
}

/* Tablet - تابلت */
@media (min-width: 768px) and (max-width: 1199px) {
    .hss-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
}

/* Mobile - موبايل */
@media (min-width: 481px) and (max-width: 767px) {
    .hss-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}

/* Small Mobile - موبايل صغير - 2 في الصف */
@media (max-width: 480px) {
    .hss-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
}

/* ===== Card Base Styles - بطاقات احترافية مع تأثيرات متقدمة ===== */
.hss-card {
    background: var(--hss-bg-light);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--hss-shadow-sm);
    transition: box-shadow 0.2s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.hss-card:hover {
    box-shadow: var(--hss-shadow-lg);
}

.hss-card-link {
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
    color: inherit;
    height: 100%;
    flex: 1;
}

.hss-card-link:hover,
.hss-card-link:focus {
    text-decoration: none !important;
    outline: none;
}

.hss-card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== Book Count - قاعدة مشتركة ===== */
.hss-book-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--hss-secondary-color);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none !important;
    line-height: 1;
}

.hss-book-count svg {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    color: var(--hss-secondary-color);
}

/* ===== Responsive Design - تحسينات إضافية ===== */
@media (max-width: 480px) {
    .hss-section {
        padding: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .hss-grid {
        margin: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        padding: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }
    
    .hss-card-content {
        padding: 12px;
    }
    
    .hss-book-count {
        font-size: 11px;
    }
    
    .hss-book-count svg {
        width: 14px;
        height: 14px;
    }
}

/* ===== Very Small Screens - شاشات صغيرة جداً ===== */
@media (max-width: 360px) {
    .hss-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .hss-card-content {
        padding: 10px;
    }
    
    .hss-book-count {
        font-size: 10px;
    }
}

/* ===== Section Footer - أزرار عرض الكل ===== */
.hss-section-footer {
    margin-top: 15px;
    padding-top: 0;
    padding-bottom: 0;
    text-align: center;
    width: 100%;
}

.hss-view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 26px;
    background: linear-gradient(135deg, var(--hss-primary-color) 0%, var(--hss-primary-hover) 100%);
    color: #ffffff;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    border-radius: 25px;
    box-shadow: 0 4px 12px rgba(var(--hss-primary-color-rgb, 188, 132, 86), 0.3);
    transition: box-shadow 0.2s ease;
    border: none;
    cursor: pointer;
    line-height: 1.5;
}

.hss-view-all-btn:hover,
.hss-view-all-btn:focus {
    background: linear-gradient(135deg, var(--hss-primary-hover) 0%, #955d3a 100%);
    color: #ffffff;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(var(--hss-primary-color-rgb, 188, 132, 86), 0.4);
    outline: none;
}

.hss-view-all-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Responsive - Section Footer */
@media (max-width: 480px) {
    .hss-section-footer {
        margin-top: 12px;
    }
    
    .hss-view-all-btn {
        padding: 10px 20px;
        font-size: 13px;
        gap: 6px;
    }
    
    .hss-view-all-btn svg {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 360px) {
    .hss-section-footer {
        margin-top: 10px;
    }
    
    .hss-view-all-btn {
        padding: 9px 18px;
        font-size: 12px;
        gap: 5px;
    }
    
    .hss-view-all-btn svg {
        width: 15px;
        height: 15px;
    }
}