/* ==================== ESTILOS ORGANIGRAMA ==================== */

/* Hero Section */
.hero-organigrama {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 5rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-organigrama::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-organigrama h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInDown 0.8s ease;
}

.hero-organigrama p {
  font-size: 1.25rem;
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s ease 0.2s both;
}

/* Toggle Buttons */
.toggle-view {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.toggle-btn {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: 2rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.toggle-btn svg {
  width: 20px;
  height: 20px;
}

.toggle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.toggle-btn.active {
  background: white;
  color: var(--primary);
  border-color: white;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Content Section */
.organigrama-section {
  padding: 4rem 0;
  background: linear-gradient(to bottom, #f8f9fa 0%, white 100%);
}

/* View Container */
.view-container {
  display: none;
  animation: fadeIn 0.5s ease;
}

.view-container.active {
  display: block;
}

/* ==================== ORGANIGRAMA VISUAL ==================== */
.organigrama-container {
  background: white;
  padding: 4rem 3rem;
  border-radius: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  position: relative;
  overflow: hidden;
}

.organigrama-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

/* Organigrama Tree Structure */
.organigrama-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4rem;
  position: relative;
}

.org-level {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  position: relative;
}

/* Connector Lines */
.org-level.level-2::before,
.org-level.level-3::before {
  content: "";
  position: absolute;
  top: -2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 2rem;
  background: linear-gradient(to bottom, var(--primary), transparent);
}

/* Horizontal connector for multiple nodes */
.org-level.level-2::after {
  content: "";
  position: absolute;
  top: -2rem;
  left: 20%;
  right: 20%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary) 20%, var(--primary) 80%, transparent);
}

.org-level.level-3::after {
  content: "";
  position: absolute;
  top: -2rem;
  left: 15%;
  right: 15%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary) 15%, var(--primary) 85%, transparent);
}

/* Node Styles */
.org-node {
  background: white;
  border: 3px solid #e0e7ff;
  border-radius: 1rem;
  padding: 2rem 1.5rem;
  text-align: center;
  min-width: 240px;
  max-width: 280px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  cursor: pointer;
  overflow: hidden;
}

.org-node::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.6s ease;
}

.org-node:hover::before {
  left: 100%;
}

.org-node:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  border-color: var(--primary);
  z-index: 10;
}

/* Director Node */
.org-node.node-director {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  border-color: var(--primary-dark);
  min-width: 320px;
  max-width: 380px;
  box-shadow: 0 10px 30px rgba(67, 97, 238, 0.3);
}

.org-node.node-director:hover {
  box-shadow: 0 20px 50px rgba(67, 97, 238, 0.4);
}

.org-node.node-director .node-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

/* Subsecretaria Node */
.org-node.node-subsecretaria {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-color: #667eea;
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.25);
}

.org-node.node-subsecretaria:hover {
  box-shadow: 0 15px 40px rgba(102, 126, 234, 0.35);
}

.org-node.node-subsecretaria .node-icon {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
}

/* Direccion Node */
.org-node.node-direccion {
  background: white;
  border-color: var(--secondary);
}

.org-node.node-direccion:hover {
  background: linear-gradient(135deg, #f8f9ff 0%, #fff 100%);
  border-color: var(--primary);
}

/* Node Icon */
.node-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.25);
  transition: all 0.4s ease;
}

.org-node:hover .node-icon {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 12px 30px rgba(67, 97, 238, 0.35);
}

.node-icon svg {
  width: 40px;
  height: 40px;
  color: white;
}

/* Node Icon Small */
.node-icon-small {
  width: 60px;
  height: 60px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.2);
  transition: all 0.4s ease;
}

.org-node:hover .node-icon-small {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
}

.node-icon-small svg {
  width: 30px;
  height: 30px;
  color: white;
}

/* Org Connector */
.org-connector {
  width: 2px;
  height: 3rem;
  background: linear-gradient(to bottom, var(--primary), transparent);
  margin: 0 auto;
}

