* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero-section {
    background: white;
    margin: 2rem auto;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section[style*="--bg-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    opacity: var(--bg-opacity, 0.15);
    z-index: 0;
    border-radius: 15px;
}

.hero-section[style*="--bg-image"] > * {
    position: relative;
    z-index: 1;
}

.hero-section h2 {
    font-size: 2rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.hero-section h2 a {
    color: #667eea;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.hero-section h2 a:hover {
    color: #764ba2;
    transform: scale(1.02);
}

.hero-section p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.action-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

.action-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.action-card[style*="--bg-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    opacity: var(--bg-opacity, 0.15);
    z-index: 0;
    border-radius: 15px;
}

.action-card[style*="--bg-image"] > * {
    position: relative;
    z-index: 1;
}

.action-card.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-card:not(.disabled):hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
    border-color: #667eea;
}

.action-card .icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 0.75rem;
}

.action-card .icon.profile-picture-icon {
    width: 57px;
    height: 57px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 0.75rem;
    display: inline-block;
    opacity: 0.95;
    filter: blur(0.3px);
}

.action-card .icon.profile-picture-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.action-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #333;
}

.action-card p {
    color: #666;
    margin-bottom: 1.25rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.action-card .btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-card .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.stats-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    margin: 3rem 0;
    border-radius: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-item .number {
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.stat-item .label {
    font-size: 1.1rem;
    opacity: 0.9;
}

.features-section {
    margin: 3rem 0;
}

.features-section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-item {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.feature-item[style*="--bg-image"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--bg-image);
    background-size: cover;
    background-position: center;
    opacity: var(--bg-opacity, 0.15);
    z-index: 0;
    border-radius: 10px;
}

.feature-item[style*="--bg-image"] > * {
    position: relative;
    z-index: 1;
}

.feature-item .icon {
    font-size: 2.5rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature-item h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.feature-item p {
    color: #666;
    font-size: 0.95rem;
}

footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .action-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 1rem;
        margin: 1.5rem auto;
    }
    
    .hero-section h2 {
        font-size: 1.6rem;
    }
    
    .action-cards {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin: 1.5rem 0;
    }
    
    .action-card .icon {
        font-size: 2.5rem;
    }
    
    .action-card h3 {
        font-size: 1.3rem;
    }
    
    .stats-section {
        padding: 2rem 0;
        margin: 2rem 0;
    }
    
    .stats-grid {
        gap: 1.5rem;
    }
    
    .stat-item .number {
        font-size: 2.5rem;
    }
    
    .features-section h2 {
        font-size: 1.6rem;
    }
    
    .features-grid {
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero-section {
        padding: 1.5rem 1rem;
    }
    
    .hero-section h2 {
        font-size: 1.4rem;
    }
    
    .action-cards {
        gap: 1rem;
    }
    
    .action-card {
        padding: 1.5rem;
    }
    
    .action-card h3 {
        font-size: 1.2rem;
    }
    
    .action-card p {
        font-size: 0.9rem;
    }
    
    .action-card .btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-item {
        padding: 0.5rem;
    }
    
    .stat-item .number {
        font-size: 2rem;
    }
    
    .stat-item .label {
        font-size: 1rem;
    }
    
    .features-section {
        margin: 2rem 0;
    }
    
    .features-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .feature-item {
        padding: 1.5rem;
    }
    
    .feature-item .icon {
        font-size: 2rem;
    }
    
    .feature-item h3 {
        font-size: 1.1rem;
    }
    
    footer {
        padding: 1.5rem 0;
        font-size: 0.9rem;
    }
}

/* RTL Support for Arabic */
[dir="rtl"] {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

[dir="rtl"] .action-cards {
    direction: rtl;
}

[dir="rtl"] .features-grid {
    direction: rtl;
}

[dir="rtl"] .stats-grid {
    direction: rtl;
}

[dir="rtl"] .action-card .icon {
    margin-left: 0;
    margin-right: 0;
}

[dir="rtl"] .cart-link i {
    margin-right: 0;
    margin-left: 0.25rem;
}

[dir="rtl"] .user-welcome i {
    margin-right: 0;
    margin-left: 0.25rem;
}

[dir="rtl"] .action-card {
    min-height: 380px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

[dir="rtl"] .action-card .btn {
    font-size: 0.85rem;
    padding: 0.75rem 1.5rem;
    margin-top: auto;
}

[dir="rtl"] .action-card h3 {
    font-size: 1.2rem;
    min-height: 2.4rem;
}

[dir="rtl"] .action-card p {
    font-size: 0.9rem;
    min-height: 4.5rem;
}

@media (max-width: 1024px) {
    [dir="rtl"] .action-card {
        min-height: 360px;
    }
}

@media (max-width: 768px) {
    [dir="rtl"] .action-card {
        min-height: auto;
    }
    
    [dir="rtl"] .action-card h3 {
        min-height: auto;
    }
    
    [dir="rtl"] .action-card p {
        min-height: auto;
    }
}

@media (max-width: 480px) {
    [dir="rtl"] .action-card .btn {
        font-size: 0.8rem;
        padding: 0.6rem 1.2rem;
    }
}
