/* Variables CSS para consistencia */
:root {
  --primary-color: #003366;
  --primary-hover: #004080;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --danger-color: #dc3545;
  --light-blue: #e6f0ff;
  --light-green: #e8f5e8;
  --light-purple: #f3e5f5;
  --border-radius: 8px;
  --box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* Base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

/* Header mejorado */
header {
  background-color: #f8f9fa;
  color: #333;
  padding: clamp(12px, 3vw, 24px);
  border-bottom: 2px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--box-shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo-title {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 16px);
}

.logo-title img {
  height: clamp(40px, 8vw, 50px);
  width: auto;
}

.logo-title h1 {
  margin: 0;
  font-size: clamp(1.1em, 2.5vw, 1.3em);
  font-weight: 600;
  line-height: 1.2;
  color: #222;
}

/* Breadcrumb consistente */
.breadcrumb {
  background: linear-gradient(135deg, #e6f0ff 0%, #cce7ff 100%);
  padding: clamp(12px, 3vw, 16px) clamp(16px, 4vw, 24px);
  font-size: clamp(0.8em, 2vw, 0.9em);
  border-bottom: 1px solid #ddd;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  position: sticky;
  top: 70px;
  z-index: 99;
}

.breadcrumb-container {
  display: flex;
  align-items: center;
  gap: clamp(8px, 2vw, 12px);
  max-width: 1200px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.breadcrumb-back {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: clamp(6px, 2vw, 8px) clamp(8px, 2.5vw, 12px);
  border-radius: var(--border-radius);
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(0, 51, 102, 0.2);
  white-space: nowrap;
}

.breadcrumb-back:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(0, 51, 102, 0.3);
  transform: translateX(-2px);
  text-decoration: none;
  color: #002244;
}

.back-icon {
  font-size: 1.1em;
  font-weight: bold;
}

.back-text {
  font-size: clamp(0.85em, 2vw, 0.95em);
}

.breadcrumb-divider {
  color: #666;
  font-weight: normal;
  margin: 0 2px;
}

.breadcrumb-current {
  color: #555;
  font-weight: 500;
}

/* Container principal */
.container {
  max-width: 1200px;
  margin: clamp(15px, 3vw, 30px) auto;
  padding: 0 clamp(15px, 3vw, 20px);
}

/* Hero section moderna */
.hero-section {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  padding: clamp(40px, 6vw, 60px) clamp(30px, 5vw, 40px);
  border-radius: 16px;
  margin-bottom: clamp(30px, 6vw, 50px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.3);
  text-align: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="guide" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.05"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.05"/><rect x="10" y="40" width="80" height="2" fill="white" opacity="0.03"/><rect x="40" y="10" width="2" height="80" fill="white" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23guide)"/></svg>');
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
}

.hero-title {
  font-size: clamp(2em, 5vw, 3em);
  font-weight: 700;
  margin: 0 0 clamp(15px, 3vw, 20px);
  line-height: 1.1;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: clamp(1.1em, 2.5vw, 1.4em);
  font-weight: 400;
  margin: 0;
  opacity: 0.95;
  line-height: 1.3;
}

/* Tabs de navegación */
.tabs-navigation {
  display: flex;
  justify-content: center;
  margin: clamp(30px, 6vw, 50px) 0 clamp(20px, 4vw, 30px);
  background: white;
  border-radius: 12px;
  padding: 8px;
  box-shadow: var(--box-shadow);
  border: 1px solid #e9ecef;
}

.tab-button {
  flex: 1;
  max-width: 250px;
  padding: clamp(12px, 3vw, 16px) clamp(20px, 4vw, 30px);
  background: none;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: clamp(1em, 2.5vw, 1.1em);
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #666;
}

.tab-button.active {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

.tab-button:not(.active):hover {
  background: var(--light-blue);
  color: var(--primary-color);
}

.tab-icon {
  font-size: 1.2em;
}

/* Contenido de tabs - SIN ANIMACIONES QUE CAUSEN SALTOS */
.tab-content {
  display: none !important;
}

.tab-content.active {
  display: block !important;
}

/* Asegurar que el contenido visible se muestre SIN transiciones */
.tab-content[style*="display: block"] {
  display: block !important;
}

/* Animación simple solo para fadeIn inicial */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Sección de pasos */
.steps-section {
  background: white;
  border-radius: 16px;
  padding: clamp(30px, 6vw, 50px);
  margin-bottom: clamp(30px, 6vw, 50px);
  box-shadow: var(--box-shadow);
  border: 1px solid #e9ecef;
}

}

.section-title {
  font-size: clamp(1.8em, 4vw, 2.2em);
  color: var(--primary-color);
  margin: 0 0 clamp(10px, 2vw, 15px);
  font-weight: 600;
}

.section-subtitle {
  font-size: clamp(1em, 2.5vw, 1.2em);
  color: #666;
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Timeline de pasos */
.steps-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.steps-timeline::before {
  content: '';
  position: absolute;
  left: 30px;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--light-blue) 100%);
  border-radius: 2px;
}

.step-item {
  position: relative;
  padding: clamp(20px, 4vw, 25px) clamp(20px, 4vw, 25px) clamp(20px, 4vw, 25px) clamp(70px, 12vw, 80px);
  margin-bottom: clamp(20px, 4vw, 30px);
  background: white;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
  transition: var(--transition);
}

