/* RESET */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: Arial, sans-serif;
  background: #ffffff;
  color: #333;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --banner-button-overlap: clamp(48px, 6vh, 80px);
}

/* ------------------ */
/* BANNER (imagen + logo) */
/* ------------------ */
.banner {
  width: 100%;
  background: transparent;
  overflow: hidden;
}

.banner-img-container {
  position: relative;
  width: 100%;
  height: clamp(220px, 40vh, 420px);
  overflow: hidden;
}

.banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms ease;
}

#logo {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(360px, 14vw, 260px);
  transition: transform 320ms ease, width 320ms ease, top 320ms ease, left 320ms ease, bottom 320ms ease, right 320ms ease;
  z-index: 10;
  pointer-events: auto;
}

#logo.small {
  top: 90%;       /* quitamos top */
  left: 80%;      /* quitamos left */
  transform: none; /* ya no usamos translate ni scale */
  width: clamp(80px, 10vw, 120px); /* tamaño reducido, adaptable */
}

#banner-buttons {
  display: flex;
  flex-wrap: wrap;
  margin-top: calc(-1 * var(--banner-button-overlap));
  position: relative;
  z-index: 999; 
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0);
}
#banner-buttons.fixed {
  position: fixed !important;
  left: 0 !important;
  width: 100% !important;
  box-shadow: 0 2px 12px rgba(121, 48, 180, 0.185);
  backdrop-filter: blur(0px);
}
#banner.anchored {
  pointer-events: none;
  box-shadow: 0 -6px 18px rgba(0,0,0,0.12);
}
#banner-spacer {
  height: 0;
  transition: height 280ms ease;
}

/* Botones */
#banner-buttons button {
  flex: 1 1 10%;
  min-width: 120px;
  background: transparent;
  color: rgba(132, 87, 255, 0.95);
  border: none;
  padding: 8px 14px;
  font-size: 18px;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.3s ease;
}
#banner-buttons button:hover {
  background: rgba(132,87,255,0.06);
}

/* MAIN */
main {
  padding-top: calc(clamp(220px, 40vh, 420px) + 56px);
  min-height: 60vh;
}

/* ------------------ */
/* MI TRAYECTORIA */
/* ------------------ */
.trayectoria-container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  margin-top: 40px;
}

/* Columnas */
.trayectoria-container .col {
  padding: 10px;
}
.trayectoria-container .izquierda {
  flex: 0 0 20%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.trayectoria-container .centro {
  flex: 0 0 60%;
  text-align: center;
}
.trayectoria-container .derecha {
  flex: 0 0 20%;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Marco y perfil */
.marco-container {
  position: relative;
  width: 100%;
  max-width: 280px;
}
.marco {
  width: 100%;
  height: auto;
  display: block;
}
.perfil {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 75%; /* editable */
  height: auto;
  transition: opacity 700ms ease, transform 700ms ease;
  opacity: 1;
}

/* Texto */
.trayectoria {
  max-width: 600px; /* editable */
  text-align: center;
  margin: 0 auto;
}
.trayectoria h2 {
  margin-bottom: 16px;
}
.trayectoria p {
  margin-bottom: 14px;
  line-height: 1.6;
}

/* Imagen orden */
.fondo-orden {
  width: 180px;
  max-width: 20vw;
  height: auto;
}

/* ------------------ */
/* SERVICIOS (tabs) */
/* ------------------ */
.servicios {
  background: #e6f0f3;
  padding: 2rem;
  text-align: center;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 1rem;
}
.tab-button {
  background: #ddd;
  border: 1px solid #ccc;
  padding: 10px 15px;
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.3s;
}
.tab-button.active {
  background: #0077cc;
  color: rgba(132,87,255,0.95);
  border-color: rgba(132,87,255,0.12);
}
.tab-content {
  display: none;
  opacity: 0;
  background: #fff;
  padding: 1rem;
  border-radius: 6px;
  max-width: 800px;
  margin: 0 auto;
  transition: opacity 0.4s ease-in-out;
}
.tab-content.active {
  display: block;
  opacity: 1;
}

/* Contacto/Horarios */
#contacto, #horarios {
  padding: 2rem;
}

.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

.tab-button.active {
  background-color: #4ca3af;
  color: white;
}


/* ------------------ */
/* RESPONSIVE */
/* ------------------ */
@media (max-width: 1024px) {
  .marco { width: 260px; }
  .perfil { width: 200px; }
}

@media (max-width: 768px) {
  #banner-buttons button {
    font-size: 16px;
    padding: 8px 10px;
  }
  main {
    padding-top: calc(clamp(180px, 34vh, 340px) + 56px);
  }
  #logo { width: clamp(260px, 28vw, 180px); }
  #logo.small {
    top: auto;       /* quitamos top */
    left: auto;      /* quitamos left */
    bottom: 5%;      /* margen inferior */
    right: 5%;       /* margen derecho */
    
  }

  .trayectoria-container {
    flex-direction: column;
    align-items: center;
  }
  .trayectoria-container .izquierda,
  .trayectoria-container .centro,
  .trayectoria-container .derecha {
    flex: 0 0 100%;
    max-width: 100%;
  }
  .marco-container {
    width: 100%;
    max-width: 200px;
  }
  .fondo-orden {
    width: 120px;
    max-width: 35vw;
  }
  .trayectoria {
    max-width: 90%;
    padding: 0 5px;
  }
}

@media (max-width: 600px) {
  .marco { width: 200px; }
  .perfil { width: 150px; }
}
