/* ==========================================================================
   INSURANCEPRO v3 — COMMERCIAL DESIGN SYSTEM & TOKENS
   Inspired by Stripe, Linear, Vercel, Framer & Intercom
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Brand Palette — Wafa Inspired Green & Accent Gold for ASTATI ET FILS */
  --color-primary: #16803d;
  --color-primary-hover: #15803d;
  --color-primary-active: #166534;
  --color-primary-light: #f0fdf4;
  --color-primary-subtle: rgba(22, 128, 61, 0.08);

  /* Neutrals (Slate/Zinc Blend) */
  --color-dark: #0f172a;
  --color-slate-900: #0f172a;
  --color-slate-800: #1e293b;
  --color-slate-700: #334155;
  --color-slate-600: #475569;
  --color-slate-500: #64748b;
  --color-slate-400: #94a3b8;
  --color-slate-300: #cbd5e1;
  --color-slate-200: #e2e8f0;
  --color-slate-100: #f1f5f9;
  --color-slate-50: #f8fafc;
  --color-white: #ffffff;

  /* Accent & Semantic Tokens */
  --color-success: #10b981;
  --color-success-light: #ecfdf5;
  --color-warning: #f59e0b;
  --color-danger: #ef4444;

  /* Typography Scale */
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Radius Scale */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Linear/Stripe Elevation & Shadows */
  --shadow-xs: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(15, 23, 42, 0.08), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08), 0 2px 6px -1px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 24px -4px rgba(15, 23, 42, 0.08), 0 4px 8px -2px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 32px -8px rgba(15, 23, 42, 0.12), 0 8px 16px -4px rgba(15, 23, 42, 0.06);
  --shadow-hover: 0 24px 40px -10px rgba(15, 23, 42, 0.14), 0 12px 20px -6px rgba(11, 94, 215, 0.08);

  /* Transitions */
  --transition-fast: all 0.15s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --------------------------------------------------------------------------
   2. GLOBAL BASE & RESET
   -------------------------------------------------------------------------- */
html {
  scroll-behavior: smooth;
  font-family: var(--font-sans);
  color: var(--color-slate-800);
  background-color: var(--color-slate-50);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  color: var(--color-slate-900);
  letter-spacing: -0.025em;
  line-height: 1.2;
}

p {
  line-height: 1.6;
}

/* Accessible Focus States */
:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* --------------------------------------------------------------------------
   3. LAYOUT CONTAINERS
   -------------------------------------------------------------------------- */
.container-custom {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* Glassmorphism Navigation Bar */
.glass-header {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.8);
}

.glass-header-scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  border-bottom-color: rgba(203, 213, 225, 0.6);
}

/* --------------------------------------------------------------------------
   4. SYSTEM BUTTON COMPONENT
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1.25rem;
  padding: 0.75rem 1.5rem;
  min-height: 44px; /* Accessible Touch Target */
  border-radius: var(--radius-md);
  transition: var(--transition-fast);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: 1px solid transparent;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(11, 94, 215, 0.25);
}

.btn-primary:active {
  background-color: var(--color-primary-active);
  transform: translateY(0);
}

.btn-secondary {
  background-color: var(--color-white);
  color: var(--color-slate-800);
  border: 1px solid var(--color-slate-200);
  box-shadow: var(--shadow-xs);
}

.btn-secondary:hover {
  background-color: var(--color-slate-100);
  border-color: var(--color-slate-300);
  color: var(--color-slate-900);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-slate-600);
  border: 1px solid transparent;
}

.btn-ghost:hover {
  background-color: var(--color-slate-100);
  color: var(--color-slate-900);
}

/* --------------------------------------------------------------------------
   5. CARDS & ELEVATIONS
   -------------------------------------------------------------------------- */
.card-hover {
  background: var(--color-white);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-xl);
  transition: var(--transition-normal);
  box-shadow: var(--shadow-xs);
  position: relative;
  overflow: hidden;
}

.card-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary) 0%, #3b82f6 100%);
  opacity: 0;
  transition: var(--transition-fast);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(11, 94, 215, 0.2);
}

.card-hover:hover::before {
  opacity: 1;
}

/* Badge Pills */
.badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid rgba(11, 94, 215, 0.15);
}

/* --------------------------------------------------------------------------
   6. FORM INPUTS & CONTROLS
   -------------------------------------------------------------------------- */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-slate-200);
  background-color: var(--color-white);
  color: var(--color-slate-900);
  font-size: 0.875rem;
  font-family: var(--font-sans);
  transition: var(--transition-fast);
  outline: none;
  box-shadow: var(--shadow-xs);
}

.form-input::placeholder {
  color: var(--color-slate-400);
}

.form-input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(11, 94, 215, 0.15);
}

/* --------------------------------------------------------------------------
   7. ACCORDION & FAQ INTERACTIVE STYLES
   -------------------------------------------------------------------------- */
.faq-accordion-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  text-align: left;
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--color-slate-900);
  cursor: pointer;
  background: transparent;
  border: none;
  transition: var(--transition-fast);
}

.faq-accordion-header:hover {
  color: var(--color-primary);
}

.faq-accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1), padding 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 1.5rem;
  color: var(--color-slate-600);
  font-size: 0.875rem;
  line-height: 1.6;
}

.faq-accordion-content.open {
  max-height: 500px;
  padding-bottom: 1.25rem;
}

/* --------------------------------------------------------------------------
   8. BACKGROUND PATTERNS & GRADIENTS
   -------------------------------------------------------------------------- */
.bg-grid-pattern {
  background-image: radial-gradient(rgba(148, 163, 184, 0.18) 1px, transparent 1px);
  background-size: 24px 24px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--color-slate-900) 0%, var(--color-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ==========================================================================
   9. MOBILE DRAWER & PHONE MENU STYLING (SOLID OPAQUE COLOR)
   ========================================================================== */
#mobile-drawer {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  z-index: 9999 !important;
  isolation: isolate !important; /* Isolates stacking context from glass-header backdrop filter */
}

#mobile-drawer.translate-x-full {
  pointer-events: none !important;
}

#mobile-drawer:not(.translate-x-full) {
  pointer-events: auto !important;
}

#drawer-overlay {
  position: absolute !important;
  inset: 0 !important;
  background-color: rgba(15, 23, 42, 0.75) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

/* Phone Menu Content Panel — Guaranteed 100% Solid Opaque Background */
.mobile-drawer-panel,
#mobile-drawer-panel,
#mobile-drawer > div:not(#drawer-overlay) {
  position: relative !important;
  background-color: #ffffff !important; /* Solid opaque white */
  background-image: none !important;
  opacity: 1 !important;
  box-shadow: -12px 0 36px rgba(15, 23, 42, 0.25) !important;
  border-left: 1px solid var(--color-slate-200) !important;
  color: var(--color-slate-800) !important;
  z-index: 20 !important;
  isolation: isolate !important;
}

/* ==========================================================================
   10. ACCESSIBILITY, FOCUS STATES & REDUCED MOTION
   ========================================================================== */
:focus-visible {
  outline: 2px solid var(--color-primary) !important;
  outline-offset: 2px !important;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--color-dark);
  color: var(--color-white);
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.875rem;
  text-decoration: none;
  box-shadow: var(--shadow-lg);
  transition: top 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.skip-link:focus {
  top: 1rem;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

