/* TAILWIND CSS BASE */
@tailwind base;
@tailwind components;
@tailwind utilities;

/* CUSTOM CSS VARIABLES */
:root {
  --color-primary: #004AAD;
  --color-secondary: #00C4FF;
  --color-accent: #FF8A00;
  --color-success: #38B000;
  --color-dark: #1E1E1E;
  --color-gray: #4A4A4A;
}

/* DARK MODE SUPPORT */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary: #1E1E1E;
    --text-primary: #ffffff;
  }
}

/* GLOBAL 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: #333;
  background-color: #ffffff;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.dark body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* ACCESSIBILITY */
.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 */
*:focus {
  outline: 2px solid var(--color-secondary);
  outline-offset: 2px;
}

/* BUTTON STYLES */
.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.3s ease;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: #003885;
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 74, 173, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
}

.btn-secondary:hover {
  background-color: var(--color-primary);
  color: white;
}

/* CARD STYLES */
.card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.dark .card {
  background: #2a2a2a;
  color: white;
}

/* SECTION STYLES */
.section {
  padding: 5rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
}

.section-subtitle {
  font-size: 1.25rem;
  color: #666;
  text-align: center;
  margin-bottom: 3rem;
}

.dark .section-subtitle {
  color: #aaa;
}

/* VALUE PROPS SECTION */
.value-props {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 4rem 0;
}

.dark .value-props {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  align-items: center;
  justify-items: center;
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.8);
  border-radius: 0.75rem;
  transition: transform 0.3s ease;
}

.logo-item:hover {
  transform: scale(1.05);
}

.dark .logo-item {
  background: rgba(255, 255, 255, 0.1);
}

/* FEATURES SECTION */
.features {
  padding: 5rem 0;
  background: white;
}

.dark .features {
  background: #1a1a1a;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.feature-card {
  text-align: center;
  padding: 2rem;
  border-radius: 1rem;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .feature-card {
  background: #2a2a2a;
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

/* REVIEWS SECTION */
.reviews {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.dark .reviews {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.review-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  position: relative;
}

.review-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 20px;
  font-size: 4rem;
  color: var(--color-secondary);
  opacity: 0.3;
}

.dark .review-card {
  background: #2a2a2a;
}

.review-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.review-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin-right: 1rem;
}

.review-info h4 {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.review-info .company {
  color: #666;
  font-size: 0.875rem;
}

.dark .review-info .company {
  color: #aaa;
}

.rating {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.star {
  color: #fbbf24;
}

/* INSIGHTS SECTION */
.insights {
  padding: 5rem 0;
  background: white;
}

.dark .insights {
  background: #1a1a1a;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.insight-card {
  text-align: center;
  padding: 2rem;
  border-radius: 1rem;
  background: #f8fafc;
  transition: all 0.3s ease;
}

.insight-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark .insight-card {
  background: #2a2a2a;
}

.insight-number {
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* FAQ SECTION */
.faq {
  padding: 5rem 0;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.dark .faq {
  background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%);
}

.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: white;
  margin-bottom: 1rem;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.dark .faq-item {
  background: #2a2a2a;
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  text-align: left;
  background: none;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-question:hover {
  background-color: #f8fafc;
}

.dark .faq-question:hover {
  background-color: #333;
}

.faq-icon {
  transition: transform 0.3s ease;
}

.faq-question.active .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 1.5rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer.active {
  padding: 0 1.5rem 1.5rem;
  max-height: 500px;
}

/* CTA SECTION */
.cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, #003885 100%);
  color: white;
  padding: 5rem 0;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.1;
}

.cta-content {
  position: relative;
  z-index: 1;
}

.cta-form {
  background: white;
  color: #333;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 0.5rem;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  border-color: var(--color-primary);
  outline: none;
}

.dark .form-input {
  background: #333;
  border-color: #444;
  color: white;
}

/* FOOTER */
.footer {
  background: var(--color-gray);
  color: white;
  padding: 3rem 0 1rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-column h4 {
  margin-bottom: 1rem;
  color: white;
}

.footer-column ul {
  list-style: none;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  color: #aaa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-column ul li a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  border-top: 1px solid #555;
  padding-top: 1rem;
  text-align: center;
  color: #aaa;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .section-title {
    font-size: 2rem;
  }
  
  .feature-grid,
  .review-grid,
  .insight-grid {
    grid-template-columns: 1fr;
  }
  
  .cta-form {
    padding: 1.5rem;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

/* 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;
}

/* 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), #003885);
}

.bg-gradient-secondary {
  background: linear-gradient(135deg, var(--color-secondary), #00a8e8);
}

.shadow-glow {
  box-shadow: 0 0 20px rgba(0, 196, 255, 0.3);
}

/* LOADING STATES */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--color-primary);
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* PRINT STYLES */
@media print {
  .header,
  .footer,
  .cta,
  .btn {
    display: none;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  .section {
    padding: 1rem 0;
  }
}

/* PAIN POINTS STYLES */
.pain-points {
  padding: 5rem 0;
  background: white;
}

.dark .pain-points {
  background: #1a1a1a;
}

.pain-point-card {
  text-align: center;
  padding: 2rem;
  border-radius: 1rem;
  background: #f8fafc;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
}

.pain-point-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.dark .pain-point-card {
  background: #2a2a2a;
  border-color: #374151;
}

.pain-point-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  border-radius: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

.pain-point-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #1f2937;
}

.dark .pain-point-card h3 {
  color: white;
}

.pain-point-card p {
  color: #6b7280;
  line-height: 1.6;
}

.dark .pain-point-card p {
  color: #9ca3af;
}

/* CLOSING CTA STYLES */
.closing-cta {
  position: relative;
  overflow: hidden;
}

.closing-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('https://www.transparenttextures.com/patterns/cubes.png');
  opacity: 0.1;
}

.closing-cta > div {
  position: relative;
  z-index: 1;
}

/* CONSOLIDATED COOKIE BANNER STYLES - GDPR & WCAG COMPLIANT */
#cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a1a;
  border-top: 3px solid #004AAD;
  color: white;
  padding: 1rem;
  z-index: 9999;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out;
  role: dialog;
  aria-labelledby: cookie-title;
  aria-describedby: cookie-description;
  aria-live: polite;
}

#cookie-banner.show {
  transform: translateY(0);
}

#cookie-banner.hide {
  transform: translateY(100%);
}

/* Mejoras de accesibilidad */
#cookie-banner button {
  min-height: 44px;
  min-width: 120px;
  font-size: 16px;
  font-weight: 600;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 12px 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

#cookie-banner button:focus,
#cookie-banner button:focus-visible {
  outline: 3px solid #00C4FF;
  outline-offset: 2px;
  border-color: #00C4FF;
}

