:root {
  --guinda: #7b1f2d;
  --guinda-dark: #601721;

  --gris: #7d858b;
  --gris-dark: #545b60;
  --gris-medium: #a6acb0;
  --gris-light: #eef0f1;

  --fondo: #f7f8f8;
  --blanco: #ffffff;
  --texto: #34383b;

  --borde: rgba(125, 133, 139, 0.18);

  --sombra: 0 10px 30px rgba(32, 37, 40, 0.07);

  --sombra-hover: 0 18px 42px rgba(123, 31, 45, 0.13);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 150px;
}

body {
  margin: 0;

  overflow-x: hidden;

  color: var(--texto);

  background: var(--fondo);

  font-family: "Metropolis", "Montserrat", Arial, sans-serif;

  font-size: 16px;

  font-weight: 400;

  line-height: 1.6;
}

img {
  max-width: 100%;
}

a {
  text-decoration: none;
}

.site-header {
  z-index: 1030;

  background: var(--blanco);

  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.07);
}

.institution-header {
  background: var(--blanco);
}

.header-container {
  min-height: 100px;

  padding-left: 42px;
  padding-right: 42px;

  display: flex;

  align-items: center;

  justify-content: space-between;
}

.institution-logo {
  display: flex;

  align-items: center;
}

.institution-logo img {
  display: block;

  width: auto;

  height: auto;

  max-width: 390px;

  max-height: 70px;

  object-fit: contain;
}

.institution-info {
  margin-left: auto;

  text-align: right;
}

.institution-title {
  margin: 0 0 6px;

  color: var(--guinda);

  font-family: "Metropolis", "Montserrat", Arial, sans-serif;

  font-size: 1.3rem;

  font-weight: 700;

  line-height: 1.2;

  letter-spacing: 1.2px;

  text-transform: uppercase;
}

.institution-subtitle {
  margin: 0;

  color: var(--gris);

  font-size: 0.96rem;

  font-weight: 700;

  line-height: 1.2;

  letter-spacing: 0.4px;

  text-transform: uppercase;
}

.portal-nav {
  background: var(--blanco);

  border-top: 1px solid rgba(125, 133, 139, 0.12);

  border-bottom: 3px solid var(--guinda);
}

.portal-menu {
  min-height: 45px;

  display: flex;

  align-items: center;

  justify-content: flex-end;

  gap: 8px;
}

.portal-menu-link {
  position: relative;

  padding: 13px 18px;

  color: var(--gris-dark);

  font-size: 0.82rem;

  font-weight: 600;

  letter-spacing: 0.35px;

  text-transform: uppercase;

  transition: color 0.25s ease;
}

.portal-menu-link::after {
  content: "";

  position: absolute;

  left: 18px;

  right: 18px;

  bottom: 7px;

  height: 2px;

  background: var(--guinda);

  transform: scaleX(0);

  transform-origin: center;

  transition: transform 0.25s ease;
}

.portal-menu-link:hover {
  color: var(--guinda);
}

.portal-menu-link:hover::after {
  transform: scaleX(1);
}

.header-carousel {
  position: relative;

  width: 100%;

  overflow: hidden;

  background: var(--blanco);
}

.owl-carousel-item {
  position: relative;

  width: 100%;

  aspect-ratio: 3 / 1;

  height: auto;

  min-height: 0;

  overflow: hidden;

  background: var(--blanco);
}

.owl-carousel-item > img {
  display: block;

  width: 100% !important;

  height: 100% !important;

  object-fit: contain;

  object-position: center;

  background: var(--blanco);
}

.header-carousel-main .owl-stage-outer {
  overflow: hidden;
}

.slider-overlay {
  position: absolute;

  inset: 0;

  z-index: 2;

  display: flex;

  align-items: center;

  background: linear-gradient(
    90deg,
    rgba(123, 31, 45, 0.1) 0%,

    rgba(123, 31, 45, 0.04) 40%,

    rgba(123, 31, 45, 0) 70%,

    rgba(0, 0, 0, 0) 100%
  );
}

