/* ==========================================================================
   IET Construcciones — Hoja de estilos principal
   ========================================================================== */

:root {
  --color-black: #0e1013;
  --color-charcoal: #191c21;
  --color-steel: #2a2e35;
  --color-steel-light: #3c414a;
  --color-yellow: #f7b500;
  --color-yellow-dark: #d99e00;
  --color-white: #ffffff;
  --color-off-white: #f4f5f7;
  --color-gray: #8b909a;
  --color-gray-light: #c7cad0;
  --color-success: #1fae5c;

  --font-head: 'Barlow Condensed', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;

  --radius: 6px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  --container: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--color-charcoal);
  background: var(--color-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

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

ul { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--dark {
  background: var(--color-black);
  color: var(--color-off-white);
}
.section--steel {
  background: var(--color-charcoal);
  color: var(--color-off-white);
}
.section--offwhite { background: var(--color-off-white); }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-yellow-dark);
  margin-bottom: 12px;
}
.section--dark .eyebrow,
.section--steel .eyebrow { color: var(--color-yellow); }

.section-title {
  font-size: clamp(28px, 4vw, 42px);
  margin-bottom: 18px;
}

.section-lead {
  max-width: 640px;
  color: var(--color-gray);
  font-size: 17px;
}
.section--dark .section-lead,
.section--steel .section-lead { color: var(--color-gray-light); }

.section-head {
  margin-bottom: 48px;
}
.section-head.center {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}
.section-head.center .section-lead {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 15px 30px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--color-yellow);
  color: var(--color-black);
}
.btn--primary:hover {
  background: var(--color-yellow-dark);
  box-shadow: 0 8px 20px rgba(247, 181, 0, 0.35);
}

.btn--outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}
.btn--outline:hover { background: rgba(255, 255, 255, 0.1); }

.btn--dark {
  background: var(--color-black);
  color: var(--color-white);
}
.btn--dark:hover { background: var(--color-steel); }

.btn--sm { padding: 11px 22px; font-size: 14px; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Top bar ---------- */
.topbar {
  background: var(--color-black);
  color: var(--color-gray-light);
  font-size: 13.5px;
}
.topbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}
.topbar__contact { display: flex; gap: 24px; }
.topbar__contact a:hover { color: var(--color-yellow); }
.topbar__tag {
  color: var(--color-gray);
  font-style: italic;
  display: none;
}
@media (min-width: 640px) {
  .topbar__tag { display: inline; }
}

/* ---------- Header / nav ---------- */
.header {
  background: var(--color-white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  position: sticky;
  top: 0;
  z-index: 500;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav__brand img { height: 48px; width: auto; }
.nav__brand-text {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 20px;
  color: var(--color-black);
  line-height: 1.1;
}
.nav__brand-text span {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 11px;
  text-transform: none;
  color: var(--color-gray);
  letter-spacing: 0;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 34px;
}
.nav__links a {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--color-charcoal);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav__links a:hover,
.nav__links a.active {
  color: var(--color-yellow-dark);
  border-color: var(--color-yellow);
}
.nav__cta { display: flex; align-items: center; gap: 18px; }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span {
  width: 26px;
  height: 3px;
  background: var(--color-black);
  border-radius: 2px;
}

@media (max-width: 900px) {
  .nav__links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    box-shadow: 0 12px 20px rgba(0,0,0,0.08);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .nav__links.open { max-height: 420px; }
  .nav__links a {
    width: 100%;
    padding: 16px 24px;
    border-bottom: 1px solid #eee;
  }
  .nav__cta .btn--sm-hide { display: none; }
  .nav__toggle { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  color: var(--color-white);
  background: var(--color-black) url('../img/hero-tablero.png') center 20% / cover no-repeat;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(10,11,13,0.94) 0%, rgba(10,11,13,0.82) 40%, rgba(10,11,13,0.55) 75%);
}
.hero__content {
  position: relative;
  z-index: 2;
  max-width: 640px;
  padding: 80px 0;
}
.hero__content .eyebrow { color: var(--color-yellow); }
.hero h1 {
  font-size: clamp(34px, 5.4vw, 58px);
  margin-bottom: 22px;
}
.hero h1 em {
  font-style: normal;
  color: var(--color-yellow);
}
.hero p {
  font-size: 18px;
  color: var(--color-gray-light);
  margin-bottom: 34px;
  max-width: 560px;
}
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }

.hero__stats {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 48px;
  margin-top: 56px;
  flex-wrap: wrap;
}
.hero__stats div strong {
  display: block;
  font-family: var(--font-head);
  font-size: 34px;
  color: var(--color-yellow);
}
.hero__stats div span {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-gray-light);
}

