@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;900&family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0604;
    --bg-secondary: #140d0a;
    --bg-card: rgba(26, 18, 14, 0.7);
    --accent-gold: #D4AF37;
    --accent-gold-light: #F3E5AB;
    --accent-gold-dark: #996515;
    --accent-copper: #b87333;
    --text-primary: #FDFBF7;
    --text-secondary: #d1bfae;
    --text-muted: #8c7865;
    --glass-bg: rgba(20, 14, 10, 0.65);
    --glass-border: rgba(212, 175, 55, 0.2);
    --transition-smooth: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition-fast: all 0.25s ease;
}

[data-theme="light"] {
    --bg-primary: #FDFBF7;
    --bg-secondary: #F5F0E8;
    --bg-card: rgba(255, 255, 255, 0.9);
    --text-primary: #2D1B0C;
    --text-secondary: #5C4A3D;
    --text-muted: #8C7A6B;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(200, 164, 86, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    background-image:
        radial-gradient(circle at 15% 50%, rgba(212, 175, 55, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(184, 115, 51, 0.04) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    font-family: 'Inter', 'Tajawal', sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

[dir="rtl"] body { font-family: 'Tajawal', 'Inter', sans-serif; }

h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--text-primary); line-height: 1.2; }
a { color: inherit; text-decoration: none; transition: var(--transition-smooth); }

.container { max-width: 1400px; margin: 0 auto; padding: 0 2rem; }
.section-padding { padding: 120px 0; }

/* ═══ Glass Card ═══ */
.glass-card {
    background: rgba(22, 22, 22, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 2.5rem;
    transition: var(--transition-smooth);
}
[data-theme="light"] .glass-card { background: rgba(255,255,255,0.95); }
.glass-card:hover { border-color: rgba(200, 164, 86, 0.4); box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(200, 164, 86, 0.05); }

/* ═══ Premium Button ═══ */
.premium-button {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 16px 48px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #0A0A0A; font-weight: 800; border-radius: 60px; border: none; cursor: pointer;
    text-transform: uppercase; letter-spacing: 2px; font-size: 0.85rem;
    transition: var(--transition-smooth);
    box-shadow: 0 8px 32px rgba(200, 164, 86, 0.25);
    position: relative; overflow: hidden;
}
.premium-button::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: 0.6s;
}
.premium-button:hover::before { left: 100%; }
.premium-button:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 48px rgba(200, 164, 86, 0.4); }

/* ═══ Text Effects ═══ */
.text-gold {
    background: linear-gradient(135deg, var(--accent-gold-light), var(--accent-gold), var(--accent-gold-dark));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.glow-gold { text-shadow: 0 0 40px rgba(200, 164, 86, 0.3), 0 0 80px rgba(200, 164, 86, 0.1); }

/* ═══ Ticker ═══ */
.ticker-wrapper {
    background: linear-gradient(180deg, #050505, #080808);
    border-top: 1px solid var(--glass-border); border-bottom: 1px solid var(--glass-border);
    padding: 22px 0; overflow: hidden; white-space: nowrap; position: relative;
}
.ticker-wrapper::before, .ticker-wrapper::after {
    content: ''; position: absolute; top: 0; width: 120px; height: 100%; z-index: 2; pointer-events: none;
}
.ticker-wrapper::before { left: 0; background: linear-gradient(90deg, #050505, transparent); }
.ticker-wrapper::after { right: 0; background: linear-gradient(-90deg, #080808, transparent); }
.ticker-content { display: inline-block; animation: ticker 35s linear infinite; }
.ticker-item {
    display: inline-flex; align-items: center; gap: 10px; padding: 0 50px;
    color: var(--accent-gold); font-weight: 700; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 3px; opacity: 0.8;
}
.ticker-item i { font-size: 0.7rem; }
@keyframes ticker { 0% { transform: translateX(0%); } 100% { transform: translateX(-50%); } }

/* ═══ Heritage ═══ */
/* Heritage Grid */
.heritage-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 60px; align-items: center; }
.heritage-image-wrapper { position: relative; }
.heritage-image {
    width: 100%; height: 550px; object-fit: cover; border-radius: 24px;
    border: 1px solid var(--glass-border); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.heritage-badge {
    position: absolute; top: -25px; right: -25px;
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    color: #0A0A0A; width: 110px; height: 110px; border-radius: 50%;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-weight: 900; font-size: 0.75rem; text-align: center;
    box-shadow: 0 0 40px rgba(200, 164, 86, 0.5); z-index: 10;
    animation: pulse-glow 3s ease-in-out infinite;
}
@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 30px rgba(200, 164, 86, 0.4); }
    50% { box-shadow: 0 0 60px rgba(200, 164, 86, 0.7); }
}
[dir="rtl"] .heritage-badge { right: auto; left: -25px; }

/* ═══ Feature / B2B Cards ═══ */
/* Product Cards */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.product-card { background: var(--bg-card); border-radius: 24px; overflow: hidden; border: 1px solid rgba(255,255,255,0.04); transition: var(--transition-smooth); }
[data-theme="light"] .product-card { background: rgba(255,255,255,0.95); border-color: var(--glass-border); }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 30px 80px rgba(0,0,0,0.5); border-color: rgba(200,164,86,0.2); }
.product-card:hover .product-image img { transform: scale(1.08); }
.product-image { height: 350px; position: relative; overflow: hidden; }
.product-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(0.165,0.84,0.44,1); }
.product-badge { position: absolute; top: 20px; right: 20px; background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light)); color: #0A0A0A; padding: 6px 18px; border-radius: 30px; font-weight: 800; font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; }
[dir="rtl"] .product-badge { right: auto; left: 20px; }
.product-info { padding: 35px; }
.product-info h3 { font-size: 1.6rem; margin-bottom: 12px; color: var(--text-primary); }
.product-info p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.product-link { display: inline-flex; align-items: center; gap: 8px; color: var(--accent-gold); font-weight: 700; font-size: 0.9rem; transition: var(--transition-fast); }
.product-link:hover { gap: 14px; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.feature-card {
    padding: 50px 40px;
    background: linear-gradient(160deg, #161616 0%, #0d0d0d 100%);
    border: 1px solid rgba(255,255,255,0.04); border-radius: 24px;
    transition: var(--transition-smooth); position: relative; overflow: hidden;
}
[data-theme="light"] .feature-card { background: #fff; border-color: var(--glass-border); }
.feature-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent-gold), transparent);
    border-radius: 24px 24px 0 0; opacity: 0; transition: var(--transition-smooth);
}
.feature-card:hover::before { opacity: 1; }
.feature-card:hover { border-color: rgba(200, 164, 86, 0.25); transform: translateY(-10px); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5); }
.feature-icon { font-size: 2.5rem; margin-bottom: 25px; color: var(--accent-gold); display: inline-block; }

