/* ═══════════════════════════════════════════════════════════════
   WNA Tax Platform — Modern UI Styles
   Built on Tailwind CSS with custom components
   ═══════════════════════════════════════════════════════════════ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* KRA Red Theme Colors */
  --kra-red-50: #fef2f2;
  --kra-red-100: #fee2e2;
  --kra-red-200: #fecaca;
  --kra-red-300: #fca5a5;
  --kra-red-400: #f87171;
  --kra-red-500: #ef4444;
  --kra-red-600: #dc2626;
  --kra-red-700: #b91c1c;
  --kra-red-800: #991b1b;
  --kra-red-900: #7f1d1d;
  
  /* Primary Brand Colors (KRA Red) */
  --brand-50: var(--kra-red-50);
  --brand-100: var(--kra-red-100);
  --brand-200: var(--kra-red-200);
  --brand-300: var(--kra-red-300);
  --brand-400: var(--kra-red-400);
  --brand-500: var(--kra-red-500);
  --brand-600: var(--kra-red-600);
  --brand-700: var(--kra-red-700);
  --brand-800: var(--kra-red-800);
  --brand-900: var(--kra-red-900);
  
  /* Secondary Colors */
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  
  --green-500: #10b981;
  --green-600: #059669;
  --green-700: #047857;
  
  --gold-400: #fbbf24;
  --gold-500: #f59e0b;
  --gold-600: #d97706;
  
  --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-medium: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-large: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* ── Base Styles ──────────────────────────────────────────── */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #1f2937;
  background-color: #f9fafb;
}

.font-serif {
  font-family: 'Playfair Display', Georgia, serif;
}

/* ── Gradient Text ────────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, var(--kra-red-900) 0%, var(--kra-red-600) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Glass Effect ─────────────────────────────────────────── */
.glass-effect {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── Animations ───────────────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

.animate-slide-in-left {
  animation: slideInLeft 0.6s ease-out;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out;
}

/* ── Hover Animations ─────────────────────────────────────── */
.hover-lift {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.hover-scale {
  transition: transform 0.2s ease;
}

.hover-scale:hover {
  transform: scale(1.02);
}

/* ── Navigation Pills ─────────────────────────────────────── */
.nav-pill {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  text-decoration: none;
  transition: all 0.3s ease;
}

.nav-pill:hover,
.nav-pill.active {
  background-color: white;
  color: #dc2626;
  transform: translateY(-2px);
}

/* ── Hero Buttons ─────────────────────────────────────────── */
.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 2rem;
  border-radius: 9999px;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.3s ease;
  transform: translateY(0);
}

.btn-hero:hover {
  transform: translateY(-2px) scale(1.05);
}

.btn-hero-primary {
  background-color: white;
  color: #dc2626;
  box-shadow: var(--shadow-large);
}

.btn-hero-primary:hover {
  background-color: #fef2f2;
  box-shadow: var(--shadow-xl);
}

.btn-hero-secondary {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-hero-secondary:hover {
  background-color: white;
  color: #dc2626;
}

.btn-hero-white {
  background-color: white;
  color: #dc2626;
  box-shadow: var(--shadow-large);
}

.btn-hero-white:hover {
  background-color: #fef2f2;
  box-shadow: var(--shadow-xl);
}

.btn-hero-outline {
  background-color: transparent;
  color: white;
  border: 2px solid white;
}

.btn-hero-outline:hover {
  background-color: white;
  color: #dc2626;
}

/* ── Section Elements ─────────────────────────────────────── */
.section-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: #fee2e2;
  color: #dc2626;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  line-height: 1.1;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #6b7280;
  max-width: 48rem;
  margin: 0 auto;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .section-title {
    font-size: 4rem;
  }
}

/* ── Service Cards ────────────────────────────────────────── */
.service-card {
  background-color: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: var(--shadow-medium);
  transition: all 0.3s ease;
  border: 1px solid #f3f4f6;
}

.service-card:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-8px);
}

.service-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.service-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.service-description {
  color: #6b7280;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-features li {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.service-features li:before {
  content: "•";
  color: #dc2626;
  font-weight: 700;
  margin-right: 0.75rem;
  font-size: 1.25rem;
}

/* ── Mission Cards ────────────────────────────────────────── */
.mission-card {
  text-align: center;
}

.mission-icon {
  width: 5rem;
  height: 5rem;
  background-color: #f9fafb;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  transition: all 0.3s ease;
}

.mission-card:hover .mission-icon {
  transform: scale(1.1);
  background-color: #fee2e2;
}

.mission-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1rem;
}

.mission-description {
  color: #6b7280;
  line-height: 1.6;
}

/* ── Timeline ─────────────────────────────────────────────── */
.timeline-item {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 4rem;
}

.timeline-left {
  justify-content: flex-start;
}

.timeline-right {
  justify-content: flex-end;
}

.timeline-content {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  padding: 1.5rem;
  max-width: 28rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.timeline-content:hover {
  background-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-4px);
}

.timeline-left .timeline-content {
  margin-right: 2rem;
}

.timeline-right .timeline-content {
  margin-left: 2rem;
}

.timeline-year {
  font-size: 2rem;
  font-weight: 700;
  color: #fbbf24;
  margin-bottom: 0.5rem;
}

.timeline-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.timeline-description {
  color: #d1d5db;
  line-height: 1.6;
}

/* Timeline dots */
.timeline-item:before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1rem;
  height: 1rem;
  background-color: white;
  border-radius: 50%;
  border: 4px solid #dc2626;
  z-index: 10;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.2);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-primary {
  background-color: var(--kra-red-700);
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  background-color: var(--kra-red-800);
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: white;
  color: var(--kra-red-700);
  border: 2px solid var(--kra-red-700);
}

.btn-secondary:hover {
  background-color: var(--kra-red-50);
}