/* ---------- Page header (subpages) ---------- */
.page-header {
  position: relative;
  color: var(--color-white);
  padding: 120px 0 64px;
  background: var(--color-black) url('../img/transformador-500kva.png') center 30% / cover no-repeat;
}
.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(10, 11, 13, 0.88);
}
.page-header__inner { position: relative; z-index: 2; }
.page-header h1 { font-size: clamp(30px, 4.6vw, 46px); margin-bottom: 12px; }
.breadcrumb {
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-gray-light);
}
.breadcrumb a:hover { color: var(--color-yellow); }
.breadcrumb .sep { margin: 0 8px; color: var(--color-gray); }

/* ---------- Trust bar ---------- */
.trust {
  padding: 40px 0;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}
.trust__label {
  text-align: center;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-gray);
  margin-bottom: 26px;
}
.trust__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 56px;
  flex-wrap: wrap;
}
.trust__logos img {
  height: 46px;
  width: auto;
  filter: grayscale(100%);
  opacity: 0.7;
  transition: filter 0.2s ease, opacity 0.2s ease;
}
.trust__logos img:hover { filter: grayscale(0%); opacity: 1; }

/* ---------- Grid helpers ---------- */
.grid {
  display: grid;
  gap: 30px;
}
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 980px) {
  .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--6 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 620px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .grid--6 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- About split ---------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; gap: 36px; }
}
.split__media { position: relative; }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow); }
.split__media.frame::after {
  content: '';
  position: absolute;
  top: 20px; left: 20px;
  right: -20px; bottom: -20px;
  border: 4px solid var(--color-yellow);
  border-radius: var(--radius);
  z-index: -1;
}

.check-list li {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--color-charcoal);
}
.section--dark .check-list li,
.section--steel .check-list li { color: var(--color-gray-light); }
.check-list li::before {
  content: '✓';
  flex-shrink: 0;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--color-yellow);
  color: var(--color-black);
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Service cards ---------- */
.card {
  background: var(--color-white);
  border: 1px solid #ececec;
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.card__media { height: 190px; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.35s ease; }
.card:hover .card__media img { transform: scale(1.06); }
.card__body { padding: 26px; flex: 1; display: flex; flex-direction: column; }
.card__num {
  font-family: var(--font-head);
  color: var(--color-yellow-dark);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.card__body h3 { font-size: 21px; margin-bottom: 10px; }
.card__body p { color: var(--color-gray); font-size: 15px; flex: 1; }
.card__link {
  margin-top: 16px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-charcoal);
}
.card__link:hover { color: var(--color-yellow-dark); }

/* ---------- Values ---------- */
.value {
  text-align: center;
  padding: 30px 20px;
}
.value__icon {
  width: 64px; height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--color-yellow);
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}
.value h4 { font-size: 17px; margin-bottom: 8px; text-transform: none; }
.value p { color: var(--color-gray); font-size: 14.5px; }
.section--dark .value p, .section--steel .value p { color: var(--color-gray-light); }

/* ---------- Service detail rows (servicios.html) ---------- */
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding: 64px 0;
  border-bottom: 1px solid #ececec;
}
.service-row:last-child { border-bottom: none; }
.service-row.reverse .service-row__media { order: 2; }
.service-row.reverse .service-row__text { order: 1; }
@media (max-width: 860px) {
  .service-row, .service-row.reverse {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .service-row.reverse .service-row__media,
  .service-row.reverse .service-row__text { order: initial; }
}
.service-row__media img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; height: 380px; object-fit: cover; }
.service-row__tag {
  display: inline-block;
  background: var(--color-yellow);
  color: var(--color-black);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  margin-bottom: 14px;
}
.service-row h2 { font-size: 30px; margin-bottom: 16px; }
.service-row p { color: var(--color-gray); margin-bottom: 16px; }

