
/* HERO SECTION */

/* OBJETIVO PRINCIPAL */
.objetivo-principal {
  background: white;
  margin: 60px auto 40px;
  max-width: 1100px;
  padding: 40px;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  border-left: 6px solid #ffd500;
}

.objetivo-principal h2 {
  color: #1e1fb2;
  font-size: 2em;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.objetivo-principal p {
  color: #555;
  line-height: 1.9;
  font-size: 1.05em;
}

/* ORGANIGRAMA IMAGEN */
.organigrama-imagen {
  text-align: center;
  margin: 40px auto 60px;
  padding: 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.organigrama-imagen img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

/* SECTION TITLE */
.section-title {
  text-align: center;
  color: #1e1fb2;
  font-size: 2.2em;
  margin: 60px 0 40px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 4px;
  background: #ffc107;
  margin: 20px auto 0;
  border-radius: 2px;
}

/* ORGANIGRAMA VISUAL */
.organigrama-visual {
  background: white;
  padding: 50px 30px;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
  margin: 60px 0;
}

.jerarquia {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
}

.nivel-jerarquia {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.cargo-box {
  background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
  color: white;
  padding: 25px 35px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(26, 35, 126, 0.3);
  min-width: 250px;
  position: relative;
}

.cargo-box.nivel-2 {
  background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
  color: #1a237e;
}

.cargo-box h4 {
  font-size: 1.2em;
  margin-bottom: 5px;
}

.cargo-box p {
  font-size: 0.9em;
  margin-bottom: 0.9;
}

.conexion-vertical {
  width: 3px;
  height: 30px;
  background: #1a237e;
}

/* IMAGEN DE ENCABEZADO EN TARJETAS */
.departamento-header-img {
  width: calc(100% + 70px);
  height: 200px;
  margin: -35px -35px 20px -35px;
  overflow: hidden;
  border-radius: 15px 15px 0 0;
}

.departamento-header-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* DEPARTAMENTOS GRID */
.departamentos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
  margin: 40px 0;
}

.departamento-card {
  background: white;
  border-radius: 15px;
  padding: 35px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.8);
  transition: all 0.3s ease;
  border-top: 5px solid #ffd500;
  position: relative;
  overflow: hidden;
}

.departamento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #ffc107, #ff9800);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.departamento-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.departamento-card:hover::before {
  transform: scaleX(1);
}

.departamento-icon {
  font-size: 3em;
  margin-bottom: 15px;
  display: block;
}

.departamento-card h3 {
  color: #1a237e;
  font-size: 1.6em;
  margin-bottom: 15px;
}

.departamento-card .objetivo-tag {
  background: #e3f2fd;
  color: #1a237e;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.85em;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 15px;
}

.departamento-card p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* FUNCIONES ACORDEON */
.funciones-container {
  margin-top: 20px;
}

.funciones-toggle {
  background: #ffc107;
  color: #1a237e;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  width: 100%;
  text-align: left;
  font-size: 1em;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.funciones-toggle:hover {
  background: #ffb300;
}

.funciones-toggle::after {
  content: '▼';
  transition: transform 0.3s ease;
}

.funciones-toggle.active::after {
  transform: rotate(180deg);
}

.funciones-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  background: #f8f9fa;
  border-radius: 0 0 8px 8px;
}

.funciones-content.active {
  max-height: 5000px;
  padding: 20px;
  margin-top: 5px;
}

.funciones-content ul {
  list-style: none;
  padding: 0;
}

.funciones-content li {
  padding: 10px 0;
  padding-left: 30px;
  position: relative;
  color: #555;
  line-height: 1.6;
}

.funciones-content li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #ffc107;
  font-weight: bold;
  font-size: 1.2em;
}

/* RESPONSIVE DESIGN */

/* Tablets y pantallas medianas (hasta 1024px) */
@media screen and (max-width: 1024px) {

  /* DEPARTAMENTO INDICATOR */
  .departamento-indicator {
    padding: 30px 15px;
  }

  .departamento-indicator h1 {
    font-size: 2em;
  }

  /* OBJETIVO PRINCIPAL */
  .objetivo-principal {
    margin: 40px auto 30px;
    padding: 30px;
  }

  .objetivo-principal h2 {
    font-size: 1.7em;
  }

  /* SECTION TITLE */
  .section-title {
    font-size: 1.9em;
    margin: 50px 0 30px;
  }

  /* ORGANIGRAMA */

  .organigrama-imagen {
    margin: 30px 0 40px;
    padding: 15px;
  }

  .organigrama-visual {
    padding: 40px 20px;
    margin: 40px 0;
  }

  .cargo-box {
    min-width: 220px;
    padding: 20px 30px;
  }

  /* DEPARTAMENTOS GRID */
  .departamentos-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
  }

  .departamento-card {
    padding: 30px;
  }

  .departamento-header-img {
    width: calc(100% + 60px);
    margin: -30px -30px 15px -30px;
    height: 180px;
  }
}

