
:root {
  --primary: #005a87;
  --primary-light: #e6f1f8;
  --light-bg: #f5f8fa;
  --dark-text: #2a2a2a;
  --program: #0f6cbf;
  --center: #db6f24;
  --content-bg: #ffffff;
  --content-color: #333333;
  --content-highlight: #f0f9ff;
  --accent-text: #005a87;
  --highlight-box: #007bb5;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "Segoe UI", Arial, sans-serif;
  background: var(--light-bg);
  color: var(--dark-text);
}

.wrapper {
  display: flex;
  height: 100vh;
}

.sidebar {
  flex: 0 0 300px;
  height: 100vh;
  overflow: hidden;
}

.profile-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
  margin: 0;
  padding: 0;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.header-box {
  background-color: var(--highlight-box);
  color: white;
  padding: 16px 30px;
}

.header-box h1 {
  margin: 0;
  font-size: 1.8rem;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.header-texts {
  display: flex;
  flex-direction: column;
}

.title {
  margin: 6px 0 2px;
  font-size: 1.1rem;
  font-weight: 600;
  color: #cceeff;
}

.subtitle {
  margin: 0;
  font-size: 0.95rem;
  color: #bbdefb;
}

.contact-top {
  margin-top: 10px;
}

.contact-top a {
  background: white;
  color: var(--highlight-box);
  padding: 6px 12px;
  border-radius: 6px;
  font-weight: 600;
  display: inline-block;
  text-decoration: none;
}

.main-content {
  padding: 30px 40px;
  background: var(--content-bg);
  overflow-y: auto;
}

details {
  border: 1px solid var(--primary);
  border-radius: 6px;
  margin-bottom: 18px;
  background: var(--content-highlight);
  overflow: hidden;
}

summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  user-select: none;
  background: var(--primary-light);
}

details[open] summary {
  background: var(--primary);
  color: #ffffff;
}

details > *:not(summary) {
  padding: 16px 22px;
  background: var(--content-highlight);
  color: var(--accent-text);
  animation: fade 0.4s ease-in;
  font-weight: 500;
}

@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.programa {
  color: var(--program);
  font-weight: 700;
}

.centro {
  color: var(--center);
  font-weight: 600;
}

.fecha {
  color: #666666;
  font-style: italic;
}

/* Responsive: vista móvil */
@media (max-width: 800px) {
  .wrapper {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    display: flex;
    justify-content: center;
    padding: 20px;
    height: auto;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
  }

  .header-box {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
  }

  .header-box h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .header-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header-texts {
    flex: 1;
  }

  .main-content {
    padding: 20px;
  }

  .contact-top {
    margin-top: 10px;
    text-align: left;
    width: 100%;
  }
}


/* Abrir el details automáticamente al pasar el ratón */
details:hover {
  open: open;
}

/* Mostrar triángulo visual en el resumen */
summary::after {
  content: "▸";
  float: right;
  font-size: 1.2em;
  margin-left: 10px;
  transition: transform 0.2s ease-in-out;
}

/* Rotar triángulo si abierto */
details[open] summary::after {
  transform: rotate(90deg);
}



.accordion {
  border: 1px solid var(--primary);
  border-radius: 6px;
  margin-bottom: 18px;
  background: var(--content-highlight);
  overflow: hidden;
}

.accordion-title {
  padding: 14px 18px;
  font-weight: 600;
  cursor: pointer;
  background: var(--primary-light);
  position: relative;
}

.accordion-content {
  display: none;
  padding: 16px 22px;
  background: var(--content-highlight);
  color: var(--accent-text);
  font-weight: 500;
}

.accordion:hover .accordion-content {
  display: block;
}

.accordion:hover .accordion-title {
  background: var(--primary);
  color: white;
}

.accordion .arrow {
  float: right;
  transition: transform 0.3s ease;
}

.accordion:hover .arrow {
  transform: rotate(90deg);
}



@media (max-width: 800px) {
  .sidebar {
    padding: 0;
  }

  .profile-photo {
    margin: 0;
    align-self: flex-start;
  }

  .header-box {
    gap: 10px;
    padding: 16px;
  }
}



@media (max-width: 800px) {
  .wrapper {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    height: auto;
    padding: 0;
  }

  .content {
    width: 100%;
  }

  .header-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    padding: 16px;
  }

  .header-box h1 {
    font-size: 1.5rem;
    margin-bottom: 6px;
  }

  .profile-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0;
  }

  .header-row {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .header-texts {
    flex: 1;
  }

  .main-content {
    padding: 20px;
  }

  .contact-top {
    margin-top: 10px;
    text-align: left;
    width: 100%;
  }
}



@media (max-width: 800px) {
  .wrapper {
    flex-direction: column;
    height: auto;
  }

  .sidebar {
    display: none;
  }

  .profile-photo {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 14px;
  }

  .header-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    flex-wrap: nowrap;
  }

  .header-content {
    flex: 1;
  }

  .header-box h1 {
    font-size: 1.4rem;
    margin-bottom: 6px;
  }

  .header-row {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .main-content {
    padding: 20px;
  }

  .contact-top {
    margin-top: 6px;
    text-align: right;
  }
}



/* Mostrar foto izquierda solo en escritorio */
.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

/* Ajustes solo para móviles */
@media (max-width: 800px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
  }

  .mobile-profile {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 14px;
  }

  .header-box {
    flex-direction: column;
    align-items: flex-start;
  }
}



@media (max-width: 800px) {
  .mobile-profile {
    width: 110px;
    height: 110px;
  }
}



@media (max-width: 800px) {
  .header-box {
    flex-direction: row;
    align-items: center;
    gap: 16px;
  }

  .mobile-only {
    flex-direction: row;
    align-items: center;
    margin-bottom: 0;
  }

  .header-row {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: 6px;
  }

  .contact-top {
    display: flex;
    gap: 10px;
    margin-top: 10px;
  }

  .contact-top a {
    font-size: 1.4rem;
    padding: 4px 8px;
    background: white;
    color: var(--highlight-box);
    border-radius: 6px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .contact-top a span {
    display: none;
  }
}
