/**
 * Premium Global CSS - Al-Jawhara Platform
 * التصميم المميز الموحد لجميع الصفحات الداخلية
 * =============================================
 */

/* ========================================
   1. CSS Variables - المتغيرات
   ======================================== */
:root {
    /* Neon Colors */
    --pg-neon-blue: #00d4ff;
    --pg-neon-purple: #a855f7;
    --pg-neon-pink: #ec4899;
    --pg-neon-green: #10b981;
    --pg-neon-orange: #f59e0b;
    --pg-gold: #D4AF37;

    /* Background Colors */
    --pg-bg-dark: #0a0a1a;
    --pg-bg-darker: #050510;
    --pg-bg-light: #f8fafc;

    /* Gradients */
    --pg-gradient-primary: linear-gradient(135deg, #00d4ff, #a855f7);
    --pg-gradient-hero: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    --pg-gradient-products: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
    --pg-gradient-talents: linear-gradient(135deg, #7c3aed 0%, #6d28d9 50%, #5b21b6 100%);
    --pg-gradient-projects: linear-gradient(135deg, #0ea5e9 0%, #0284c7 50%, #0369a1 100%);
    --pg-gradient-equipment: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
    --pg-gradient-services: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    --pg-gradient-courses: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #4338ca 100%);

    /* Glass Effect */
    --pg-glass-bg: rgba(255, 255, 255, 0.05);
    --pg-glass-bg-light: rgba(255, 255, 255, 0.95);
    --pg-glass-border: rgba(255, 255, 255, 0.1);
    --pg-glass-border-light: rgba(0, 0, 0, 0.06);

    /* Text Colors */
    --pg-text-primary: #1e293b;
    --pg-text-secondary: #64748b;
    --pg-text-muted: #94a3b8;
    --pg-text-light: #ffffff;

    /* Shadows & Glows */
    --pg-glow-blue: 0 0 30px rgba(0, 212, 255, 0.3);
    --pg-glow-purple: 0 0 30px rgba(168, 85, 247, 0.3);
    --pg-shadow-card: 0 10px 40px rgba(0, 0, 0, 0.08);
    --pg-shadow-card-hover: 0 20px 60px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --pg-transition-fast: 0.2s ease;
    --pg-transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --pg-transition-bounce: 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   2. Premium Page Wrapper
   ======================================== */
.premium-page {
    min-height: 100vh;
    background: var(--pg-bg-light);
}

.premium-page.dark-theme {
    background: var(--pg-bg-dark);
}

/* ========================================
   3. Premium Hero Section
   ======================================== */
.premium-hero {
    padding: 1.5rem 0;
    color: white;
    position: relative;
    overflow: hidden;
}

.premium-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.premium-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    position: relative;
    z-index: 1;
}

.premium-hero-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.premium-hero-icon {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.premium-hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    margin: 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.premium-hero p {
    font-size: 0.9rem;
    margin: 0.25rem 0 0;
    opacity: 0.9;
}

.premium-hero-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* ========================================
   4. Premium Cards
   ======================================== */
.premium-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--pg-shadow-card);
    border: 1px solid var(--pg-glass-border-light);
    transition: all var(--pg-transition-smooth);
    overflow: hidden;
}

.premium-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--pg-shadow-card-hover);
}

.premium-card-glass {
    background: var(--pg-glass-bg-light);
    backdrop-filter: blur(20px);
    border: 1px solid var(--pg-glass-border-light);
}

/* Dark Theme Cards */
.dark-theme .premium-card {
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--pg-glass-border);
}

.dark-theme .premium-card-glass {
    background: var(--pg-glass-bg);
    backdrop-filter: blur(20px);
    border-color: var(--pg-glass-border);
}

/* ========================================
   5. Premium Buttons
   ======================================== */
