/* =========================================================
   Coninsa — Home (hero + servicios + equipo)
   Tipografías y colores tomados del sistema de diseño original
   ========================================================= */

@font-face {
  font-family: "Open Sans";
  src: url("../fonts/open-sans-latin-vf.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Oswald";
  src: url("../fonts/oswald-latin-vf.woff2") format("woff2");
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Marca */
  --coninsa-blue: #223983;
  --coninsa-blue-logo: #223980;
  --coninsa-green: #00a54c;
  --coninsa-lime: #80c342;
  --coninsa-teal: #00706a;
  --coninsa-red: #db2239;
  --coninsa-yellow: #ffee4f;

  /* Neutros */
  --white: #ffffff;
  --gray-50: #fafafa;
  --gray-100: #f4f4f4;
  --gray-200: #eaeaea;
  --gray-300: #e5e5e6;
  --gray-500: #808080;
  --gray-600: #3e3e3e;
  --gray-700: #333333;

  /* Estructura */
  --container: 1100px;
  --gutter: 24px;
  --radius-sm: 7px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --shadow-header: 0 3px 6px rgba(0, 0, 0, 0.16);
  --shadow-card: 0 2px 8px rgba(34, 57, 131, 0.08);
  --shadow-search: 0 10px 24px rgba(0, 0, 0, 0.16);

  /* Tipografía */
  --font-body: "Open Sans", Arial, Helvetica, sans-serif;
  --font-display: "Oswald", Helvetica, Arial, sans-serif;
}

/* ----------------------------- Reset ----------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--gray-600);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img,
svg {
  display: block;
  max-width: 100%;
}

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

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(128, 195, 66, 0.85);
  outline-offset: 3px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 100;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--coninsa-blue);
  color: var(--white);
  font-weight: 700;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ----------------------------- Botones ----------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 17px;
  border: 1px solid var(--coninsa-blue);
  border-radius: 20px;
  background: var(--coninsa-blue);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.btn:hover {
  background: transparent;
  color: var(--coninsa-blue);
}

.btn--cta {
  padding: 12px 22px;
  font-size: 14px;
}

/* ----------------------------- Barra superior ----------------------------- */

.site-header {
  position: relative;
  z-index: 30;
  box-shadow: var(--shadow-header);
}

.topbar {
  height: 42px;
  background: var(--coninsa-blue);
  color: var(--white);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.topbar__link {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 100%;
  padding-inline: 16px;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.topbar__link svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  fill: currentColor;
}

.topbar__link:hover {
  background: var(--white);
  border-color: var(--gray-300);
  color: var(--coninsa-blue);
}

/* ----------------------------- Cabecera ----------------------------- */

.header {
  background: var(--white);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  padding-bottom: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.logo img {
  width: 160px;
  height: auto;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 29px;
}

.main-nav__item {
  position: relative;
  display: flex;
  align-items: center;
}

.main-nav__link {
  position: relative;
  padding-block: 24px;
  color: var(--coninsa-blue);
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.main-nav__link::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 16px;
  left: 4px;
  height: 3px;
  border-radius: 3px;
  background: var(--coninsa-blue);
  opacity: 0;
  transform: scaleX(0.6);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.main-nav__link:hover::after,
.main-nav__link:focus-visible::after,
.main-nav__item--has-panel:hover > .main-nav__link::after,
.main-nav__item--has-panel:focus-within > .main-nav__link::after {
  opacity: 1;
  transform: scaleX(1);
}

.main-nav__item--has-panel::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 14px;
}

.main-nav__panel {
  position: absolute;
  top: calc(100% + 13px);
  left: 50%;
  z-index: 40;
  min-width: 250px;
  padding: 18px 22px;
  border-radius: 0 0 8px 8px;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 8px);
  transition: opacity 0.18s ease, transform 0.18s ease, visibility 0.18s ease;
}

.main-nav__panel--wide {
  display: grid;
  grid-template-columns: repeat(2, minmax(185px, 1fr));
  gap: 6px 36px;
  width: max-content;
  max-width: 560px;
}

.main-nav__item--end .main-nav__panel {
  right: 0;
  left: auto;
  transform: translateY(8px);
}

.main-nav__item--has-panel:hover .main-nav__panel,
.main-nav__item--has-panel:focus-within .main-nav__panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.main-nav__item--end:hover .main-nav__panel,
.main-nav__item--end:focus-within .main-nav__panel {
  transform: translateY(0);
}

.main-nav__column {
  min-width: 0;
}

.main-nav__heading {
  display: block;
  margin-bottom: 8px;
  color: var(--coninsa-blue);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.main-nav__panel a {
  display: block;
  padding: 6px 0;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
  transition: color 0.18s ease;
}

.main-nav__panel a:hover,
.main-nav__panel a:focus-visible {
  color: var(--coninsa-blue);
  text-decoration: underline;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin-block: 4px;
  background: var(--coninsa-blue);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

/* ----------------------------- Hero ----------------------------- */

.hero {
  position: relative;
  z-index: 5;
  height: 300px;
  overflow: visible;
  color: var(--white);
  isolation: isolate;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: url("../img/hero-construccion.jpg");
  background-position: center 18%;
  background-repeat: no-repeat;
  background-size: cover;
}

.hero__bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(9, 17, 38, 0.74) 0%, rgba(9, 17, 38, 0.45) 46%, rgba(9, 17, 38, 0.07) 100%),
    linear-gradient(0deg, rgba(9, 17, 38, 0.15) 0%, rgba(9, 17, 38, 0) 55%);
}

.hero__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding-top: 34px;
  padding-bottom: 14px;
}

.hero__title {
  max-width: 700px;
  font-size: 33px;
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.4px;
  text-wrap: balance;
}

.hero__title-main {
  display: inline-block;
  margin-bottom: 4px;
  font-size: 45px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.8px;
}

/* ----------------------------- Buscador ----------------------------- */

.search {
  display: flex;
  width: 100%;
  height: 58px;
  margin-top: auto;
  border-radius: var(--radius-sm);
  background: var(--white);
  box-shadow: var(--shadow-search);
}

.search__field {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.search__field--one {
  flex: 0.62;
}

.search__field--two {
  flex: 0.94;
  border-left: 1px solid var(--gray-300);
}

.search__field--three {
  flex: 0.44;
  border-left: 1px solid var(--gray-300);
}

.search__field input {
  width: 100%;
  height: 100%;
  padding: 0 38px 0 17px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #707070;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 400;
  cursor: text;
}

.search__field input:disabled {
  cursor: not-allowed;
  opacity: 1;
}

.search__field:focus-within input:not(:disabled) {
  background: #f8f9fc;
}

.search__menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 50;
  width: 100%;
  min-width: 100%;
  max-height: 280px;
  margin: 0;
  padding: 6px 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e1e4ea;
  border-radius: 6px;
  background: var(--white);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.2);
  color: var(--gray-600);
  font-family: var(--font-body);
  font-size: 13px;
  list-style: none;
  scrollbar-width: thin;
}