/* ═══ Section Headers ═══ */
.section-header { text-align: center; max-width: 800px; margin: 0 auto 80px; }
.section-header h2 { font-size: 3.5rem; margin-bottom: 20px; letter-spacing: -1px; }
.section-header p { color: var(--text-secondary); font-size: 1.15rem; line-height: 1.9; }
.section-label {
    display: inline-block; color: var(--accent-gold); font-weight: 700; font-size: 0.8rem;
    text-transform: uppercase; letter-spacing: 4px; margin-bottom: 20px;
    position: relative; padding-bottom: 15px;
}
.section-label::after {
    content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%);
    width: 40px; height: 2px; background: var(--accent-gold);
}

/* ═══ Stats Counter ═══ */
.stats-bar {
    display: flex; flex-wrap: wrap; justify-content: center;
    background: linear-gradient(135deg, rgba(212,175,55,0.08), rgba(20,13,10,0.9));
    border: 1px solid var(--glass-border); border-radius: 20px; overflow: hidden;
}
.stat-item { text-align: center; padding: 50px 20px; position: relative; flex: 1 1 0; min-width: 180px; }
.stat-item:not(:last-child)::after {
    content: ''; position: absolute; top: 20%; right: 0; height: 60%; width: 1px;
    background: linear-gradient(transparent, var(--glass-border), transparent);
}
[dir="rtl"] .stat-item:not(:last-child)::after { right: auto; left: 0; }
.stat-icon { font-size: 2.5rem; color: var(--accent-gold); margin-bottom: 15px; }
.stat-value { font-size: 3.5rem; font-weight: 900; color: var(--accent-gold); line-height: 1; margin-bottom: 10px; }
.stat-suffix { font-size: 1.5rem; color: var(--accent-gold-dark); }
.stat-label { color: var(--text-secondary); font-weight: 600; font-size: 0.9rem; letter-spacing: 1px; }