.step-item:hover {
  transform: translateX(5px);
  box-shadow: 0 6px 25px rgba(0, 51, 102, 0.12);
}

.step-number {
  position: absolute;
  left: clamp(15px, 3vw, 20px);
  top: clamp(20px, 4vw, 25px);
  width: clamp(45px, 8vw, 60px);
  height: clamp(45px, 8vw, 60px);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: clamp(1.1em, 2.5vw, 1.3em);
  box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

.step-content h3 {
  font-size: clamp(1.2em, 2.8vw, 1.4em);
  color: var(--primary-color);
  margin: 0 0 clamp(8px, 2vw, 12px);
  font-weight: 600;
}

.step-content p {
  color: #555;
  margin: 0 0 clamp(12px, 2.5vw, 15px);
  line-height: 1.6;
  font-size: clamp(0.95em, 2vw, 1em);
}

.step-actions {
  display: flex;
  gap: clamp(10px, 2vw, 15px);
  flex-wrap: wrap;
}

.step-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 500;
  font-size: clamp(0.9em, 2vw, 1em);
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.step-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
  text-decoration: none;
  color: white;
}

.step-button.secondary {
  background: var(--secondary-color);
}

.step-button.secondary:hover {
  box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

/* Servicios grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(20px, 4vw, 25px);
  margin: clamp(30px, 6vw, 40px) 0;
}

.service-card {
  background: white;
  border-radius: 12px;
  padding: clamp(25px, 5vw, 30px);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
  border: 1px solid #e9ecef;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--success-color), #20c997);
}

.service-card.colegiados::before {
  background: linear-gradient(90deg, var(--primary-color), var(--primary-hover));
}

.service-card.upcoming::before {
  background: linear-gradient(90deg, var(--warning-color), #fd7e14);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 51, 102, 0.15);
}

.service-icon {
  font-size: clamp(2.2em, 5vw, 2.8em);
  margin-bottom: clamp(15px, 3vw, 20px);
  display: block;
}

.service-title {
  font-size: clamp(1.2em, 2.8vw, 1.4em);
  font-weight: 600;
  color: var(--primary-color);
  margin: 0 0 clamp(12px, 2.5vw, 15px);
}

.service-description {
  color: #555;
  line-height: 1.6;
  margin: 0 0 clamp(15px, 3vw, 20px);
  font-size: clamp(0.9em, 2vw, 1em);
}

.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
  padding: clamp(8px, 2vw, 10px) clamp(15px, 3vw, 20px);
  border: 2px solid var(--primary-color);
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-size: clamp(0.9em, 2vw, 1em);
}

.service-link:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  text-decoration: none;
}

.service-link.available {
  background: var(--success-color);
  border-color: var(--success-color);
  color: white;
}

.service-link.available:hover {
  background: #1e7e34;
  border-color: #1e7e34;
}

.service-link.coming-soon {
  background: var(--warning-color);
  border-color: var(--warning-color);
  color: #212529;
  cursor: default;
}

/* Sección de ayuda */
.help-section {
  background: linear-gradient(135deg, var(--light-blue) 0%, #f0f8ff 100%);
  border-radius: 16px;
  padding: clamp(30px, 6vw, 50px);
  margin: clamp(40px, 8vw, 60px) 0;
  border: 1px solid #b3d9ff;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: clamp(20px, 4vw, 30px);
  margin-top: clamp(25px, 5vw, 30px);
}

.help-item {
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: clamp(20px, 4vw, 25px);
  transition: var(--transition);
  backdrop-filter: blur(10px);
}

.help-item:hover {
  background: rgba(255, 255, 255, 0.95);
  transform: translateY(-3px);
}

.help-icon {
  font-size: clamp(1.8em, 4vw, 2.2em);
  margin-bottom: clamp(12px, 2.5vw, 15px);
  display: block;
  color: var(--primary-color);
}

.help-item h4 {
  font-size: clamp(1.1em, 2.5vw, 1.2em);
  color: var(--primary-color);
  margin: 0 0 8px;
  font-weight: 600;
}

.help-item p {
  color: #555;
  margin: 0;
  line-height: 1.5;
  font-size: clamp(0.9em, 2vw, 1em);
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  text-align: center;
  padding: clamp(20px, 4vw, 30px);
  font-size: clamp(0.85em, 2vw, 0.9em);
  margin-top: clamp(50px, 10vw, 80px);
}

/* Media Queries */
@media (max-width: 768px) {
  .logo-title {
    flex-direction: column;
    text-align: center;
  }

  .breadcrumb-container {
    justify-content: center;
  }

  .tabs-navigation {
    flex-direction: column;
    gap: 8px;
  }

  .tab-button {
    max-width: none;
  }

  .steps-timeline::before {
    left: 20px;
  }

  .step-item {
    padding-left: clamp(60px, 10vw, 70px);
  }

  .step-number {
    left: 10px;
    width: 40px;
    height: 40px;
    font-size: 1em;
  }

  .step-actions {
    flex-direction: column;
  }

  .step-button {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 10px;
  }

  .hero-section,
  .steps-section,
  .help-section {
    padding: 20px;
    margin-bottom: 20px;
  }
}

/* Animaciones */
.fade-in {
  animation: fadeIn 0.8s ease-out;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus mejorado */
.tab-button:focus,
.step-button:focus,
.service-link:focus,
.breadcrumb-back:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}