/* Estilos mejorados para ConTuCuota - Implementación directa de mejoras */

:root {
  --primary-color: #4CAF50;
  --primary-dark: #388E3C;
  --primary-light: #C8E6C9;
  --secondary-color: #2196F3;
  --secondary-dark: #1976D2;
  --secondary-light: #BBDEFB;
  --accent-color: #FF9800;
  --accent-dark: #F57C00;
  --accent-light: #FFE0B2;
  --success-color: #4CAF50;
  --warning-color: #FFC107;
  --error-color: #F44336;
  --info-color: #2196F3;
  --text-color: #2c3e50;
  --text-light: #546e7a;
  --text-dark: #1a2a36;
  --background-light: #f5f9fa;
  --background-alt: #ecf0f1;
  --white: #ffffff;
  --shadow-soft: 0 4px 6px rgba(0, 0, 0, 0.05);
  --shadow-medium: 0 6px 12px rgba(0, 0, 0, 0.08);
  --shadow-strong: 0 10px 20px rgba(0, 0, 0, 0.12);
  --transition-fast: all 0.2s ease;
  --transition-standard: all 0.3s ease;
  --transition-slow: all 0.5s ease;
  --border-radius-small: 4px;
  --border-radius: 8px;
  --border-radius-large: 12px;
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.25rem;
  --font-size-xl: 1.5rem;
  --font-size-xxl: 2rem;
  --font-size-xxxl: 3rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--background-light);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition-standard);
  position: relative;
}

a:hover {
  color: var(--primary-dark);
}

a:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

a:active {
  transform: translateY(1px);
}

img {
  max-width: 100%;
  height: auto;
}

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

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--primary-color);
  color: white;
  padding: 8px;
  z-index: 9999;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 0;
}

/* Header y navegación mejorados */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: var(--white);
  box-shadow: var(--shadow-soft);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: var(--transition-standard);
}

.header.scrolled {
  padding: 0.7rem 2rem;
  box-shadow: var(--shadow-medium);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  transition: var(--transition-standard);
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.header.scrolled .logo img {
  width: 50px;
  height: 50px;
}

nav {
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--text-color);
  font-weight: 600;
  position: relative;
  padding: 0.5rem 0;
}

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

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

nav a:focus {
  outline: none;
}

nav a:focus::after {
  width: 100%;
}

/* Hero section mejorada con mejor contraste */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem;
  background: linear-gradient(135deg, rgba(200, 230, 201, 0.8) 0%, rgba(255, 255, 255, 0.9) 100%);
  position: relative;
  overflow: hidden;
  background-image: url('hero-background.jpg');
  background-size: cover;
  background-position: center;
  min-height: 80vh;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  padding: var(--spacing-xl);
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: var(--border-radius);
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow-medium);
  animation: fadeIn 1s ease-out;
}

.hero h1 {
  font-size: var(--font-size-xxxl);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
  line-height: 1.2;
  letter-spacing: -0.5px;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.5);
}

.hero p {
  font-size: var(--font-size-lg);
  max-width: 700px;
  margin: 0 auto 2rem;
  color: var(--text-color);
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  background-color: var(--primary-color);
  color: white;
  font-weight: 600;
  border-radius: var(--border-radius);
  transition: var(--transition-standard);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
  box-shadow: var(--shadow-soft);
}

.cta-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: 0.5s;
  z-index: -1;
}

.cta-button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
}

.cta-button:hover::before {
  left: 100%;
}

.cta-button:active {
  transform: translateY(-1px);
}

.cta-button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.4);
}

/* Secciones generales mejoradas */
section {
  padding: 5rem 2rem;
  position: relative;
}

.section-title {
  font-size: var(--font-size-xxl);
  text-align: center;
  margin-bottom: 2.5rem;
  position: relative;
  padding-bottom: 1rem;
  color: var(--text-dark);
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--primary-color);
  border-radius: 3px;
}

.section-text {
  max-width: 800px;
  margin: 0 auto 2rem;
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--text-light);
  line-height: 1.7;
}

.subsection-title {
  font-size: var(--font-size-xl);
  text-align: center;
  margin: 3rem 0 2rem;
  color: var(--text-color);
}

/* Estilos alternados para secciones */
.section-padding {
  padding: 5rem 2rem;
}

.section-alt {
  background-color: var(--background-alt);
  position: relative;
}

.section-alt::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0.3;
}

.section-highlight {
  background-color: var(--primary-light);
  color: var(--text-color);
  position: relative;
}

.section-white {
  background-color: var(--white);
  position: relative;
}

.section-light {
  background-color: var(--background-light);
  position: relative;
}

.section-notice {
  background-color: #FFF8E1;
  padding: 2rem;
  text-align: center;
  font-size: 0.9rem;
  border-left: 4px solid var(--warning-color);
}

/* Pasos del proceso mejorados */
.process-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.step {
  flex: 1;
  min-width: 250px;
  max-width: 300px;
  text-align: center;
  padding: 2rem;
  background-color: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-standard);
  position: relative;
  overflow: hidden;
}

.step::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0.7;
}

.step:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-medium);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  background-color: var(--primary-color);
  color: white;
  font-size: 1.5rem;
  font-weight: 700;
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  position: relative;
  z-index: 1;
}