/* ═══ Testimonials ═══ */
.testimonial-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; }
.testimonial-card {
    background: linear-gradient(160deg, #161616, #0d0d0d); border: 1px solid rgba(255,255,255,0.04);
    border-radius: 20px; padding: 40px; transition: var(--transition-smooth);
}
[data-theme="light"] .testimonial-card { background: #fff; border-color: var(--glass-border); }
.testimonial-card:hover { transform: translateY(-5px); border-color: rgba(200,164,86,0.3); }
.testimonial-stars { color: var(--accent-gold); margin-bottom: 20px; font-size: 1.1rem; letter-spacing: 3px; }
.testimonial-text { color: var(--text-secondary); font-size: 1.05rem; line-height: 1.9; margin-bottom: 25px; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: 15px; }
.testimonial-avatar {
    width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    display: flex; align-items: center; justify-content: center; font-weight: 900; color: #0A0A0A; font-size: 1.2rem;
}
.testimonial-name { font-weight: 700; color: var(--text-primary); margin-bottom: 2px; }
.testimonial-role { font-size: 0.85rem; color: var(--text-muted); }

/* ═══ Gallery Filter ═══ */
.filter-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-bottom: 40px; }
.filter-btn {
    padding: 10px 28px; border: 1px solid var(--glass-border); background: transparent;
    color: var(--text-secondary); border-radius: 50px; cursor: pointer; font-family: inherit;
    font-size: 0.85rem; font-weight: 600; transition: var(--transition-fast);
}
.filter-btn.active, .filter-btn:hover {
    background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-dark));
    color: #0A0A0A; border-color: var(--accent-gold);
}
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.gallery-item {
    border-radius: 16px; overflow: hidden; position: relative; height: 280px;
    border: 1px solid rgba(255,255,255,0.04); transition: var(--transition-smooth);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .gallery-overlay {
    position: absolute; bottom: 0; width: 100%; padding: 25px 15px 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    color: #fff; text-align: center;
}

/* ═══ Diaries (Stories) ═══ */
.diaries-scroll { display: flex; gap: 20px; overflow-x: auto; padding-bottom: 20px; scroll-snap-type: x mandatory; }
.diaries-scroll::-webkit-scrollbar { height: 6px; }
.diaries-scroll::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 3px; }
.diary-card {
    flex: 0 0 280px; height: 420px; border-radius: 20px; overflow: hidden;
    position: relative; scroll-snap-align: start; border: 1px solid rgba(255,255,255,0.06);
    transition: var(--transition-smooth); cursor: pointer;
}
.diary-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.diary-card:hover img { transform: scale(1.05); }
.diary-card .diary-overlay {
    position: absolute; bottom: 0; width: 100%; padding: 60px 20px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}
.diary-card .diary-brand { color: var(--accent-gold); font-size: 0.75rem; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.diary-card .diary-title { color: #fff; font-weight: 700; font-size: 1rem; }

/* ═══ Processing Cards (Arch Top) ═══ */
.processing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.processing-card {
    background: linear-gradient(160deg, #161616, #0d0d0d);
    border: 1px solid rgba(255,255,255,0.04); border-radius: 24px;
    padding: 50px 35px; text-align: center; transition: var(--transition-smooth);
    position: relative; overflow: hidden;
}
[data-theme="light"] .processing-card { background: #fff; border-color: var(--glass-border); }
.processing-card::before {
    content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
    width: 80px; height: 40px; background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-light));
    border-radius: 0 0 50% 50%; opacity: 0.15;
}
.processing-card:hover { transform: translateY(-8px); border-color: rgba(200,164,86,0.3); box-shadow: 0 25px 60px rgba(0,0,0,0.4); }
.processing-card .p-icon { font-size: 2.5rem; color: var(--accent-gold); margin-bottom: 25px; }
.processing-card h3 { color: var(--text-primary); margin-bottom: 15px; font-size: 1.4rem; }
.processing-card p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 20px; }
.processing-features { list-style: none; }
.processing-features li {
    color: var(--text-muted); font-size: 0.9rem; padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.processing-features li i { color: var(--accent-gold); margin-inline-end: 8px; font-size: 0.7rem; }

/* ═══ Hero 2-Column ═══ */
.hero { min-height: 100vh; position: relative; overflow: hidden; display: flex; align-items: center; background: radial-gradient(ellipse at 30% 50%, var(--bg-card) 0%, var(--bg-secondary) 40%, var(--bg-primary) 100%); }
#canvas-container { position: absolute; top: 0; right: 0; width: 100%; height: 100%; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; position: relative; z-index: 2; }
.hero-content { max-width: 650px; }
.hero-label { color: var(--accent-gold); font-weight: 800; letter-spacing: 6px; font-size: 0.9rem; display: block; margin-bottom: 25px; }
.hero-title { font-size: 5rem; line-height: 1.1; margin-bottom: 25px; font-weight: 900; }
.hero-subtitle { font-size: 1.3rem; color: var(--text-secondary); margin-bottom: 50px; line-height: 1.8; }
.hero-btns { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.hero-link { color: var(--accent-gold); font-weight: 700; font-size: 1rem; letter-spacing: 1px; border-bottom: 1px solid rgba(200,164,86,0.4); padding-bottom: 4px; transition: all 0.3s ease; }
.hero-link:hover { border-bottom-color: var(--accent-gold); }
.hero-image-wrapper { display: flex; justify-content: center; align-items: center; }
.arch-frame {
    width: 420px; height: 520px; border-radius: 210px 210px 20px 20px;
    overflow: hidden; border: 2px solid var(--glass-border);
    box-shadow: 0 30px 80px rgba(0,0,0,0.6), 0 0 60px rgba(200,164,86,0.1);
    position: relative;
}
.arch-frame img { width: 100%; height: 100%; object-fit: cover; }

/* ═══ Contact Form ═══ */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 60px; align-items: start; }
.contact-info-item { display: flex; gap: 18px; margin-bottom: 30px; }
.contact-info-item i { color: var(--accent-gold); font-size: 1.5rem; margin-top: 5px; }
.form-control {
    width: 100%; padding: 15px 20px; background: rgba(10,10,10,0.8); border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary); border-radius: 14px; margin-bottom: 16px; font-family: inherit; font-size: 0.95rem;
    transition: var(--transition-fast); outline: none;
}
[data-theme="light"] .form-control { background: #f8f6f2; border-color: var(--glass-border); color: var(--text-primary); }
.form-control:focus { border-color: var(--accent-gold); box-shadow: 0 0 0 3px rgba(200,164,86,0.1); }

/* ═══ Journey Timeline ═══ */
.journey-timeline { position: relative; max-width: 1000px; margin: 0 auto; }
.journey-timeline::before { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--glass-border); transform: translateX(-50%); }
.journey-step { display: flex; position: relative; margin-bottom: 60px; padding-inline-start: 50%; justify-content: flex-start; }
.journey-step:nth-child(even) { padding-inline-start: 0; padding-inline-end: 50%; justify-content: flex-end; }
.journey-card { width: 85%; background: var(--bg-card); padding: 30px; border-radius: 20px; border: 1px solid var(--glass-border); position: relative; z-index: 2; backdrop-filter: blur(10px); overflow: hidden; margin-inline-start: 30px; }
.journey-step:nth-child(even) .journey-card { margin-inline-start: 0; margin-inline-end: 30px; }
[data-theme="light"] .journey-card { background: rgba(255,255,255,0.95); }
.journey-card-img { width: 100%; height: 180px; object-fit: cover; border-radius: 12px; margin-bottom: 20px; }
.journey-step::after { content: ''; position: absolute; left: calc(50% - 10px); top: 40px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent-gold); border: 4px solid var(--bg-primary); z-index: 3; box-shadow: 0 0 15px rgba(200,164,86,0.4); }

