/*
  style.refactored.css — DRY, consolidated, and corrected
  Notes:
  - Consolidates repeated typography + layout rules with :is() groups
  - Removes duplicate blocks and unnecessary defaults (e.g., position: static)
  - Fixes invalid values (e.g., align-items:flex-center → center; justify-content:flex-center → center)
  - Preserves original class names/selectors to avoid HTML changes
  - Adds light comments and logical ordering (base → components → utilities → responsive)
*/

/* =====================
   Base / Layout
   ===================== */
.desktop {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 40px 20px;
  position: relative;
  background-color: var(--backgroundbackground-1);
}

.desktop .main {
  display: flex;
  flex-direction: column;
  align-items: center; /* was flex-center */
  position: relative;
  width: 100%;
  max-width: 1500px;
  background-color: #fff;
}

.desktop .navigation {
  display: flex;
  flex-direction: column;
  align-items: center;
  align-self: stretch;
  position: relative;
  width: 100%;
  flex: 0 0 auto;
}

/* Sections */
.desktop .benefits-section,
.desktop .headline-and-icons,
.desktop .specifications-table,
.desktop .content,
.desktop .footer,
.desktop .header {
  display: flex;
  flex-direction: column;
  align-items: center; /* unify */
}

.desktop .benefits-section { padding: 0 0 120px; width: 100%; flex: 0 0 auto; }
.desktop .headline-and-icons {
  gap: 50px;
  padding: 80px 0 60px;
  width: 100%;
  border-top: .5px solid var(--dividersdivider-1);
}

/* Scoped: Only for the mission block in Quienes Somos */
.desktop .headline-and-icons.mission-row {
  flex-direction: row;
  align-items: flex-start;
}
.desktop .headline-and-icons.mission-row { flex-direction: column; }
.desktop .headline-and-icons.mission-row > .text-wrapper-3 { align-self: stretch; text-align: center; }
.desktop .headline-and-icons.mission-row .mission-body { display: flex; gap: 50px; align-items: flex-start; }
.desktop .headline-and-icons.mission-row .mission-body .text { flex: 1 1 60%; }
.desktop .headline-and-icons.mission-row .mission-body .img-container { flex: 0 1 40%; max-width: 40%; }

.desktop .headline-and-icons .text strong {
  font-weight: 700; /* force visible bold */
}
.desktop .headline-and-icons.mission-row .text strong {
  font-weight: 700; /* force visible bold */
}

@media (max-width: 768px) {
  .desktop .headline-and-icons.mission-row {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }
  .desktop .headline-and-icons.mission-row .mission-body { flex-direction: column; }
  .desktop .headline-and-icons.mission-row .mission-body .text,
  .desktop .headline-and-icons.mission-row .mission-body .img-container {
    flex: 1 1 auto;
    max-width: 100%;
    width: 100%;
  }
}
.desktop .specifications-table { max-width: 1500px; gap: 20px; padding: 0 0 120px; width: 100%; flex: 0 0 auto; margin-bottom: -147px; }
.desktop .content { gap: 40px; padding: 80px 240px; width: 100%; border-top: 1px solid var(--accentaccent-6); align-self: stretch; flex: 0 0 auto; }
.desktop .header { max-width: 1500px; gap: 240px; width: 100%; background-color: transparent; flex: 0 0 auto; }
.desktop .footer { max-width: 1500px; gap: 80px; padding: 40px 0 20px; width: 100%; background: transparent; justify-content: flex-end; flex: 0 0 auto; }

/* =====================
   Shared Typography
   ===================== */
/* Heading 1 */
:is(.desktop .text-wrapper-3, .desktop .text-wrapper-12) {
  font-family: var(--heading-1-font-family);
  font-weight: var(--heading-1-font-weight);
  color: var(--textheadline);
  font-size: var(--heading-1-font-size);
  text-align: center;
  letter-spacing: var(--heading-1-letter-spacing);
  line-height: var(--heading-1-line-height);
  font-style: var(--heading-1-font-style);
}