/* Tablets pequeñas (hasta 768px) */
@media screen and (max-width: 768px) {

  /* OBJETIVO PRINCIPAL */
  .objetivo-principal {
    margin: 30px 15px;
    padding: 25px;
  }

  .objetivo-principal h2 {
    font-size: 1.5em;
    flex-direction: column;
    gap: 10px;
  }

  .objetivo-principal p {
    font-size: 1em;
  }

  /* SECTION TITLE */
  .section-title {
    font-size: 1.6em;
    margin: 40px 0 25px;
  }

  .section-title::after {
    width: 80px;
    height: 3px;
  }

  /* ORGANIGRAMA */

  .organigrama-imagen {
    margin: 25px 10px 35px;
    padding: 12px;
  }

  .organigrama-visual {
    padding: 30px 15px;
    margin: 30px 10px;
  }

  .nivel-jerarquia {
    gap: 15px;
  }

  .cargo-box {
    min-width: 200px;
    padding: 18px 25px;
  }

  .cargo-box h4 {
    font-size: 1.1em;
  }

  .cargo-box p {
    font-size: 0.85em;
  }

  .conexion-vertical {
    height: 20px;
  }

  /* DEPARTAMENTOS GRID */
  .departamentos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 30px 10px;
  }

  .departamento-card {
    padding: 25px;
  }

  .departamento-icon {
    font-size: 2.5em;
  }

  .departamento-card h3 {
    font-size: 1.4em;
  }

  .departamento-header-img {
    width: calc(100% + 50px);
    margin: -25px -25px 15px -25px;
    height: 160px;
  }
}

/* Móviles pequeños (hasta 480px) */
@media screen and (max-width: 480px) {

  /* OBJETIVO PRINCIPAL */
  .objetivo-principal {
    margin: 25px 10px;
    padding: 20px;
    border-left: 4px solid #ffd500;
  }

  .objetivo-principal h2 {
    font-size: 1.3em;
    margin-bottom: 15px;
  }

  .objetivo-principal p {
    font-size: 0.95em;
    line-height: 1.7;
  }

  /* SECTION TITLE */
  .section-title {
    font-size: 1.4em;
    margin: 30px 0 20px;
  }

  .section-title::after {
    width: 60px;
    height: 3px;
    margin: 15px auto 0;
  }

  /* ORGANIGRAMA */

  .organigrama-imagen {
    margin: 20px 5px 30px;
    padding: 10px;
  }

  .organigrama-visual {
    padding: 25px 10px;
    margin: 25px 5px;
  }

  .jerarquia {
    gap: 20px;
  }

  .nivel-jerarquia {
    gap: 12px;
  }

  .cargo-box {
    min-width: 100%;
    padding: 15px 20px;
  }

  .cargo-box h4 {
    font-size: 1em;
  }

  .cargo-box p {
    font-size: 0.8em;
  }

  .conexion-vertical {
    height: 15px;
    width: 2px;
  }

  /* DEPARTAMENTOS GRID */
  .departamentos-grid {
    grid-template-columns: 1fr;
    gap: 20px;
    margin: 25px 5px;
  }

  .departamento-card {
    padding: 20px;
  }

  .departamento-card:hover {
    transform: translateY(-4px);
  }

  .departamento-icon {
    font-size: 2.2em;
    margin-bottom: 12px;
  }

  .departamento-card h3 {
    font-size: 1.3em;
    margin-bottom: 12px;
  }

  .departamento-card .objetivo-tag {
    padding: 6px 10px;
    font-size: 0.8em;
    margin-bottom: 12px;
  }

  .departamento-card p {
    font-size: 0.9em;
    line-height: 1.6;
    margin-bottom: 15px;
  }

  /* FUNCIONES ACORDEON */
  .funciones-toggle {
    padding: 10px 15px;
    font-size: 0.95em;
  }

  .funciones-content.active {
    padding: 15px;
  }

  .funciones-content li {
    padding: 8px 0;
    padding-left: 25px;
    font-size: 0.9em;
  }

  .funciones-content li::before {
    font-size: 1em;
  }

  .departamento-header-img {
    width: calc(100% + 40px);
    margin: -20px -20px 15px -20px;
    height: 140px;
  }
}

/* Móviles muy pequeños (hasta 375px) */
@media screen and (max-width: 375px) {

  /* OBJETIVO PRINCIPAL */
  .objetivo-principal {
    padding: 18px;
  }

  .objetivo-principal h2 {
    font-size: 1.2em;
  }

  .objetivo-principal p {
    font-size: 0.9em;
  }

  /* SECTION TITLE */
  .section-title {
    font-size: 1.2em;
  }

  /* ORGANIGRAMA */

  .organigrama-imagen {
    margin: 18px 5px 25px;
    padding: 8px;
  }

  .cargo-box {
    padding: 12px 15px;
  }

  .cargo-box h4 {
    font-size: 0.95em;
  }

  .cargo-box p {
    font-size: 0.75em;
  }

  /* DEPARTAMENTOS GRID */
  .departamento-card {
    padding: 18px;
  }

  .departamento-icon {
    font-size: 2em;
  }

  .departamento-card h3 {
    font-size: 1.2em;
  }

  .departamento-card p {
    font-size: 0.85em;
  }

  .funciones-toggle {
    font-size: 0.9em;
    padding: 8px 12px;
  }

  .funciones-content li {
    font-size: 0.85em;
  }

  .departamento-header-img {
    width: calc(100% + 36px);
    margin: -18px -18px 12px -18px;
    height: 120px;
  }
}