/* ==========================================================
   VARIABLES
   ========================================================== */

:root {
  /* Brand colors */
  --maetel-turquoise: #0097a9;
  --maetel-blue: #002e5e;
  --maetel-white: #ffffff;
  --maetel-dark: #071b2f;
  --maetel-text: #263746;
  --maetel-text-muted: #506070;
  --maetel-surface-soft: #eef3f5;

  /* Fonts */
  --maetel-font-main: "Sora", Arial, sans-serif;

  /* Layout */
  --maetel-container-width: 1200px;
  --maetel-container-gutter: 40px;

  --maetel-section-padding: clamp(76px, 9vw, 132px);
  --maetel-section-padding-large: clamp(78px, 9vw, 136px);
  --maetel-section-padding-activity: clamp(70px, 9vw, 130px);
  --maetel-section-padding-compact: clamp(64px, 7vw, 92px);
  --maetel-section-padding-tablet: 80px;
  --maetel-section-padding-mobile: 64px;

  --maetel-hero-min-height: 760px;
  --maetel-hero-min-height-tablet: 660px;
  --maetel-hero-min-height-mobile: 620px;
  --maetel-hero-padding-top: clamp(130px, 15vh, 180px);
  --maetel-hero-padding-bottom: 42px;

  --maetel-internal-hero-min-height: clamp(560px, 72svh, 700px);
  --maetel-internal-hero-min-height-tablet: 600px;
  --maetel-internal-hero-min-height-mobile: 540px;

  /* Typography sizes - global */
  --maetel-font-size-hero-statement: clamp(34px, 4.2vw, 62px);
  --maetel-font-size-page-hero-title: clamp(32px, 3.7vw, 54px);
  --maetel-font-size-page-hero-title-tablet: clamp(30px, 5.2vw, 44px);
  --maetel-font-size-page-hero-title-mobile: clamp(28px, 8vw, 38px);
  --maetel-font-size-featured-statement: clamp(30px, 3.2vw, 46px);
  --maetel-font-size-section-title: clamp(30px, 3.2vw, 46px);
  --maetel-font-size-area-title: clamp(24px, 2.35vw, 33px);
  --maetel-font-size-content-title: clamp(22px, 2.4vw, 34px);
  --maetel-font-size-card-title: clamp(21px, 2vw, 29px);
  --maetel-font-size-body: 17px;
  --maetel-font-size-body-small: 14px;
  --maetel-font-size-section-marker: 14px;
  --maetel-font-size-button: 12px;
  --maetel-font-size-button-large: 16px;
  --maetel-font-size-nav: 13px;
  --maetel-font-size-caption: 12px;
  --maetel-font-size-micro: 10px;

  /* Typography sizes - home specific */
  --maetel-font-size-home-label: 15px;
  --maetel-font-size-section-marker-tablet: 13px;
  --maetel-font-size-section-title-tablet: clamp(25px, 4.4vw, 34px);
  --maetel-font-size-section-title-mobile: clamp(23px, 6.8vw, 30px);
  --maetel-font-size-content-title-tablet: clamp(21px, 3.8vw, 28px);
  --maetel-font-size-content-title-mobile: 22px;
  --maetel-font-size-area-title-tablet: clamp(18px, 2.8vw, 22px);
  --maetel-font-size-area-title-mobile: 18px;
  --maetel-font-size-body-mobile: 16px;
  --maetel-font-size-index-marker: 24px;
  --maetel-font-size-index-marker-mobile: 23px;
  --maetel-font-size-project-tab: clamp(15px, 1.4vw, 19px);
  --maetel-font-size-project-stat-value: clamp(15px, 1.45vw, 23px);
  --maetel-font-size-world-region-title: clamp(19px, 1.7vw, 25px);
  --maetel-font-size-world-region-title-tablet: 20px;
  --maetel-font-size-world-country: clamp(17px, 1.6vw, 25px);
  --maetel-font-size-news-title: clamp(30px, 3vw, 42px);
  --maetel-font-size-news-card-title: clamp(19px, 1.65vw, 25px);
  --maetel-font-size-compact-title: 19px;

  /* Typography line heights */
  --maetel-line-height-hero-statement: 1.12;
  --maetel-line-height-heading: 1.14;
  --maetel-line-height-title: 1.18;
  --maetel-line-height-body: 1.65;
  --maetel-line-height-body-mobile: 1.62;
  --maetel-line-height-compact: 1.35;
  --maetel-line-height-button: 1;

  /* Typography weights */
  --maetel-font-weight-light: 300;
  --maetel-font-weight-regular: 400;
  --maetel-font-weight-medium: 500;
  --maetel-font-weight-semibold: 600;
  --maetel-font-weight-bold: 700;

  /* Typography tracking */
  --maetel-letter-spacing-hero: -0.035em;
}

