/* Inbox Marketing KFT - Custom Styles */
/* Complementing Tailwind CSS with custom overrides and components */

/* ===== CSS Variables for Design System ===== */
:root {
  /* Primary Color Palette */
  --color-primary: #2563eb;
  --color-primary-dark: #1d4ed8;
  --color-primary-light: #3b82f6;
  
  /* Secondary Color Palette */  
  --color-secondary: #16a34a;
  --color-secondary-dark: #15803d;
  --color-secondary-light: #22c55e;
  
  /* Accent Color Palette */
  --color-accent: #dc2626;
  --color-accent-dark: #b91c1c;
  --color-accent-light: #ef4444;
  
  /* Typography */
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Poppins', sans-serif;
  
  /* Spacing (8pt Grid System) */
  --spacing-xs: 0.25rem;    /* 4px */
  --spacing-sm: 0.5rem;     /* 8px */
  --spacing-md: 1rem;       /* 16px */
  --spacing-lg: 1.5rem;     /* 24px */
  --spacing-xl: 2rem;       /* 32px */
  --spacing-2xl: 3rem;      /* 48px */
  --spacing-3xl: 4rem;      /* 64px */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  
  /* Border Radius */
  --radius-sm: 0.375rem;    /* 6px */
  --radius-md: 0.5rem;      /* 8px */
  --radius-lg: 0.75rem;     /* 12px */
  --radius-xl: 1rem;        /* 16px */
  
  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-normal: 300ms ease-in-out;
  --transition-slow: 500ms ease-in-out;
}

/* ===== Global Styles ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ===== Typography Enhancements ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  font-weight: 600;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

/* ===== Button Components ===== */
.btn {
  @apply inline-flex items-center justify-center px-6 py-3 rounded-lg font-poppins font-semibold transition-all duration-300 min-h-[44px];
}

.btn-primary {
  @apply bg-primary text-white hover:bg-blue-700 focus:ring-4 focus:ring-blue-300 focus:outline-none;
}

.btn-secondary {
  @apply bg-secondary text-white hover:bg-green-700 focus:ring-4 focus:ring-green-300 focus:outline-none;
}

.btn-accent {
  @apply bg-accent text-white hover:bg-red-700 focus:ring-4 focus:ring-red-300 focus:outline-none;
}

.btn-outline {
  @apply border-2 border-primary text-primary hover:bg-primary hover:text-white focus:ring-4 focus:ring-blue-300 focus:outline-none;
}

.btn-ghost {
  @apply text-primary hover:bg-blue-50 focus:ring-4 focus:ring-blue-300 focus:outline-none;
}

/* ===== Card Components ===== */
.card {
  @apply bg-white rounded-xl shadow-sm border;
}

.card-elevated {
  @apply shadow-lg hover:shadow-xl transition-shadow duration-300;
}

.card-interactive {
  @apply cursor-pointer hover:shadow-lg hover:-translate-y-1 transition-all duration-300;
}

/* ===== Navigation Enhancements ===== */
.nav-link {
  @apply text-gray-700 hover:text-primary transition-colors duration-200 relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-primary);
  transition: width var(--transition-fast);
}

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

/* ===== Form Enhancements ===== */
.form-input {
  @apply w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-transparent transition-all duration-200;
}

.form-input:focus {
  @apply shadow-md;
}

.form-label {
  @apply block text-sm font-medium text-gray-700 mb-2;
}

.form-error {
  @apply text-red-600 text-sm mt-1;
}

.form-success {
  @apply text-green-600 text-sm mt-1;
}

/* ===== Image Enhancements ===== */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

.img-responsive {
  @apply w-full h-auto;
}

.img-cover {
  @apply w-full h-full object-cover;
}

.img-contain {
  @apply w-full h-full object-contain;
}

.img-rounded {
  @apply rounded-lg;
}

.img-circle {
  @apply rounded-full;
}

/* ===== Loading States ===== */
.loading {
  @apply opacity-50 pointer-events-none;
}

.skeleton {
  @apply animate-pulse bg-gray-200 rounded;
}

/* ===== FAQ Component Styles ===== */
.faq-trigger {
  @apply w-full text-left transition-all duration-200;
}

.faq-trigger:hover {
  @apply text-primary;
}

.faq-trigger[data-expanded="true"] .faq-arrow {
  @apply rotate-180;
}

.faq-content {
  @apply overflow-hidden transition-all duration-300;
}

.faq-content.show {
  @apply block;
}

/* ===== Cookie Toggle Styles ===== */
.cookie-switch {
  cursor: pointer;
  transition: background-color var(--transition-fast);
}

.cookie-switch.active {
  @apply bg-primary;
}

.cookie-switch.active .cookie-slider {
  @apply translate-x-6;
}

.cookie-slider {
  transition: transform var(--transition-fast);
}

/* ===== Scroll Animations ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* ===== Mobile Menu Styles ===== */
.mobile-menu {
  @apply fixed inset-0 z-50 lg:hidden;
}

.mobile-menu-overlay {
  @apply fixed inset-0 bg-black bg-opacity-50;
}

.mobile-menu-panel {
  @apply fixed right-0 top-0 h-full w-64 bg-white shadow-xl transform transition-transform duration-300;
}

.mobile-menu-panel.closed {
  @apply translate-x-full;
}

.mobile-menu-panel.open {
  @apply translate-x-0;
}

/* ===== Utility Classes ===== */
.text-gradient {
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--color-secondary), var(--color-secondary-light));
}

.bg-gradient-accent {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-light));
}

/* ===== Accessibility Enhancements ===== */
.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;
}

/* Focus styles for keyboard navigation */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  @apply outline-2 outline-primary outline-offset-2;
}

/* ===== Print Styles ===== */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  img {
    max-width: 100% !important;
  }
  
  @page {
    margin: 2cm;
  }
}

/* ===== Responsive Design Enhancements ===== */
@media (max-width: 640px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .text-responsive {
    font-size: clamp(0.875rem, 2.5vw, 1rem);
  }
}

@media (min-width: 768px) {
  .text-responsive {
    font-size: clamp(1rem, 2vw, 1.125rem);
  }
}

@media (min-width: 1024px) {
  .text-responsive {
    font-size: 1.125rem;
  }
}

/* ===== Dark Mode Support (Future Enhancement) ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #1f2937;
    --color-text: #f9fafb;
    --color-border: #374151;
  }
}

/* ===== Performance Optimizations ===== */
.will-change-transform {
  will-change: transform;
}

.will-change-opacity {
  will-change: opacity;
}

.gpu-accelerated {
  transform: translateZ(0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 4px;
}

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

/* ===== Selection Styles ===== */
::selection {
  background-color: var(--color-primary);
  color: white;
}

::-moz-selection {
  background-color: var(--color-primary);
  color: white;
}