.step-number::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  background-color: var(--primary-light);
  border-radius: 50%;
  z-index: -1;
  opacity: 0.5;
  transform: scale(0);
  transition: transform 0.3s ease;
}

.step:hover .step-number::before {
  transform: scale(1);
}

.step h3 {
  margin-bottom: 1rem;
  font-size: var(--font-size-lg);
  color: var(--text-dark);
}

.step p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Calculadora mejorada */
.calculadora {
  background-color: var(--white);
  padding: 3rem 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  max-width: 900px;
  margin: 0 auto;
}

.calculator-form {
  display: flex;
  flex-direction: column;
  max-width: 500px;
  margin: 0 auto;
  background-color: var(--background-light);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  position: relative;
  overflow: hidden;
}

.calculator-form::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.calculator-form label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.calculator-form input,
.calculator-form select {
  padding: 0.8rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius-small);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.calculator-form input:focus,
.calculator-form select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.form-hint {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  margin-top: -1rem;
  margin-bottom: 1.5rem;
}

.resultado {
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--primary-light);
  border-radius: var(--border-radius);
  display: none;
  animation: fadeIn 0.5s ease;
}

.resultado h3 {
  color: var(--primary-dark);
  margin-bottom: 1rem;
  font-size: var(--font-size-lg);
  text-align: center;
}

.resultado-detalle {
  background-color: var(--white);
  padding: 1.5rem;
  border-radius: var(--border-radius-small);
  margin: 1rem 0;
  box-shadow: var(--shadow-soft);
}

.resultado-detalle p {
  margin-bottom: 0.5rem;
}

.resultado-nota {
  font-size: var(--font-size-sm);
  color: var(--text-light);
  text-align: center;
  margin-top: 1rem;
}

/* Formulario de contacto */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
  padding: 0.8rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius-small);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.privacy-consent {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
}

.privacy-consent input {
  margin-top: 0.3rem;
}

.privacy-consent label {
  font-size: var(--font-size-sm);
  font-weight: normal;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .sectors-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: var(--font-size-xxl);
  }
  
  .hero p {
    font-size: var(--font-size-md);
  }
  
  .process-steps {
    flex-direction: column;
    align-items: center;
  }
  
  .step {
    max-width: 100%;
    width: 100%;
  }
  
  .sectors-grid {
    grid-template-columns: 1fr;
  }
  
  .header {
    flex-direction: column;
    padding: 1rem;
  }
  
  nav {
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  section {
    padding: 3rem 1rem;
  }
  
  .hero {
    padding: 6rem 1rem;
  }
  
  .hero-content {
    padding: 1.5rem;
  }
  
  .hero h1 {
    font-size: var(--font-size-xl);
  }
  
  .section-title {
    font-size: var(--font-size-xl);
  }
  
  .calculator-form,
  .contact-form {
    padding: 1.5rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
}

/* Mejoras de accesibilidad adicionales */
.zoom-on-hover {
  transition: transform 0.3s ease;
}

.zoom-on-hover:hover {
  transform: scale(1.05);
}

.tooltip {
  position: relative;
  display: inline-block;
  border-bottom: 1px dotted var(--primary-color);
  cursor: help;
}

.tooltip .tooltip-text {
  visibility: hidden;
  width: 200px;
  background-color: var(--text-dark);
  color: var(--white);
  text-align: center;
  border-radius: var(--border-radius-small);
  padding: 0.5rem;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: var(--font-size-xs);
  font-weight: normal;
  box-shadow: var(--shadow-medium);
}

.tooltip .tooltip-text::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: var(--text-dark) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Mejoras específicas para la sección de herramientas */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.tool-card {
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  transition: var(--transition-standard);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tool-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  opacity: 0.7;
}

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

.tool-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin: 0 auto 1.5rem;
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-radius: 50%;
  font-size: 1.5rem;
}

.tool-card h3 {
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.tool-card p {
  color: var(--text-light);
  margin-bottom: 1.5rem;
}

.tool-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: transparent;
  color: var(--primary-color);
  border: 1px solid var(--primary-color);
  border-radius: var(--border-radius-small);
  font-weight: 600;
  transition: var(--transition-standard);
}

.tool-link:hover {
  background-color: var(--primary-color);
  color: var(--white);
}

/* Mejoras para la sección de contacto */
.section-cta {
  background-color: var(--primary-light);
  padding: 5rem 2rem;
  text-align: center;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Mejoras para la sección legal */
.legal-content {
  max-width: 800px;
  margin: 0 auto;
  background-color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-soft);
  font-size: var(--font-size-sm);
}

.legal-content h3 {
  margin: 1.5rem 0 1rem;
  color: var(--text-dark);
}

.legal-content p {
  margin-bottom: 1rem;
}

/* Mejoras para la visualización de resultados */
.resultado {
  display: none; /* Inicialmente oculto */
  margin-top: 2rem;
  padding: 1.5rem;
  background-color: var(--primary-light);
  border-radius: var(--border-radius);
  animation: fadeIn 0.5s ease;
  box-shadow: var(--shadow-soft);
}

.resultado.visible {
  display: block;
}

/* Mejoras para el hero con mejor contraste */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
  z-index: 1;
}

.hero-content {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero h1 {
  color: #1a2a36; /* Color más oscuro para mejor contraste */
  text-shadow: none;
}