/* ==========================================================
   BASE
   ========================================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--maetel-text);
  font-family: var(--maetel-font-main);
  font-weight: 400;
  line-height: 1.5;
  background-color: var(--maetel-white);
}

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

a {
  color: inherit;
}

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

button {
  cursor: pointer;
}

/* ==========================================================
   LAYOUT GLOBAL
   ========================================================== */

.maetel-container {
  width: min(
    100% - var(--maetel-container-gutter),
    var(--maetel-container-width)
  );
  margin-inline: auto;
}

.maetel-section {
  padding: var(--maetel-section-padding) 0;
}

.maetel-section--large {
  padding: var(--maetel-section-padding-large) 0;
}

.maetel-section--activity {
  padding: var(--maetel-section-padding-activity) 0;
}

.maetel-section--compact {
  padding: var(--maetel-section-padding-compact) 0;
}

.maetel-section--white {
  background: var(--maetel-white);
}

.maetel-section--soft {
  background: var(--maetel-surface-soft);
}

.maetel-section--blue {
  background: var(--maetel-blue);
  color: var(--maetel-white);
}

/* ==========================================================
   PAGE HERO
   Hero reutilizable para paginas internas
   ========================================================== */

.maetel-page-hero {
  position: relative;
  min-height: var(--maetel-hero-min-height);
  min-height: 100svh;
  overflow: hidden;
  color: var(--maetel-white);
  background: var(--maetel-blue);
}

.maetel-page-hero--internal {
  min-height: var(--maetel-internal-hero-min-height);
}

.maetel-page-hero__media,
.maetel-page-hero__overlay {
  position: absolute;
  inset: 0;
}

.maetel-page-hero__media img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.maetel-page-hero__overlay {
  z-index: 1;
  background:
    linear-gradient(
      90deg,
      rgba(0, 18, 40, 0.78) 0%,
      rgba(0, 28, 60, 0.66) 28%,
      rgba(0, 46, 94, 0.34) 45%,
      rgba(0, 20, 42, 0.08) 60%,
      rgba(0, 0, 0, 0) 68%
    ),
    linear-gradient(180deg, rgba(0, 0, 0, 0.02) 0%, rgba(0, 20, 42, 0.2) 100%);
  pointer-events: none;
}

.maetel-page-hero__inner {
  position: relative;
  z-index: 2;
  display: grid;
  min-height: inherit;
  padding-top: var(--maetel-hero-padding-top);
  padding-bottom: var(--maetel-hero-padding-bottom);
}

.maetel-page-hero__content {
  width: 100%;
  max-width: 980px;
  align-self: center;
  transform: translateY(-24px);
}

.maetel-page-hero__marker {
  margin: 0 0 20px;
  padding-bottom: 0;
}

.maetel-page-hero__marker.maetel-type-section-marker::after {
  content: none;
  display: none;
}

.maetel-page-hero__title.maetel-type-hero-statement {
  max-width: 980px;
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--maetel-font-size-page-hero-title);
  text-wrap: balance;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.22);
}

.maetel-section-header {
  max-width: 1080px;
  margin: 0 auto clamp(54px, 7vw, 88px);
  text-align: center;
}

.maetel-section-header--narrow {
  max-width: 780px;
}

.maetel-section-title-block {
  max-width: 1080px;
  margin: 44px auto clamp(64px, 9vw, 120px);
  text-align: center;
}

/* ==========================================================
   TYPOGRAPHY PRESETS
   Reutilizables en futuras paginas
   ========================================================== */

.maetel-type-hero-statement {
  color: #fff;
  font-size: var(--maetel-font-size-hero-statement);
  font-weight: 200;
  line-height: var(--maetel-line-height-hero-statement);
  letter-spacing: var(--maetel-letter-spacing-hero);
}

.maetel-type-hero-label {
  color: #fff;
  font-size: var(--maetel-font-size-home-label);
  font-weight: var(--maetel-font-weight-regular);
  line-height: var(--maetel-line-height-compact);
  text-transform: uppercase;
}

