/* ==========================================================================
   Inbox Marketing - Main CSS
   Custom styles to complement Tailwind CSS
   ========================================================================== */

/* Root Variables for Brand Colors */
:root {
  /* Primary Colors from Phase 1 Analysis */
  --color-primary-blue: #2563EB;
  --color-dark-gray: #1F2937;
  --color-success-green: #10B981;
  
  /* Extended Color Palette */
  --color-light-blue: #DBEAFE;
  --color-light-green: #D1FAE5;
  --color-light-gray: #F9FAFB;
  
  /* Typography */
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Roboto Slab', serif;
  
  /* Spacing (8pt Grid System) */
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  
  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Typography System */
body {
  font-family: var(--font-primary);
  line-height: 1.6;
  color: var(--color-dark-gray);
}

.font-roboto {
  font-family: var(--font-primary);
}

.font-roboto-slab {
  font-family: var(--font-secondary);
}

/* Component Utilities */
.btn-primary {
  background-color: var(--color-primary-blue);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

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

.btn-success {
  background-color: var(--color-success-green);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-success:hover {
  background-color: #047857;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Card Components */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--space-md);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.card-header {
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid #E5E7EB;
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
}

.logo-grid img {
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.logo-grid img:hover {
  filter: grayscale(0%);
}

/* Navigation Enhancements */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: var(--color-primary-blue);
}

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

/* Mobile Menu Animation */
#mobile-menu {
  transition: all 0.3s ease;
}

#mobile-menu.show {
  display: block;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Enhancements */
.form-input {
  border: 2px solid #E5E7EB;
  border-radius: var(--radius-md);
  padding: 12px 16px;
  transition: all 0.3s ease;
  width: 100%;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-input.error {
  border-color: #EF4444;
}

.form-input.success {
  border-color: var(--color-success-green);
}

/* FAQ Accordion */
.faq-toggle {
  transition: all 0.3s ease;
}

.faq-toggle:hover {
  background-color: #F9FAFB;
}

.faq-toggle svg {
  transition: transform 0.3s ease;
}

.faq-toggle.active svg {
  transform: rotate(180deg);
}

.faq-content {
  transition: all 0.3s ease;
  overflow: hidden;
}

.faq-content.show {
  display: block;
  animation: slideDown 0.3s ease;
}

/* Hero Section Enhancements */
.hero-gradient {
  background: linear-gradient(135deg, var(--color-primary-blue) 0%, #1E40AF 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

/* Analytics Dashboard Cards */
.dashboard-card {
  transition: all 0.3s ease;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.dashboard-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.dashboard-card img {
  transition: transform 0.3s ease;
}

.dashboard-card:hover img {
  transform: scale(1.05);
}

/* Client Logo Animations */
.client-logo {
  transition: all 0.3s ease;
  filter: grayscale(100%);
}

.client-logo:hover {
  filter: grayscale(0%);
  transform: scale(1.1);
}

/* CTA Sections */
.cta-section {
  background: linear-gradient(135deg, var(--color-success-green) 0%, #047857 100%);
}

/* Statistics Numbers */
.stat-number {
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus States for Keyboard Navigation */
.focus-ring:focus {
  outline: 2px solid var(--color-primary-blue);
  outline-offset: 2px;
}

/* Loading States */
.loading {
  opacity: 0.7;
  pointer-events: none;
}

.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--color-primary-blue);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 8px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Success and Error States */
.success-message {
  background-color: var(--color-light-green);
  color: #065F46;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid #10B981;
}

.error-message {
  background-color: #FEE2E2;
  color: #991B1B;
  padding: var(--space-sm);
  border-radius: var(--radius-md);
  border: 1px solid #EF4444;
}

/* Responsive Image Grid */
.responsive-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

@media (max-width: 768px) {
  .responsive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
  }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--color-dark-gray);
  }
  
  .btn-primary,
  .btn-success {
    border: 2px solid currentColor;
  }
}

/* Smooth Scrolling for Anchor Links */
html {
  scroll-behavior: smooth;
}

/* Container Responsive Padding */
.container {
  padding-left: var(--space-sm);
  padding-right: var(--space-sm);
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
}

/* Touch Target Size for Mobile */
@media (max-width: 768px) {
  .touch-target {
    min-height: 44px;
    min-width: 44px;
  }
}

/* Custom Scrollbar for WebKit browsers */
::-webkit-scrollbar {
  width: 8px;
}

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

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

::-webkit-scrollbar-thumb:hover {
  background: #1E40AF;
}