/* ========================================
   Soluciones Empresariales — réplica estática
   Colores y tipografía tomados del sitio original
   ======================================== */

:root {
  --blue: #344c8c;
  --green: #6cac3c;
  --gray: #7a7a7a;
  --gray-mid: #919191;
  --dark: #3d3d3d;
  --white: #ffffff;
  --font: "Roboto", sans-serif;
  --radius: 25px;
  --radius-sm: 20px;
  --pad-x: clamp(24px, 8vw, 150px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.5;
  color: var(--dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 500;
  font-size: 14px;
  line-height: 1.2;
  padding: 12px 18px;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.2s;
  white-space: nowrap;
}

.btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.btn--green {
  background: var(--green);
  color: var(--white);
}

.btn--green:hover {
  background: #5a9432;
}

.btn--outline {
  background: var(--white);
  color: var(--blue);
  border: 2px solid var(--blue);
}

.btn--outline:hover {
  background: var(--blue);
  color: var(--white);
}

.btn--whatsapp {
  background: var(--green);
  color: var(--white);
  padding: 10px 16px;
}

.btn--whatsapp:hover {
  background: #5a9432;
}

.btn--sm {
  font-size: 13px;
  padding: 10px 16px;
  align-self: flex-start;
  margin-top: auto;
}

.btn--full {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
}

/* ---------- Header ---------- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px var(--pad-x);
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.header__logo img {
  width: min(280px, 55vw);
  height: auto;
}

.header__spacer {
  flex: 1;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 520px;
  padding: 150px var(--pad-x);
  background:
    linear-gradient(270deg, #ffffff00 21%, #fffffff2 61%),
    url("../img/hero.jpg") center / cover no-repeat;
  display: flex;
  align-items: center;
}

.hero__content {
  max-width: 560px;
}

.hero h1 {
  font-size: clamp(25px, 4vw, 50px);
  font-weight: 600;
  color: var(--blue);
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero__sub {
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--gray);
  margin-bottom: 28px;
  max-width: 480px;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Stats ---------- */
.stats {
  display: flex;
  justify-content: center;
  gap: clamp(40px, 10vw, 120px);
  padding: 30px var(--pad-x);
  background: var(--white);
}

.stats__item {
  text-align: center;
}

.stats__item h2 {
  font-size: clamp(40px, 5vw, 44px);
  font-weight: 600;
  color: var(--blue);
  line-height: 1.1;
}

.stats__item p {
  color: var(--gray);
  font-size: 16px;
  margin-top: 4px;
}

/* ---------- About band ---------- */
.about-band {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  padding: 70px var(--pad-x);
}

.about-band h2 {
  font-size: clamp(25px, 3.2vw, 40px);
  font-weight: 400;
  line-height: 1.25;
  margin-bottom: 18px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.about-band p {
  font-size: clamp(15px, 1.4vw, 18px);
  opacity: 0.95;
  max-width: 700px;
  margin: 0 auto;
}

/* ---------- Services ---------- */
.services {
  padding: 80px var(--pad-x);
  background: var(--white);
}

.section-title {
  text-align: center;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 400;
  color: var(--blue);
  line-height: 1.2;
  margin-bottom: 40px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 20px;
}

.service-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 340px;
  padding: 36px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: var(--white);
  background-color: #222;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-card--fianzas {
  background-image: url("../img/fianzas.jpg");
}

.service-card--seguros-gen {
  background-image: url("../img/seguros-gen.jpg");
}

.service-card--seguros-pers {
  background-image: url("../img/seguros-pers.jpg");
}

.service-card--diseno {
  background-image: url("../img/diseno.jpg");
}

.service-card--medicos {
  background-image: url("../img/medicos.jpg");
}

.service-card--sctr {
  background-image: url("../img/sctr.jpg");
}

.service-card--creditos {
  background-image: url("../img/creditos.jpg");
}

.service-card--iso {
  background-image: url("../img/iso-bg.jpg");
}

.service-card--fideicomiso {
  background-image: url("../img/fideicomiso.jpg");
}

.service-card--software {
  background-image: url("../img/software.jpg");
}

.service-card--licita {
  background-image: url("../img/licita-facil.jpg");
}

.service-card--escicion {
  background-image: url("../img/escicion.jpg");
}

.service-card--seguro-legal {
  background-image: url("../img/seguro.jpg");
}

.service-card--impuestos {
  background-image: url("../img/impuestos.jpg");
}

.service-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  transition: background 0.3s ease;
  z-index: 0;
}

.service-card:hover::before {
  background: rgba(0, 0, 0, 0.8);
}

.service-card > * {
  position: relative;
  z-index: 1;
}

.service-card h3 {
  font-size: 25px;
  font-weight: 400;
  line-height: 1.2;
}

.service-card p {
  font-size: 14px;
  line-height: 1.45;
  opacity: 0.95;
}

.service-card__iso {
  width: 90px;
  height: auto;
  margin-bottom: 4px;
}

/* ---------- Image modal ---------- */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.image-modal[hidden] {
  display: none;
}

.image-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
}

