/* ============================================
   global.css --- version 2.2 --- redrose
   Zaitun Mehendi - Global CSS
   Core Variables, Reset, and Base Styles
   Islamic Theme with Modern Approach
   Updated with Clock Variables & Modern Link Effects
   ============================================ */

/* ===== CSS Variables (Design System) ===== */
:root {
  /* Primary Color Palette - Islamic Inspired */
  --olive-50: #F4F7F2;
  --olive-100: #E8EFE5;
  --olive-200: #D1DFCB;
  --olive-300: #B3C9A9;
  --olive-400: #8DAE7E;
  --olive-500: #6B8E5C;
  --olive-600: #4F7042;
  --olive-700: #2F4F2F;      /* Primary - Deep Islamic Green */
  --olive-800: #1A3A1A;
  --olive-900: #0C260C;
  
  /* Gold/Amber Accents - Islamic Luxury */
  --gold-50: #FDF8E7;
  --gold-100: #FCF1CF;
  --gold-200: #FAE3A0;
  --gold-300: #F7D570;
  --gold-400: #F5C641;
  --gold-500: #D4AF37;       /* Primary Gold - Islamic Motif */
  --gold-600: #B38F2C;
  --gold-700: #8F6F22;
  --gold-800: #6B4F19;
  --gold-900: #473010;
  
  /* Cream/Off-White - Backgrounds */
  --cream-50: #FFFDF9;
  --cream-100: #FEFBF5;
  --cream-200: #FDF9F0;      /* Primary Cream */
  --cream-300: #FCF5E6;
  --cream-400: #FBF2DC;
  --cream-500: #FAEED2;
  
  /* Ink/Dark Colors - Text */
  --ink-900: #1E1E1E;
  --ink-800: #2D2D2D;
  --ink-700: #3D3D3D;
  --ink-600: #5C5C5C;
  --ink-500: #7A7A7A;
  --ink-400: #999999;
  --ink-300: #B8B8B8;
  --ink-200: #D6D6D6;
  --ink-100: #F5F5F5;
  
  /* Semantic Colors */
  --success: #27AE60;
  --warning: #F39C12;
  --error: #E74C3C;
  --info: #3498DB;
  
  /* Clock Specific Colors */
  --clock-bg: rgba(255, 255, 255, 0.9);
  --clock-border: rgba(212, 175, 55, 0.2);
  --clock-shadow: rgba(47, 79, 47, 0.15);
  --clock-icon-bg: linear-gradient(135deg, var(--olive-700), var(--olive-800));
  --clock-icon-color: var(--gold-400);
  --clock-time-color: var(--olive-900);
  --clock-colon-color: var(--gold-600);
  --clock-ampm-bg: var(--olive-100);
  --clock-ampm-color: var(--olive-800);
  --clock-date-bg: rgba(212, 175, 55, 0.05);
  --clock-date-border: rgba(212, 175, 55, 0.15);
  --clock-date-icon: var(--gold-600);
  
  /* Spacing System (8px base) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 40px;
  --space-9: 48px;
  --space-10: 56px;
  --space-11: 64px;
  --space-12: 80px;
  
  /* Typography */
  --font-primary: 'Anek Bangla', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-size-xs: 0.75rem;    /* 12px */
  --font-size-sm: 0.875rem;    /* 14px */
  --font-size-base: 1rem;      /* 16px */
  --font-size-lg: 1.125rem;    /* 18px */
  --font-size-xl: 1.25rem;     /* 20px */
  --font-size-2xl: 1.5rem;     /* 24px */
  --font-size-3xl: 1.875rem;   /* 30px */
  --font-size-4xl: 2.25rem;    /* 36px */
  --font-size-5xl: 3rem;       /* 48px */
  
  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  
  /* Line Heights */
  --line-tight: 1.2;
  --line-normal: 1.5;
  --line-relaxed: 1.7;
  
  /* Borders & Radii */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-3xl: 24px;
  --radius-full: 9999px;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.12);
  --shadow-2xl: 0 20px 40px rgba(0, 0, 0, 0.15);
  --shadow-clock: 0 15px 35px rgba(47, 79, 47, 0.15);
  --shadow-clock-hover: 0 20px 40px rgba(47, 79, 47, 0.2);
  
  /* Islamic Pattern Opacity */
  --pattern-opacity-light: 0.03;
  --pattern-opacity-medium: 0.05;
  --pattern-opacity-heavy: 0.08;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --transition-smooth: 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --transition-clock: 400ms cubic-bezier(0.175, 0.885, 0.32, 1.275);
  
  /* Z-index layers */
  --z-below: -1;
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 100;
  --z-modal: 1000;
  --z-toast: 2000;
  --z-tooltip: 3000;
  --z-clock: 5;
  --z-lightbox: 10000;
}

