/* Import all separated CSS files */
@import url('./css/variables.css');
@import url('./css/base.css');
@import url('./css/animations.css');
@import url('./css/components.css');
@import url('./css/forms.css');
@import url('./css/effects.css');
@import url('./css/header.css');
@import url('./css/theme-colors.css');
@import url('./css/theme-backgrounds.css');
@import url('./css/footer.css');
@import url('./css/sections.css');
@import url('./css/responsive.css');
@import url('./css/accessibility.css');

/* Core Variables */
:root {
  --blue-dark: #3b82f6;
  --text-dark: #2d2220;
  --text-medium: #4b3f3a;
  --text-light: #6b5d57;
  --text-on-brown: #ffffff;
  --white: #ffffff;
}

/* Reset and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
}

/* Logo and Navigation Protection */
.logo-link {
  text-decoration: none !important;
  color: inherit !important;
}

.company-name {
  color: #111827 !important;
  font-weight: bold !important;
  font-size: 1.25rem !important;
  display: inline-block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Dynamic company name - content will be set by JavaScript */
.company-name::before {
  content: none !important;
  display: none !important;
}

/* Header Auto-Hide Styles */
.header-trigger {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 35;
  pointer-events: auto;
}

header {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

header.show {
  transform: translateX(-50%) translateY(0) !important;
}

#mobileMenu.show {
  transform: translateX(-50%) translateY(100%) !important;
}



/* Hero Card - Remove shadows */
#heroCard {
  box-shadow: none !important;
  filter: none !important;
  backdrop-filter: none !important;
}

/* Navigation Buttons */
#prevCard, #nextCard {
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

#prevCard:hover, #nextCard:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Global Text Color Enforcement */
* {
  color: #000000 !important;
}

/* Footer Text Colors */
footer,
footer * {
  color: #000000 !important;
}

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

::-webkit-scrollbar-track {
  background: #f0f0f0 !important;
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: #C6E2FF !important;
  border-radius: 10px;
  border: 1px solid #b3d9ff !important;
}

/* Firefox scrollbar */
html {
  scrollbar-width: thin;
  scrollbar-color: #C6E2FF #f0f0f0;
}

/* Edit Modal Styles */
.modal-backdrop {
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.5);
}

.btn-modern {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  color: white;
  border: none;
  transition: all 0.2s ease;
}

.btn-modern:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
  transform: translateY(-1px);
}

.progress-bar {
  background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
  background-size: 200% 100%;
  animation: progressGradient 2s ease infinite;
}

@keyframes progressGradient {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.form-input-modern {
  transition: all 0.3s ease;
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
}

.form-input-modern:focus {
  background: #ffffff;
  transform: translateY(-1px);
}

/* Contact Form Button Override */
#contact button[type="submit"] {
  background: #C6E2FF !important;
  background-image: none !important;
  color: #000000 !important;
  border: 1px solid #b3d9ff !important;
  transition: none !important;
  transform: none !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  font-weight: 600 !important;
}

#contact button[type="submit"]:hover,
#contact button[type="submit"]:focus,
#contact button[type="submit"]:active {
  background: #C6E2FF !important;
  background-image: none !important;
  color: #000000 !important;
  transform: none !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
  border: 1px solid #b3d9ff !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
  header {
    max-width: calc(100vw - 1.5rem) !important;
  }
}

@media (max-width: 768px) {
  #companyLogo {
    max-height: 40px !important;
  }
  
  header span {
    font-size: 1.125rem !important;
  }
}

@media (max-width: 640px) {
  #companyLogo {
    max-height: 32px !important;
  }
  
  header span {
    font-size: 1rem !important;
  }
}

/* Print Mode */
@media print {
  body,
  * {
    background: white !important;
    background-color: white !important;
    background-image: none !important;
  }
}

/* ========== HIGH-RESOLUTION INSIGHT CARDS STYLES ========== */