.search__menu[hidden] {
  display: none;
}

.search__field--one .search__menu,
.search__field--three .search__menu {
  width: max-content;
  max-width: 320px;
}

.search__field--three .search__menu {
  right: 0;
  left: auto;
}

.search__option {
  padding: 9px 16px;
  overflow: hidden;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.search__option.is-active,
.search__option:hover {
  background: #e9eef9;
  color: var(--coninsa-blue);
}

.search__option.is-selected {
  font-weight: 700;
}

.search__option--create {
  color: var(--coninsa-teal);
  font-weight: 600;
}

.search__option--create.is-active,
.search__option--create:hover {
  background: #e6f3f2;
  color: var(--coninsa-teal);
}

.search__empty {
  padding: 10px 16px;
  color: #8a8f98;
}

.search__field input::placeholder {
  color: #7a7a7a;
  opacity: 1;
}

.search__chevron {
  position: absolute;
  right: 14px;
  width: 12px;
  height: 12px;
  pointer-events: none;
  fill: #9aa0a6;
  transition: transform 0.18s ease, fill 0.18s ease;
}

.search__field.is-open .search__chevron {
  transform: rotate(180deg);
}

.search__field.is-disabled .search__chevron {
  fill: #c3c6cc;
}

.search__field.is-disabled input::placeholder {
  color: #a5a9b0;
}

.search__btn {
  display: grid;
  place-items: center;
  flex: 0 0 62px;
  border: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--coninsa-blue);
  color: var(--white);
  transition: background-color 0.2s ease;
}