.btn-premium {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--pg-transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn-premium:hover::before {
    left: 100%;
}

.btn-premium-primary {
    background: var(--pg-gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-premium-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}

.btn-premium-outline {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    backdrop-filter: blur(10px);
}

.btn-premium-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-premium-white {
    background: white;
    color: var(--pg-text-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-premium-white:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* ========================================
   6. Premium Filter Sidebar
   ======================================== */
.premium-filters {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: var(--pg-shadow-card);
    border: 1px solid var(--pg-glass-border-light);
    position: sticky;
    top: 100px;
}

.premium-filters h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.premium-filters h4 i {
    background: var(--pg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-filters .form-label {
    font-weight: 600;
    color: var(--pg-text-primary);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.premium-filters .form-control,
.premium-filters .form-select {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all var(--pg-transition-fast);
}

.premium-filters .form-control:focus,
.premium-filters .form-select:focus {
    border-color: var(--pg-neon-blue);
    box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.1);
}

.premium-filters .input-group-text {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-left: none;
    border-radius: 0 12px 12px 0;
    color: var(--pg-text-secondary);
}

[dir="rtl"] .premium-filters .input-group-text {
    border-radius: 12px 0 0 12px;
    border-left: 2px solid #e2e8f0;
    border-right: none;
}

/* ========================================
   7. Premium Product/Item Cards
   ======================================== */
.premium-item-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--pg-shadow-card);
    border: 1px solid var(--pg-glass-border-light);
    transition: all var(--pg-transition-smooth);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.premium-item-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--pg-shadow-card-hover);
}

.premium-item-card .card-image {
    height: 200px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
}

.premium-item-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--pg-transition-smooth);
}

.premium-item-card:hover .card-image img {
    transform: scale(1.05);
}

.premium-item-card .card-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(0, 0, 0, 0.1);
}

.premium-item-card .card-badges {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    z-index: 5;
}

.premium-item-card .card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.premium-item-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pg-text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.premium-item-card .card-title a {
    color: inherit;
    text-decoration: none;
    transition: color var(--pg-transition-fast);
}

.premium-item-card .card-title a:hover {
    color: var(--pg-neon-blue);
}

.premium-item-card .card-footer-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    margin-top: auto;
    border-top: 1px solid #f1f5f9;
}

/* ========================================
   8. Premium Badges
   ======================================== */
.badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.badge-premium-discount {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.badge-premium-new {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.badge-premium-featured {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #1a1a2e;
}

.badge-premium-verified {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

/* ========================================
   9. Premium Price Display
   ======================================== */
.premium-price {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.premium-price .original-price {
    font-size: 0.85rem;
    color: var(--pg-text-muted);
    text-decoration: line-through;
}

.premium-price .current-price {
    font-size: 1.25rem;
    font-weight: 800;
    background: var(--pg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   10. Premium Rating Stars
   ======================================== */
.premium-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.premium-rating .stars {
    display: flex;
    gap: 2px;
}

.premium-rating .stars i {
    font-size: 0.85rem;
    color: #e2e8f0;
}

.premium-rating .stars i.active {
    color: #fbbf24;
}

.premium-rating .count {
    font-size: 0.85rem;
    color: var(--pg-text-secondary);
}

/* ========================================
   11. Premium Sort Bar
   ======================================== */
.premium-sort-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 16px;
    box-shadow: var(--pg-shadow-card);
    margin-bottom: 1.5rem;
    border: 1px solid var(--pg-glass-border-light);
}

.premium-sort-bar .results-count {
    font-weight: 600;
    color: var(--pg-text-secondary);
}

.premium-sort-bar .results-count strong {
    color: var(--pg-text-primary);
}

.premium-sort-bar .sort-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.premium-sort-bar .sort-btn {
    padding: 0.5rem 1rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #e2e8f0;
    background: white;
    color: var(--pg-text-secondary);
    transition: all var(--pg-transition-fast);
}

.premium-sort-bar .sort-btn:hover {
    border-color: var(--pg-neon-blue);
    color: var(--pg-neon-blue);
}

.premium-sort-bar .sort-btn.active {
    background: var(--pg-gradient-primary);
    border-color: transparent;
    color: white;
}

/* ========================================
   12. Premium Pagination
   ======================================== */
.premium-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.premium-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    background: white;
    color: var(--pg-text-primary);
    border: 2px solid #e2e8f0;
    transition: all var(--pg-transition-fast);
}

.premium-pagination .page-link:hover {
    border-color: var(--pg-neon-blue);
    color: var(--pg-neon-blue);
    transform: translateY(-2px);
}

.premium-pagination .page-link.active {
    background: var(--pg-gradient-primary);
    border-color: transparent;
    color: white;
}

.premium-pagination .page-link.prev,
.premium-pagination .page-link.next {
    width: auto;
    padding: 0 1.25rem;
}

/* ========================================
   13. Premium Empty State
   ======================================== */
.premium-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 24px;
    box-shadow: var(--pg-shadow-card);
}

.premium-empty-state .empty-icon {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.premium-empty-state .empty-icon i {
    font-size: 3rem;
    background: var(--pg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.premium-empty-state h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pg-text-primary);
    margin-bottom: 0.75rem;
}

.premium-empty-state p {
    color: var(--pg-text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* ========================================
   14. Animations
   ======================================== */
@keyframes premiumFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes premiumPulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(0, 212, 255, 0.4);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(0, 212, 255, 0);
    }
}

.premium-fade-in {
    animation: premiumFadeInUp 0.6s ease-out forwards;
}

.premium-fade-in-delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
}

.premium-fade-in-delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
}

.premium-fade-in-delay-3 {
    animation-delay: 0.3s;
    opacity: 0;
}

.premium-fade-in-delay-4 {
    animation-delay: 0.4s;
    opacity: 0;
}

.premium-fade-in-delay-5 {
    animation-delay: 0.5s;
    opacity: 0;
}

/* Stagger Grid Animation */
.premium-grid-animated>*:nth-child(1) {
    animation-delay: 0.05s;
}

.premium-grid-animated>*:nth-child(2) {
    animation-delay: 0.10s;
}

.premium-grid-animated>*:nth-child(3) {
    animation-delay: 0.15s;
}

.premium-grid-animated>*:nth-child(4) {
    animation-delay: 0.20s;
}

.premium-grid-animated>*:nth-child(5) {
    animation-delay: 0.25s;
}

.premium-grid-animated>*:nth-child(6) {
    animation-delay: 0.30s;
}

.premium-grid-animated>*:nth-child(7) {
    animation-delay: 0.35s;
}

.premium-grid-animated>*:nth-child(8) {
    animation-delay: 0.40s;
}

.premium-grid-animated>*:nth-child(9) {
    animation-delay: 0.45s;
}

.premium-grid-animated>*:nth-child(10) {
    animation-delay: 0.50s;
}

.premium-grid-animated>*:nth-child(11) {
    animation-delay: 0.55s;
}

.premium-grid-animated>*:nth-child(12) {
    animation-delay: 0.60s;
}

.premium-grid-animated>* {
    opacity: 0;
    animation: premiumFadeInUp 0.5s ease-out forwards;
}

/* ========================================
   15. Responsive Design
   ======================================== */
@media (max-width: 991px) {
    .premium-filters {
        position: static;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .premium-hero h1 {
        font-size: 1.35rem;
    }

    .premium-hero-inner {
        justify-content: center;
        text-align: center;
    }

    .premium-hero-content {
        flex-direction: column;
        text-align: center;
    }

    .premium-sort-bar {
        flex-direction: column;
        text-align: center;
    }

    .premium-sort-bar .sort-options {
        justify-content: center;
    }

    .premium-item-card .card-image {
        height: 180px;
    }
}

/* ========================================
   16. RTL Support
   ======================================== */
[dir="rtl"] .premium-hero-content {
    flex-direction: row-reverse;
}

[dir="rtl"] .premium-item-card .card-badges {
    flex-direction: row-reverse;
}

[dir="rtl"] .btn-premium i {
    margin-left: 0.5rem;
    margin-right: 0;
}

/* ========================================
   17. Dark Mode Compatibility
   ======================================== */
@media (prefers-color-scheme: dark) {
    .premium-page:not(.light-theme) {
        --pg-bg-light: #0f172a;
        --pg-text-primary: #f1f5f9;
        --pg-text-secondary: #94a3b8;
    }

    .premium-page:not(.light-theme) .premium-card,
    .premium-page:not(.light-theme) .premium-filters,
    .premium-page:not(.light-theme) .premium-item-card,
    .premium-page:not(.light-theme) .premium-sort-bar,
    .premium-page:not(.light-theme) .premium-empty-state {
        background: rgba(30, 41, 59, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
    }

    .premium-page:not(.light-theme) .premium-filters .form-control,
    .premium-page:not(.light-theme) .premium-filters .form-select {
        background: rgba(15, 23, 42, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f1f5f9;
    }

    .premium-page:not(.light-theme) .premium-sort-bar .sort-btn {
        background: rgba(15, 23, 42, 0.8);
        border-color: rgba(255, 255, 255, 0.1);
        color: #94a3b8;
    }

    .premium-page:not(.light-theme) .premium-pagination .page-link {
        background: rgba(30, 41, 59, 0.9);
        border-color: rgba(255, 255, 255, 0.1);
        color: #f1f5f9;
    }
}

/* Utility Classes */
.hover-lift {
    transition: transform var(--pg-transition-smooth), box-shadow var(--pg-transition-smooth);
}

.hover-lift:hover {
    transform: translateY(-5px);
}

.gradient-text {
    background: var(--pg-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}