.btn-success {
  background-color: #059669;
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-success:hover {
  background-color: #047857;
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}

.btn-danger {
  background-color: #dc2626;
  color: white;
  box-shadow: var(--shadow-soft);
}

.btn-danger:hover {
  background-color: #b91c1c;
  box-shadow: var(--shadow-medium);
  transform: translateY(-1px);
}

.btn-ghost {
  background-color: transparent;
  color: #6b7280;
}

.btn-ghost:hover {
  color: #111827;
  background-color: #f3f4f6;
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-soft);
  border: 1px solid #e5e7eb;
}

.card-hover {
  transition: all 0.3s ease;
}

.card-hover:hover {
  box-shadow: var(--shadow-large);
  transform: translateY(-4px);
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1.5rem 1.5rem 0;
}

.card-footer {
  padding: 0 1.5rem 1.5rem;
}

/* ── Navigation ───────────────────────────────────────────── */
.navbar {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background-color: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-medium);
}

.nav-link {
  color: #6b7280;
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
  color: #dc2626;
  background-color: #fef2f2;
}

/* ── Play Button ──────────────────────────────────────────── */
.play-button {
  background: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.play-button:hover {
  transform: scale(1.1);
}

/* ── Responsive Design ────────────────────────────────────── */
@media (max-width: 768px) {
  .timeline-item {
    justify-content: center;
  }
  
  .timeline-left .timeline-content,
  .timeline-right .timeline-content {
    margin-left: 2rem;
    margin-right: 2rem;
  }
  
  .section-title {
    font-size: 2.5rem;
  }
  
  .btn-hero {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* ── Utility Classes ──────────────────────────────────────── */
.prose {
  max-width: none;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul {
  list-style: none;
  padding: 0;
}

.prose li {
  margin-bottom: 0.5rem;
}

/* Runtime fallback styles for environments that do not compile @apply */

/* ── Form Select ─────────────────────────────────────────── */
.form-select {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 12px center;
  background-repeat: no-repeat;
  background-size: 16px;
  padding-right: 48px;
}

.form-select:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

/* ── Form Helpers ────────────────────────────────────────── */
.form-error { color: #dc2626; font-size: 0.875rem; margin-top: 0.25rem; }
.form-help { color: #6b7280; font-size: 0.875rem; margin-top: 0.25rem; }
.form-group { margin-bottom: 1rem; }

/* ── Compliance Cards ────────────────────────────────────── */
.compliance-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-left: 4px solid var(--brand-600);
  padding: 1.5rem;
}

/* ── Package Cards ───────────────────────────────────────── */
.package-card { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.package-card:hover { transform: translateY(-4px); box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }

.package-featured {
  background: linear-gradient(135deg, var(--brand-900) 0%, var(--brand-600) 100%);
  transform: scale(1.05);
  color: white;
  position: relative;
}

.package-featured::before {
  content: 'RECOMMENDED';
  position: absolute;
  top: 0;
  right: 0;
  background-color: #fbbf24;
  color: #1e3a5f;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0 0 0 8px;
}

/* ── Time Slot ───────────────────────────────────────────── */
.time-slot.selected { background-color: #2563eb; color: white; }

/* ── Screen Reader Only ──────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Modals (plain CSS) ──────────────────────────────────── */
.modal { position: fixed; inset: 0; z-index: 50; display: none; }
.modal.active {
  display: flex; align-items: center; justify-content: center; padding: 1rem;
  background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(4px);
}
.modal-content { background: white; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); max-width: 28rem; width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-header { padding: 1.5rem; border-bottom: 1px solid #e5e7eb; display: flex; justify-content: space-between; align-items: center; }
.modal-title { font-size: 1.25rem; font-weight: 700; color: #111827; }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1.5rem; border-top: 1px solid #e5e7eb; display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Notifications (plain CSS) ───────────────────────────── */
.notification { position: fixed; top: 6rem; right: 1.5rem; z-index: 50; transform: translateX(100%); transition: transform 0.3s ease; }
.notification.show { transform: translateX(0); }
.notification-content { background: white; border-left: 4px solid; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); border-radius: 0.5rem; padding: 1rem; min-width: 300px; }
.notification-success { border-color: #10b981; }
.notification-error { border-color: #ef4444; }
.notification-warning { border-color: #f59e0b; }
.notification-info { border-color: #3b82f6; }

/* ── Stat Cards (plain CSS) ──────────────────────────────── */
.stat-card { background: white; border: 1px solid #e5e7eb; border-radius: 0.9rem; padding: 1.5rem; box-shadow: 0 1px 3px rgba(15,23,42,0.08); }
.stat-value { font-size: 1.875rem; font-weight: 700; color: #111827; margin-bottom: 0.25rem; }
.stat-label { font-size: 0.875rem; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; }
.stat-change { font-size: 0.875rem; font-weight: 500; }
.stat-change.positive { color: #059669; }
.stat-change.negative { color: #dc2626; }

/* ── Table (plain CSS) ───────────────────────────────────── */
.table-container { background: white; border: 1px solid #e5e7eb; border-radius: 0.9rem; overflow: hidden; box-shadow: 0 1px 3px rgba(15,23,42,0.08); }
.table { width: 100%; border-collapse: collapse; }
.table th { padding: 1rem 1.5rem; text-align: left; font-size: 0.75rem; font-weight: 500; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.table td { padding: 1rem 1.5rem; white-space: nowrap; border-bottom: 1px solid #f3f4f6; }
.table tbody tr:hover { background: #f9fafb; }

/* ── Dashboard Layout (plain CSS) ────────────────────────── */
.dashboard-layout { margin-left: 16rem; padding-top: 5rem; min-height: 100vh; background: #f9fafb; }
.dashboard-content { padding: 1.5rem; }
.dashboard-header { margin-bottom: 1.5rem; }
.dashboard-title { font-size: 1.5rem; font-weight: 700; color: #111827; margin-bottom: 0.5rem; }
.dashboard-subtitle { color: #6b7280; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background-color: #2563eb;
  color: #ffffff;
}

.btn-primary:hover {
  background-color: #1d4ed8;
}

.btn-secondary {
  background-color: #ffffff;
  color: #1d4ed8;
  border-color: #1d4ed8;
}

.btn-secondary:hover {
  background-color: #eff6ff;
}

.btn-success {
  background-color: #16a34a;
  color: #ffffff;
}

.btn-success:hover {
  background-color: #15803d;
}

.btn-danger {
  background-color: #dc2626;
  color: #ffffff;
}

.btn-danger:hover {
  background-color: #b91c1c;
}

.btn-sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
}

.card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.9rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.form-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.form-input {
  width: 100%;
  padding: 0.72rem 0.9rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: #ffffff;
}

.form-input:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.16);
}

.nav-link {
  color: #374151;
  font-weight: 500;
  border-radius: 0.5rem;
  padding: 0.5rem 0.85rem;
  text-decoration: none;
}

.nav-link:hover,
.nav-link.active {
  color: #2563eb;
  background: #eff6ff;
}

.sidebar-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  color: #374151;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-item:hover {
  background: #f3f4f6;
  color: #111827;
}

.sidebar-item.active {
  background: #fef2f2;
  color: #dc2626;
  border-left: 3px solid #dc2626;
}

.sidebar-item i {
  width: 1.25rem;
  height: 1.25rem;
  text-align: center;
  flex-shrink: 0;
}

.dashboard-layout {
  margin-left: 16rem;
  padding-top: 5rem;
  min-height: 100vh;
}

.dashboard-content {
  padding: 1.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 600;
}

.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-gray { background: #e5e7eb; color: #1f2937; }

/* ── Additional Styles for Clean Home Page ─────────────────── */

/* Remove any conflicting timeline styles for cleaner design */
@media (max-width: 768px) {
    .timeline-item {
        justify-content: center;
    }
    
    .timeline-left .timeline-content,
    .timeline-right .timeline-content {
        margin-left: 2rem;
        margin-right: 2rem;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .btn-hero {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

/* ── Clean Button Styles ──────────────────────────────────── */
.btn-outline {
    background-color: transparent;
    border: 2px solid currentColor;
}

.btn-outline:hover {
    background-color: currentColor;
    color: white;
}

/* ── Utility Classes ──────────────────────────────────────── */
.prose {
    max-width: none;
}

.prose p {
    margin-bottom: 1rem;
}

.prose ul {
    list-style: none;
    padding: 0;
}

.prose li {
    margin-bottom: 0.5rem;
}

/* ── Smooth Transitions ───────────────────────────────────── */
* {
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

/* ── Focus States ─────────────────────────────────────────── */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ── Loading States ───────────────────────────────────────── */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
/* ── KRA Red Theme Overrides ──────────────────────────────── */

/* Update primary buttons to use KRA red */
.btn-primary {
    background-color: var(--kra-red-600) !important;
    color: white !important;
}

.btn-primary:hover {
    background-color: var(--kra-red-700) !important;
}

/* Update secondary buttons */
.btn-secondary {
    color: var(--kra-red-600) !important;
    border-color: var(--kra-red-600) !important;
}

.btn-secondary:hover {
    background-color: var(--kra-red-50) !important;
}

/* Update section badges */
.section-badge {
    background-color: var(--kra-red-100) !important;
    color: var(--kra-red-700) !important;
}

/* Update service card icons */
.service-icon.bg-red-100 {
    background-color: var(--kra-red-100) !important;
}

.service-icon.text-red-600 {
    color: var(--kra-red-600) !important;
}

.service-card:hover .service-icon.bg-red-100 {
    background-color: var(--kra-red-600) !important;
}

/* Update navigation active states */
.nav-link:hover,
.nav-link.active {
    color: var(--kra-red-600) !important;
    background-color: var(--kra-red-50) !important;
}

/* Update hero slider overlay */
.slide-overlay {
    background: linear-gradient(135deg, rgba(185, 28, 28, 0.8) 0%, rgba(127, 29, 29, 0.6) 100%) !important;
}

/* Update CTA section background */
.bg-gradient-to-r.from-blue-600.to-blue-700 {
    background: linear-gradient(to right, var(--kra-red-600), var(--kra-red-700)) !important;
}

/* Update package card featured border */
.package-card.featured {
    border-color: var(--kra-red-600) !important;
}

.package-badge {
    background-color: var(--kra-red-600) !important;
}

/* Update hero buttons */
.btn-hero.btn-primary {
    color: var(--kra-red-600) !important;
}

.btn-hero.btn-primary:hover {
    background-color: var(--kra-red-50) !important;
}

/* Update package buttons */
.package-btn.btn-primary {
    background-color: var(--kra-red-600) !important;
}

.package-btn.btn-primary:hover {
    background-color: var(--kra-red-700) !important;
}

.package-btn.btn-outline {
    color: var(--kra-red-600) !important;
    border-color: var(--kra-red-600) !important;
}

.package-btn.btn-outline:hover {
    background-color: var(--kra-red-600) !important;
}

/* Update CTA buttons */
.btn-cta.btn-white {
    color: var(--kra-red-600) !important;
}

.btn-cta.btn-white:hover {
    background-color: var(--kra-red-50) !important;
}

/* Update focus states */
button:focus,
a:focus {
    outline-color: var(--kra-red-500) !important;
}

/* Update check icons */
.text-green-500 {
    color: var(--green-600) !important;
}

/* Update mission icons */
.mission-icon i.text-red-600 {
    color: var(--kra-red-600) !important;
}

/* Update service features bullets */
.service-features li:before {
    color: var(--kra-red-600) !important;
}

/* Update navbar logo background */
.bg-blue-800 {
    background-color: var(--kra-red-700) !important;
}

/* Update text colors */
.text-blue-600 {
    color: var(--kra-red-600) !important;
}

.text-blue-800 {
    color: var(--kra-red-800) !important;
}

.text-blue-900 {
    color: var(--kra-red-900) !important;
}

/* Update border colors */
.border-blue-600 {
    border-color: var(--kra-red-600) !important;
}

/* Update background colors */
.bg-blue-600 {
    background-color: var(--kra-red-600) !important;
}

.bg-blue-700 {
    background-color: var(--kra-red-700) !important;
}

.bg-blue-100 {
    background-color: var(--kra-red-100) !important;
}

.bg-blue-50 {
    background-color: var(--kra-red-50) !important;
}

/* Update hover states */
.hover\:bg-blue-700:hover {
    background-color: var(--kra-red-700) !important;
}

.hover\:bg-blue-50:hover {
    background-color: var(--kra-red-50) !important;
}

/* Update ring colors for focus */
.focus\:ring-blue-500:focus {
    --tw-ring-color: var(--kra-red-500) !important;
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ADMIN & DASHBOARD LAYOUTS
   ═══════════════════════════════════════════════════════════════ */

/* ── Mobile Sidebar Overlay ──────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 35;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ── Admin Layout Responsive Styles ──────────────────────── */
@media (max-width: 1024px) {
  .admin-sidebar {
    transform: translateX(-100%);
  }
  
  .admin-sidebar.open {
    transform: translateX(0);
  }
  
  .admin-main {
    margin-left: 0;
  }
  
  .admin-content {
    padding: 1rem;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .admin-table {
    font-size: 0.875rem;
  }
  
  .admin-table th,
  .admin-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .admin-content {
    padding: 0.75rem;
  }
  
  .card-header,
  .card-body {
    padding: 1rem;
  }
  
  .form-row {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .topbar-right .hidden {
    display: none !important;
  }
  
  .admin-table {
    min-width: 600px;
  }
  
  .table-container {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .admin-content {
    padding: 0.5rem;
  }
  
  .stats-grid {
    gap: 0.75rem;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 1.5rem;
  }
  
  .card-title {
    font-size: 1.125rem;
  }
  
  .btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
  
  .btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
  }
}

/* ── Dashboard Layout Responsive Styles ──────────────────── */
@media (max-width: 1024px) {
  .dashboard-layout {
    margin-left: 0;
    padding-top: 4rem;
  }
  
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.open {
    transform: translateX(0);
  }
  
  .dashboard-content {
    padding: 1rem;
  }
}

@media (max-width: 768px) {
  .dashboard-content {
    padding: 0.75rem;
  }
  
  .dashboard-title {
    font-size: 1.5rem;
  }
  
  .dashboard-subtitle {
    font-size: 0.875rem;
  }
  
  .grid {
    gap: 1rem;
  }
  
  .lg\\:grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .lg\\:grid-cols-3 {
    grid-template-columns: 1fr;
  }
  
  .lg\\:col-span-2 {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .dashboard-content {
    padding: 0.5rem;
  }
  
  .lg\\:grid-cols-4,
  .sm\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .table {
    font-size: 0.875rem;
  }
  
  .table th,
  .table td {
    padding: 0.75rem 0.5rem;
  }
  
  .modal-content {
    margin: 1rem;
    max-height: calc(100vh - 2rem);
  }
}

/* ── Form Responsive Styles ──────────────────────────────── */
@media (max-width: 768px) {
  .md\\:grid-cols-2 {
    grid-template-columns: 1fr;
  }
  
  .md\\:col-span-2 {
    grid-column: span 1;
  }
  
  .form-input {
    padding: 0.75rem;
  }
  
  .form-label {
    font-size: 0.875rem;
  }
}

/* ── Navigation Responsive Styles ────────────────────────── */
@media (max-width: 1024px) {
  .navbar .hidden {
    display: none;
  }
  
  .topbar-left .flex {
    gap: 0.5rem;
  }
  
  .topbar-right .space-x-6 {
    display: none;
  }
}

@media (max-width: 640px) {
  .navbar {
    padding: 0.75rem 1rem;
  }
  
  .navbar h1 {
    font-size: 1rem;
  }
  
  .navbar p {
    font-size: 0.625rem;
  }
  
  .w-10 {
    width: 2rem;
    height: 2rem;
  }
  
  .text-lg {
    font-size: 1rem;
  }
}

/* ── Table Responsive Styles ─────────────────────────────── */
@media (max-width: 768px) {
  .table-container {
    border-radius: 0.5rem;
    overflow: hidden;
  }
  
  .table {
    min-width: 600px;
  }
  
  .table th:first-child,
  .table td:first-child {
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
  }
  
  .table th:first-child {
    background: #f9fafb;
  }
}

/* ── Auth Layout Responsive Styles ───────────────────────── */
@media (max-width: 768px) {
  .auth-container {
    padding: 1rem;
  }
  
  .auth-card {
    padding: 1.5rem;
  }
  
  .auth-title {
    font-size: 1.75rem;
  }
}

@media (max-width: 640px) {
  .auth-container {
    padding: 0.75rem;
  }
  
  .auth-card {
    padding: 1rem;
  }
  
  .auth-title {
    font-size: 1.5rem;
  }
  
  .w-full.max-w-md {
    max-width: 100%;
  }
  
  .w-full.max-w-2xl {
    max-width: 100%;
  }
}

/* ── Utility Responsive Classes ──────────────────────────── */
@media (max-width: 1024px) {
  .lg\\:hidden {
    display: none !important;
  }
  
  .lg\\:block {
    display: block !important;
  }
}

@media (max-width: 768px) {
  .md\\:hidden {
    display: none !important;
  }
  
  .md\\:block {
    display: block !important;
  }
  
  .md\\:flex {
    display: flex !important;
  }
}

@media (max-width: 640px) {
  .sm\\:hidden {
    display: none !important;
  }
  
  .sm\\:block {
    display: block !important;
  }
  
  .sm\\:text-sm {
    font-size: 0.875rem !important;
  }
  
  .sm\\:text-xs {
    font-size: 0.75rem !important;
  }
}

/* ── Touch Device Optimizations ──────────────────────────── */
@media (hover: none) and (pointer: coarse) {
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }
  
  .sidebar-item {
    padding: 1rem;
  }
  
  .nav-item {
    padding: 1rem 1.5rem;
  }
  
  .form-input {
    padding: 1rem;
    font-size: 1rem;
  }
  
  .table th,
  .table td {
    padding: 1rem 0.75rem;
  }
}

/* ── High DPI Display Optimizations ──────────────────────── */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .admin-sidebar,
  .sidebar {
    border-right-width: 0.5px;
  }
  
  .admin-topbar,
  .navbar {
    border-bottom-width: 0.5px;
  }
  
  .card {
    border-width: 0.5px;
  }
}

/* ── Landscape Mobile Optimizations ──────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
  .sidebar {
    padding: 0.5rem;
  }
  
  .sidebar-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }
  
  .admin-content,
  .dashboard-content {
    padding: 0.75rem;
  }
  
  .modal-content {
    max-height: 90vh;
    overflow-y: auto;
  }
}

/* ── Print Optimizations ─────────────────────────────────── */
@media print {
  .admin-sidebar,
  .sidebar,
  .admin-topbar,
  .navbar,
  .mobile-menu-btn,
  .btn,
  .notification {
    display: none !important;
  }
  
  .admin-main,
  .dashboard-layout {
    margin-left: 0 !important;
    padding-top: 0 !important;
  }
  
  .admin-content,
  .dashboard-content {
    padding: 0 !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #000 !important;
    break-inside: avoid;
  }
  
  .table {
    border-collapse: collapse;
  }
  
  .table th,
  .table td {
    border: 1px solid #000 !important;
  }
  
  .page-break {
    page-break-before: always;
  }
}

/* ── Accessibility Enhancements ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .admin-sidebar,
  .modal,
  .notification {
    transition: none !important;
  }
  
  .hover-lift:hover {
    transform: none !important;
  }
  
  .btn:hover {
    transform: none !important;
  }
}

/* Focus visible for better keyboard navigation */
.sidebar-item:focus-visible,
.nav-item:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--kra-red-600);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .sidebar,
  .admin-sidebar {
    border-right: 2px solid #000;
  }
  
  .navbar,
  .admin-topbar {
    border-bottom: 2px solid #000;
  }
  
  .card {
    border: 2px solid #000;
  }
  
  .btn {
    border: 2px solid currentColor;
  }
}

/* ═══════════════════════════════════════════════════════════════
   ADVANCED HOME PAGE UI STYLES
   ═══════════════════════════════════════════════════════════════ */

/* ── Advanced Hero Section ────────────────────────────────── */
.text-glow {
  text-shadow: 0 0 20px rgba(220, 38, 38, 0.5), 0 0 40px rgba(220, 38, 38, 0.3);
}

.floating-element {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.floating-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.floating-2 {
  width: 120px;
  height: 120px;
  top: 60%;
  right: 15%;
  animation-delay: 2s;
}

.floating-3 {
  width: 60px;
  height: 60px;
  bottom: 30%;
  left: 20%;
  animation-delay: 4s;
}

.floating-4 {
  width: 100px;
  height: 100px;
  top: 40%;
  right: 30%;
  animation-delay: 1s;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
    opacity: 0.7;
  }
  50% {
    transform: translateY(-20px) rotate(180deg);
    opacity: 1;
  }
}

/* ── Advanced Animations ─────────────────────────────────── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.6s ease-out forwards;
}

.animate-pulse-slow {
  animation: pulse 3s ease-in-out infinite;
}

/* ── Advanced Button Styles ──────────────────────────────── */
.btn-gradient {
  background: linear-gradient(135deg, var(--kra-red-600) 0%, var(--kra-red-700) 100%);
  position: relative;
  overflow: hidden;
}

.btn-gradient::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn-gradient:hover::before {
  left: 100%;
}

.btn-3d {
  transform-style: preserve-3d;
  transition: all 0.3s ease;
}

.btn-3d:hover {
  transform: translateY(-2px) rotateX(15deg);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* ── Advanced Card Styles ────────────────────────────────── */
.card-glass {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.card-hover-lift {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-lift:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-tilt {
  transition: transform 0.3s ease;
}

.card-tilt:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* ── Gradient Backgrounds ────────────────────────────────── */
.bg-gradient-red {
  background: linear-gradient(135deg, var(--kra-red-600) 0%, var(--kra-red-800) 100%);
}

.bg-gradient-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

.bg-gradient-green {
  background: linear-gradient(135deg, #10b981 0%, #047857 100%);
}

.bg-gradient-purple {
  background: linear-gradient(135deg, #8b5cf6 0%, #5b21b6 100%);
}

.bg-gradient-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

/* ── Icon Animations ─────────────────────────────────────── */
.icon-bounce {
  animation: iconBounce 2s ease-in-out infinite;
}

.icon-rotate {
  animation: iconRotate 3s linear infinite;
}

.icon-pulse {
  animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconBounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes iconRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes iconPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

/* ── Advanced Typography ─────────────────────────────────── */
.text-gradient {
  background: linear-gradient(135deg, var(--kra-red-600) 0%, var(--kra-red-800) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-shadow-soft {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-shadow-medium {
  text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.text-shadow-strong {
  text-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* ── Scroll Animations ───────────────────────────────────── */
.scroll-reveal {
  opacity: 0;
  transform: translateY(50px);
  transition: all 0.8s ease;
}

.scroll-reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.scroll-reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 0.8s ease;
}

.scroll-reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.scroll-reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Enhanced scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-left.animate {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-right.animate {
    opacity: 1;
    transform: translateX(0);
}

.scroll-animate-scale {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-scale.animate {
    opacity: 1;
    transform: scale(1);
}

.scroll-animate-fade {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.scroll-animate-fade.animate {
    opacity: 1;
}

/* Staggered animations for multiple elements */
.scroll-animate-stagger {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-stagger.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Delay classes for staggered animations */
.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }
.delay-300 { transition-delay: 0.3s; }
.delay-400 { transition-delay: 0.4s; }
.delay-500 { transition-delay: 0.5s; }
.delay-600 { transition-delay: 0.6s; }

/* Special animations for specific elements */
.scroll-animate-bounce {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.scroll-animate-bounce.animate {
    opacity: 1;
    transform: translateY(0);
}

.scroll-animate-rotate {
    opacity: 0;
    transform: rotate(-10deg) scale(0.8);
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.scroll-animate-rotate.animate {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.scroll-reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.scroll-reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 0.8s ease;
}

.scroll-reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* ── Interactive Elements ────────────────────────────────── */
.interactive-hover {
  position: relative;
  overflow: hidden;
}

.interactive-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
  transform: translateX(-100%);
  transition: transform 0.6s;
}

.interactive-hover:hover::before {
  transform: translateX(100%);
}

/* ── Particle Effects ────────────────────────────────────── */
.particles-bg {
  position: relative;
  overflow: hidden;
}

.particles-bg::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 80%, rgba(220, 38, 38, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(16, 185, 129, 0.1) 0%, transparent 50%);
  animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(120deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(240deg);
  }
}

/* ── Loading States ───────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--kra-red-600);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ── Mobile Optimizations ────────────────────────────────── */
@media (max-width: 768px) {
  .floating-element {
    display: none;
  }
  
  /* Hero section mobile optimization */
  section[style*="min-height"] {
    min-height: 100vh !important;
    padding-top: 0 !important;
  }
  
  /* Mobile hero content spacing */
  .hero-content {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    margin-top: 0 !important;
  }
  
  /* Reduce excessive spacing on mobile */
  .py-8 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
  
  .mb-8 {
    margin-bottom: 1.5rem !important;
  }
  
  .mb-16 {
    margin-bottom: 2rem !important;
  }
  
  /* Optimize text sizes for mobile */
  .text-3xl {
    font-size: 1.875rem !important;
  }
  
  .text-lg {
    font-size: 1rem !important;
  }
  
  .text-glow {
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
  }
  
  .card-hover-lift:hover {
    transform: translateY(-6px) scale(1.01);
  }
  
  .btn-3d:hover {
    transform: translateY(-1px);
  }
}

/* ── Dark Mode Support ───────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  .card-glass {
    background: rgba(31, 41, 55, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
  }
}

/* ── Performance Optimizations ───────────────────────────── */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

.gpu-accelerated {
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
}

/* ═══════════════════════════════════════════════════════════════
   Clean & Sleek Navigation Styles
   ═══════════════════════════════════════════════════════════════ */

/* Clean Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.99);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

/* Clean Navigation Links */
.nav-link {
    color: #4b5563;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.nav-link:hover {
    color: #1f2937;
    background: rgba(0, 0, 0, 0.04);
}

.nav-link.active {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
    font-weight: 600;
}

/* Clean Buttons */
.btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #b91c1c;
    color: white;
}

.btn-primary:hover {
    background: #991b1b;
}

.btn-outline {
    background: transparent;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    color: #1f2937;
}

/* Mobile Navigation */
.mobile-nav-link {
    display: flex;
    align-items: center;
    space-x: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #4b5563;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-nav-link:hover {
    background: #f3f4f6;
    color: #1f2937;
}

.mobile-nav-link i {
    width: 1.25rem;
    margin-right: 0.75rem;
}

/* Hamburger Animation */
.hamburger-line {
    transform-origin: center;
    transition: all 0.3s ease;
}

/* ── Mobile Menu Enhancements ────────────────────────────── */
#mobile-menu {
    box-shadow: -10px 0 25px rgba(0, 0, 0, 0.15);
    will-change: transform;
    backface-visibility: hidden;
    z-index: 9999 !important;
}

#mobile-menu-overlay {
    will-change: opacity;
    backface-visibility: hidden;
    z-index: 9998 !important;
}

/* Ensure navbar doesn't interfere */
.navbar {
    z-index: 9997 !important;
}

/* Smooth hamburger animation */
.hamburger-line {
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Mobile menu performance optimizations */
@media (max-width: 1024px) {
    #mobile-menu {
        width: min(90vw, 320px);
        transform: translateX(100%);
    }
    
    #mobile-menu.translate-x-full {
        transform: translateX(100%) !important;
    }
    
    #mobile-menu:not(.translate-x-full) {
        transform: translateX(0) !important;
    }
}

/* Ensure mobile menu is visible and clickable */
#mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    background: white !important;
    pointer-events: auto !important;
}

#mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    pointer-events: auto !important;
}

/* Hide overlay when hidden class is applied */
#mobile-menu-overlay.hidden {
    display: none !important;
}

/* ── Simple Creative Mobile Menu Styles ──────────────────── */
#mobile-menu {
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.3);
    will-change: transform;
    backface-visibility: hidden;
    z-index: 9999 !important;
}

#mobile-menu-overlay {
    will-change: opacity;
    backface-visibility: hidden;
    z-index: 9998 !important;
    background: rgba(0, 0, 0, 0.6) !important;
}

/* Ensure navbar doesn't interfere */
.navbar {
    z-index: 9997 !important;
}

/* Smooth hamburger animation */
.hamburger-line {
    transform-origin: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

/* Mobile menu performance optimizations */
@media (max-width: 1024px) {
    #mobile-menu {
        width: min(90vw, 320px);
        transform: translateX(100%);
    }
    
    #mobile-menu.translate-x-full {
        transform: translateX(100%) !important;
    }
    
    #mobile-menu:not(.translate-x-full) {
        transform: translateX(0) !important;
    }
}

/* Ensure mobile menu is visible and clickable */
#mobile-menu {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    height: 100vh !important;
    pointer-events: auto !important;
}

#mobile-menu-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    pointer-events: auto !important;
}

/* Hide overlay when hidden class is applied */
#mobile-menu-overlay.hidden {
    display: none !important;
}

/* Simple Creative Navigation Links */
.mobile-nav-creative {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 16px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    background: rgba(255, 255, 255, 0.1) !important;
    margin-bottom: 8px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.mobile-nav-creative:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateX(8px) !important;
}

/* Simple Creative Buttons */
.btn-mobile-primary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 14px 20px !important;
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    margin-bottom: 8px !important;
}

.btn-mobile-primary:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-2px) !important;
}

.btn-mobile-secondary {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    padding: 14px 20px !important;
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    margin-bottom: 8px !important;
}

.btn-mobile-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-2px) !important;
}

/* Mobile Responsive Adjustments */
@media (max-width: 640px) {
    #mobile-menu {
        width: 100vw !important;
        max-width: 100vw !important;
    }
}

/* Logo Styling */
.navbar img {
    transition: all 0.2s ease;
}

.navbar img:hover {
    transform: scale(1.02);
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .navbar h1 {
        font-size: 1rem;
    }
    
    .navbar p {
        font-size: 0.75rem;
    }
}

/* Enhanced Footer Styles */
footer {
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #b91c1c, transparent);
}

/* Chat Button Enhancement */
.chat-bubble button {
    position: relative;
    overflow: hidden;
}

.chat-bubble button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.chat-bubble button:hover::before {
    width: 100px;
    height: 100px;
}

/* Logo Hover Effects */
.logo-container {
    transition: all 0.3s ease;
}

.logo-container:hover {
    transform: scale(1.02);
}

.logo-container img {
    transition: all 0.3s ease;
    filter: brightness(1);
}

.logo-container:hover img {
    filter: brightness(1.1) contrast(1.1);
}

/* Enhanced Social Icons */
.social-icon {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.social-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.3s ease;
}

.social-icon:hover::before {
    width: 100%;
    height: 100%;
}

/* Newsletter Enhancement */
.newsletter-input {
    transition: all 0.3s ease;
}

.newsletter-input:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: scale(1.02);
}

/* Responsive Logo Adjustments */
@media (max-width: 768px) {
    .navbar img {
        width: 3rem;
        height: 3rem;
    }
    
    .navbar h1 {
        font-size: 1rem;
    }
    
    .navbar p {
        font-size: 0.625rem;
    }
}

@media (max-width: 640px) {
    .navbar img {
        width: 2.5rem;
        height: 2.5rem;
    }
    
    .navbar h1 {
        font-size: 0.875rem;
    }
}

/* Enhanced Mobile Menu */
@media (max-width: 1024px) {
    #mobile-menu {
        width: min(90vw, 380px);
    }
}

/* Accessibility Improvements */
.nav-link:focus,
.btn:focus,
.social-icon:focus {
    outline: 2px solid #b91c1c;
    outline-offset: 2px;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .nav-link,
    .btn,
    .social-icon,
    .logo-container,
    .mobile-menu-item {
        transition: none;
    }
    
    .navbar img:hover,
    .logo-container:hover {
        transform: none;
    }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE LAYOUT FIXES - NAVBAR SPACING
   ═══════════════════════════════════════════════════════════════ */

/* ── Critical Mobile Layout Fixes ───────────────────────── */
/* Remove all body padding to prevent white space above navbar */
body {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

/* Ensure navbar is always at the very top */
.navbar {
    top: 0 !important;
    margin-top: 0 !important;
    position: fixed !important;
    z-index: 9997 !important;
}

/* ── Mobile Spacing for All Pages ───────────────────────── */
@media (max-width: 1024px) {
    /* Home page hero section - specific fix */
    section.relative.min-h-screen {
        padding-top: 80px !important;
        min-height: calc(100vh - 80px) !important;
    }
    
    /* All other page sections */
    section:not(.relative.min-h-screen) {
        margin-top: 80px !important;
    }
    
    /* Page content containers */
    .py-20:first-child,
    .py-32:first-child {
        padding-top: calc(5rem + 80px) !important;
    }
    
    /* Dark hero sections (like contact page) */
    section.py-32.bg-gray-900 {
        padding-top: calc(8rem + 80px) !important;
    }
    
    /* About page hero */
    section.py-20.lg\\:py-32 {
        padding-top: calc(5rem + 80px) !important;
    }
    
    /* Pricing page hero */
    section.py-20.lg\\:py-32.bg-gradient-to-br {
        padding-top: calc(5rem + 80px) !important;
    }
    
    /* Filing page hero */
    section.py-20.lg\\:py-32.bg-gradient-to-br {
        padding-top: calc(5rem + 80px) !important;
    }
}

@media (max-width: 768px) {
    /* Smaller screens need more spacing */
    section.relative.min-h-screen {
        padding-top: 100px !important;
        min-height: calc(100vh - 100px) !important;
    }
    
    section:not(.relative.min-h-screen) {
        margin-top: 100px !important;
    }
    
    .py-20:first-child,
    .py-32:first-child {
        padding-top: calc(5rem + 100px) !important;
    }
    
    section.py-32.bg-gray-900 {
        padding-top: calc(8rem + 100px) !important;
    }
    
    section.py-20.lg\\:py-32 {
        padding-top: calc(5rem + 100px) !important;
    }
}

/* ── Navbar Height Consistency ──────────────────────────── */
.navbar {
    height: 64px !important;
}

@media (max-width: 768px) {
    .navbar {
        height: 68px !important;
    }
}

/* ── Specific Page Fixes ────────────────────────────────── */
@media (max-width: 1024px) {
    /* Home page specific */
    .hero-content {
        padding-top: 40px !important;
    }
    
    /* Contact page dark hero */
    section.relative.py-32.bg-gray-900 {
        padding-top: calc(8rem + 80px) !important;
    }
    
    /* About page hero with background */
    section.relative.py-20.lg\\:py-32.overflow-hidden {
        padding-top: calc(5rem + 80px) !important;
    }
    
    /* Pricing page gradient hero */
    section.relative.py-20.lg\\:py-32.bg-gradient-to-br.from-red-50 {
        padding-top: calc(5rem + 80px) !important;
    }
    
    /* Filing page gradient hero */
    section.relative.py-20.lg\\:py-32.bg-gradient-to-br.from-red-50 {
        padding-top: calc(5rem + 80px) !important;
    }
}

@media (max-width: 768px) {
    .hero-content {
        padding-top: 60px !important;
    }
    
    section.relative.py-32.bg-gray-900 {
        padding-top: calc(8rem + 100px) !important;
    }
    
    section.relative.py-20.lg\\:py-32.overflow-hidden {
        padding-top: calc(5rem + 100px) !important;
    }
    
    section.relative.py-20.lg\\:py-32.bg-gradient-to-br.from-red-50 {
        padding-top: calc(5rem + 100px) !important;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ADDITIONAL MOBILE LAYOUT FIXES
   ═══════════════════════════════════════════════════════════════ */

/* ── Mobile Screen Size Specific Fixes ──────────────────── */
@media (max-width: 640px) {
    /* Very small screens need even more spacing */
    section.relative.min-h-screen {
        padding-top: 140px !important;
        min-height: calc(100vh - 140px) !important;
    }
    
    section:not(.relative.min-h-screen) {
        margin-top: 140px !important;
    }
    
    .py-20:first-child,
    .py-32:first-child {
        padding-top: calc(5rem + 140px) !important;
    }
    
    section.py-32.bg-gray-900 {
        padding-top: calc(8rem + 140px) !important;
    }
    
    /* Hero content adjustments */
    .relative.z-10.text-center.text-white {
        padding-top: 100px !important;
        margin-top: 80px !important;
    }
    
    /* Navbar height for very small screens */
    .navbar {
        height: 72px !important;
    }
}

/* ── Landscape Mobile Fixes ─────────────────────────────── */
@media (max-height: 500px) and (orientation: landscape) {
    section.relative.min-h-screen {
        padding-top: 80px !important;
        min-height: calc(100vh - 80px) !important;
    }
    
    .relative.z-10.text-center.text-white {
        padding-top: 40px !important;
        margin-top: 20px !important;
    }
    
    .hero-content h1 {
        font-size: 2.5rem !important;
        margin-bottom: 1rem;
        margin-top: 20px !important;
    }
    
    .hero-content p {
        font-size: 1rem !important;
        margin-bottom: 1.5rem;
    }
    
    .py-20 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* ── Universal Mobile Content Protection ────────────────── */
@media (max-width: 1024px) {
    /* Ensure no content gets hidden behind navbar */
    * {
        scroll-margin-top: 80px;
    }
    
    /* Smooth scrolling adjustments */
    html {
        scroll-padding-top: 80px;
    }
}

@media (max-width: 768px) {
    * {
        scroll-margin-top: 100px;
    }
    
    html {
        scroll-padding-top: 100px;
    }
}

@media (max-width: 640px) {
    * {
        scroll-margin-top: 120px;
    }
    
    html {
        scroll-padding-top: 120px;
    }
}

/* ── Safe Area Insets for Modern Mobile Devices ─────────── */
@supports (padding-top: env(safe-area-inset-top)) {
    @media (max-width: 768px) {
        .navbar {
            padding-top: env(safe-area-inset-top);
            height: calc(68px + env(safe-area-inset-top));
        }
        
        section.relative.min-h-screen {
            padding-top: calc(120px + env(safe-area-inset-top)) !important;
        }
        
        section:not(.relative.min-h-screen) {
            margin-top: calc(120px + env(safe-area-inset-top)) !important;
        }
    }
}

/* ── Debug Helper (Remove in Production) ────────────────── */
/* Uncomment to debug mobile layout issues */
/*
@media (max-width: 768px) {
    .navbar {
        background: rgba(255, 0, 0, 0.3) !important;
        border: 2px solid red !important;
    }
    
    section.relative.min-h-screen {
        border: 2px solid blue !important;
    }
    
    section:not(.relative.min-h-screen) {
        border: 2px solid green !important;
    }
}
*/

/* ── Performance Optimizations for Mobile ───────────────── */
@media (max-width: 768px) {
    /* Reduce animations on mobile for better performance */
    .animate-fade-in-up,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-scale-in {
        animation-duration: 0.4s;
    }
    
    /* Optimize transforms for mobile */
    .hover-lift:hover,
    .card-hover-lift:hover {
        transform: translateY(-2px) scale(1.01);
    }
    
    /* Reduce shadow complexity on mobile */
    .shadow-xl {
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    }
}

/* ── Accessibility Improvements for Mobile ──────────────── */
@media (max-width: 768px) {
    /* Larger touch targets */
    .btn,
    .nav-link,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better focus indicators on mobile */
    .btn:focus,
    .nav-link:focus,
    button:focus,
    a:focus {
        outline: 3px solid #b91c1c;
        outline-offset: 2px;
    }
    
    /* Improved text readability */
    body {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    input,
    textarea,
    select {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* ── Extra Small Mobile Screens ──────────────────────────── */
@media (max-width: 480px) {
  /* Hero section for very small screens */
  .text-3xl {
    font-size: 1.5rem !important;
    line-height: 1.3 !important;
  }
  
  .text-lg {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
  }
  
  /* Reduce padding on very small screens */
  .px-4 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .py-8 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }
  
  /* Button optimization for small screens */
  .px-6 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  
  .py-3 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }
}