.search__btn svg {
  width: 27px;
  height: 27px;
}

.search__btn:hover {
  background: #1b2f6e;
}

/* ----------------------------- Servicios ----------------------------- */

.services {
  padding-block: 30px;
  background: var(--gray-50);
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.service-card {
  display: flex;
  flex-direction: column;
  min-height: 178px;
  padding: 36px 14px 9px 16px;
  border-left: 5px solid var(--coninsa-green);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-card);
  transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.service-card--green {
  border-left-color: var(--coninsa-green);
}

.service-card--lime {
  border-left-color: var(--coninsa-green);
}

.service-card--blue {
  border-left-color: var(--coninsa-blue);
}

.service-card__copy {
  min-width: 0;
}

.service-card__title {
  font-family: var(--font-display);
  font-size: 35px;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.2px;
  color: var(--coninsa-green);
}

.service-card--blue .service-card__title {
  color: var(--coninsa-blue);
}

.service-card__subtitle {
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 200;
  line-height: 1.18;
  color: var(--coninsa-blue);
}

.service-card .btn {
  align-self: flex-start;
  margin-top: auto;
  padding-inline: 11px;
}

/* Hover global de la tarjeta */
.service-card:hover {
  border-left-color: var(--coninsa-blue);
  background: var(--coninsa-blue);
}

.service-card:hover .service-card__title,
.service-card:hover .service-card__subtitle {
  color: var(--white);
}

.service-card:hover .btn {
  background: var(--white);
  border-color: var(--white);
  color: var(--coninsa-blue);
}

.service-card:hover .btn:hover {
  background: transparent;
  color: var(--white);
}

/* ----------------------------- Equipo ----------------------------- */

.team {
  padding-block: 30px 31px;
  background: var(--gray-50);
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: center;
  gap: 18px;
}

.team__media img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.team__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}

.team__title {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 200;
  line-height: 1.15;
  letter-spacing: -0.28px;
  color: var(--coninsa-teal);
}

.team__title span {
  display: block;
}

.team__title-blue {
  color: var(--coninsa-blue);
}

.team__paragraph {
  max-width: 540px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--gray-600);
}

.team__paragraph strong {
  font-weight: 700;
}

.btn--team {
  padding: 10px 16px;
  font-size: 12.5px;
}

/* ----------------------------- Nuestra experiencia ----------------------------- */

.experience {
  padding-block: 74px 23px;
  background: var(--white);
}

.experience__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 20px;
  row-gap: 0;
  align-items: center;
}

.experience__copy {
  grid-column: span 5;
  align-self: center;
  min-width: 0;
}

.experience__title {
  margin-bottom: 24px;
  font-family: var(--font-display);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.28px;
  color: var(--coninsa-blue);
}

.experience__lead {
  font-size: 23px;
  line-height: 1.15;
  color: var(--coninsa-blue);
}

.experience__lead strong {
  font-weight: 700;
}

.experience__media {
  position: relative;
  grid-column: span 7;
  min-width: 0;
}

/* Cinta teal que queda detrás de las tarjetas */
.experience__ribbon {
  position: absolute;
  top: -28px;
  right: 28px;
  left: -22px;
  z-index: 0;
  height: 160px;
  pointer-events: none;
}

.experience__ribbon-band {
  position: absolute;
  top: 34px;
  right: 0;
  left: 0;
  height: 120px;
  border-radius: 8px;
  background: var(--coninsa-teal);
}

