/* ==========================================================================
   ASHRAFUL MADARIS - আধুনিক ইসলামী ওয়েব পোর্টাল
   ========================================================================== */

@import url('https://fonts.maateen.me/solaiman-lipi/font.css');
@import url('https://fonts.googleapis.com/css2?family=Amiri:ital,wght@0,400;0,700;1,400&family=Hind+Siliguri:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

/* SolaimanLipi Local & Web Font Fallback */
@font-face {
  font-family: 'SolaimanLipi';
  font-style: normal;
  font-weight: 400;
  src: local('SolaimanLipi'), local('Solaiman Lipi'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-normal-v1.0.woff2') format('woff2'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-normal-v1.0.ttf') format('truetype');
  font-display: swap;
}

@font-face {
  font-family: 'SolaimanLipi';
  font-style: normal;
  font-weight: 700;
  src: local('SolaimanLipi Bold'), local('SolaimanLipi'), local('Solaiman Lipi'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.woff2') format('woff2'),
       url('https://fonts.maateen.me/solaiman-lipi/solaimanlipi-bold-v1.0.ttf') format('truetype');
  font-display: swap;
}

:root {
  /* Color Palette - Light Mode */
  --primary: #0d7857;
  --primary-hover: #0a6045;
  --primary-light: #e6f5ef;
  --primary-ring: rgba(13, 120, 87, 0.25);
  
  --accent-gold: #d97706;
  --accent-gold-light: #fef3c7;
  --accent-teal: #0284c7;
  
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --bg-card-subtle: #f1f5f9;
  --bg-header: rgba(255, 255, 255, 0.92);
  
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-inverse: #ffffff;
  
  --border-color: rgba(15, 23, 42, 0.08);
  --border-strong: rgba(15, 23, 42, 0.16);
  --border-primary: rgba(13, 120, 87, 0.25);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 14px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.12), 0 4px 12px -2px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 16px 36px -6px rgba(13, 120, 87, 0.18);
  
  /* Fonts */
  --font-bangla: 'SolaimanLipi', 'Solaiman Lipi', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-arabic: 'Amiri', serif;
  --font-english: 'Outfit', sans-serif;
  
  /* Layout */
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --transition: all 0.24s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark Mode Theme */
[data-theme="dark"] {
  --primary: #10b981;
  --primary-hover: #34d399;
  --primary-light: rgba(16, 185, 129, 0.14);
  --primary-ring: rgba(16, 185, 129, 0.35);
  
  --accent-gold: #fbbf24;
  --accent-gold-light: rgba(251, 191, 36, 0.14);
  
  --bg-main: #0b151b;
  --bg-card: #13242e;
  --bg-card-subtle: #192d38;
  --bg-header: rgba(11, 21, 27, 0.94);
  
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --text-inverse: #0b151b;
  
  --border-color: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --border-primary: rgba(16, 185, 129, 0.3);
  
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.5);
  --shadow-hover: 0 16px 36px rgba(16, 185, 129, 0.22);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-bangla);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Islamic Geometric Background Pattern Overlay */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.025;
  background-image: radial-gradient(var(--primary) 1px, transparent 1px), radial-gradient(var(--primary) 1px, transparent 1px);
  background-size: 40px 40px;
  background-position: 0 0, 20px 20px;
}

[data-theme="dark"] body::before {
  opacity: 0.04;
}

a {
  color: inherit;
  text-decoration: none;
  transition: var(--transition);
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: transparent;
}

button {
  cursor: pointer;
  user-select: none;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
}

/* Typography Utilities */
.arabic-text {
  font-family: var(--font-arabic);
  direction: rtl;
  font-size: 1.45rem;
  line-height: 2.2;
}

.eng-text {
  font-family: var(--font-english);
}

/* Container */
.container {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
  z-index: 1;
}

.container-narrow {
  max-width: 1080px;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  font-size: 0.825rem;
  font-weight: 600;
  line-height: 1;
}

.badge-primary {
  background-color: var(--primary-light);
  color: var(--primary);
  border: 1px solid var(--border-primary);
}

.badge-gold {
  background-color: var(--accent-gold-light);
  color: var(--accent-gold);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.25rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(13, 120, 87, 0.25);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
}

.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.btn-icon:hover {
  color: var(--primary);
  border-color: var(--border-primary);
  background-color: var(--primary-light);
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  opacity: 0.4;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}