/* Heading 3 */
:is(
  .desktop .text-wrapper-4,
  .desktop .text-wrapper-6,
  .desktop .text-wrapper-8,
  .desktop .text-wrapper-10
) {
  font-family: var(--heading-3-font-family);
  font-weight: var(--heading-3-font-weight);
  color: var(--textheadline);
  font-size: var(--heading-3-font-size);
  letter-spacing: var(--heading-3-letter-spacing);
  line-height: var(--heading-3-line-height);
  font-style: var(--heading-3-font-style);
  white-space: nowrap;
}

/* Paragraph copy */
:is(
  .desktop .p,
  .desktop .text-wrapper-5,
  .desktop .text-wrapper-7,
  .desktop .text-wrapper-9,
  .desktop .text-wrapper-11
) {
  text-align: start;
  font-family: var(--paragraph-font-family);
  font-weight: var(--paragraph-font-weight);
  color: var(--textparagraph);
  font-size: var(--paragraph-font-size);
  letter-spacing: var(--paragraph-letter-spacing);
  line-height: var(--paragraph-line-height);
  font-style: var(--paragraph-font-style);
}

:is(
  .desktop .text-wrapper-13
) {
  text-align: center;
  font-family: var(--paragraph-font-family);
  font-weight: var(--paragraph-font-weight);
  color: var(--textparagraph);
  font-size: var(--paragraph-font-size);
  letter-spacing: var(--paragraph-letter-spacing);
  line-height: var(--paragraph-line-height);
  font-style: var(--paragraph-font-style);
}

/* Specific spacing and width for main content paragraph */
.desktop .text .p {
  margin-top: 20px;
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}

.desktop .text .p-row {
  text-align: justify;
  font-family: var(--paragraph-font-family);
  font-weight: var(--paragraph-font-weight);
  color: var(--textparagraph);
  letter-spacing: var(--paragraph-letter-spacing);
  line-height: var(--paragraph-line-height);
  font-style: var(--paragraph-font-style);
  font-size: var(--paragraph-font-size);
  width: 75%;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 20px;
}

/* Link / button label styles */
:is(.desktop .text-wrapper-14, .desktop .text-wrapper-16, .desktop .text-wrapper-17) {
  text-align: center;
  width: fit-content;
  position: relative;
  font-family: var(--link-font-family);
  font-weight: var(--link-font-weight);
  color: var(--textlink);
  font-size: var(--link-font-size);
  letter-spacing: var(--link-letter-spacing);
  line-height: var(--link-line-height);
  font-style: var(--link-font-style);
}

/* Captions */
.desktop .text-wrapper-15 {
  font-family: var(--captions-font-family);
  font-weight: var(--captions-font-weight);
  color: var(--textcaptions);
  font-size: var(--captions-font-size);
  letter-spacing: var(--captions-letter-spacing);
  line-height: var(--captions-line-height);
}

/* =====================
   Buttons / Links / Nav
   ===================== */
.desktop .button {
  all: unset;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 1000px;
  background-color: var(--accentaccent-2);
}
.desktop .button:hover { background-color: var(--accentaccent-3); transition: background-color .2s ease; }
.desktop .button:focus { outline: 2px solid var(--accentaccent-2); outline-offset: 2px; }

.btn-pdf {
  display: inline-block;
  padding: 0.75em 1.5em;
  background-color: #007BFF; /* or your brand color */
  color: white;
  border: none;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s ease;
}
.btn-pdf:hover {
  background-color: #0056b3; /* darker shade */
}

