/**
 * Hero Banner Styles
 * ====================
 */

.hero-banner {
    position: relative;
    width: 100%;
    min-height: 520px;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

/* Background Layers */
.hero-background {
    position: absolute;
    inset: 0;
    z-index: var(--z-below);
}

.hero-background-image {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 20%;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background: var(--gradient-overlay);
}

/* Additional gradient for text readability */
.hero-gradient::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        rgba(13, 11, 9, 0.9) 0%,
        rgba(13, 11, 9, 0.6) 50%,
        transparent 100%
    );
}

[data-theme="light"] .hero-gradient {
    background: var(--gradient-overlay);
}

[data-theme="light"] .hero-gradient::before {
    background: linear-gradient(
        90deg,
        rgba(250, 246, 240, 0.95) 0%,
        rgba(250, 246, 240, 0.7) 50%,
        transparent 100%
    );
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: var(--z-raised);
    padding: var(--space-10);
    max-width: 600px;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--accent-soft);
    color: var(--accent-primary);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    border-radius: var(--radius-full);
    margin-bottom: var(--space-4);
}

.hero-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    animation: pulse 2s ease-in-out infinite;
}

/* Hero Title */
.hero-title {
    font-size: var(--text-5xl);
    font-weight: 800;
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tighter);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

/* Hero Arabic Subtitle */
.hero-subtitle {
    font-family: var(--font-arabic);
    font-size: var(--text-2xl);
    color: var(--accent-primary);
    direction: rtl;
    margin-bottom: var(--space-4);
    opacity: 0.9;
}

/* Hero Description */
.hero-description {
    font-size: var(--text-md);
    line-height: var(--leading-relaxed);
    color: var(--text-secondary);
    margin-bottom: var(--space-5);
    max-width: 480px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hero Meta Info */
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-5);
    margin-bottom: var(--space-6);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.meta-item svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    opacity: 0.7;
}

/* Hero Actions */
.hero-actions {
    display: flex;
    gap: var(--space-3);
}

/* Featured Tags */
.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-5);
}

.hero-tag {
    padding: var(--space-1) var(--space-3);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

/* =============================================
   NO IMAGE FALLBACK — Oriental pattern
   ============================================= */

.hero-banner--no-image .hero-background {
    background:
        /* Central radial glow */
        radial-gradient(ellipse at 70% 40%, rgba(212, 175, 125, 0.15) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(201, 165, 77, 0.08) 0%, transparent 50%),
        /* Base warm tone */
        linear-gradient(135deg, #1a1510 0%, #0D0B09 40%, #171310 100%);
}

/* 8-pointed star Islamic pattern */
.hero-banner--no-image .hero-background::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23D4AF7D' stroke-opacity='0.07' stroke-width='0.6'%3E%3C!-- 8-pointed star --%3E%3Cpolygon points='60,10 70,40 100,40 76,58 84,88 60,70 36,88 44,58 20,40 50,40'/%3E%3C!-- Inner circle --%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3C!-- Outer circle --%3E%3Ccircle cx='60' cy='60' r='35'/%3E%3C!-- Diamond --%3E%3Crect x='38' y='38' width='44' height='44' rx='2' transform='rotate(45 60 60)'/%3E%3C/g%3E%3C/svg%3E");
    background-size: 120px 120px;
    opacity: 1;
    z-index: 0;
}

/* Decorative arabesque arc on the right */
.hero-banner--no-image .hero-background::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5%;
    width: 500px;
    height: 500px;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3Csvg width='500' height='500' viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23D4AF7D' stroke-opacity='0.06' stroke-width='0.8'%3E%3Ccircle cx='250' cy='250' r='200'/%3E%3Ccircle cx='250' cy='250' r='170'/%3E%3Ccircle cx='250' cy='250' r='140'/%3E%3Ccircle cx='250' cy='250' r='110'/%3E%3Ccircle cx='250' cy='250' r='80'/%3E%3Cline x1='50' y1='250' x2='450' y2='250'/%3E%3Cline x1='250' y1='50' x2='250' y2='450'/%3E%3Cline x1='109' y1='109' x2='391' y2='391'/%3E%3Cline x1='391' y1='109' x2='109' y2='391'/%3E%3C/g%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 0;
}

.hero-banner--no-image .hero-gradient {
    background: linear-gradient(
        90deg,
        rgba(13, 11, 9, 0.7) 0%,
        rgba(13, 11, 9, 0.3) 50%,
        rgba(13, 11, 9, 0.1) 100%
    );
}

.hero-banner--no-image .hero-gradient::before {
    background: none;
}

/* Light theme no-image fallback */
[data-theme="light"] .hero-banner--no-image .hero-background {
    background:
        radial-gradient(ellipse at 70% 40%, rgba(212, 175, 125, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(201, 165, 77, 0.06) 0%, transparent 50%),
        linear-gradient(135deg, #F5EDE0 0%, #FAF6F0 40%, #F0E8DA 100%);
}

[data-theme="light"] .hero-banner--no-image .hero-background::before {
    background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C9A066' stroke-opacity='0.10' stroke-width='0.6'%3E%3Cpolygon points='60,10 70,40 100,40 76,58 84,88 60,70 36,88 44,58 20,40 50,40'/%3E%3Ccircle cx='60' cy='60' r='18'/%3E%3Ccircle cx='60' cy='60' r='35'/%3E%3Crect x='38' y='38' width='44' height='44' rx='2' transform='rotate(45 60 60)'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="light"] .hero-banner--no-image .hero-background::after {
    background-image: url("data:image/svg+xml,%3Csvg width='500' height='500' viewBox='0 0 500 500' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23C9A066' stroke-opacity='0.08' stroke-width='0.8'%3E%3Ccircle cx='250' cy='250' r='200'/%3E%3Ccircle cx='250' cy='250' r='170'/%3E%3Ccircle cx='250' cy='250' r='140'/%3E%3Ccircle cx='250' cy='250' r='110'/%3E%3Ccircle cx='250' cy='250' r='80'/%3E%3Cline x1='50' y1='250' x2='450' y2='250'/%3E%3Cline x1='250' y1='50' x2='250' y2='450'/%3E%3Cline x1='109' y1='109' x2='391' y2='391'/%3E%3Cline x1='391' y1='109' x2='109' y2='391'/%3E%3C/g%3E%3C/svg%3E");
}

[data-theme="light"] .hero-banner--no-image .hero-gradient {
    background: linear-gradient(
        90deg,
        rgba(250, 246, 240, 0.8) 0%,
        rgba(250, 246, 240, 0.3) 50%,
        transparent 100%
    );
}

[data-theme="light"] .hero-banner--no-image .hero-gradient::before {
    background: none;
}

/* Mobile no-image */
@media (max-width: 768px) {
    .hero-banner--no-image .hero-background::after {
        top: auto;
        bottom: -10%;
        right: -15%;
        width: 300px;
        height: 300px;
    }

    .hero-banner--no-image .hero-gradient {
        background: linear-gradient(
            180deg,
            transparent 20%,
            rgba(13, 11, 9, 0.4) 60%,
            var(--bg-primary) 100%
        );
    }

    [data-theme="light"] .hero-banner--no-image .hero-gradient {
        background: linear-gradient(
            180deg,
            transparent 20%,
            rgba(250, 246, 240, 0.4) 60%,
            var(--bg-primary) 100%
        );
    }
}

/* Skeleton Loading State */
.hero-skeleton .hero-badge,
.hero-skeleton .hero-title,
.hero-skeleton .hero-subtitle,
.hero-skeleton .hero-description,
.hero-skeleton .hero-meta,
.hero-skeleton .hero-actions {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}