.experience__ribbon-corner {
  position: absolute;
  top: 0;
  left: 59px;
  width: 43px;
  height: 34px;
  color: var(--coninsa-teal);
}

/* Carrusel de estadísticas */
.experience__viewport {
  position: relative;
  z-index: 1;
  width: 100%;
  min-width: 0;
  height: 246px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-behavior: smooth;
}

.experience__viewport::-webkit-scrollbar {
  display: none;
}

.experience__track {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  height: 100%;
}

.stat-card {
  position: relative;
  flex: 0 0 262px;
  height: 206px;
  margin-top: 40px;
  padding: 56px 16px 18px;
  border-left: 5px solid var(--coninsa-lime);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  text-align: center;
}

.stat-card__icon {
  position: absolute;
  top: -40px;
  left: 50%;
  z-index: 2;
  width: 80px;
  height: 80px;
  transform: translateX(-50%);
}

.stat-card__title {
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--coninsa-blue);
  text-wrap: balance;
}

.stat-card__text {
  margin-top: 7px;
  font-size: 14.5px;
  font-weight: 300;
  line-height: 1.4;
  color: #6d6d6d;
}

.experience__controls {
  display: flex;
  grid-column: 6 / -1;
  justify-content: center;
  gap: 17px;
  margin-top: 26px;
}

.carousel-btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--white);
  color: var(--coninsa-teal);
  box-shadow: 0 9px 12px rgba(0, 0, 0, 0.16);
  transition: background-color 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.carousel-btn svg {
  width: 22px;
  height: 22px;
}

.carousel-btn:hover:not(:disabled) {
  background: var(--coninsa-teal);
  color: var(--white);
}

.carousel-btn:disabled {
  opacity: 0.75;
  cursor: default;
}

/* ----------------------------- Teaser del blog ----------------------------- */

.blog-banner {
  padding-block: 23px;
  background: var(--coninsa-blue);
}

.blog-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.blog-banner__title {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 200;
  line-height: 1.2;
  letter-spacing: -0.28px;
  color: var(--white);
}

.blog-banner__title strong {
  font-weight: 600;
}

.btn--outline {
  padding: 11px 16px;
  border-color: var(--white);
  background: transparent;
  color: var(--white);
  font-size: 12.5px;
}

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

/* ----------------------------- Mosaico del blog ----------------------------- */

.blog-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 276px;
}

.blog-card {
  position: relative;
  display: block;
  overflow: hidden;
  min-height: 276px;
  color: var(--white);
  background: var(--coninsa-blue);
}

.blog-card--big {
  grid-column: span 2;
  grid-row: span 2;
}

.blog-card--wide {
  grid-column: span 2;
}

.blog-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.blog-card:hover .blog-card__image {
  transform: scale(1.035);
}

.blog-card__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 15%, rgba(0, 0, 0, 0.8) 100%);
}

.blog-card__title {
  max-width: 94%;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--white);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.blog-card__date {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.92);
}

/* ----------------------------- Accesos rápidos ----------------------------- */

.quick {
  padding-block: 56px 64px;
  background: var(--gray-50);
}

.quick__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  align-items: center;
}

.quick__intro {
  grid-column: span 1;
  min-width: 0;
  padding-top: 30px;
}

.quick__title {
  margin-bottom: 16px;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.28px;
  text-transform: uppercase;
  color: var(--coninsa-blue);
}

.quick__intro p {
  max-width: 260px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--gray-600);
}

.quick__cards {
  display: grid;
  grid-column: span 3;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  min-width: 0;
}

.quick__item {
  display: flex;
  flex-direction: column;
  padding: 0;
}

.quick-card {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  width: 100%;
  min-height: 164px;
  margin-top: 50px;
  padding: 78px 16px 4px;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
  text-align: center;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.quick-card:hover {
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.18);
  transform: translateY(-2px);
}

.quick-card__icon {
  position: absolute;
  top: -48px;
  left: 50%;
  display: grid;
  place-items: center;
  width: 80px;
  height: 80px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: var(--coninsa-blue);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
}

