/*
  SUMMA IT - hoja de estilos del sitio.
  Reemplaza bulma.css + examples.css + estilos inline de la versión Angular.
*/

@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Montserrat";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/montserrat-latin-wght-italic.woff2") format("woff2");
}

:root {
  --naranja: #ff3b00;
  --azul-oscuro: #244d6b;
  --azul: #1f67a3;
  --azul-redes: #3379b6;
  --gris: #f2f2f2;
  --fondo-video: #000d27;
  --fondo-socios: #040822;
  --turquesa: #64f7e9;
  --navbar-height: 4.5rem;
  --font: "Montserrat", "Segoe UI", Arial, sans-serif;
}

/* ---------- Base ---------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--navbar-height);
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  color: #4a4a4a;
  background-color: #fff;
}

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

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

a {
  color: var(--azul-redes);
}

address {
  font-style: normal;
}

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

:focus-visible {
  outline: 3px solid var(--naranja);
  outline-offset: 2px;
}

/* ---------- Barra de navegación ---------- */

.navbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background-color: #fff;
  border-bottom: 2px solid var(--naranja);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--navbar-height);
  padding: 0.5rem 1.5rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
}

.navbar-logo {
  width: 200px;
  margin-left: 6vw;
}

.navbar-menu {
  display: flex;
  align-items: center;
}

.navbar-item {
  display: block;
  padding: 0.5rem 0.75rem;
  color: var(--azul);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  text-transform: uppercase;
}

.navbar-item:hover,
.navbar-item:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Separadores naranjas entre opciones del menú */
.navbar-item + .navbar-item::before {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin: 0 1.25rem 0 -0.75rem;
  vertical-align: -0.15em;
  background-color: var(--naranja);
}

.navbar-burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: none;
  border: 0;
  cursor: pointer;
}

.navbar-burger-bar {
  display: block;
  height: 2px;
  background-color: var(--azul);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar-burger[aria-expanded="true"] .navbar-burger-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.navbar-burger[aria-expanded="true"] .navbar-burger-bar:nth-child(2) {
  opacity: 0;
}

.navbar-burger[aria-expanded="true"] .navbar-burger-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 1023px) {
  .navbar-logo {
    width: 150px;
    margin-left: 0;
  }

  .navbar-burger {
    display: flex;
  }

  .navbar-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1.5rem 1rem;
    background-color: #fff;
    border-bottom: 2px solid var(--naranja);
    box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);
  }

  .navbar-menu.is-open {
    display: flex;
  }

  .navbar-item {
    padding: 0.75rem 0;
  }

  .navbar-item + .navbar-item::before {
    display: none;
  }
}

/* ---------- Video ---------- */

.hero {
  display: flex;
  justify-content: center;
  background-color: var(--fondo-video);
}

.hero-video {
  width: 100%;
  max-width: 1280px;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* ---------- Secciones ---------- */

.section {
  padding: 3rem 1.5rem;
}

.section-title {
  margin-bottom: 1.5rem;
  color: var(--azul-oscuro);
  font-size: clamp(1.9rem, 6vw, 4.8rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.125;
  text-transform: uppercase;
}

.section-title-light {
  color: var(--turquesa);
}

.section-gray {
  padding-top: 0;
  background-color: var(--gris);
}

.sombra {
  width: 100%;
  height: 40px;
  background-image: url("../img/sombra.webp");
  background-repeat: no-repeat;
  background-position: top center;
  background-size: 90% 40%;
}

/* ---------- Tarjetas con fotografía ---------- */

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.cards-5 > * {
  flex: 0 1 16%;
  min-width: 10rem;
}

.cards-4 > * {
  flex: 0 1 22%;
  min-width: 12rem;
}

.photo-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: 0.25rem;
  background-color: var(--azul-oscuro);
  background-size: cover;
  background-position: center;
  box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);
  color: #fff;
  text-align: center;
}