.image-modal__dialog {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: min(1100px, 96vw);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-modal__img {
  max-width: 96vw;
  max-height: calc(92vh - 48px);
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.45);
  background: #111;
}

.image-modal__caption {
  margin-top: 12px;
  color: var(--white);
  font-size: 16px;
  font-weight: 500;
  text-align: center;
}

.image-modal__close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: var(--white);
  color: var(--dark);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.image-modal__close:hover {
  background: var(--green);
  color: var(--white);
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .image-modal {
    padding: 12px;
  }

  .image-modal__close {
    top: 8px;
    right: 8px;
  }
}

/* ---------- Advantages ---------- */
.advantages {
  padding: 70px var(--pad-x) 50px;
  background: var(--white);
}

.advantages__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.advantage {
  text-align: center;
  padding: 20px;
}

.advantage__num {
  display: block;
  font-size: clamp(25px, 3vw, 40px);
  font-weight: 400;
  color: var(--blue);
  line-height: 1.1;
  margin-bottom: 8px;
}

.advantage h3 {
  font-size: 23px;
  font-weight: 400;
  color: var(--blue);
  margin-bottom: 10px;
  line-height: 1.25;
}

.advantage p {
  font-size: 15px;
  color: var(--gray);
  line-height: 1.5;
}

/* ---------- Clients ---------- */
.clients {
  background: var(--blue);
  padding: 80px var(--pad-x);
  color: var(--white);
}

.clients > h2 {
  text-align: center;
  font-size: clamp(30px, 3.5vw, 40px);
  font-weight: 400;
  margin-bottom: 40px;
}

.clients__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}

.clients__card {
  background: var(--white);
  color: var(--dark);
  border-radius: var(--radius-sm);
  padding: 30px;
}

.clients__card h3 {
  font-size: 24px;
  font-weight: 500;
  color: var(--blue);
  margin-bottom: 16px;
}

.clients__card ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.clients__card li {
  position: relative;
  padding-left: 18px;
  font-size: 15px;
  color: var(--gray);
  line-height: 1.45;
}

.clients__card li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 700;
}

/* ---------- Contact ---------- */
.contact {
  padding: 70px var(--pad-x) 50px;
  background: var(--white);
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  max-width: 1100px;
  margin: 0 auto;
}

.contact__info h2 {
  font-size: 30px;
  font-weight: 400;
  color: var(--blue);
  line-height: 1.2;
  margin-bottom: 14px;
}

.contact__info p {
  color: var(--gray);
  font-size: 16px;
  max-width: 380px;
}

.contact__form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
  border: 1px solid #d5d5d5;
  border-radius: 4px;
  padding: 12px 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--blue);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-message {
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 4px;
  margin-top: 4px;
}

.form-message.is-success {
  background: #e8f5e0;
  color: #3d6b1f;
}