.slider-content {
  width: min(720px, 92%);

  padding: 32px 38px;

  color: var(--blanco);

  border-left: 5px solid var(--blanco);
}

.slider-content h2 {
  margin: 0 0 18px;

  color: var(--blanco);

  font-family: "Metropolis", "Montserrat", Arial, sans-serif;

  font-size: clamp(2.3rem, 4vw, 4.4rem);

  font-weight: 700;

  line-height: 1.06;

  letter-spacing: -1px;

  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.3);
}

.slider-content p {
  max-width: 650px;

  margin: 0;

  color: var(--blanco);

  font-size: 1.08rem;

  font-weight: 400;

  line-height: 1.7;

  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.slider-eyebrow {
  display: inline-flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 16px;

  padding: 7px 13px;

  color: var(--blanco);

  background: rgba(255, 255, 255, 0.12);

  border: 1px solid rgba(255, 255, 255, 0.35);

  border-radius: 50px;

  font-size: 0.74rem;

  font-weight: 700;

  letter-spacing: 1px;

  text-transform: uppercase;

  backdrop-filter: blur(5px);
}

.owl-item.active .slider-content {
  animation: sliderTextIn 0.7s ease both;
}

@keyframes sliderTextIn {
  from {
    opacity: 0;

    transform: translateX(-30px);
  }

  to {
    opacity: 1;

    transform: translateX(0);
  }
}

.header-carousel-main .owl-dots {
  position: absolute;

  z-index: 5;

  left: 50%;

  bottom: 22px;

  transform: translateX(-50%);

  display: flex;

  align-items: center;

  gap: 9px;
}

.header-carousel-main .owl-dot {
  padding: 0 !important;

  border: none;

  background: transparent;
}

.header-carousel-main .owl-dot span {
  display: block;

  width: 10px;

  height: 10px;

  margin: 0;

  border-radius: 100px;

  background: rgba(255, 255, 255, 0.68);

  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.header-carousel-main .owl-dot.active span {
  width: 34px;

  background: var(--blanco);
}

.slider-progress {
  position: absolute;

  z-index: 7;

  left: 0;

  bottom: 0;

  width: 0;

  height: 4px;

  background: var(--blanco);
}

.slider-progress.running {
  animation: sliderTimer 6s linear forwards;
}

@keyframes sliderTimer {
  from {
    width: 0;
  }

  to {
    width: 100%;
  }
}

.sistemas-section {
  padding: 82px 0 90px;

  background: linear-gradient(
    180deg,
    var(--blanco) 0%,

    #f7f8f8 100%
  );
}

.sistemas-header {
  max-width: 720px;

  margin: 0 auto 48px;
}

.section-label {
  display: block;

  margin-bottom: 8px;

  color: var(--gris);

  font-size: 0.73rem;

  font-weight: 700;

  letter-spacing: 1.8px;

  text-transform: uppercase;
}

.sistemas-title {
  margin: 0;

  color: var(--guinda);

  font-family: "Metropolis", "Montserrat", Arial, sans-serif;

  font-size: clamp(2rem, 3vw, 2.75rem);

  font-weight: 700;

  letter-spacing: -0.6px;
}

.sistemas-line {
  width: 68px;

  height: 4px;

  margin: 17px auto 0;

  background: var(--guinda);

  border-radius: 20px;
}

.sistemas-description {
  max-width: 650px;

  margin: 16px auto 0;

  color: var(--gris);

  font-size: 0.98rem;

  font-weight: 400;

  line-height: 1.7;
}

.system-card {
  position: relative;

  display: flex;

  flex-direction: column;

  align-items: center;

  height: 100%;

  padding: 28px 24px 30px;

  overflow: hidden;

  text-align: center;

  background: var(--blanco);

  border: 1px solid var(--borde);

  border-radius: 16px;

  box-shadow: var(--sombra);

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

.system-card::before {
  content: "";

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 5px;

  background: var(--guinda);
}

.system-card:hover {
  transform: translateY(-7px);

  border-color: rgba(123, 31, 45, 0.25);

  box-shadow: var(--sombra-hover);
}

.system-category {
  align-self: flex-start;

  margin: 2px 0 21px;

  color: var(--gris);

  font-size: 0.66rem;

  font-weight: 700;

  letter-spacing: 1.2px;

  text-transform: uppercase;
}

.system-icon {
  width: 96px;

  height: 96px;

  margin-bottom: 23px;

  display: flex;

  align-items: center;

  justify-content: center;

  background: rgba(123, 31, 45, 0.045);

  border: 1px solid rgba(123, 31, 45, 0.1);

  border-radius: 16px;

  transition:
    transform 0.3s ease,
    background 0.3s ease;
}

.system-card:hover .system-icon {
  transform: scale(1.04);

  background: rgba(123, 31, 45, 0.075);
}

.system-icon img {
  width: 70px;

  height: 70px;

  object-fit: contain;
}

.system-card h3 {
  margin: 0 0 13px;

  color: var(--guinda);

  font-family: "Metropolis", "Montserrat", Arial, sans-serif;

  font-size: 1.13rem;

  font-weight: 700;

  letter-spacing: 0.25px;
}

.system-card p {
  flex-grow: 1;

  margin: 0 0 26px;

  color: var(--gris-dark);

  font-size: 0.9rem;

  font-weight: 400;

  line-height: 1.65;
}

.system-action {
  width: 100%;

  margin-top: auto;
}

.btn-system {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  gap: 9px;

  min-width: 190px;

  padding: 10px 20px;

  color: var(--blanco);

  background: var(--guinda);

  border: 2px solid var(--guinda);

  border-radius: 7px;

  font-family: "Metropolis", "Montserrat", Arial, sans-serif;

  font-size: 0.82rem;

  font-weight: 700;

  text-decoration: none;

  transition:
    color 0.25s ease,
    background 0.25s ease,
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.btn-system:hover {
  color: var(--guinda);

  background: var(--blanco);

  transform: translateY(-2px);

  box-shadow: 0 7px 18px rgba(123, 31, 45, 0.14);
}

.btn-system i {
  font-size: 0.74rem;

  transition: transform 0.25s ease;
}

.btn-system:hover i {
  transform: translateX(4px);
}

.footer-diresa {
  position: relative;

  width: 100%;

  padding: 0;

  overflow: hidden;

  display: flex;

  flex-direction: column;

  color: var(--blanco);

  background: var(--guinda);

  border-top: 5px solid var(--gris);
}

.footer-content {
  order: 1;

  padding-top: 38px;

  padding-bottom: 30px;
}
.footer-social-title {
  margin: 0 0 4px;

  color: var(--blanco);

  font-size: 0.88rem;

  font-weight: 700;

  letter-spacing: 1px;

  text-transform: uppercase;
}

.footer-social-description {
  margin: 0 0 15px;

  color: rgba(255, 255, 255, 0.7);

  font-size: 0.78rem;

  font-weight: 400;
}

.social-links {
  display: flex;

  flex-wrap: wrap;

  align-items: center;

  gap: 10px;
}

.social-link {
  width: 44px;

  height: 44px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  color: var(--blanco);

  background: rgba(255, 255, 255, 0.08);

  border: 1px solid rgba(255, 255, 255, 0.25);

  border-radius: 50%;

  font-size: 1rem;

  text-decoration: none;

  transition:
    color 0.25s ease,
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease;
}

.social-link:hover {
  color: var(--guinda);

  background: var(--blanco);

  border-color: var(--blanco);

  transform: translateY(-3px);
}

.footer-brand-card {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding: 10px 15px;

  border-radius: 9px;

  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.footer-brand-card:hover {
  transform: translateY(-3px);

  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.footer-logo {
  display: block;

  width: 210px;

  height: auto;

  max-height: 90px;

  object-fit: contain;

  filter: none !important;
}
.footer-copy {
  margin: 0 0 5px;

  color: var(--blanco);

  font-size: 0.94rem;

  font-weight: 700;
}

.footer-institution {
  margin: 0;

  color: rgba(255, 255, 255, 0.72);

  font-size: 0.83rem;

  font-weight: 400;
}

.footer-cintillo {
  order: 2;

  position: relative;

  width: 100%;

  height: 52px;

  margin: 0;

  padding: 0;

  flex-shrink: 0;

  background-image: url("../img/cintillo-footer.png");

  background-repeat: repeat-x;

  background-position: left center;

  background-size: auto 52px;

  background-color: var(--guinda);

  overflow: hidden;
}

.footer-cintillo img {
  display: none;
}

@media (max-width: 991.98px) {
  html {
    scroll-padding-top: 100px;
  }

  .header-container {
    min-height: 86px;

    padding-left: 24px;

    padding-right: 24px;
  }

  .institution-logo img {
    max-height: 58px;

    max-width: 290px;
  }

  .institution-title {
    font-size: 0.96rem;
  }

  .institution-subtitle {
    font-size: 0.75rem;
  }

  .portal-menu {
    justify-content: center;
  }

  .owl-carousel-item {
    width: 100%;

    aspect-ratio: 3 / 1;

    height: auto;

    min-height: 0;
  }

  .owl-carousel-item > img {
    width: 100% !important;

    height: 100% !important;

    object-fit: contain;

    object-position: center;
  }

  .sistemas-section {
    padding: 65px 0 75px;
  }

  .footer-content {
    padding-top: 32px;

    padding-bottom: 26px;
  }

  .footer-cintillo {
    height: 46px;

    background-size: auto 46px;
  }
}

@media (max-width: 767.98px) {
  html {
    scroll-padding-top: 80px;
  }

  .header-container {
    min-height: 75px;

    padding-left: 15px;

    padding-right: 15px;
  }

  .institution-logo img {
    max-height: 52px;

    max-width: 250px;
  }

  .institution-info {
    display: none;
  }

  .portal-menu {
    min-height: 42px;

    justify-content: center;

    gap: 0;
  }

  .portal-menu-link {
    padding: 12px 14px;

    font-size: 0.73rem;
  }
  .owl-carousel-item {
    width: 100%;

    aspect-ratio: 3 / 1;

    height: auto;

    min-height: 0;

    background: var(--blanco);
  }

  .owl-carousel-item > img {
    display: block;

    width: 100% !important;

    height: 100% !important;

    object-fit: contain;

    object-position: center;

    background: var(--blanco);
  }

  .slider-overlay {
    background: linear-gradient(
      90deg,
      rgba(123, 31, 45, 0.05) 0%,

      rgba(123, 31, 45, 0.02) 70%,

      rgba(123, 31, 45, 0) 100%
    );
  }

  .slider-content {
    width: 92%;

    padding: 23px 20px;

    border-left-width: 4px;
  }

  .slider-content h2 {
    font-size: 2rem;

    line-height: 1.1;
  }

  .slider-content p {
    font-size: 0.94rem;

    line-height: 1.55;
  }

  .slider-eyebrow {
    font-size: 0.66rem;
  }

  .sistemas-section {
    padding: 52px 0 62px;
  }

  .sistemas-header {
    margin-bottom: 35px;

    padding: 0 15px;
  }

  .sistemas-title {
    font-size: 1.9rem;
  }

  .sistemas-description {
    font-size: 0.91rem;
  }

  .system-card {
    padding: 27px 23px 28px;
  }

  .system-icon {
    width: 88px;

    height: 88px;
  }

  .system-icon img {
    width: 64px;

    height: 64px;
  }

  .footer-diresa {
    text-align: center;
  }

  .footer-content {
    padding-top: 30px;

    padding-bottom: 25px;
  }

  .social-links {
    justify-content: center;
  }

  .footer-brand-card {
    margin: 5px auto;
  }

  .footer-logo {
    width: 190px;
  }
  .footer-cintillo {
    height: 38px;

    background-size: auto 38px;

    background-repeat: repeat-x;

    background-position: left center;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;

    animation-iteration-count: 1 !important;

    transition-duration: 0.01ms !important;

    scroll-behavior: auto !important;
  }
}