/* Line clamp utilities for text truncation */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* High-resolution image loading states */
.image-loaded {
  animation: fadeInScale 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadeInScale {
  0% {
    opacity: 0;
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Enhanced insight card hover effects */
.insight-card-wrapper:hover .insight-image {
  transform: scale(1.08);
  filter: brightness(1.1) contrast(1.05);
}

.insight-card-wrapper:hover .quality-indicator {
  opacity: 1;
  transform: translateY(-2px);
}

/* Progressive image loading placeholder */
.image-placeholder {
  background: linear-gradient(
    135deg,
    #f1f5f9 0%,
    #e2e8f0 25%,
    #f1f5f9 50%,
    #e2e8f0 75%,
    #f1f5f9 100%
  );
  background-size: 400% 400%;
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  50% { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

/* High-DPI image optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .insight-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Enhanced backdrop blur for better glassmorphism effect */
.backdrop-blur-enhanced {
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

/* Responsive high-resolution adjustments */
@media (min-width: 1920px) {
  #insightsGrid .insight-card-wrapper {
    min-height: 520px;
  }
}

@media (min-width: 2560px) {
  #insightsGrid .insight-card-wrapper {
    min-height: 600px;
  }
}

/* Enhanced quality indicators */
.quality-indicator {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.8;
}

.quality-indicator:hover {
  transform: scale(1.1);
  opacity: 1;
}

/* Smooth transitions for card interactions */
.card-transition {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-scale:hover {
  transform: scale(1.02) translateY(-4px);
}

/* Enhanced text readability on images */
.text-shadow-enhanced {
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3), 0 1px 2px rgba(0, 0, 0, 0.2);
}

/* Better focus states for accessibility */
.insight-card-wrapper:focus-visible {
  outline: 3px solid #3b82f6;
  outline-offset: 2px;
}

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

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

/* Rich Text Content Styles */
#aboutDescription strong,
#aboutDescription b {
  font-weight: bold !important;
}

#aboutDescription em,
#aboutDescription i {
  font-style: italic !important;
}

#aboutDescription u {
  text-decoration: underline !important;
}

/* Allow inline styles to work */
#aboutDescription span {
  display: inline !important;
}

/* Simple and direct approach */
#aboutDescription span[style*="color"] {
  color: inherit !important;
}

#aboutDescription span[style*="font-size"] {
  font-size: inherit !important;
}

/* Specific color overrides */
#aboutDescription span[style*="color: #ff0000"] { color: #ff0000 !important; }
#aboutDescription span[style*="color: #0000ff"] { color: #0000ff !important; }
#aboutDescription span[style*="color: #008000"] { color: #008000 !important; }
#aboutDescription span[style*="color: #800080"] { color: #800080 !important; }
#aboutDescription span[style*="color: #ffa500"] { color: #ffa500 !important; }
#aboutDescription span[style*="color: #808080"] { color: #808080 !important; }

/* Force all color styles to work */
#aboutDescription span[style*="color"] {
  color: inherit !important;
}

/* Override with specific colors */
#aboutDescription span[style*="color: #ff0000"] { color: #ff0000 !important; }
#aboutDescription span[style*="color: #0000ff"] { color: #0000ff !important; }
#aboutDescription span[style*="color: #008000"] { color: #008000 !important; }
#aboutDescription span[style*="color: #800080"] { color: #800080 !important; }
#aboutDescription span[style*="color: #ffa500"] { color: #ffa500 !important; }
#aboutDescription span[style*="color: #808080"] { color: #808080 !important; }

/* Direct color classes */
.red-text { color: #ff0000 !important; }
.blue-text { color: #0000ff !important; }
.green-text { color: #008000 !important; }
.purple-text { color: #800080 !important; }
.orange-text { color: #ffa500 !important; }
.gray-text { color: #808080 !important; }

/* Direct font size classes */
.small-text { font-size: 12px !important; }
.normal-text { font-size: 16px !important; }
.large-text { font-size: 20px !important; }
.huge-text { font-size: 24px !important; }

/* Specific font size classes */
.font-12px { font-size: 12px !important; }
.font-16px { font-size: 16px !important; }
.font-20px { font-size: 20px !important; }
.font-24px { font-size: 24px !important; }

/* Specific font size overrides */
#aboutDescription span[style*="font-size: 12px"] { font-size: 12px !important; }
#aboutDescription span[style*="font-size: 16px"] { font-size: 16px !important; }
#aboutDescription span[style*="font-size: 20px"] { font-size: 20px !important; }
#aboutDescription span[style*="font-size: 24px"] { font-size: 24px !important; }

/* CSS custom properties for dynamic values */
:root {
  --font-size-value: 16px;
  --color-value: #000000;
}

/* List styles for rich text content */
#aboutDescription ul {
  list-style-type: disc;
  margin: 1rem 0;
  padding-left: 2rem;
}

#aboutDescription ol {
  list-style-type: decimal;
  margin: 1rem 0;
  padding-left: 2rem;
}

#aboutDescription li {
  margin: 0.5rem 0;
  line-height: 1.6;
}

/* Reduce motion for users with motion sensitivity */
@media (prefers-reduced-motion: reduce) {
  .image-loaded,
  .card-transition,
  .card-hover-scale:hover {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
  
  .image-placeholder {
    animation: none !important;
    background: #f1f5f9 !important;
  }
}

/* Dark mode support for better contrast */
@media (prefers-color-scheme: dark) {
  .image-placeholder {
    background: linear-gradient(
      135deg,
      #374151 0%,
      #4b5563 25%,
      #374151 50%,
      #4b5563 75%,
      #374151 100%
    );
  }
  
  .backdrop-blur-enhanced {
    background-color: rgba(0, 0, 0, 0.3);
  }
}