/* ===== Dark Mode Support (Optional) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --cream-50: #1A1A1A;
    --cream-100: #2D2D2D;
    --cream-200: #3D3D3D;
    --ink-900: #F5F5F5;
    --ink-800: #E0E0E0;
    --ink-700: #CCCCCC;
    --ink-600: #B8B8B8;
    --ink-500: #A3A3A3;
    
    /* Clock dark mode adjustments */
    --clock-bg: rgba(45, 45, 45, 0.95);
    --clock-border: rgba(212, 175, 55, 0.3);
    --clock-shadow: rgba(0, 0, 0, 0.3);
    --clock-time-color: var(--gold-300);
    --clock-ampm-bg: var(--olive-800);
    --clock-ampm-color: var(--gold-200);
  }
  
  body {
    background: var(--cream-100);
    color: var(--ink-800);
  }
  
  .card, .product-card, .testimonial-card {
    background: var(--cream-200);
  }
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  line-height: var(--line-normal);
  color: var(--ink-800);
  background: var(--cream-100);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* ===== Modern Link Styles (Global) ===== */
a {
  color: var(--olive-700);
  text-decoration: none;
  transition: all var(--transition-smooth);
  position: relative;
  cursor: pointer;
}

/* Animated underline for text links */
a:not(.btn):not(.card):not(.product-card):not(.design-card):not(.instagram-card):not(.feature-card):not(.btn-whatsapp):not(.filter-pill):not(.badge):not(.logo)::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--gold-500), var(--olive-600));
  transition: width var(--transition-smooth);
  border-radius: var(--radius-sm);
  opacity: 0.8;
}

a:not(.btn):not(.card):not(.product-card):not(.design-card):not(.instagram-card):not(.feature-card):not(.btn-whatsapp):not(.filter-pill):not(.badge):not(.logo):hover::after {
  width: 100%;
}

a:not(.btn):not(.card):not(.product-card):not(.design-card):not(.instagram-card):not(.feature-card):not(.btn-whatsapp):not(.filter-pill):not(.badge):not(.logo):hover {
  color: var(--gold-600);
  transform: translateY(-1px);
}

/* Remove underline on active state */
a:active {
  outline: none;
  text-decoration: none;
}

/* Focus state for accessibility */
a:focus-visible {
  outline: 2px solid var(--gold-500);
  outline-offset: 4px;
  border-radius: var(--radius-sm);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-bold);
  line-height: var(--line-tight);
  color: var(--olive-900);
  margin-bottom: var(--space-4);
}

h1 {
  font-size: var(--font-size-5xl);
}

h2 {
  font-size: var(--font-size-4xl);
}

h3 {
  font-size: var(--font-size-3xl);
}

h4 {
  font-size: var(--font-size-2xl);
}

h5 {
  font-size: var(--font-size-xl);
}

h6 {
  font-size: var(--font-size-lg);
}

p {
  margin-bottom: var(--space-4);
  line-height: var(--line-relaxed);
}

/* ===== Container System ===== */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.container-fluid {
  width: 100%;
  padding: 0 var(--space-4);
}

/* ===== Grid System ===== */
.grid {
  display: grid;
  gap: var(--space-4);
}

.grid-cols-1 { grid-template-columns: 1fr; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ===== Flexbox Utilities ===== */
.flex {
  display: flex;
}

.flex-col {
  flex-direction: column;
}

.items-center {
  align-items: center;
}

.justify-center {
  justify-content: center;
}

.justify-between {
  justify-content: space-between;
}

.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-5 { gap: var(--space-5); }
.gap-6 { gap: var(--space-6); }

/* ===== Card Styles ===== */
.card {
  background: white;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-bounce);
  border: 1px solid rgba(212, 175, 55, 0.1);
}

