/* ===========================
   ESTILOS GLOBALES
   =========================== */
html {
  scroll-behavior: smooth;
  font-size: 62.5%;
  scroll-padding-top: 28rem;
}

*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --plasma-blue-dark: #1a2a3a;
  --plasma-blue: #234a6f;
  --plasma-blue-light: #3a7bbf;
  --plasma-celeste: #5bb6e6;
  --plasma-orange: #f15d28;
  --plasma-white: #ffffff;
  --plasma-gray-light: #eeecec;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background-color: var(--plasma-gray-light);
  padding-top: 0;
}

body.navbar-has-fixed {
  padding-top: 7rem;
}

code, pre, .code {
  font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* ===========================
   ANIMACIONES
   =========================== */
@keyframes fadeDown {
  from { transform: translateY(-100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

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

/* @keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(calc(-1 * (10rem + 2rem) * 14)); }
} */

/* ===========================
   HEADER & NAVIGATION
   =========================== */
header {
  display: flex;
  flex-direction: column;
  background-color: var(--plasma-blue-light);
}

header.navbar-fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(35,74,111,0.10);
  animation: fadeDown 0.5s;
}

.responsive-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.plasma-logo {
  width: 7rem;
}

#btn-menu {
  font-size: 5rem;
  color: var(--plasma-white);
  transition: transform 0.3s ease, opacity 0.15s ease;
}

#btn-menu:hover {
  cursor: pointer;
  color: var(--plasma-white);
}

#btn-menu.rotating {
  opacity: 0;
}

nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  padding: 1rem 3rem 1rem 2rem;
  margin: 0;
}

nav ul li {
  font-size: 2rem;
  margin: .5rem 0;
  border-bottom: .1rem solid var(--plasma-celeste);
  width: 16rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--plasma-white);
  padding: 0.5rem 0;
}

#main-nav {
  max-height: 40rem;
  opacity: 1;
  visibility: visible;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s, visibility 0.3s;
}

#main-nav.nav-hidden {
  max-height: 0;
  opacity: 0;
  visibility: hidden;
  transition: max-height 0.4s cubic-bezier(0.4,0,0.2,1), opacity 0.3s, visibility 0.3s;
}

/* ===========================
   WHATS SECTION (PROYECTO)
   =========================== */
.whats {
  position: relative;
  background-image: url('images/plasma-background.jpg');
  background-size: cover;
  background-position: center;
  margin-bottom: 2.5rem;
}

.whats::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(3px);
  z-index: 0;
}

.whats .dashboard-plasma,
.whats .whats-content {
  position: relative;
  z-index: 1;
}

.whats .dashboard-plasma {
  padding: .5rem 1rem;
  width: 100%;
}

.whats .whats-content {
  padding: .5rem 1rem;
  font-size: 1.5rem;
  color: var(--plasma-gray-light);
}

/* ===========================
   FEATURES & IMPACT (COLLAPSIBLES)
   =========================== */
.features-list-collapsible,
.impact-list-collapsible {
  margin: 2rem 1rem;
  margin-top: 2rem;
  background: var(--plasma-white);
  border-radius: .3rem;
  box-shadow: 0 2px 12px rgba(35, 74, 111, 0.07);
  border: 1.2px solid var(--plasma-celeste);
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  background: var(--plasma-white);
  color: var(--plasma-blue-dark);
  width: 100%;
  padding: 0;
  border-top-left-radius: .3rem;
  border-top-right-radius: .3rem;
  transition: background 0.2s, color 0.2s;
}

.collapsible-header[aria-expanded="true"] {
  background: var(--plasma-blue-light);
  color: var(--plasma-white);
}

.collapsible-header .material-symbols-outlined,
.greet-arrow {
  font-size: 2.4rem;
  color: var(--plasma-blue-dark);
  transition: transform 0.3s, color 0.2s;
  user-select: none;
  margin-right: 1.5rem;
}

.collapsible-header[aria-expanded="true"] .material-symbols-outlined,
.collapsible-header[aria-expanded="true"] .greet-arrow {
  transform: rotate(180deg);
  color: var(--plasma-white);
}

#features-toggle,
#impact-toggle {
  background: none;
  color: inherit;
  font-size: 2.2rem;
  font-weight: bold;
  margin: 0;
  padding: 1.5rem 2rem 1.2rem 2rem;
  border: none;
  outline: none;
  flex: 1;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border-radius: 0;
  box-sizing: border-box;
}

.features-list,
.impact-list {
  background: var(--plasma-white);
  color: var(--plasma-blue-dark);
  padding: .5rem 1rem;
  font-size: 1.3rem;
}

#features-list,
#impact-list {
  padding: 0 1rem 1.5rem 1rem;
  animation: fadeIn 0.3s;
  font-size: 1.6rem;
}