.desktop .links { display: flex; height: 40px; align-items: center; justify-content: space-around; gap: 100px; align-self: stretch; width: 100%; }
.desktop .nav-items, .desktop .nav-items-2 { display: inline-flex; align-items: center; gap: 27px; }
.desktop .nav-items-2 { padding: 20px 24px; position: fixed; top: 14px; background: #ffffff66; border-radius: 100px; backdrop-filter: blur(15px) brightness(100%); -webkit-backdrop-filter: blur(15px) brightness(100%); overflow-x: auto; }
.desktop .nav-items-2::-webkit-scrollbar { width: 0; display: none; }
.desktop .text-wrapper-12 { white-space: nowrap; }

/* Anchor normalization + focus */
.desktop :is(.nav-items a, .nav-items-2 a) { text-decoration: none; color: inherit; }
.desktop .nav-items-2 a[aria-current="page"] { color: var(--accentaccent-2); }
.desktop :is(.nav-items a, .nav-items-2 a):focus { outline: 2px solid var(--accentaccent-2); outline-offset: 2px; border-radius: 4px; }

/* =====================
   Hero / Media
   ===================== */
.desktop .hero-image { position: relative; align-self: stretch; object-fit: cover; }
.desktop .hero-image-container { position: relative; max-width: 100%; width: 100%; display: flex; justify-content: center; align-items: center; }
.desktop .hero-background { max-width: 100%; width: 100%; height: auto; display: block; }
.desktop .text-wrapper-2 { position: absolute; top: 40%; left: 70%; transform: translate(-50%, -100%); z-index: 2; padding: 20px 30px; border-radius: 8px; color: #fff; font-family: "DM Sans", Helvetica; font-weight: 500; font-size: clamp(18px, 4vw, 32px); letter-spacing: -1.28px; line-height: 1.2; text-align: center; max-width: 90vw; word-wrap: break-word; white-space: normal; }

/* Media elements (responsive by default) */
.desktop :is(.capa, .captura-de-pantalla, .img, .img-2, .improvesankey-2) {
  max-width: 100%;
  width: 100%;
  height: auto;
}
.desktop .captura-de-pantalla { position: static; }

/* =====================
   Icon grid (benefits)
   ===================== */
.desktop .icons-module { position: relative; align-self: stretch; width: 100%; height: 397px; }

/* Shared card styling */
.desktop :is(.icon-lockup, .icon-lockup-2, .icon-lockup-3, .icon-lockup-4) {
  display: flex;
  flex-direction: column;
  width: 285px;
  gap: 24px;
  padding: 40px 20px 40px 0;
  position: absolute;
  top: 40px;
  align-items: flex-start;
  border-top: 1px solid var(--dividersdivider-1);
}
/* column tweaks */
.desktop .icon-lockup-2 { gap: 25px; }
.desktop .icon-lockup-3,
.desktop .icon-lockup-4 { padding: 40px 40px 40px 0; }

/* absolute positions preserved from original */
.desktop .icon-lockup   { left: 0; }
.desktop .icon-lockup-2 { left: 305px; }
.desktop .icon-lockup-3 { left: 610px; }
.desktop .icon-lockup-4 { left: 915px; }

/* Text stacks inside cards */
.desktop :is(.text-2, .text-3, .text-4, .text-5) {
  display: flex; flex-direction: column; align-items: flex-start; gap: 20px; width: 100%;
}

/* =====================
   Header block / brand row
   ===================== */
.desktop .div { /* header row around logo + nav */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  padding: 73px 0 80px;
  width: 100%;
  max-width: 1500px;
  height: 148px;
  flex-wrap: wrap;
}
.desktop .cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 1000px;
  background-color: var(--accentaccent-2);
  color: #fff;
  font-family: var(--link-font-family);
  font-weight: var(--link-font-weight);
  font-size: var(--link-font-size);
  line-height: var(--link-line-height);
  letter-spacing: var(--link-letter-spacing);
  text-decoration: none;
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.desktop .cta-button:hover {
  background-color: var(--accentaccent-3);
  transform: translateY(-2px);
}
.desktop .cta-button:focus {
  outline: 2px solid var(--accentaccent-2);
  outline-offset: 2px;
}
.desktop .img-2 { position: relative; width: 24px; height: 24px; }
.desktop .improvesankey { position: relative; width: 267px; height: 83px; margin-top: -44px; margin-bottom: -44px; overflow: hidden; }
.desktop .improvesankey-2 { position: relative; width: 56px; height: 56px; }
.desktop .credits { display: flex; align-items: flex-end; gap: 40px; position: relative; align-self: stretch; width: 100%; flex: 0 0 auto; }
.desktop .capa { width: 267px; height: 83px; position: absolute; top: 0; left: 0; }
.desktop .text-wrapper { position: relative; align-self: stretch; margin-top: -1px; font-family: var(--display-font-family); font-weight: var(--display-font-weight); color: var(--black); font-size: var(--display-font-size); text-align: center; letter-spacing: var(--display-letter-spacing); line-height: var(--display-line-height); font-style: var(--display-font-style); }

/* =====================
   Contact page
   ===================== */
.contact-section { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 100%; padding: 40px 40px 20px; background-color: var(--backgroundbackground-1); }
.contact-content { display: flex; flex-direction: column; gap: 30px; max-width: 800px; width: 100%; align-items: center; justify-content: center; margin-bottom: 0; }
.contact-info { display: flex; flex-direction: column; gap: 20px; text-align: center; width: 100%; }
.contact-details { display: flex; flex-direction: column; gap: 30px; }
.contact-item { display: flex; align-items: center; gap: 20px; } /* was flex-center */
.contact-text h3 { margin: 0 0 8px 0; }
.contact-text p { margin: 0; }
.contact-form { display: flex; flex-direction: column; gap: 24px; padding: 40px; background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,.1); width: 100%; max-width: 600px; }
.form-group { display: flex; flex-direction: column; gap: 8px; }
.form-label { font-family: var(--link-font-family); font-weight: 600; font-size: 14px; color: var(--accentaccent-2); margin: 0; text-align: center; }
.form-input, .form-textarea { padding: 12px 16px; border: 2px solid #e5e5e5; border-radius: 8px; font-family: var(--body-font-family); font-size: 16px; color: var(--accentaccent-2); background: #fff; transition: border-color .2s ease; text-align: center; }
.form-input:focus, .form-textarea:focus { outline: none; border-color: var(--accentaccent-2); }
.form-textarea { resize: vertical; min-height: 120px; }
.form-submit { margin-top: 16px; align-self: center; }

/* Contact overrides */
.contact-section :is(.text-wrapper-3, .p) { max-width: 800px; text-align: center; margin: 0 auto; }

/* Progressive enhancement alternative to :has() for broader support:
   (Keep original JS/CSS override if needed; removing brittle height overrides here.) */

/* =====================
   Utilities
   ===================== */
.u-center { display: flex; align-items: center; justify-content: center; }
.u-stretch { align-self: stretch; width: 100%; }

/* =====================
   Responsive
   ===================== */
@media (max-width: 1200px) {
  .desktop .icons-module { display: flex; flex-direction: row; flex-wrap: wrap; justify-content: space-between; height: auto; gap: 20px; }
  .desktop :is(.icon-lockup, .icon-lockup-2, .icon-lockup-3, .icon-lockup-4) { position: static; width: calc(50% - 10px); height: auto; padding: 20px; border-radius: 8px; background: #fff; }
  .desktop .text-wrapper-2 { font-size: clamp(16px, 3.5vw, 28px); padding: 15px 25px; }
}

@media (max-width: 768px) {
  .desktop .icons-module { flex-direction: column; gap: 16px; }
  .desktop :is(.icon-lockup, .icon-lockup-2, .icon-lockup-3, .icon-lockup-4) { width: 100%; padding: 16px; margin: 0; }
  .desktop .text-wrapper-2 { font-size: clamp(14px, 3vw, 24px); padding: 12px 20px; top: 50%; left: 50%; transform: translate(-50%, -50%); }
  .contact-content { gap: 40px; }
  .contact-form { padding: 24px; }
}

@media (max-width: 480px) {
  .desktop .text-wrapper-2 { font-size: clamp(12px, 4vw, 18px); padding: 10px 15px; letter-spacing: -0.5px; max-width: 85vw; }
}

/* Center the button in specifications-table section */
.desktop .text-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  max-width: 600px;
}

/* === Revised fix: center absolute-positioned icons row on wide screens === */
@media (min-width: 1201px) {
  .desktop .icons-module {
    position: relative;
    display: block;           /* keep absolute children working */
    width: 1200px;            /* 4 cols: 0,305,610,915 + 285 width = 1200 */
    height: 397px;            /* preserve original height */
    margin: 0 auto;           /* center the whole row */
  }
  .desktop :is(.icon-lockup, .icon-lockup-2, .icon-lockup-3, .icon-lockup-4) {
    position: absolute;
    top: 40px;
  }
}