#cookie-banner button:hover {
  transform: translateY(-1px);
}

/* Alto contraste */
@media (prefers-contrast: high) {
  #cookie-banner {
    background: #000000;
    border-color: #ffffff;
  }
  
  #cookie-banner button {
    border: 2px solid #ffffff;
  }
}

/* Modal de preferencias */
#cookie-preferences-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  align-items: center;
  justify-content: center;
}

#cookie-preferences-modal.show {
  display: flex;
}

.cookie-modal-content {
  background: white;
  color: #333;
  padding: 2rem;
  border-radius: 0.5rem;
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.dark .cookie-modal-content {
  background: #1a1a1a;
  color: white;
}

.cookie-category {
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #e5e7eb;
}

.dark .cookie-category {
  border-bottom-color: #374151;
}

.cookie-category:last-child {
  border-bottom: none;
}

.cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.3s;
  border: 2px solid transparent;
}

.cookie-toggle:focus {
  outline: 2px solid #004AAD;
  outline-offset: 2px;
}

.cookie-toggle.active {
  background: #004AAD;
}

.cookie-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s;
}

.cookie-toggle.active::after {
  transform: translateX(26px);
}

/* Anuncios para lectores de pantalla */
.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;
}

/* Responsive design para móviles */
@media (max-width: 768px) {
  #cookie-banner {
    padding: 0.75rem;
  }
  
  #cookie-banner .flex {
    flex-direction: column;
    gap: 1rem;
  }
  
  #cookie-banner button {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* ABOUT SECTION STYLES */
.about {
  padding: 5rem 0;
}

.about .grid {
  gap: 3rem;
  align-items: center;
}

.about img {
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.about .absolute {
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.dark .about .absolute {
  background: #1a1a1a;
  border-color: #374151;
}

/* RESPONSIVE UPDATES */
@media (max-width: 768px) {
  .pain-point-card,
  .about .grid {
    grid-template-columns: 1fr;
  }
  
  .closing-cta .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}