.quick-card--green .quick-card__icon {
  background: var(--coninsa-green);
}

.quick-card--mint .quick-card__icon {
  background: #41b8a3;
}

.quick-card__icon img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.quick-card__title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  color: var(--coninsa-blue);
}

.quick-card__text {
  margin-top: 8px;
  font-size: 14px;
  font-weight: 300;
  line-height: 1.3;
  color: var(--gray-600);
}

/* ----------------------------- Pie de página / contacto ----------------------------- */

.footer {
  position: relative;
}

.footer__cloud {
  position: absolute;
  top: -53px;
  left: 50%;
  z-index: 2;
  width: min(var(--container), calc(100% - 48px));
  height: 52px;
  pointer-events: none;
  transform: translateX(-50%);
}

.footer__cloud-line {
  position: absolute;
  top: 34px;
  right: 0;
  left: 0;
  height: 18px;
  border-radius: 8px;
  background: var(--coninsa-lime);
}

.footer__cloud-corner {
  position: absolute;
  top: 0;
  right: 48px;
  width: 43px;
  height: 34px;
  color: var(--coninsa-lime);
}

.contact {
  padding-top: 24px;
  background: var(--gray-100);
}

.contact__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 32px;
  padding-block: 45px 30px;
}

.contact__block:nth-child(2) {
  padding-bottom: 60px;
}

.contact__heading {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--coninsa-blue);
}

.contact__phones {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0 0 0 27px;
  list-style: none;
}

.contact__phones li {
  width: 60%;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--gray-300);
}

.contact__phones li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.contact__phone {
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact__phone img {
  flex: 0 0 auto;
  width: 23px;
  height: 23px;
}

.contact__city {
  display: block;
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
  color: var(--gray-500);
}

.contact__number {
  display: block;
  margin-top: 3px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--coninsa-blue);
}

.contact__schedules,
.contact__hours {
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact__schedule {
  position: relative;
  margin-bottom: 16px;
  padding-bottom: 16px;
  padding-left: 23px;
  border-bottom: 1px solid var(--gray-300);
}

.contact__schedule:last-child {
  border-bottom: 0;
}

.contact__schedule::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 6px;
  height: 6px;
  background: var(--coninsa-lime);
}

.contact__schedule h4 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--coninsa-blue);
}

.contact__hours li {
  font-size: 14px;
  line-height: 1.5;
  color: var(--gray-600);
}

.contact__hours strong {
  font-weight: 700;
}

.btn--contact {
  margin-top: 40px;
  padding: 10px 16px;
  border-color: var(--coninsa-blue);
  background: transparent;
  color: var(--coninsa-blue);
  font-size: 13px;
}

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

.contact__logos {
  display: flex;
  gap: 12px;
  align-self: end;
  justify-self: end;
}

.contact__logos img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

/* ----------------------------- Enlaces legales ----------------------------- */

.footer-links {
  padding-block: 34px 50px;
  background: #f2f2f2;
}

.footer-links__grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
}

.footer-links__heading {
  margin-bottom: 20px;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--coninsa-blue);
}

.footer-links__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links__list li {
  position: relative;
  margin-bottom: 15px;
  padding-left: 20px;
}

.footer-links__list li::before {
  content: "";
  position: absolute;
  top: 6px;
  left: 0;
  width: 5px;
  height: 5px;
  background: var(--coninsa-lime);
}

.footer-links__list a {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--gray-600);
  transition: color 0.2s ease;
}

.footer-links__list a:hover {
  color: var(--coninsa-blue);
  text-decoration: underline;
}

.footer-links__list--columns {
  column-count: 2;
  column-gap: 32px;
}

.footer-links__list--columns li {
  break-inside: avoid;
}

/* ----------------------------- Barra inferior ----------------------------- */

.footer-bottom {
  padding-block: 36px 52px;
  background: var(--coninsa-blue);
}

@media (min-width: 1025px) {
  .footer-bottom {
    padding-block: 36px 150px;
  }
}