/* ---------- Gallery (proyectos.html) ---------- */
.gallery {
  column-count: 3;
  column-gap: 20px;
}
@media (max-width: 900px) { .gallery { column-count: 2; } }
@media (max-width: 560px) { .gallery { column-count: 1; } }
.gallery__item {
  break-inside: avoid;
  margin-bottom: 20px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 16px rgba(0,0,0,0.1);
}
.gallery__item img { width: 100%; display: block; }
.gallery__cap {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.85), transparent);
  color: var(--color-white);
  padding: 26px 16px 14px;
  font-family: var(--font-head);
  font-size: 15px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--color-black) 0%, var(--color-charcoal) 100%);
  color: var(--color-white);
  padding: 64px 0;
  text-align: center;
}
.cta-banner h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 14px; }
.cta-banner p { color: var(--color-gray-light); margin-bottom: 30px; }
.cta-banner__actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Contact page ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

.info-card {
  background: var(--color-charcoal);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 40px;
}
.info-card h3 { font-size: 22px; margin-bottom: 24px; }
.info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 26px;
}
.info-item__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--color-yellow);
  color: var(--color-black);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.info-item strong { display: block; font-size: 15px; margin-bottom: 3px; }
.info-item span, .info-item a { color: var(--color-gray-light); font-size: 14.5px; }
.info-item a:hover { color: var(--color-yellow); }
.info-card .social { display: flex; gap: 12px; margin-top: 30px; }
.info-card .social a {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  display: flex; align-items: center; justify-content: center;
}
.info-card .social a:hover { background: var(--color-yellow); color: var(--color-black); border-color: var(--color-yellow); }

.form-card {
  background: var(--color-off-white);
  border-radius: var(--radius);
  padding: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-charcoal);
  margin-bottom: 7px;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid #d8dade;
  border-radius: 4px;
  font-family: var(--font-body);
  font-size: 15px;
  background: var(--color-white);
  color: var(--color-charcoal);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--color-yellow-dark);
  box-shadow: 0 0 0 3px rgba(247,181,0,0.18);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: 12.5px; color: var(--color-gray); margin-top: 12px; }

.map-frame {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: none;
  width: 100%;
  height: 360px;
}

/* ---------- Footer ---------- */
.footer {
  background: var(--color-black);
  color: var(--color-gray-light);
  padding: 72px 0 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
@media (max-width: 860px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer__grid { grid-template-columns: 1fr; }
}
.footer__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.footer__brand img { height: 42px; }
.footer__brand span { font-family: var(--font-head); font-weight: 700; color: var(--color-white); font-size: 18px; }
.footer p.tagline { font-style: italic; color: var(--color-gray); margin-bottom: 18px; font-size: 14.5px; }
.footer h4 {
  color: var(--color-white);
  font-size: 15px;
  letter-spacing: 1px;
  margin-bottom: 20px;
}
.footer ul li { margin-bottom: 11px; font-size: 14.5px; }
.footer ul li a:hover { color: var(--color-yellow); }
.footer .social { display: flex; gap: 10px; margin-top: 20px; }
.footer .social a {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
}
.footer .social a:hover { background: var(--color-yellow); color: var(--color-black); border-color: var(--color-yellow); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 0;
  font-size: 13px;
  color: var(--color-gray);
  flex-wrap: wrap;
  gap: 10px;
}
.footer__bottom a:hover { color: var(--color-yellow); }

/* ---------- WhatsApp float ---------- */
.wa-float {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
  z-index: 900;
  font-size: 28px;
  transition: transform 0.2s ease;
}
.wa-float:hover { transform: scale(1.08); }

/* ---------- Misc ---------- */
.badge-strip {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.badge-strip span {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12.5px;
  letter-spacing: 0.5px;
}

.icon-svg { width: 26px; height: 26px; }

/* ---------- Alliance page (IET + Baja Tech) ---------- */
.value__icon--blue { background: #1a56db; color: var(--color-white); }
.service-row__tag--blue { background: #1a56db; color: var(--color-white); }

.duo-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 36px 0;
}
.duo-logos img { height: 68px; width: auto; }
.duo-logos__x {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 30px;
  color: var(--color-gray-light);
}
.section--offwhite .duo-logos__x,
.section--white .duo-logos__x { color: var(--color-gray); }

.ally-strip {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.ally-strip__item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  padding: 10px 18px;
  border-radius: 30px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--color-white);
}
.section--offwhite .ally-strip__item,
.section--white .ally-strip__item {
  background: var(--color-white);
  border-color: #e4e6ea;
  color: var(--color-charcoal);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