.maetel-type-featured-statement {
  color: var(--maetel-blue);
  font-size: var(--maetel-font-size-featured-statement);
  font-weight: var(--maetel-font-weight-regular);
  line-height: var(--maetel-line-height-heading);
}

.maetel-type-section-marker {
  position: relative;
  display: table;
  padding: 0 0 10px;
  color: var(--maetel-turquoise);
  font-size: var(--maetel-font-size-section-marker);
  font-weight: var(--maetel-font-weight-semibold);
  line-height: 1.2;
  text-transform: uppercase;
}

.maetel-type-section-marker::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--maetel-blue);
}

.maetel-type-section-marker--light {
  color: var(--maetel-white);
}

.maetel-type-section-marker--light::after {
  background: var(--maetel-turquoise);
}

.maetel-type-section-title {
  color: var(--maetel-blue);
  font-size: var(--maetel-font-size-section-title);
  font-weight: var(--maetel-font-weight-regular);
  line-height: var(--maetel-line-height-heading);
}

.maetel-type-area-title {
  color: var(--maetel-blue);
  font-size: var(--maetel-font-size-area-title);
  font-weight: var(--maetel-font-weight-light);
  line-height: 1.15;
}

.maetel-type-content-title {
  color: var(--maetel-blue);
  font-size: var(--maetel-font-size-content-title);
  font-weight: var(--maetel-font-weight-regular);
  line-height: var(--maetel-line-height-title);
}

.maetel-type-card-title {
  color: var(--maetel-blue);
  font-size: var(--maetel-font-size-card-title);
  font-weight: var(--maetel-font-weight-regular);
  line-height: 1.2;
}

.maetel-type-news-title {
  color: var(--maetel-blue);
  font-size: var(--maetel-font-size-news-title);
  font-weight: var(--maetel-font-weight-regular);
  line-height: var(--maetel-line-height-heading);
}

.maetel-type-news-card-title {
  color: var(--maetel-blue);
  font-size: var(--maetel-font-size-news-card-title);
  font-weight: var(--maetel-font-weight-regular);
  line-height: 1.22;
}

.maetel-type-body {
  color: var(--maetel-text-muted);
  font-size: var(--maetel-font-size-body);
  font-weight: var(--maetel-font-weight-regular);
  line-height: var(--maetel-line-height-body);
}

.maetel-type-body-small {
  color: var(--maetel-text-muted);
  font-size: var(--maetel-font-size-body-small);
  font-weight: var(--maetel-font-weight-regular);
  line-height: 1.55;
}

.maetel-type-label {
  font-size: var(--maetel-font-size-home-label);
  font-weight: var(--maetel-font-weight-regular);
  line-height: var(--maetel-line-height-compact);
}

.maetel-type-nav {
  font-size: var(--maetel-font-size-nav);
  font-weight: var(--maetel-font-weight-medium);
  line-height: 1.2;
}

.maetel-type-caption {
  font-size: var(--maetel-font-size-caption);
  font-weight: var(--maetel-font-weight-regular);
  line-height: 1.5;
}

.maetel-type-button {
  font-size: var(--maetel-font-size-button);
  font-weight: var(--maetel-font-weight-medium);
  line-height: var(--maetel-line-height-button);
}

.maetel-type-stat-label {
  color: rgba(255, 255, 255, 0.78);
  font-size: var(--maetel-font-size-micro);
  font-weight: var(--maetel-font-weight-bold);
  line-height: 1.2;
  text-transform: uppercase;
}

.maetel-type-stat-value {
  color: #fff;
  font-size: var(--maetel-font-size-project-stat-value);
  font-weight: var(--maetel-font-weight-semibold);
  line-height: 1.08;
}

/* ==========================================================
   BUTTONS
   ========================================================== */

/*
  Botón global MAETEL.
  De momento usamos un único tamaño: botón pequeño tipo pill.
  Uso general: CTAs, Leer más, Ver más, Ver proyecto, Compañía, etc.
*/

.maetel-btn,
.maetel-pill-button {
  display: inline-flex;
  width: fit-content;
  min-height: 34px;
  align-items: center;
  justify-content: center;
  padding: 8px 17px;
  border: 1px solid rgba(0, 151, 169, 0.38);
  border-radius: 999px;
  color: var(--maetel-white);
  background: rgba(0, 151, 169, 0.84);
  font-size: var(--maetel-font-size-button);
  font-weight: var(--maetel-font-weight-medium);
  line-height: var(--maetel-line-height-button);
  text-decoration: none;
  text-transform: none;
  cursor: pointer;
  transition:
    background 220ms ease,
    border-color 220ms ease,
    color 220ms ease,
    transform 220ms ease;
}