.footer-bottom__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.footer-bottom__copy {
  max-width: 760px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--white);
}

.footer-bottom__social {
  display: flex;
  flex: 0 0 auto;
  gap: 20px;
  margin-top: 8px;
  margin-inline: auto;
}

.footer-bottom__social a {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-bottom__social a:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.footer-bottom__social img {
  width: 100%;
  height: 100%;
}

/* ----------------------------- WhatsApp ----------------------------- */

.whatsapp {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.whatsapp svg {
  width: 33px;
  height: 33px;
}

.whatsapp:hover {
  background: #1fbe5a;
  transform: scale(1.06);
}

/* ----------------------------- Responsive ----------------------------- */

@media (min-width: 1148px) {
  .container {
    padding-inline: 0;
  }
}

@media (max-width: 1024px) {
  .menu-toggle {
    display: block;
  }

  .main-nav {
    position: absolute;
    top: 110px;
    right: var(--gutter);
    left: var(--gutter);
    z-index: 20;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - 128px);
    padding: 12px 20px;
    overflow-y: auto;
    border-radius: 10px;
    background: var(--white);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav__item {
    display: block;
  }

  .main-nav__link {
    display: block;
    padding-block: 14px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 15px;
  }

  .main-nav__item:last-child > .main-nav__link {
    border-bottom: 0;
  }

  .main-nav__link::after {
    display: none;
  }

  .main-nav__item--has-panel::after {
    display: none;
  }

  .main-nav .main-nav__item .main-nav__panel,
  .main-nav .main-nav__item .main-nav__panel--wide {
    position: static;
    display: block;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 0 0 10px 14px;
    border-radius: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    left: auto;
    right: auto;
    transform: none;
  }

  .main-nav__heading {
    margin-top: 10px;
    margin-bottom: 2px;
    color: #6a6f78;
    font-size: 11px;
  }

  .main-nav__panel a {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
  }

  .main-nav__panel a:last-child {
    border-bottom: 0;
  }

  .hero {
    height: auto;
    min-height: 360px;
  }

  .hero__inner {
    gap: 30px;
    padding-block: 40px 32px;
  }

  .hero__title {
    max-width: 620px;
  }

  .hero__title-main {
    font-size: 38px;
  }

  .hero__title {
    font-size: 26px;
  }

  .search {
    height: auto;
    flex-wrap: wrap;
    margin-top: 0;
  }

  .search__field {
    flex: 1 1 42%;
    min-height: 56px;
  }

  .search__field--two,
  .search__field--three {
    border-left: 0;
  }

  .search__field--one,
  .search__field--two {
    border-bottom: 1px solid var(--gray-300);
  }

  .search__field--two {
    border-left: 1px solid var(--gray-300);
  }

  .search__field--three {
    flex: 1 1 auto;
  }

  .search__btn {
    flex: 0 0 74px;
    min-height: 56px;
    border-radius: 0;
  }

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

  .team__title {
    font-size: 38px;
  }

  .experience {
    padding-block: 56px 24px;
  }

  .experience__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .experience__copy {
    grid-column: 1;
    margin-bottom: 40px;
  }

  .experience__media {
    grid-column: 1;
  }

  .experience__controls {
    grid-column: 1;
  }

  .experience__title {
    font-size: 38px;
  }

  .experience__lead {
    font-size: 21px;
  }

  .blog-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 220px;
  }

  .blog-card {
    min-height: 220px;
  }

  .quick {
    padding-block: 40px 48px;
  }

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

  .quick__intro {
    grid-column: 1;
    padding-top: 0;
    margin-bottom: 24px;
  }

  .quick__cards {
    grid-column: 1;
    padding-right: 0;
  }

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

  .contact__logos {
    grid-column: 2;
    align-self: start;
    justify-self: start;
    margin-top: 24px;
  }

  .footer-links__grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-links__list--columns {
    column-count: 1;
  }
}

@media (max-width: 760px) {
  .topbar {
    height: 40px;
  }

  .topbar__link {
    padding-inline: 10px;
    font-size: 11.5px;
  }

  .header__inner {
    height: 62px;
  }

  .logo img {
    width: 136px;
  }

  .main-nav {
    top: 102px;
  }

  .hero__inner {
    gap: 24px;
    padding-block: 34px 28px;
  }

  .hero__title-main {
    font-size: 33px;
  }

  .hero__title {
    font-size: 22px;
  }

  .search {
    display: grid;
    grid-template-columns: 1fr;
    border-radius: var(--radius-md);
  }

  .search__field {
    min-height: 54px;
    border-left: 0 !important;
    border-bottom: 1px solid var(--gray-300);
  }

  .search__field input {
    padding-inline: 16px 38px;
    background: var(--white);
    font-size: 14px;
  }

  .search__field--one input {
    border-radius: var(--radius-md) var(--radius-md) 0 0;
  }

  .search__btn {
    width: 100%;
    min-height: 54px;
    flex-basis: auto;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
  }

  .services {
    padding-block: 24px;
  }

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

  .service-card {
    min-height: 158px;
  }

  .team {
    padding-block: 26px 44px;
  }

  .team__grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .team__title {
    font-size: 34px;
  }

  .experience {
    padding-block: 40px 20px;
  }

  .experience__title {
    font-size: 34px;
  }

  .experience__lead {
    font-size: 20px;
  }

  .experience__ribbon {
    top: -18px;
    right: 0;
    left: 0;
    height: 185px;
  }

  .experience__ribbon-band {
    top: 45px;
    height: 140px;
  }

  .experience__ribbon-corner {
    top: 0;
    left: 30px;
    width: 55px;
    height: 45px;
  }

  .experience__viewport {
    height: 240px;
  }

  .experience__track {
    gap: 10px;
    padding-left: 16px;
  }

  .stat-card {
    flex-basis: 82%;
    height: 200px;
    padding: 54px 16px 16px;
  }

  .stat-card__icon {
    top: -36px;
    width: 72px;
    height: 72px;
  }

  .experience__controls {
    margin-top: 22px;
  }

  .blog-banner__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .blog-banner__title {
    font-size: 24px;
  }

  .blog-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: 230px;
  }

  .blog-card--big {
    grid-column: 1;
    grid-row: span 2;
  }

  .blog-card--wide {
    grid-column: 1;
  }

  .blog-card__content {
    padding: 22px;
  }

  .blog-card__title {
    max-width: 100%;
    font-size: 17px;
  }

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

  .quick__item {
    padding: 8px 0;
  }

  .quick-card {
    min-height: 0;
  }

  .quick__title {
    font-size: 26px;
  }

  .quick__intro p {
    max-width: none;
  }

  .contact {
    padding-top: 18px;
  }

  .contact__grid {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 36px 40px;
  }

  .contact__phones {
    padding-left: 0;
  }

  .contact__phones li {
    width: 100%;
  }

  .contact__number {
    font-size: 17px;
  }

  .contact__logos {
    grid-column: 1;
    justify-self: start;
    margin-top: 0;
  }

  .footer__cloud {
    top: -40px;
    width: calc(100% - 32px);
    height: 42px;
  }

  .footer__cloud-line {
    top: 28px;
    height: 14px;
  }

  .footer__cloud-corner {
    right: 24px;
    width: 34px;
    height: 28px;
  }

  .footer-links {
    padding-block: 36px 24px;
  }

  .footer-links__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .footer-links__list li {
    margin-bottom: 14px;
  }

  .footer-bottom {
    padding-block: 30px;
  }

  .footer-bottom__inner {
    flex-direction: column-reverse;
    align-items: center;
    text-align: center;
    gap: 24px;
  }

  .footer-bottom__social {
    margin-inline: auto;
  }

  .footer-bottom__copy {
    max-width: none;
  }

  .whatsapp {
    right: 18px;
    bottom: 18px;
    width: 54px;
    height: 54px;
  }

  .whatsapp svg {
    width: 29px;
    height: 29px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