.card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px) scale(1.02);
  border-color: var(--gold-300);
}

/* ===== Button Styles ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-full);
  font-weight: var(--font-semibold);
  font-size: var(--font-size-base);
  line-height: 1;
  border: none;
  cursor: pointer;
  transition: all var(--transition-bounce);
  text-decoration: none;
  white-space: nowrap;
  min-width: 44px;
  min-height: 44px;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
  z-index: 0;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn > * {
  position: relative;
  z-index: 1;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--font-size-sm);
  min-height: 36px;
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--font-size-lg);
  min-height: 52px;
}

.btn-primary {
  background: var(--olive-700);
  color: white;
  box-shadow: 0 8px 20px rgba(47, 79, 47, 0.3);
}

.btn-primary:hover {
  background: var(--olive-800);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 30px rgba(47, 79, 47, 0.4);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

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

.btn-outline:hover {
  background: var(--olive-50);
  border-color: var(--olive-800);
  transform: translateY(-3px) scale(1.02);
}

.btn-outline:active {
  transform: translateY(0) scale(0.98);
}

/* ===== Badge Styles ===== */
.badge {
  display: inline-block;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-medium);
  line-height: 1;
  transition: all var(--transition-base);
}

.badge:hover {
  transform: translateY(-2px);
}

.badge-primary {
  background: var(--olive-100);
  color: var(--olive-700);
  border: 1px solid var(--olive-300);
}

.badge-gold {
  background: var(--gold-100);
  color: var(--gold-800);
  border: 1px solid var(--gold-300);
}

/* ===== Form Elements ===== */
input,
textarea,
select {
  font-family: var(--font-primary);
  font-size: var(--font-size-base);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--ink-300);
  border-radius: var(--radius-md);
  width: 100%;
  transition: all var(--transition-base);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--gold-500);
  box-shadow: 0 0 0 4px rgba(212, 175, 55, 0.15);
  transform: translateY(-1px);
}

/* ===== Loading States ===== */
.loading-spinner {
  display: inline-block;
  width: 40px;
  height: 40px;
  border: 3px solid var(--cream-300);
  border-top-color: var(--gold-500);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== Toast Notifications ===== */
.toast {
  background: white;
  color: var(--ink-800);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  min-width: 280px;
  max-width: 400px;
  border-left: 4px solid;
  animation: slideIn 0.4s var(--transition-bounce);
}

.toast-success { border-left-color: var(--success); }
.toast-error { border-left-color: var(--error); }
.toast-info { border-left-color: var(--info); }
.toast-warning { border-left-color: var(--warning); }

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.toast-hide {
  animation: slideOut 0.4s var(--transition-bounce) forwards;
}

@keyframes slideOut {
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* ===== Empty/Error States ===== */
.empty-state,
.error-state {
  text-align: center;
  padding: var(--space-8);
  color: var(--ink-500);
  transition: all var(--transition-base);
}

.empty-state:hover,
.error-state:hover {
  transform: translateY(-5px);
}

.empty-state i,
.error-state i {
  font-size: 3rem;
  margin-bottom: var(--space-4);
  color: var(--ink-300);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ===== Accessibility ===== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus visible for keyboard navigation */
:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
}

/* ===== Print Styles ===== */
@media print {
  .no-print {
    display: none !important;
  }
  
  a[href]::after {
    content: " (" attr(href) ")";
  }
}

/* ===== Utility Classes ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: var(--olive-700); }
.text-gold { color: var(--gold-500); }
.text-error { color: var(--error); }
.text-success { color: var(--success); }

.bg-primary { background: var(--olive-700); }
.bg-gold { background: var(--gold-500); }
.bg-cream { background: var(--cream-200); }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
.shadow-clock { box-shadow: var(--shadow-clock); }
.shadow-clock:hover { box-shadow: var(--shadow-clock-hover); }

.m-0 { margin: 0; }
.p-0 { padding: 0; }

.w-full { width: 100%; }
.h-full { height: 100%; }

/* Animation Utilities */
.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin 3s linear infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.05); }
}

/* Hide scrollbar but keep functionality */
.hide-scrollbar {
  -ms-overflow-style: none;
  scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Clock Specific Utilities */
.clock-pulse {
  animation: clockPulse 1.5s ease-in-out infinite;
}

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