.form-message.is-error {
  background: #fdeaea;
  color: #a12626;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--blue);
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  padding: 24px var(--pad-x);
  font-size: 13px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Chatbot widget ---------- */
.chatbot {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  font-family: var(--font);
}

.chatbot__toggle {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(52, 76, 140, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}

.chatbot__toggle:hover {
  background: #5a9432;
  transform: scale(1.05);
}

.chatbot__toggle-icon--close {
  display: none;
}

.chatbot.is-open .chatbot__toggle-icon--chat {
  display: none;
}

.chatbot.is-open .chatbot__toggle-icon--close {
  display: block;
}

.chatbot__panel {
  position: absolute;
  right: 0;
  bottom: 76px;
  width: min(360px, calc(100vw - 32px));
  height: min(520px, calc(100vh - 120px));
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.chatbot__panel[hidden] {
  display: none;
}

.chatbot__header {
  background: var(--blue);
  color: var(--white);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.chatbot__header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chatbot__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot__header strong {
  display: block;
  font-size: 15px;
  font-weight: 500;
}

.chatbot__status {
  display: block;
  font-size: 12px;
  opacity: 0.85;
}

.chatbot__close {
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  opacity: 0.9;
}

.chatbot__close:hover {
  opacity: 1;
}

.chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f4f6f9;
}

.chatbot__bubble {
  max-width: 88%;
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.chatbot__bubble--bot {
  align-self: flex-start;
  background: var(--white);
  color: var(--dark);
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.chatbot__bubble--user {
  align-self: flex-end;
  background: var(--blue);
  color: var(--white);
  border-bottom-right-radius: 4px;
}

.chatbot__options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 12px;
  background: var(--white);
  border-top: 1px solid #e8e8e8;
  max-height: 180px;
  overflow-y: auto;
}

.chatbot__options[hidden] {
  display: none;
}

.chatbot__option {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.chatbot__option:hover {
  background: var(--blue);
  color: var(--white);
}

.chatbot__option--primary {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
  width: 100%;
  border-radius: 8px;
  padding: 12px;
  font-size: 14px;
}

.chatbot__option--primary:hover {
  background: #5a9432;
  border-color: #5a9432;
  color: var(--white);
}

.chatbot__input-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: var(--white);
  border-top: 1px solid #e8e8e8;
}

.chatbot__input-wrap[hidden] {
  display: none;
}

.chatbot__input {
  flex: 1;
  font-family: var(--font);
  font-size: 14px;
  padding: 10px 12px;
  border: 1px solid #d5d5d5;
  border-radius: 8px;
  outline: none;
}

.chatbot__input:focus {
  border-color: var(--blue);
}

.chatbot__send {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 8px;
  background: var(--green);
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chatbot__send:hover {
  background: #5a9432;
}

@media (max-width: 480px) {
  .chatbot {
    right: 12px;
    bottom: 12px;
  }

  .chatbot__panel {
    width: calc(100vw - 24px);
    height: min(560px, calc(100vh - 100px));
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .advantages__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header {
    padding: 10px 20px;
  }

  .hero {
    padding: 120px 25px 50px;
    min-height: 420px;
    background:
      linear-gradient(180deg, #fffffff2 40%, #ffffff00 100%),
      url("../img/hero.jpg") center / cover no-repeat;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }

  .stats {
    flex-direction: column;
    gap: 24px;
    padding: 20px 50px;
  }

  .about-band,
  .services,
  .advantages,
  .clients,
  .contact {
    padding-left: 25px;
    padding-right: 25px;
  }

  .about-band {
    padding-top: 25px;
    padding-bottom: 25px;
  }

  .services {
    padding-top: 50px;
    padding-bottom: 25px;
  }

  .services__grid {
    grid-template-columns: 1fr;
  }

  .advantages__grid {
    grid-template-columns: 1fr;
  }

  .clients__grid {
    grid-template-columns: 1fr;
  }

  .contact__inner {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header__logo img {
    width: 160px;
  }

  .btn--whatsapp span,
  .btn--whatsapp {
    font-size: 13px;
  }
}
