/* ========================= RESET Y BASE ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'Poppins', sans-serif;
  background-color: #f5f5f5;
  color: #000;
}

/* ========================= COLORES ========================= */
.green { color: #8bbb3e; }
.blue { color: #28638f; }
.orange { color: #ff7a18; }
.white { color: #ffffff; }

/* ========================= HEADER ========================= */
.header {
  display: flex;
  align-items: center;
  background-color: #28638f;
  height: 140px;
  width: 100%;
}

.header-logo {
  width: 260px;
  height: 100%;
  background-color: #ffffff !important;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0 24px 24px 0;
  box-shadow: 0 10px 22px rgba(2,6,23,.12);
  overflow: hidden;
}

.header-logo img {
  max-height: 85px;
  max-width: 90%;
  object-fit: contain;
}

.header-name {
  flex: 1;
  padding-left: 20px;
  font-size: clamp(20px, 2.4vw, 36px);
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

/* ========================= BANNER ========================= */
.banner {
  background-color: #8bbb3e;
  padding: clamp(18px, 3vh, 26px);
  text-align: center;
}

.banner h2 {
  color: #ffffff;
  font-size: clamp(22px, 3vw, 42px);
  font-weight: 600;
}

.banner-content {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========================= REDES DESKTOP EN BANNER ========================= */
.social-boxes {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 10px;
}

.social-box {
  width: 48px;
  height: 48px;
  background-color: #ffffff;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.social-box img {
  width: 70%;
  height: 70%;
  object-fit: contain;
}

.social-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}

/* ========================= MAIN ========================= */
.main {
  flex: 1;
  padding: clamp(40px, 6vh, 90px) 20px;
  text-align: center;
}

.main h3 {
  font-size: clamp(24px, 3vw, 46px);
  margin-bottom: clamp(30px, 5vh, 70px);
}

/* ========================= OPCIONES ========================= */
.options {
  display: flex;
  justify-content: center;
  gap: clamp(40px, 8vw, 120px);
  flex-wrap: wrap;
}

/* ========================= CARD ========================= */
.card {
  position: relative;
  background-color: #e6e6e6;
  border-radius: 22px;
  border: none;
  width: clamp(240px, 25vw, 380px);
  aspect-ratio: 1 / 1;
  padding: clamp(15px, 3vw, 30px);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition:
    transform 0.45s cubic-bezier(.4,0,.2,1),
    box-shadow 0.45s cubic-bezier(.4,0,.2,1);
}

@property --angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 3px;
  border-radius: 22px;
  background: conic-gradient(
    from var(--angle),
    #28638f 0deg,
    #28638f 220deg,
    #8bbb3e 260deg,
    #8bbb3e 300deg,
    #28638f 360deg
  );
  animation: ledRun 7s linear infinite;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

@keyframes ledRun {
  from { --angle: 0deg; }
  to { --angle: 360deg; }
}

.card:hover {
  transform: translateY(-8px) scale(1.035);
  box-shadow: 0 18px 35px rgba(0,0,0,0.22);
}

/* ========================= ICONO ========================= */
.icon {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon img {
  max-width: 70%;
  max-height: 70%;
}

/* ========================= TEXTO CARD ========================= */
.label {
  font-size: clamp(18px, 2vw, 28px);
  font-weight: 700;
}

/* ========================= SCROLL INDICATOR ========================= */
.scroll-indicator {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.scroll-indicator span {
  width: 18px;
  height: 18px;
  border-right: 3px solid #28638f;
  border-bottom: 3px solid #28638f;
  transform: rotate(45deg);
  animation: scrollDown 1.6s infinite;
}

@keyframes scrollDown {
  0% {
    opacity: 0;
    transform: rotate(45deg) translate(-5px, -5px);
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: rotate(45deg) translate(5px, 5px);
  }
}

/* ========================= FOOTER ========================= */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #000;
  padding: clamp(15px, 3vh, 30px);
  display: flex;
  justify-content: center;
  gap: clamp(20px, 6vw, 50px);
  flex-wrap: wrap;
  z-index: 999;
}

.footer a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  font-size: 16px;
}

.footer a:hover {
  text-decoration: underline;
}

/* ========================= BOTÓN AYUDA DESKTOP ========================= */
.help-button {
  position: absolute;
  right: 25px;
  top: -45px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background-color: #8bbb3e;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 6px 15px rgba(0,0,0,0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.help-button img {
  width: 34px;
  height: 34px;
  margin-bottom: 3px;
}

.help-button:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 10px 22px rgba(0,0,0,0.35);
}

/* ============================= */
/* SECCIÓN: Misión, Visión, Valores */
/* ============================= */
.new-section {
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  margin-top: 170px;
  margin-bottom: 80px;
  max-width: 1400px;
  padding: 20px;
  gap: 20px;
  margin-left: auto;
  margin-right: auto;
}

.info-box {
  width: 30%;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.12);
  text-align: center;
  padding: 24px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.info-box.show {
  opacity: 1;
  transform: translateY(0);
}

.info-box h2 {
  font-size: 22px;
  color: #28638f;
  margin-bottom: 10px;
}

.info-box p {
  text-align: justify;
  font-size: 16px;
  color: #555;
  line-height: 1.6;
  word-spacing: normal;
  word-break: break-word;
  white-space: normal;
  hyphens: auto;
}

.info-box ul {
  padding-left: 0;
  margin-top: 10px;
}

.info-box li {
  text-align: left;
  list-style-position: inside;
  color: #555;
  font-size: 16px;
  line-height: 1.6;
}

/* ============================= */
/* SECCIÓN: QUIÉNES SOMOS */
/* ============================= */
.third-container {
  position: relative;
  width: 100vw;
  min-height: 700px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  overflow: hidden;
}

.third-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.third-container .header-container {
  position: relative;
  width: 80%;
  padding: 20px;
  background-color: transparent;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin: 40px auto 0 auto;
  z-index: 2;
}

.third-container .header-container .line {
  width: 100%;
  height: 5px;
}

.third-container .header-container .line-top {
  background-color: #28638f;
}

.third-container .header-container .line-bottom {
  background-color: #8bbb3e;
}

.third-container .header-container .header-text {
  font-size: 48px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  color: #ffffff;
  text-align: center;
  margin: 12px 0;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.third-container .content-text {
  position: relative;
  margin: 60px auto 0 auto;
  max-width: 900px;
  color: white;
  font-size: 18px;
  line-height: 1.8;
  text-align: justify;
  padding: 25px;
  z-index: 2;
  background: rgba(0,0,0,0.45);
  border-radius: 12px;
  word-spacing: normal;
  word-break: break-word;
  white-space: normal;
  hyphens: auto;
}

/* ========================= OCULTOS EN ESCRITORIO ========================= */
.mobile-hide-sa {
  display: inline;
}

.mobile-float-wrap {
  display: none;
}

.social-toggle,
.floating-social {
  display: none;
}

/* ========================= MOVIL ========================= */
@media (max-width: 768px) {
  body {
    background: #f3f4f6;
  }

  /* ocultar S.A de C.V solo en móvil */
  .mobile-hide-sa {
    display: none !important;
  }

  /* HEADER */
  .header {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
    height: 77px;
    min-height: 77px;
    padding: 0;
    background-color: #28638f;
  }

  .header-logo {
    width: 82px;
    min-width: 82px;
    height: 100%;
    background-color: #fff !important;
    border-radius: 0 16px 16px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 5px 12px rgba(2, 6, 23, 0.10);
  }

  .header-logo img {
    max-width: 76%;
    max-height: 76%;
    object-fit: contain;
  }

  .header-name {
    flex: 1;
    padding: 0 10px 0 0;
    font-size: 15.5px;
    font-weight: 600;
    line-height: 1.15;
    white-space: normal;
    text-align: left;
    word-break: normal;
    letter-spacing: 0;
  }

  .header-name .green,
  .header-name .white,
  .header-name .mobile-hide-sa {
    display: inline;
  }

  .header-name .green {
    margin-right: 0;
  }

  /* BANNER */
  .banner {
    padding: 22px 14px 18px;
  }

  .banner-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
  }

  .banner h2 {
    font-size: 17px;
    line-height: 1.35;
    max-width: 320px;
    margin: 0 auto;
  }

  .banner .social-boxes {
    display: none !important;
  }

  /* MAIN */
  .main {
    padding: 30px 14px 0;
  }

  .main h3 {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: 24px;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  /* BOTONES PRINCIPALES */
  .options {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .card {
    width: calc(50% - 6px);
    max-width: 178px;
    min-width: 160px;
    aspect-ratio: 1 / 1.04;
    padding: 14px 12px;
    border-radius: 22px;
    background: #ececec;
    box-shadow: 0 10px 24px rgba(0,0,0,0.08);
  }

  .card::before {
    border-radius: 22px;
  }

  .icon img {
    max-width: 60%;
    max-height: 60%;
  }

  .label {
    font-size: 18px;
  }

  .scroll-indicator {
    margin-top: 16px;
    margin-bottom: 8px;
  }

  .scroll-indicator span {
    width: 14px;
    height: 14px;
  }

  /* MISION / VISION / VALORES */
  .new-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 48px;
    margin-bottom: 48px;
    padding: 0;
  }

  .info-box {
    width: 100%;
    border-radius: 18px;
    padding: 18px 16px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  }

  .info-box h2 {
    font-size: 19px;
    margin-bottom: 10px;
  }

  .info-box p,
  .info-box li {
    font-size: 14px;
    line-height: 1.6;
  }

  /* QUIENES SOMOS */
  .third-container {
    position: relative;
    width: 100vw;
    min-height: auto;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    margin-bottom: -1px;
    overflow: hidden;
  }

  .third-container img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .third-container .header-container {
    width: calc(100% - 24px);
    margin: 22px auto 0;
    padding: 8px 0;
  }

  .third-container .header-container .line {
    height: 4px;
  }

  .third-container .header-container .header-text {
    font-size: 26px;
    margin: 10px 0;
  }

  .third-container .content-text {
    margin: 20px auto 14px;
    width: calc(100% - 52px);
    max-width: 315px;
    font-size: 14px;
    line-height: 1.65;
    padding: 16px 14px;
    border-radius: 16px;
    background: rgba(0,0,0,0.52);
  }

  /* FOOTER */
  .footer {
    position: relative;
    width: 100%;
    padding: 12px 12px 22px;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 18px;
    text-align: center;
    margin-top: 0;
  }

  .footer a {
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
  }

  /* FLOTANTES */
  .mobile-float-wrap {
    display: block;
    position: fixed;
    right: 12px;
    bottom: 14px;
    z-index: 1100;
  }

  .help-button {
    position: fixed;
    right: 12px;
    bottom: 14px;
    top: auto;
    width: 68px;
    height: 68px;
    font-size: 10px;
    z-index: 1102;
    margin: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .help-button img {
    width: 24px;
    height: 24px;
    margin-bottom: 2px;
  }

  .help-button:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 22px rgba(0,0,0,0.25);
  }

  .social-toggle {
    display: flex;
    position: fixed;
    right: 12px;
    bottom: 90px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    cursor: pointer;
    z-index: 1102;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(0,0,0,0.18);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
  }

  .social-toggle:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.22);
  }

  .social-toggle:active {
    transform: scale(0.96);
  }

  .social-icon {
    width: 22px;
    height: 22px;
    stroke: #28638f;
    stroke-width: 1.8;
    fill: none;
    margin-top: 2px;
  }

  .social-icon circle {
    fill: #28638f;
    stroke: none;
  }

  .social-label {
    font-size: 9px;
    font-weight: 600;
    color: #28638f;
    margin-top: -2px;
    line-height: 1;
  }

  .floating-social {
    display: flex;
    position: fixed;
    right: 20px;
    bottom: 150px;
    flex-direction: column;
    gap: 10px;
    z-index: 1101;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: all 0.3s ease;
  }

  .floating-social.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .social-float {
    width: 42px;
    height: 42px;
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(0,0,0,0.2);
    transform: translateY(10px) scale(0.9);
    opacity: 0;
    transition: all 0.3s cubic-bezier(.2,.8,.2,1);
  }

  .floating-social.open .social-float {
    transform: translateY(0) scale(1);
    opacity: 1;
  }

  .floating-social.open .social-float:nth-child(1) {
    transition-delay: 0.05s;
  }

  .floating-social.open .social-float:nth-child(2) {
    transition-delay: 0.1s;
  }

  .floating-social.open .social-float:nth-child(3) {
    transition-delay: 0.15s;
  }

  .social-float img {
    width: 60%;
    height: 60%;
    object-fit: contain;
  }

  .social-float:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 10px 22px rgba(0,0,0,0.22);
  }
}