.photo-card h3 {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.photo-card ul {
  margin-top: 0.75rem;
  padding: 0;
  list-style: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

.photo-card-short {
  justify-content: flex-end;
  min-height: 250px;
}

.photo-card-tall {
  justify-content: center;
  min-height: 350px;
}

.bg-consolidacion { background-image: url("../img/consolidacion.webp"); }
.bg-inteligencia { background-image: url("../img/inteligencia.webp"); }
.bg-vinculacion { background-image: url("../img/vinculacion.webp"); }
.bg-comunicaciones { background-image: url("../img/comunicaciones.webp"); }
.bg-implementacion { background-image: url("../img/implementacion.webp"); }
.bg-data { background-image: url("../img/data.webp"); }
.bg-almacenamiento { background-image: url("../img/almacenamiento.webp"); }
.bg-renovacion { background-image: url("../img/renovacion.webp"); }
.bg-servicios { background-image: url("../img/servicios.webp"); }

/* ---------- Objetivo / Misión / Visión / Valores ---------- */

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  padding: 0 4vw;
}

.about-card {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  min-height: 180px;
  padding: 1.5rem;
  background-color: var(--gris);
}

.about-icon {
  flex: 0 0 80px;
  width: 80px;
}

.about-card h3 {
  margin-bottom: 0.5rem;
  color: var(--azul-oscuro);
  font-size: 1.2rem;
  font-style: italic;
  font-weight: 500;
  text-transform: uppercase;
}

/* ---------- Socios (carrusel) ---------- */

.section-partners {
  background-color: var(--fondo-socios);
}

.carousel {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

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

.carousel-track {
  display: flex;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.carousel-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 30%;
  height: 180px;
  padding: 2rem 3%;
  scroll-snap-align: start;
}

.carousel-cell img {
  width: 100%;
  max-height: 100%;
  object-fit: contain;
}

@media (min-width: 1700px) {
  .carousel-cell {
    flex-basis: 20%;
  }
}

/* ---------- Contacto ---------- */

.section-contact {
  background-color: var(--gris);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-info {
  color: var(--azul-oscuro);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.4;
  text-align: right;
}

.contact-info a {
  color: var(--azul-redes);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 28rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  border: 1px solid transparent;
  border-radius: 2px;
  background-color: #fff;
  color: #4a4a4a;
  font: inherit;
}

.contact-form textarea {
  resize: vertical;
  min-height: 5rem;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #6b6b6b;
}

.contact-form [aria-invalid="true"] {
  border-color: #c0392b;
}

.field-error {
  margin-top: 0.25rem;
  color: #b3261e;
  font-size: 0.875rem;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn-submit {
  padding: 0.65rem;
  border: 0;
  border-radius: 3px;
  background-color: var(--azul-oscuro);
  box-shadow: 1px 5px 20px -5px rgba(0, 0, 0, 0.4);
  color: #fff;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.btn-submit:hover {
  background-color: #1a3a52;
}

.btn-submit[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.form-status {
  min-height: 1.5em;
  font-weight: 600;
}

.form-status.is-success {
  color: #1e6b34;
}

.form-status.is-error {
  color: #b3261e;
}

/* ---------- Redes sociales ---------- */

.social {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 1.5rem 0;
  background-color: var(--azul-redes);
}

.social img {
  width: 45px;
}

/* ---------- Pantallas pequeñas ---------- */

@media (max-width: 768px) {
  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .about-grid {
    padding: 0;
  }

  .contact-info {
    font-size: 1.2rem;
    text-align: center;
  }

  .contact-form {
    max-width: none;
  }

  .carousel-cell {
    flex-basis: 80%;
  }
}

@media (max-width: 460px) {
  .cards-5 > *,
  .cards-4 > * {
    flex-basis: 100%;
  }

  .photo-card-short {
    min-height: 95px;
  }

  .photo-card-tall {
    min-height: 100px;
  }

  .about-card {
    gap: 1rem;
    padding: 1rem;
  }

  .about-icon {
    flex-basis: 56px;
    width: 56px;
  }

  .social {
    gap: 1.5rem;
  }
}