/* ═══ Footer Islamic Pattern ═══ */
.site-footer {
    background: #050505; padding: 80px 0 0; border-top: 1px solid rgba(255,255,255,0.04);
    position: relative; overflow: hidden;
}
.site-footer::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-image: 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='%23d4af37' 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");
    opacity: 0.5; pointer-events: none;
}

/* ═══ Responsive ═══ */
@media (max-width: 1024px) {
    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-content { max-width: 100%; }
    .hero-image-wrapper { display: flex; margin-top: 40px; }
    .arch-frame { width: 300px; height: 380px; border-radius: 150px 150px 20px 20px; }
    .hero-title { font-size: 3.5rem; }
    .hero-btns { justify-content: center; }
    .heritage-grid { grid-template-columns: 1fr; gap: 40px; }
    .heritage-image { height: 400px; }
    .contact-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-wrap: wrap; }
    .stat-item { min-width: 45%; }
    .section-header h2 { font-size: 2.8rem; }
}
@media (max-width: 768px) {
    .section-padding { padding: 80px 0; }
    .section-header { margin-bottom: 50px; }
    .section-header h2 { font-size: 2.2rem; }
    .feature-grid, .processing-grid, .testimonial-grid { grid-template-columns: 1fr; }
    .journey-timeline::before { left: 0; }
    .journey-step, .journey-step:nth-child(even) { padding: 0 0 0 40px !important; justify-content: flex-start !important; }
    .journey-card { width: 100%; }
    .journey-step::after, .journey-step:nth-child(even)::after { left: -10px !important; right: auto !important; }
    [dir="rtl"] .journey-timeline::before { left: auto; right: 0; }
    [dir="rtl"] .journey-step, [dir="rtl"] .journey-step:nth-child(even) { padding: 0 40px 0 0 !important; }
    [dir="rtl"] .journey-step::after, [dir="rtl"] .journey-step:nth-child(even)::after { right: -10px !important; left: auto !important; }
    .stat-value { font-size: 2.5rem; }
    .stats-bar { flex-wrap: wrap; }
    .stat-item { min-width: 45%; }
    .diary-card { flex: 0 0 240px; height: 360px; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}

/* ═══ Scrollbar & Selection ═══ */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #0A0A0A; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); }
::selection { background: var(--accent-gold); color: #0A0A0A; }