/* Organigrama Visual Section */
.organigrama-visual-section {
  padding: 4rem 0;
  background: linear-gradient(to bottom, #f8f9fa 0%, white 100%);
}

.container-wide {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.organigrama-interactive {
  margin-top: 3rem;
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Hero Badge and Actions */
.hero-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-view {
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.938rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-view svg {
  width: 20px;
  height: 20px;
}

.btn-view:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.btn-view.active {
  background: white;
  color: var(--primary);
  border-color: white;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* Node Content */
.org-node h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
  line-height: 1.3;
}

.org-node.node-director h3,
.org-node.node-subsecretaria h3 {
  color: white;
  font-size: 1.4rem;
}

.org-node p {
  font-size: 0.938rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
}

.org-node.node-director p,
.org-node.node-subsecretaria p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
}

.org-node h4 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--gray-900);
  line-height: 1.3;
}

.org-node.node-direccion h4 {
  color: var(--gray-900);
}

/* Node Badge */
.node-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.375rem 1rem;
  background: rgba(67, 97, 238, 0.1);
  color: var(--primary);
  border-radius: 1rem;
  font-size: 0.813rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.org-node.node-director .node-badge,
.org-node.node-subsecretaria .node-badge {
  background: rgba(255, 255, 255, 0.25);
  color: white;
  backdrop-filter: blur(10px);
}

/* ==================== FUNCIONES VIEW ==================== */
.funciones-section {
  padding: 4rem 0;
  background: linear-gradient(to bottom, #f8f9fa 0%, white 100%);
}

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

.intro-funciones {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  border-left: 4px solid var(--primary);
}

.intro-funciones p {
  font-size: 1.125rem;
  color: var(--gray-700);
  line-height: 1.7;
  margin: 0;
}

/* Funcion Card */
.funciones-accordion {
  max-width: 1000px;
  margin: 0 auto;
}

.funcion-card {
  background: white;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.funcion-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.funcion-header {
  padding: 1.75rem 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #f8f9ff 0%, white 100%);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.funcion-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.funcion-card:hover .funcion-header::before {
  transform: scaleY(1);
}

.funcion-title {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.funcion-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  transition: all 0.3s ease;
}

.funcion-card:hover .funcion-icon {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.funcion-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.funcion-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.funcion-title p {
  font-size: 0.938rem;
  color: var(--gray-600);
  margin: 0;
}

.accordion-toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.accordion-toggle svg {
  width: 20px;
  height: 20px;
  color: white;
  transition: transform 0.3s ease;
}

.funcion-card.active .accordion-toggle {
  background: var(--primary-dark);
}

.funcion-card.active .accordion-toggle svg {
  transform: rotate(180deg);
}

.funcion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.funcion-card.active .funcion-content {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}

.funcion-list {
  list-style: none;
  padding: 2rem;
  margin: 0;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: grid;
  gap: 0.875rem;
}

.funcion-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.6;
  padding-left: 0;
}

.funcion-list li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.813rem;
  margin-top: 0.125rem;
}

/* Accordion */
.accordion-item {
  background: white;
  border-radius: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.accordion-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.accordion-header {
  padding: 1.75rem 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: linear-gradient(135deg, #f8f9ff 0%, white 100%);
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.accordion-header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--primary);
  transform: scaleY(0);
  transition: transform 0.3s ease;
}

.accordion-item:hover .accordion-header::before,
.accordion-item.active .accordion-header::before {
  transform: scaleY(1);
}

.accordion-header-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
}

.accordion-icon {
  width: 56px;
  height: 56px;
  min-width: 56px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
  transition: all 0.3s ease;
}

.accordion-item:hover .accordion-icon {
  transform: scale(1.05) rotate(5deg);
  box-shadow: 0 6px 20px rgba(67, 97, 238, 0.4);
}

.accordion-icon svg {
  width: 28px;
  height: 28px;
  color: white;
}

.accordion-title h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0 0 0.25rem 0;
  line-height: 1.3;
}

.accordion-title p {
  font-size: 0.938rem;
  color: var(--gray-600);
  margin: 0;
}

.accordion-toggle {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.accordion-toggle svg {
  width: 20px;
  height: 20px;
  color: white;
  transition: transform 0.3s ease;
}

.accordion-item.active .accordion-toggle {
  background: var(--primary-dark);
  transform: rotate(180deg);
}

/* Accordion Content */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.accordion-item.active .accordion-content {
  max-height: 1000px;
  transition: max-height 0.5s ease-in;
}

.accordion-body {
  padding: 2rem;
  background: white;
  border-top: 1px solid #e5e7eb;
}

.accordion-body h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 1rem 0;
}

.accordion-body ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.875rem;
}

