/* ☪ Nama Barishab Islamic Fund Limited - Design System */

:root {
  /* Color Palette */
  --primary: #059669;
  --primary-dark: #064E3B;
  --accent: #D4A843;
  --bg-light: #FEFCF3;
  --bg-dark: #1A1A2E;
  --text-primary: #1E293B;
  --text-light: #64748B;
  --success: #14B8A6;
  --cta: #F97316;
  --white: #FFFFFF;
  --black: #000000;

  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.3);
  --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);

  /* Spacing */
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 2rem;
  --spacing-xl: 4rem;

  /* Typography Base */
  --font-heading: 'Playfair Display', serif;
  --font-body: 'Inter', sans-serif;
}

/* RTL Support Base */
[dir="rtl"] {
  --font-heading: 'Noto Sans Arabic', sans-serif;
  --font-body: 'Noto Kufi Arabic', sans-serif;
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Premium Glow Border - Page Edge Finishing */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  box-shadow:
    inset 3px 0 15px rgba(5, 150, 105, 0.25),
    inset -3px 0 15px rgba(5, 150, 105, 0.25),
    inset 0 3px 15px rgba(5, 150, 105, 0.15),
    inset 0 -3px 15px rgba(212, 168, 67, 0.2);
  pointer-events: none;
  z-index: 9999;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--primary-dark);
  margin-bottom: var(--spacing-md);
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Layout Utilities */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.section-padding {
  padding-top: var(--spacing-xl);
  padding-bottom: var(--spacing-xl);
}

/* Typography Utilities */
.text-center { text-align: center; }
.section-title {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background-color: var(--accent);
}
[dir="rtl"] .section-title::after {
    left: 50%;
    transform: translateX(50%);
}
.section-subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
  margin-bottom: var(--spacing-xl);
}

/* Components */
.btn {
  display: inline-block;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-align: center;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
}

.btn-cta {
  background-color: var(--cta);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(249, 115, 22, 0.3);
}

.btn-cta:hover {
  background-color: #ea580c;
  transform: translateY(-2px);
}

.btn-outline {
  background-color: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-outline:hover {
  background-color: var(--primary);
  color: var(--white);
}

.glass-card {
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.05);
  box-shadow: 0 10px 30px rgba(0,0,0,0.08);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}

.glass-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(5, 150, 105, 0.15);
}

/* Navigation */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-md) 0;
  background-color: rgba(254, 252, 243, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  z-index: 1000;
  transition: padding 0.3s ease;
}

.navbar.scrolled {
  padding: var(--spacing-sm) 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.logo-img {
  width: 45px;
  height: 45px;
  object-fit: contain;
  border-radius: 8px;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logo-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.logo-tagline {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.footer-logo {
  color: white;
  margin-bottom: 10px;
}

.footer-logo .logo-name {
  color: white;
}

.footer-logo .logo-tagline {
  color: var(--accent);
}

/* Nav Login Button */
.nav-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  font-family: var(--font-body);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(5, 150, 105, 0.25);
  margin-left: 10px;
}

.nav-login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
  background: linear-gradient(135deg, var(--primary-dark), #022c22);
}

.nav-login-btn i {
  font-size: 0.8rem;
}

/* Hero Badge */
.hero-badge {
  display: inline-block;
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(212, 168, 67, 0.15));
  color: var(--primary-dark);
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  border: 1px solid rgba(5, 150, 105, 0.2);
  backdrop-filter: blur(10px);
  animation: fadeInDown 0.8s ease;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-links {
  display: flex;
  gap: var(--spacing-lg);
  align-items: center;
}

.nav-links a {
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary);
  transition: width 0.3s ease;
}

[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Language Switcher */
.lang-switcher {
  position: relative;
  cursor: pointer;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 5px;
  background-color: rgba(5, 150, 105, 0.1);
  color: var(--primary-dark);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--white);
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 10px 0;
  min-width: 150px;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

.lang-switcher:hover .lang-dropdown {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.lang-dropdown li {
  padding: 8px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background-color 0.2s;
}

.lang-dropdown li:hover {
  background-color: rgba(5, 150, 105, 0.05);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 120px;
  padding-bottom: 120px; /* Added padding to prevent overlap with stats */
  background: linear-gradient(135deg, rgba(254, 252, 243, 0.9) 0%, rgba(254, 252, 243, 0.7) 100%);
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-size: 3.5rem;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--primary-dark);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: var(--spacing-lg);
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-md);
}

/* Stats Section */
.stats {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--primary-dark);
  padding: var(--spacing-xl) 2rem;
  margin-top: -100px;
  position: relative;
  border-radius: 24px;
  z-index: 10;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-lg);
  text-align: center;
  position: relative;
  z-index: 2;
}

.stat-item h3 {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 5px;
  font-family: var(--font-body);
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-item p {
  font-size: 1.05rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Force 4 columns on desktop */
  gap: var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.service-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 100%;
}

[dir="rtl"] .service-card {
    text-align: right;
}

.service-img-wrapper {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.service-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.service-card:hover .service-img {
  transform: scale(1.05);
}

.service-icon-floating {
  position: absolute;
  bottom: -25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background-color: var(--primary);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 10px 20px rgba(5, 150, 105, 0.3);
  z-index: 2;
  border: 4px solid var(--white);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

[dir="rtl"] .service-icon-floating {
    right: auto;
    left: 25px;
}

.service-card:hover .service-icon-floating {
    transform: rotateY(180deg);
    background-color: var(--accent);
}

.service-content {
  padding: 2.5rem 1.5rem 1.5rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: var(--spacing-sm);
  color: var(--primary-dark);
}

.service-card p {
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* About Section */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.about-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-item i {
  color: var(--success);
  margin-top: 5px;
  font-size: 1.1rem;
}

.feature-item span {
  line-height: 1.6;
}

/* Footer */
footer {
  background: linear-gradient(to bottom, #111827, #030712);
  color: var(--white);
  padding: 3rem 0 2rem; /* Reduced top padding from 6rem to 3rem */
  position: relative;
  border-top: 5px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
  gap: var(--spacing-xl);
  margin-bottom: var(--spacing-xl);
}

.footer-col h3 {
  color: var(--white);
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.footer-col h3::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 2px;
  background-color: var(--accent);
}

[dir="rtl"] .footer-col h3::after {
    left: auto;
    right: 0;
}

.footer-links li {
  margin-bottom: 12px;
  transition: transform 0.3s ease;
}

.footer-links li:hover {
  transform: translateX(5px);
}

[dir="rtl"] .footer-links li:hover {
  transform: translateX(-5px);
}

.footer-links a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Footer Contact Info */
.contact-info li {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  line-height: 1.5;
}

.contact-info li:hover {
  transform: none; /* disable shift for contact info */
}

.icon-box {
  background-color: rgba(212, 168, 67, 0.1);
  color: var(--accent);
  width: 35px;
  height: 35px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Newsletter */
.newsletter-form {
  display: flex;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  padding: 5px;
}

.newsletter-input {
  flex-grow: 1;
  background: transparent;
  border: none;
  padding: 10px 15px;
  color: white;
  outline: none;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.newsletter-btn {
  padding: 10px 20px;
  border-radius: 50px;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.9rem;
}
