:root {
  --portal-blue: #175cdd;
  --portal-blue-dark: #1044a8;
  --portal-blue-soft: #eaf2ff;
  --portal-navy: #07162f;
  --portal-text: #3c4049;
  --portal-border: #dce6f3;
}

body.index-page {
  --accent-color: var(--portal-blue);
  --nav-hover-color: var(--portal-blue);
  --heading-color: var(--portal-navy);
  background-color: #fff;
}

.header .logo {
  gap: 12px;
}

.header .logo img {
  max-height: 48px;
  max-width: 250px;
  object-fit: contain;
}

.header .logo h1 {
  color: var(--portal-navy);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.header .logo h1 span {
  color: var(--portal-blue);
}

.topbar .container {
  gap: 12px;
}

.portal-topbar-brand,
.portal-call-center,
.portal-live-info,
.portal-live-info span {
  align-items: center;
  color: #fff;
  display: inline-flex;
  gap: 7px;
}

.portal-call-center {
  font-weight: 700;
}

.portal-live-info {
  flex-wrap: wrap;
  font-size: 13px;
  gap: 16px;
}

.portal-hero {
  align-items: center;
  background:
    radial-gradient(ellipse at 87% 45%, rgba(23, 92, 221, 0.1), transparent 35%),
    linear-gradient(135deg, #fff 0%, #f3f7ff 100%);
  display: flex;
  min-height: 0;
  overflow: hidden;
  padding: 175px 0 76px;
  position: relative;
}

.portal-hero::before {
  display: none;
}

.portal-hero-content {
  position: relative;
  z-index: 2;
}

.portal-hero .hero-content {
  max-width: 650px;
}

.portal-eyebrow {
  align-items: center;
  color: var(--portal-blue);
  display: inline-flex;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  letter-spacing: 0.04em;
  margin-bottom: 16px;
  text-transform: uppercase;
}

.portal-hero h1 {
  color: var(--portal-navy);
  font-size: clamp(36px, 4vw, 56px);
  line-height: 1.12;
  margin-bottom: 20px;
}

.portal-hero h1 .highlight {
  color: var(--portal-blue);
}

.portal-hero .hero-description {
  color: var(--portal-text);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 26px;
  max-width: 560px;
}

.portal-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.portal-hero-actions .btn {
  border-radius: 8px;
  font-weight: 700;
  padding: 12px 18px;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.portal-hero-actions .btn:hover {
  box-shadow: 0 8px 18px rgba(7, 22, 47, 0.16);
  transform: translateY(-3px);
}

.portal-hero-actions .btn-primary:hover {
  background-color: var(--portal-blue-dark);
  border-color: var(--portal-blue-dark);
}

.portal-hero-actions .btn-outline-primary:hover {
  background-color: var(--portal-blue);
  border-color: var(--portal-blue);
  color: #fff;
}

.portal-gallery-frame {
  background: #fff;
  border: 1px solid rgba(23, 92, 221, 0.12);
  border-radius: 18px;
  box-shadow: 0 22px 55px rgba(7, 22, 47, 0.14);
  overflow: hidden;
  padding: 12px;
  position: relative;
}

.portal-gallery {
  background: var(--portal-blue-soft);
  border-radius: 11px;
  height: clamp(270px, 32vw, 390px);
  overflow: hidden;
  position: relative;
  width: 100%;
}

.portal-gallery .swiper-config {
  display: none;
}

.portal-gallery .swiper-wrapper,
.portal-gallery .swiper-slide {
  height: 100%;
  width: 100%;
}

.portal-gallery .swiper-slide img {
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.portal-gallery-caption {
  align-items: center;
  color: var(--portal-navy);
  display: flex;
  font-size: 13px;
  font-weight: 700;
  gap: 7px;
  padding: 13px 4px 2px;
}

.portal-gallery-caption i {
  color: var(--portal-blue);
}

.portal-news-panel {
  background: #fff;
  border-left: 5px solid var(--portal-blue);
  border-radius: 8px;
  box-shadow: 0 10px 32px rgba(7, 22, 47, 0.12);
  margin: 28px auto 0;
  max-height: 40vh;
  max-width: 700px;
  overflow-y: auto;
  padding: 20px 22px;
  position: relative;
  right: auto;
  width: 100%;
  z-index: 3;
}

.portal-news-panel h2 {
  color: var(--portal-navy);
  font-size: 19px;
  font-weight: 700;
  margin: 0 0 12px;
}

.portal-news-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-news-panel li {
  border-top: 1px solid var(--portal-border);
  color: var(--portal-text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px 0;
}

.portal-news-panel li:first-child {
  border-top: 0;
  padding-top: 0;
}

.portal-news-panel li:last-child {
  padding-bottom: 0;
}

.portal-news-panel li strong {
  color: var(--portal-navy);
}

.portal-news-date {
  color: var(--portal-blue);
  font-size: 12px;
  font-weight: 700;
}

.portal-services {
  background: #f5f8fd;
  scroll-margin-top: 100px;
}

.portal-info-page {
  background:
    radial-gradient(ellipse at 90% 15%, rgba(23, 92, 221, 0.08), transparent 34%),
    #f5f8fd;
  min-height: 65vh;
  padding: 175px 0 76px;
}

.portal-info-heading {
  margin: 0 auto 34px;
  max-width: 760px;
  text-align: center;
}

.portal-info-heading .portal-eyebrow {
  margin-bottom: 10px;
}

.portal-info-heading h1 {
  color: var(--portal-navy);
  font-size: clamp(32px, 4vw, 46px);
  font-weight: 700;
  margin-bottom: 12px;
}

.portal-info-heading p {
  color: var(--portal-text);
  font-size: 17px;
  margin: 0;
}

.portal-info-card {
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(7, 22, 47, 0.06);
  height: 100%;
  padding: 26px;
}

.portal-info-card-heading {
  align-items: center;
  border-bottom: 1px solid var(--portal-border);
  display: flex;
  gap: 14px;
  margin-bottom: 18px;
  padding-bottom: 16px;
}

.portal-info-card-heading h2 {
  color: var(--portal-navy);
  font-size: 22px;
  font-weight: 700;
  margin: 0;
}

.portal-requirements-list {
  display: grid;
  gap: 20px;
}

.portal-requirements {
  color: var(--portal-text);
  margin: 0;
  padding-left: 1.5rem;
}

.portal-requirements > li {
  line-height: 1.65;
  padding: 9px 0 9px 5px;
}

.portal-requirements > li::marker {
  color: var(--portal-blue);
  font-weight: 700;
}

.portal-requirements > li + li {
  border-top: 1px solid var(--portal-border);
}

.portal-requirements ul {
  margin-top: 8px;
  padding-left: 1.25rem;
}

.portal-requirements ul li + li {
  margin-top: 6px;
}

.portal-payment-location {
  border-bottom: 1px solid var(--portal-border);
  padding: 13px 0;
}

.portal-payment-location:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.portal-payment-location h3,
.portal-payment-notice h3 {
  color: var(--portal-navy);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
}

.portal-payment-location address {
  color: var(--portal-text);
  line-height: 1.6;
  margin: 0;
}

.portal-payment-methods,
.portal-payment-notice ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.portal-payment-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  margin-bottom: 18px;
}

.portal-payment-methods li {
  align-items: center;
  color: var(--portal-text);
  display: inline-flex;
  gap: 8px;
}

.portal-payment-methods i {
  color: var(--portal-blue);
}

.portal-payment-details {
  background: #f5f8fd;
  border-radius: 10px;
  margin: 0 0 18px;
  padding: 12px 16px;
}

.portal-payment-details div {
  align-items: center;
  border-bottom: 1px solid var(--portal-border);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  justify-content: space-between;
  padding: 9px 0;
}

.portal-payment-details div:last-child {
  border-bottom: 0;
}

.portal-payment-details dt {
  color: var(--portal-navy);
  font-weight: 700;
}

.portal-payment-details dd {
  margin: 0;
}

.portal-payment-details code {
  color: var(--portal-blue-dark);
  font-size: 15px;
  overflow-wrap: anywhere;
}

.portal-payment-notice {
  background: #fff8e6;
  border-left: 4px solid #e4a300;
  border-radius: 8px;
  padding: 15px 16px;
}

.portal-payment-notice h3 {
  color: #765300;
}

.portal-payment-notice h3 i {
  margin-right: 5px;
}

.portal-payment-notice p,
.portal-payment-notice li {
  color: var(--portal-text);
  line-height: 1.6;
}

.portal-payment-notice p {
  margin-bottom: 8px;
}

.portal-payment-notice li + li {
  margin-top: 4px;
}

.portal-payment-notice a {
  overflow-wrap: anywhere;
}

.portal-info-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.portal-info-actions .btn {
  border-radius: 8px;
  font-weight: 700;
  padding: 12px 18px;
}

.portal-services .section-title {
  margin-bottom: 36px;
}

.portal-services .section-title h2 {
  color: var(--portal-navy);
  font-size: clamp(27px, 3vw, 38px);
  font-weight: 700;
  text-transform: none;
}

.portal-services .section-title p {
  color: var(--portal-text);
  font-size: 16px;
}

.portal-service-group {
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(7, 22, 47, 0.06);
  height: 100%;
  padding: 24px;
  scroll-margin-top: 105px;
}

.portal-service-group-featured {
  border-top: 20px solid var(--portal-blue);
}

.portal-service-group-heading {
  align-items: center;
  display: flex;
  gap: 14px;
  margin-bottom: 40px;
}

.portal-service-group-icon {
  align-items: center;
  background: var(--portal-blue-soft);
  border-radius: 12px;
  color: var(--portal-blue);
  display: inline-flex;
  flex: 0 0 48px;
  font-size: 22px;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.portal-service-group-heading h3 {
  color: var(--portal-navy);
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 4px;
}

.portal-service-group-heading p {
  color: #677286;
  font-size: 13px;
  line-height: 1.45;
  margin: 0;
}

.portal-service-options {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#cisi .portal-service-options {
  grid-template-columns: 1fr;
}

#tem .portal-service-options {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#otros-servicios .portal-service-options {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.portal-option-card {
  align-items: center;
  background: #fff;
  border: 3px solid var(--portal-border);
  border-radius: 10px;
  color: var(--portal-navy);
  display: flex;
  gap: 11px;
  min-height: 68px;
  min-width: 0;
  padding: 11px 12px;
  text-decoration: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
}

.portal-option-icon {
  align-items: center;
  background: #f0f5ff;
  border-radius: 8px;
  color: var(--portal-blue);
  display: inline-flex;
  flex: 0 0 36px;
  font-size: 17px;
  height: 36px;
  justify-content: center;
  width: 36px;
}

.portal-option-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.portal-option-title {
  color: var(--portal-navy);
  font-family: var(--heading-font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.portal-option-status {
  color: #677286;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.3;
  text-transform: uppercase;
}

.portal-option-arrow {
  color: var(--portal-blue);
  font-size: 15px;
}

.portal-option-link {
  cursor: pointer;
}

.portal-option-card:hover,
.portal-option-link:focus-visible {
  background: #e8f0ff;
  border-color: var(--portal-blue);
  box-shadow: 0 9px 20px rgba(7, 22, 47, 0.11);
  color: var(--portal-navy);
  transform: translateY(-3px);
}

.portal-option-card:hover .portal-option-icon,
.portal-option-link:focus-visible .portal-option-icon {
  background: var(--portal-blue);
  color: #fff;
}

.portal-option-link:focus-visible {
  outline: 3px solid rgba(23, 92, 221, 0.35);
  outline-offset: 2px;
}

.portal-ordinance-card {
  align-items: center;
  background: #fff;
  border: 1px solid var(--portal-border);
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(7, 22, 47, 0.1);
  color: var(--portal-navy);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 210px;
  padding: 24px;
  text-align: center;
  text-decoration: none;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.portal-ordinance-card:hover,
.portal-ordinance-card:focus-visible {
  border-color: var(--portal-blue);
  box-shadow: 0 15px 40px rgba(7, 22, 47, 0.2);
  color: var(--portal-navy);
  transform: translateY(-10px);
}

.portal-ordinance-card:focus-visible {
  outline: 3px solid rgba(23, 92, 221, 0.35);
  outline-offset: 3px;
}

.portal-ordinance-icon {
  align-items: center;
  background: var(--portal-blue-soft);
  border-radius: 50%;
  color: var(--portal-blue);
  display: flex;
  font-size: 36px;
  height: 92px;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  position: relative;
  width: 92px;
}

.portal-ordinance-overlay {
  align-items: center;
  background: rgba(23, 92, 221, 0.88);
  border-radius: 50%;
  color: #fff;
  display: flex;
  flex-direction: column;
  font-size: 12px;
  font-weight: 700;
  gap: 4px;
  inset: 0;
  justify-content: center;
  opacity: 0;
  position: absolute;
  transition: opacity 0.3s ease;
}

.portal-ordinance-overlay i {
  font-size: 20px;
}

.portal-ordinance-card:hover .portal-ordinance-overlay,
.portal-ordinance-card:focus-visible .portal-ordinance-overlay {
  opacity: 1;
}

.portal-ordinance-content {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.portal-ordinance-title {
  color: var(--portal-navy);
  font-family: var(--heading-font);
  font-size: 18px;
  font-weight: 700;
}

.portal-ordinance-description {
  color: #677286;
  font-size: 13px;
}

body.index-page #footer.footer-16 {
  background: #061225;
  border-top: 0;
  color: #fff;
  padding-top: 56px;
}

body.index-page #footer .brand-section .logo .sitename,
body.index-page #footer .brand-section .brand-description,
body.index-page #footer .nav-column h6,
body.index-page #footer .footer-nav a,
body.index-page #footer .footer-nav span,
body.index-page #footer .footer-bottom .copyright p,
body.index-page #footer .footer-bottom .copyright p .sitename,
body.index-page #footer .footer-bottom .legal-links,
body.index-page #footer .footer-bottom .legal-links .credits {
  color: #fff;
}

body.index-page #footer .footer-nav a:hover,
body.index-page #footer .footer-bottom .legal-links a:hover,
body.index-page #footer .footer-bottom .legal-links .credits a:hover {
  color: #cfe0ff;
}

body.index-page #footer .footer-bottom {
  background: rgba(0, 0, 0, 0.28);
}

body.index-page #footer .footer-bottom .legal-links .credits {
  border-left-color: rgba(255, 255, 255, 0.28);
}

body.index-page #footer .footer-bottom .legal-links .credits a {
  color: #fff;
}

.footer-16 .footer-nav-wrapper {
  padding-top: 8px;
}

.footer-16 .footer-nav-wrapper .row {
  row-gap: 28px;
}

.footer-16 .footer-bottom .legal-links {
  flex-wrap: wrap;
}

@media (min-width: 1400px) {
  #tem .portal-service-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  .header .topbar {
    height: auto;
    min-height: 40px;
    padding: 8px 0;
  }

  .topbar .container {
    align-items: center !important;
    flex-direction: column;
    gap: 6px;
    padding-bottom: 8px;
    padding-top: 8px;
  }

  .topbar .contact-info {
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
  }

  .portal-live-info {
    justify-content: center;
  }

  .portal-hero {
    padding-top: 165px;
  }

  .portal-info-page {
    padding: 165px 0 58px;
  }

  #otros-servicios .portal-service-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .topbar .container {
    align-items: flex-start !important;
    flex-direction: column;
    gap: 7px;
    padding-bottom: 9px;
    padding-top: 9px;
  }

  .portal-live-info {
    font-size: 12px;
  }

  .portal-hero {
    padding: 175px 0 58px;
  }

  .portal-info-page {
    padding: 175px 0 58px;
  }

  .portal-hero .hero-description {
    font-size: 16px;
  }

  .portal-gallery {
    height: 300px;
  }

  .portal-service-group {
    padding: 19px;
  }

  #otros-servicios .portal-service-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575px) {
  .header .logo {
    gap: 8px;
  }

  .header .logo img {
    max-width: 128px;
  }

  .header .logo h1 {
    font-size: 15px;
  }

  .header .logo h1 span {
    display: block;
    font-size: 13px;
  }

  .portal-topbar-brand {
    font-size: 11px;
  }

  .portal-call-center {
    font-size: 12px;
  }

  .portal-hero {
    padding-top: 165px;
  }

  .portal-info-page {
    padding-top: 165px;
  }

  .portal-hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .portal-hero-actions .btn {
    width: 100%;
  }

  .portal-gallery {
    height: 240px;
  }

  .portal-service-options,
  #tem .portal-service-options,
  #otros-servicios .portal-service-options {
    grid-template-columns: 1fr;
  }

  .portal-option-card {
    min-height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portal-hero-actions .btn,
  .portal-option-card,
  .portal-ordinance-card,
  .portal-ordinance-overlay {
    transition: none;
  }

  .portal-hero-actions .btn:hover,
  .portal-option-card:hover,
  .portal-option-link:focus-visible,
  .portal-ordinance-card:hover,
  .portal-ordinance-card:focus-visible {
    transform: none;
  }
}

@page {
  margin: 1.5cm;
}

@media print {
  body.index-page {
    background: #fff;
    color: #000;
  }

  #header,
  #footer,
  #scroll-top,
  #preloader,
  .portal-info-actions {
    display: none !important;
  }

  .main,
  .portal-info-page {
    background: #fff !important;
    margin: 0 !important;
    min-height: 0;
    padding: 0 !important;
  }

  .portal-info-page .container {
    max-width: none;
    padding: 0;
    width: 100%;
  }

  .portal-info-heading {
    margin-bottom: 20px;
  }

  .portal-info-heading .portal-eyebrow {
    color: #333;
  }

  .portal-info-heading h1,
  .portal-info-card-heading h2 {
    color: #000;
  }

  .portal-info-card {
    break-inside: avoid;
    box-shadow: none;
    page-break-inside: avoid;
  }

  .portal-requirements > li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
  }
}