#features-list[hidden],
#impact-list[hidden] {
  display: none !important;
}

#impact-list {
  padding: 0 2rem 2rem 2rem;
}

/* ===========================
   US SECTION (EQUIPO)
   =========================== */
.us {
  margin-top: 2.5rem;
  background-color: var(--plasma-white);
}

.us h3 {
  font-size: 2.3rem;
  text-align: center;
  color: var(--plasma-blue-dark);
  margin: 1rem 0 2rem 0;
}

.us-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2rem 4rem;
  margin-bottom: 2rem;
}

.us-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 18rem;
}

.us-card img {
  width: 15rem;
  height: 15rem;
  object-fit: cover;
  border-radius: 50%;
  margin-bottom: 0.7rem;
}

.us-info {
  text-align: center;
  font-size: 1.6rem;
  color: var(--plasma-blue-dark);
}

.us-card a .linkedin-icon {
  width: 4.5rem;
  height: 4.5rem;
  margin-top: 0.5rem;
  filter: grayscale(1) brightness(0.7) sepia(1) hue-rotate(170deg) saturate(4);
}

/* ===========================
   PARTNERS SECTION
   =========================== */
.partners {
  padding: .5rem 1rem;
  background-color: var(--plasma-blue-white);
}

.partners h3 {
  text-align: center;
  font-size: 3.3rem;
}

.carousel-container {
  width: 100%;
  overflow: hidden;
  padding: 2rem 0;
  display: flex;
}

.carousel-track {
  display: flex;
  flex-wrap: nowrap;
}

.carousel-track > * {
  flex: 0 0 auto;
}

.carousel-track:hover .carousel-group {
  animation-play-state: paused;
}

.carousel-group {
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
  padding-right: 2rem;
  will-change: transform;
  animation: carouselScroll 40s linear infinite;
}

.partner-logo {
  width: 20rem;
  height: 20rem;
  object-fit: contain;
  padding: 1rem;
  background: var(--plasma-white);
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  flex-shrink: 0;
}

@keyframes carouselScroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}


/* ===========================
   PARTNERS GREETS SECTION
   =========================== */
.partners-greets {
  padding: .5rem 1rem;
  font-size: 1.5rem;
  background-color: var(--plasma-white);
}

.greet-collapsible {
  margin: 2rem 1rem;
  background: var(--plasma-white);
  border-radius: .3rem;
  box-shadow: 0 2px 16px rgba(35, 74, 111, 0.10);
  border: 1.5px solid var(--plasma-celeste);
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  overflow: hidden;
  padding: 0;
  text-align: center;
}

.greet-toggle {
  font-size: 1.5rem;
  font-weight: 600;
  background: none;
  color: var(--plasma-blue-dark);
  margin: 0;
  padding: 1.5rem 2rem 1.2rem 2rem;
  border: none;
  outline: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  border-radius: 0;
  box-sizing: border-box;
  margin-bottom: 0;
}

.greet-toggle[aria-expanded="true"] {
  background: var(--plasma-blue-light);
  color: var(--plasma-white);
}

.greet-list {
  padding: 0 1rem 1.5rem 1rem;
  animation: fadeIn 0.3s;
  text-align: left;
  font-size: 1.6rem;
  margin: 1.8rem auto 1rem auto;
  max-width: 32rem;
  display: block;
}

.greet-list[hidden] {
  display: none !important;
}

/* ===========================
   CONTACT SECTION
   =========================== */
.contact {
  padding: .5rem 1rem;
  background-color: var(--plasma-blue-white);
}

.contact h3 {
  text-align: center;
  font-size: 2.3rem;
  margin: 1.2rem;
}

.contact-form {
  background: var(--plasma-white);
  border-radius: .5rem;
  box-shadow: 0 2px 16px rgba(35, 74, 111, 0.10);
  padding: 2.5rem 2rem 2rem 2rem;
  max-width: 90%;
  margin: 2rem auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  border: 1.5px solid var(--plasma-celeste);
}

.contact-form label {
  color: var(--plasma-blue-dark);
  font-size: 1.5rem;
  margin-bottom: 0.2rem;
}

.contact-form input,
.contact-form textarea {
  font-size: 1.5rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--plasma-blue-light);
  border-radius: 0.1rem;
  background: var(--plasma-gray-light);
  color: var(--plasma-blue-dark);
  outline: none;
  transition: border 0.2s;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border: 1.5px solid var(--plasma-celeste);
}

.contact-form button {
  background: var(--plasma-blue-light);
  color: var(--plasma-white);
  border: none;
  border-radius: 0.1rem;
  padding: 1rem 0;
  font-size: 1.6rem;
  font-weight: bold;
  margin-top: 0.5rem;
  cursor: pointer;
  transition: background 0.2s;
}