.accordion-body li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.6;
}

.accordion-body li::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  min-width: 24px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  color: white;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.813rem;
  margin-top: 0.125rem;
}

/* ==================== ESTADISTICAS ==================== */
.stats-section {
  margin-top: 4rem;
  padding: 3rem 0;
  background: linear-gradient(135deg, #f8f9ff 0%, white 100%);
  border-radius: 1.5rem;
}

.stats-section h2 {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 3rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  padding: 0 3rem;
}

.stat-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

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

.stat-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.25);
  transition: all 0.4s ease;
}

.stat-card:hover .stat-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 30px rgba(67, 97, 238, 0.35);
}

.stat-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.stat-card h4 {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 1rem 0 0.5rem;
}

.stat-card p {
  font-size: 0.938rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin: 0;
}

/* Stats Org Section */
.stats-org-section {
  margin-top: 4rem;
  padding: 3rem 0;
  background: linear-gradient(135deg, #f8f9ff 0%, white 100%);
  border-radius: 1.5rem;
}

.stats-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  padding: 0 3rem;
}

.stat-org-card {
  background: white;
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.stat-org-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
}

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

.stat-org-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.25);
  transition: all 0.4s ease;
}

.stat-org-card:hover .stat-org-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 30px rgba(67, 97, 238, 0.35);
}

.stat-org-icon svg {
  width: 32px;
  height: 32px;
  color: white;
}

.stat-org-content h3 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.5rem 0;
  line-height: 1.2;
}

.stat-org-content p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.5;
  margin: 0;
  font-weight: 600;
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  .org-level {
    gap: 2rem;
  }

  .org-node {
    min-width: 220px;
    max-width: 260px;
  }

  .org-node.node-director {
    min-width: 280px;
    max-width: 320px;
  }

  .stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 0 2rem;
  }
}

@media (max-width: 768px) {
  .hero-organigrama {
    padding: 4rem 0 3rem;
  }

  .hero-organigrama h1 {
    font-size: 2.25rem;
  }

  .hero-organigrama p {
    font-size: 1.125rem;
  }

  .toggle-view {
    flex-direction: column;
    align-items: center;
  }

  .toggle-btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }

  .organigrama-container {
    padding: 3rem 1.5rem;
  }

  .organigrama-tree {
    gap: 3rem;
  }

  .org-level {
    gap: 1.5rem;
    flex-direction: column;
    align-items: center;
  }

  .org-level::after {
    display: none;
  }

  .org-node {
    min-width: 100%;
    max-width: 100%;
  }

  .org-node.node-director {
    min-width: 100%;
    max-width: 100%;
  }

  .accordion-header {
    padding: 1.5rem 1rem;
  }

  .accordion-icon {
    width: 48px;
    height: 48px;
    min-width: 48px;
  }

  .accordion-icon svg {
    width: 24px;
    height: 24px;
  }

  .accordion-title h3 {
    font-size: 1.125rem;
  }

  .accordion-title p {
    font-size: 0.875rem;
  }

  .accordion-body {
    padding: 1.5rem 1rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    padding: 0 1.5rem;
  }

  .stats-section h2 {
    font-size: 1.75rem;
  }
}

@media (max-width: 480px) {
  .hero-organigrama h1 {
    font-size: 1.875rem;
  }

  .hero-organigrama p {
    font-size: 1rem;
  }

  .node-icon {
    width: 64px;
    height: 64px;
  }

  .node-icon svg {
    width: 32px;
    height: 32px;
  }

  .org-node h3 {
    font-size: 1.125rem;
  }

  .org-node.node-director h3,
  .org-node.node-subsecretaria h3 {
    font-size: 1.25rem;
  }
}
