/* Common CSS - Shared across all sections */
/* Using Pico CSS as base framework */

:root {
  /* Layout system - colors now in [data-theme] */
  
  /* Spacing */
  --section-padding: 60px;
  --section-padding-mobile: 40px;
  --container-width: 1400px;
  
  --container-padding: 24px;
  
  /* Animation */
  --transition-fast: 150ms ease-out;
  --transition-normal: 200ms ease-out;
  --transition-slow: 300ms ease-out;
}

/* Academic-optimized Pico CSS theme */
[data-theme="light"] {
  /* 6-Color Academic System */
  --primary: #1E40AF;           /* Academic navy - trust & authority */
  --secondary: #6B7280;         /* Academic gray - neutral elements */
  --accent: #10B981;           /* Academic green - success & validation */
  
  /* Text hierarchy */
  --color: #1F2937;            /* Primary text - high contrast reading */
  --muted-color: #6B7280;      /* Secondary text - reduced eye strain */
  
  /* Surface */
  --background-color: #FFFFFF; /* Clean research environment */
  
  /* Pico semantic mappings */
  --h1-color: var(--color);
  --h2-color: var(--color);
  --h3-color: var(--color);
  --h4-color: var(--color);
  --h5-color: var(--color);
  --h6-color: var(--color);
  --muted-border-color: color-mix(in srgb, var(--secondary) 30%, white);
  --primary-focus: color-mix(in srgb, var(--primary) 12%, white);
  --primary-inverse: #FFFFFF;
  
  /* Academic semantic states */
  --academic-warning: #DC2626;  /* Problems, conflicts */
  --academic-surface: color-mix(in srgb, var(--background-color) 95%, var(--secondary));
  
  /* Additional color mappings for blog */
  --primary-light: #DBEAFE;     /* Light blue for backgrounds */
  --success-light: color-mix(in srgb, var(--accent) 12%, white);  /* Light green for highlights */
  --color-primary: var(--primary);
  --color-success: var(--accent);
  --color-text: var(--color);
  --color-text-secondary: var(--muted-color);
}

/* Pico CSS provides base layout - only custom overrides */
body {
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Reset any Pico CSS section defaults */
main {
  margin: 0;
  padding: 0;
}

/* Container system - enhanced for brand requirements */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--container-padding, 24px);
}

/* Use semantic HTML elements with Pico CSS instead of custom containers */

/* Section Spacing */
section {
  padding: var(--section-padding) 0;
  position: relative;
  margin: 0;
}

/* Visual Elements - Use Pico's mark and kbd elements */

/* Cards - enhanced from Pico article base */
.card {
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all var(--transition-normal);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

/* Button system - Pico CSS handles all button styling */

/* Use CSS Grid directly on elements instead of utility classes */

/* Layout - Use CSS Grid/Flexbox directly on elements */

/* Text Utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: var(--muted-color);
}

.text-primary {
  color: var(--primary);
}

.text-success {
  color: var(--success);
}

.text-danger {
  color: var(--danger);
}

/* Animation Utilities */
.fade-in {
  opacity: 0;
  animation: fadeIn 600ms ease-out forwards;
}

.slide-up {
  opacity: 0;
  transform: translateY(20px);
  animation: slideUp 600ms ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Grid and Layout */

/* Large Screens - 1200px+ */
@media (min-width: 1200px) {
  .container {
    padding: 0 32px;
  }
}

/* Medium-Large Screens - 1024-1199px */
@media (min-width: 1024px) and (max-width: 1199px) {
  .container {
    padding: 0 24px;
  }
}

/* Medium Screens - 768-1023px */
@media (min-width: 768px) and (max-width: 1023px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }
  
  .container {
    padding: 0 20px;
  }
  
  /* Grid-3 handled by Pico CSS responsive behavior */
}

/* Small-Medium Screens - 640-767px */
@media (min-width: 640px) and (max-width: 767px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }
  
  .container {
    padding: 0 20px;
  }
  
  /* Grid responsive behavior handled by Pico CSS */
  
  .card {
    padding: 28px;
  }
  
}

/* Small Screens - 480-639px */
@media (min-width: 480px) and (max-width: 639px) {
  :root {
    --section-padding: var(--section-padding-mobile);
  }
  
  .container {
    padding: 0 16px;
  }
  
  /* Grid responsive behavior handled by Pico CSS */
  
  .card {
    padding: 24px;
  }
  
  .btn {
    padding: 14px 24px;
  }
  
  .btn-large {
    padding: 16px 32px;
    font-size: 16px;
  }
  
  
}

/* Extra Small Screens - 320-479px */
@media (max-width: 479px) {
  :root {
    --section-padding: 30px;
  }
  
  .container {
    padding: 0 16px;
  }
  
  /* Grid responsive behavior handled by Pico CSS */
  
  .card {
    padding: 20px;
  }
  
  .btn {
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .btn-large {
    padding: 14px 24px;
    font-size: 15px;
  }
  
  .hide-mobile {
    display: none;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  button,
  [role="button"] {
    min-height: 44px;
    font-size: 16px;
  }
  
  button[data-size="large"] {
    min-height: 48px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .slide-up {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  button:hover,
  [role="button"]:hover {
    transform: none;
  }
}

/* Accessibility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus States */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Loading States */
.loading {
  position: relative;
  color: transparent;
}

.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Shared Styles for Screens 11-13 */
.comparison-badge,
.vs-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border-radius: 50%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.feature-list,
.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feature-list li,
.benefits-list li {
  display: flex;
  align-items: start;
  margin-bottom: 16px;
  line-height: 1.6;
}

.icon-check {
  color: var(--success);
  margin-right: 12px;
  flex-shrink: 0;
}

/* Pricing Card Styles */
.pricing-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.pricing-card.featured {
  border: 2px solid var(--primary);
}


/* Download Button Enhancement */
[download] {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

[download]:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Testimonial Card */
.testimonial-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 30px;
  backdrop-filter: blur(10px);
}

/* FAQ Styles */
.faq-item {
  padding-bottom: 32px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--gray-200);
}

.faq-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.faq-question {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 12px;
  cursor: pointer;
  transition: color 0.3s ease;
}

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

.faq-answer {
  color: var(--gray-600);
  line-height: 1.6;
}

/* Override Pico's default details/summary styling to prevent teal backgrounds */
details {
    background-color: white !important;
    border-color: var(--muted-border-color) !important;
}

summary {
    background-color: transparent !important;
    color: var(--color) !important;
}

details[open] > summary {
    background-color: transparent !important;
}

/* Specific overrides for tool pages */
.tool-page details {
    background: white !important;
}

.tool-page summary {
    background: transparent !important;
}

/* Force override any inherited teal/turquoise colors */
.faq-section details,
.faq-section summary,
.tool-page .faq-section details,
.tool-page .faq-section summary {
    background-color: transparent !important;
}

.faq-section details {
    background-color: white !important;
}