.maetel-btn:hover,
.maetel-btn:focus-visible,
.maetel-pill-button:hover,
.maetel-pill-button:focus-visible {
  color: var(--maetel-white);
  background: var(--maetel-turquoise);
  border-color: rgba(0, 151, 169, 0.75);
  transform: translateY(-2px);
}

.maetel-btn:focus-visible,
.maetel-pill-button:focus-visible {
  outline: 2px solid var(--maetel-turquoise);
  outline-offset: 3px;
}

/*
  Variantes mantenidas por compatibilidad.
  Ahora mismo NO cambian tamaño.
*/

.maetel-btn--primary,
.maetel-btn--secondary {
  color: var(--maetel-white);
  background: rgba(0, 151, 169, 0.84);
  border-color: rgba(0, 151, 169, 0.38);
}

.maetel-btn--primary:hover,
.maetel-btn--primary:focus-visible,
.maetel-btn--secondary:hover,
.maetel-btn--secondary:focus-visible {
  color: var(--maetel-white);
  background: var(--maetel-turquoise);
  border-color: rgba(0, 151, 169, 0.75);
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */

@media (max-width: 900px) {
  .maetel-section,
  .maetel-section--large,
  .maetel-section--activity,
  .maetel-section--compact {
    padding: var(--maetel-section-padding-tablet) 0;
  }

  .maetel-page-hero {
    min-height: var(--maetel-hero-min-height-tablet);
    min-height: 86svh;
  }

  .maetel-page-hero--internal {
    min-height: var(--maetel-internal-hero-min-height-tablet);
  }

  .maetel-page-hero__inner {
    padding-top: 105px;
    padding-bottom: 36px;
  }

  .maetel-page-hero__content {
    transform: translateY(-12px);
  }

  .maetel-page-hero__title.maetel-type-hero-statement {
    font-size: var(--maetel-font-size-page-hero-title-tablet);
  }

  .maetel-section-header {
    max-width: 760px;
    margin-bottom: 48px;
  }

  .maetel-section-title-block {
    max-width: 760px;
    margin: 36px auto 48px;
  }

  .maetel-type-section-marker {
    font-size: var(--maetel-font-size-section-marker-tablet);
  }

  .maetel-type-section-title {
    font-size: var(--maetel-font-size-section-title-tablet);
    line-height: 1.16;
  }

  .maetel-type-content-title {
    font-size: var(--maetel-font-size-content-title-tablet);
  }

  .maetel-type-body {
    font-size: var(--maetel-font-size-body-mobile);
    line-height: var(--maetel-line-height-body-mobile);
  }
}

@media (max-width: 768px) {
  :root {
    --maetel-container-gutter: 28px;
  }

  .maetel-btn {
    width: 100%;
    max-width: 320px;
  }
}

@media (max-width: 560px) {
  .maetel-section,
  .maetel-section--large,
  .maetel-section--activity,
  .maetel-section--compact {
    padding: var(--maetel-section-padding-mobile) 0;
  }

  .maetel-page-hero {
    min-height: var(--maetel-hero-min-height-mobile);
    min-height: 84svh;
  }

  .maetel-page-hero--internal {
    min-height: var(--maetel-internal-hero-min-height-mobile);
  }

  .maetel-page-hero__inner {
    padding-top: 110px;
    padding-bottom: 28px;
  }

  .maetel-page-hero__content {
    transform: none;
  }

  .maetel-page-hero__marker {
    margin-bottom: 18px;
  }

  .maetel-section-header {
    margin-bottom: 38px;
  }

  .maetel-section-title-block {
    max-width: 100%;
    margin: 30px auto 38px;
  }

  .maetel-type-section-marker {
    font-size: var(--maetel-font-size-button);
  }

  .maetel-type-section-title {
    font-size: var(--maetel-font-size-section-title-mobile);
    line-height: 1.17;
  }

  .maetel-type-content-title {
    font-size: var(--maetel-font-size-content-title-mobile);
  }

  .maetel-type-area-title {
    font-size: var(--maetel-font-size-area-title-mobile);
    line-height: 1.22;
  }

  .maetel-type-hero-statement {
    font-size: clamp(30px, 9.2vw, 42px);
  }

  .maetel-page-hero__title.maetel-type-hero-statement {
    font-size: var(--maetel-font-size-page-hero-title-mobile);
  }
}