.contact-form button:hover {
  background: var(--plasma-orange);
}

/* ===========================
   FOOTER
   =========================== */
footer {
  background-color: var(--plasma-blue-dark);
  color: var(--plasma-white);
  text-align: center;
  padding: .25rem 2rem;
  font-size: 1.2rem;
}

/* ===========================
   MEDIA QUERIES - TABLET & DESKTOP
   =========================== */
@media (min-width: 768px) {
  
  /* Header & Navigation */
  header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0;
  }

  .responsive-actions {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 1.2rem 3rem 1.2rem 3rem;
    gap: 0;
  }

  .plasma-logo {
    width: 8.2rem;
  }

  #btn-menu {
    display: none !important;
  }

  #main-nav {
    max-height: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static;
    background: none;
    transition: none;
    display: flex;
    align-items: center;
  }

  nav ul {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    margin: 0 4rem;
    gap: 2rem;
  }

  nav ul li {
    border-bottom: none;
    margin: 0;
    width: auto;
    font-size: 2rem;
  }

  nav ul li:last-child {
    margin-right: 0;
  }

  nav ul li a {
    color: var(--plasma-white);
    padding: 0.5rem 0.8rem;
    border-radius: 0.3rem;
    font-weight: 500;
    font-size: 2.2rem;
    display: block;
    transition: color 0.2s;
  }

  nav ul li a:hover {
    color: var(--plasma-blue-dark);
  }

  /* Whats Section */
  .whats {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10rem;
    min-height: 32rem;
  }

  .whats .dashboard-plasma {
    width: 45rem;
    max-width: 40vw;
    flex-shrink: 0;
    height: auto;
    margin: 0;
  }

  .whats .whats-content {
    flex: 1;
    padding: 2rem 2rem 2rem 0;
    font-size: 1.7rem;
    min-width: 0;
    width: 80%;
  }

  /* Us Section (Equipo) */
  .us-card {
    height: 30rem;
    justify-content: flex-start;
  }

  .us-card img {
    margin-bottom: 1rem;
  }

  .us-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
  }

  .us-group.investigadores {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 3rem;
    justify-items: center;
    max-width: 90rem;
    margin: 0 auto 2rem auto;
  }

  .us-group.investigadores .us-card:nth-child(1) {
    grid-column: 2 / 3;
  }

  .us-group.investigadores .us-card:nth-child(2) {
    grid-column: 5 / 6;
  }

  .us-group.investigadores .us-card:nth-child(3) {
    grid-column: 1 / 3;
    grid-row: 2;
  }

  .us-group.investigadores .us-card:nth-child(4) {
    grid-column: 3 / 5;
    grid-row: 2;
  }

  .us-group.investigadores .us-card:nth-child(5) {
    grid-column: 5 / 7;
    grid-row: 2;
  }

  .us-group.alumnos {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    justify-items: center;
    max-width: 60rem;
    margin: 0 auto 2rem auto;
  }

  .us-group.alumnos .us-card:first-child {
    grid-column: 1 / -1;
  }

  /* Partners Greets Section */
  .partners-greets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem 4rem;
    align-items: stretch;
    justify-content: center;
    margin: 5rem auto 0;
    padding: 4rem 5rem;
  }

  .greet-column {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    font-size: 1.8rem;
  }

  .greet-column > p {
    margin-bottom: 2rem;
    text-align: left;
  }

  .greet-collapsible {
    min-width: 0;
    max-width: 48rem;
    width: 100%;
    margin: 0 auto;
  }

  /* Greet collapsibles: siempre abiertos, mostrando h5 pero sin flecha ni click */
  .greet-collapsible .collapsible-header {
    cursor: default;
    pointer-events: none;
    background-color: var(--plasma-blue-light);
  }

  .greet-collapsible .greet-arrow {
    display: none;
  }

  .greet-toggle {
    cursor: default;
    pointer-events: none;
    color: var(--plasma-white);
  }

  .greet-list-wrapper {
    display: block !important;
  }

  /* Features & Impact: siempre abiertos, mostrando h3 pero sin flecha ni click */
  .features-list-collapsible .collapsible-header,
  .impact-list-collapsible .collapsible-header {
    cursor: default;
    pointer-events: none;
    background-color: var(--plasma-blue-light);
  }

  .features-list-collapsible .material-symbols-outlined,
  .impact-list-collapsible .material-symbols-outlined {
    display: none;
  }

  #features-toggle,
  #impact-toggle {
    cursor: default;
    pointer-events: none;
    color: var(--plasma-white);
  }

  #features-list,
  #impact-list {
    display: block !important;
  }

  /* Contact Section */
  .contact h3{
    margin-top: 2rem;
  }
  .contact-form {
    max-width: 90rem;
  }

  .contact-form label {
    font-size: 2.5rem;
  }
}