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

:root {
  --primary-green: #0A6C3E;
  --accent-green: #10B981;
  --emergency-red: #E30613;
  --light-beige: #F8F1E9;
}

body {
  font-family: 'Tajawal', 'Noto Sans Arabic', sans-serif;
  direction: rtl;
  background-color: var(--light-beige) !important;
  overflow-x: hidden;
}

/* Fallback for English Mode */
body.en-font {
  font-family: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #085c34;
}

/* Custom Colors & Utilities */
.bg-primary-green { background-color: var(--primary-green) !important; }
.text-primary-green { color: var(--primary-green) !important; }
.bg-accent-green { background-color: var(--accent-green) !important; }
.text-accent-green { color: var(--accent-green) !important; }
.bg-emergency-red { background-color: var(--emergency-red) !important; }
.text-emergency-red { color: var(--emergency-red) !important; }
.bg-beige { background-color: var(--light-beige) !important; }

/* Cinematic / Emotional Enhancements */
.cinematic-shadow {
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.cinematic-shadow-hover:hover {
  box-shadow: 0 25px 50px rgba(0,0,0,0.15);
}

.gradient-overlay-dark {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 100%);
}

.gradient-overlay-primary {
  position: absolute;
  inset: 0;
  background: linear-gradient(to left, rgba(10, 108, 62, 0.95), rgba(10, 108, 62, 0.7), transparent);
}
html[dir="ltr"] .gradient-overlay-primary {
  background: linear-gradient(to right, rgba(10, 108, 62, 0.95), rgba(10, 108, 62, 0.7), transparent);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fadeIn { animation: fadeIn 0.3s ease-out; }

@keyframes pulse-custom {
  0%, 100% { opacity: 1; }
  50% { opacity: .5; }
}
.animate-pulse-custom { animation: pulse-custom 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes bounce-custom {
  0%, 100% { transform: translateY(-25%); animation-timing-function: cubic-bezier(0.8,0,1,1); }
  50% { transform: none; animation-timing-function: cubic-bezier(0,0,0.2,1); }
}
.animate-bounce-custom { animation: bounce-custom 1s infinite; }

/* Custom Components */
.hero-section {
    position: relative;
    min-height: 100vh;
    padding-top: 4rem;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url('../../public/images/hero-bg.jpg');
}

.glass-panel {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.zakat-badge {
    border: 2px solid #fbbf24;
}

.card-hover-up {
    transition: transform 0.3s, box-shadow 0.3s;
}
.card-hover-up:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.img-hover-scale {
    transition: transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}
.card-hover-up:hover .img-hover-scale {
    transform: scale(1.08);
}

.border-r-4-primary { border-right: 4px solid var(--primary-green); }
.border-r-4-accent { border-right: 4px solid var(--accent-green); }

/* In LTR fix borders */
html[dir="ltr"] .border-r-4-primary { border-right: none; border-left: 4px solid var(--primary-green); }
html[dir="ltr"] .border-r-4-accent { border-right: none; border-left: 4px solid var(--accent-green); }

.story-active {
    background-color: var(--primary-green) !important;
    color: white !important;
}

.nav-link {
    color: #4a5568 !important;
    font-weight: 500;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--primary-green) !important;
}

.custom-btn-primary {
    background-color: var(--emergency-red);
    color: white;
    font-weight: 800;
    border: none;
    transition: all 0.3s;
}
.custom-btn-primary:hover {
    background-color: #b91c1c;
    color: white;
    transform: scale(1.02);
}

.counter-number {
    font-variant-numeric: tabular-nums;
}

/* Modals */
.modal {
    backdrop-filter: blur(4px);
}
.cursor-pointer {
    cursor: pointer;
}

/* Utility to ensure text remains readable over images */
.text-shadow-strong {
  text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}
