:root {
  --vino: #8f141b;
  --vino-2: #b15b60;
  --vino-oscuro: #5c0e12;
  --gris-texto: #263238;
  --gris: #52636e;
  --gris-claro: #eef1f3;
  --gris-borde: #b7c1c8;
  --gris-borde-claro: #dfe4e7;
  --azul-footer: #344f66;
  --azul-link: #526f86;
  --ocre: #c7b363;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  background: #fff;
  color: var(--gris-texto);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
}
img { max-width: 100%; }
a { transition: color .2s ease, background-color .2s ease, border-color .2s ease, opacity .2s ease; }

/* Encabezado y slider */
.site-header { width: 100%; margin: 0; padding: 0; }
.header-slider { width: 100%; margin: 0; padding: 0; overflow: hidden; }
.header-slider .carousel-inner,
.header-slider .carousel-item { width: 100%; }
.header-slider-img {
  display: block;
  width: 100%;
  height: clamp(220px, 38vw, 620px);
  object-fit: cover;
  object-position: center;
}
.header-slider .carousel-caption {
  bottom: 10%;
  text-shadow: 0 2px 8px rgba(0,0,0,.75);
}
.header-slider .carousel-indicators { margin-bottom: .75rem; }
.header-slider .carousel-indicators button { background-color: #e3c5c6; opacity: .8; }
.header-slider .carousel-indicators button.active { background-color: var(--vino); }

/* Navegación */
.navbar.bg-dark {
  background: var(--vino-oscuro) !important;
  border-bottom: 4px solid var(--vino-2);
}
.navbar .navbar-brand,
.navbar .nav-link { color: #fff !important; }
.navbar .nav-link:hover,
.navbar .nav-link.active { color: #e3c5c6 !important; }
.navbar-toggler { border-color: rgba(255,255,255,.55); }

.site-logo {
  display: block;
  width: 239px;
  height: 77px;
  max-width: 100%;
  object-fit: contain;
  background: #fff;
  border-radius: 2px;
}

/* Identidad principal */
.hero {
  background: linear-gradient(135deg, var(--vino), var(--vino-oscuro));
  color: #fff;
  border-bottom: 6px solid var(--ocre);
}
.hero-brand { text-align: center; }
.hero-logo {
  display: none;
  width: 239px;
  height: auto;
  margin: 0 auto 1rem;
}

/* Noticias */
.news-home { max-width: 1280px; }
.news-section-heading,
.news-page-head {
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--gris-borde-claro);
  padding-bottom: .7rem;
}
.news-section-heading h2 {
  margin: 0;
  color: #304957;
  font-size: 1.65rem;
  font-weight: 500;
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 22px;
  row-gap: 36px;
}
.news-item { min-width: 0; background: #fff; }
.news-image-link { display: block; overflow: hidden; }
.news-item .news-img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  border: 1px solid #d4d9dc;
}
.news-image-link:hover .news-img { opacity: .96; }
.news-meta {
  margin-top: 9px;
  color: #536b78;
  font-size: .92rem;
  line-height: 1.35;
}
.news-title {
  margin: 9px 0 0;
  text-align: center;
  color: #344d5c;
  font-size: 1.38rem;
  line-height: 1.12;
  font-weight: 400;
}
.news-title a { color: inherit; text-decoration: none; }
.news-title a:hover { color: var(--vino); }
.news-more-wrap {
  margin-top: 38px;
  padding-top: 24px;
  text-align: center;
  border-top: 1px solid #e2e6e8;
}
.btn-news-more {
  display: inline-block;
  border: 1px solid #667985;
  color: #455d69;
  background: #fff;
  border-radius: 3px;
  padding: .65rem 2.1rem;
  font-size: 1rem;
  text-decoration: none;
}
.btn-news-more:hover {
  background: var(--vino);
  border-color: var(--vino);
  color: #fff;
}
.news-page-head h1 {
  margin: .55rem 0 .25rem;
  color: #304957;
  font-size: 2rem;
  font-weight: 500;
}
.news-page-head p { margin: 0; color: #687984; }
.back-news { color: var(--vino); text-decoration: none; font-size: .95rem; }
.back-news:hover { text-decoration: underline; }
.empty-news { grid-column: 1 / -1; text-align: center; color: #687984; padding: 3rem 1rem; }

/* Contenido de noticia */
.detail-img { max-height: 520px; object-fit: cover; }
.news-content { font-size: 1.08rem; line-height: 1.8; }
.news-content img { max-width: 100%; height: auto; border-radius: .75rem; }
.news-content iframe { max-width: 100%; }
.news-content table { width: 100%; margin: 1rem 0; border-collapse: collapse; }
.news-content td,
.news-content th { border: 1px solid var(--gris-borde-claro); padding: .5rem; }
.news-content blockquote {
  border-left: 4px solid var(--vino-2);
  padding-left: 1rem;
  color: var(--gris);
  font-style: italic;
}
.text-muted { color: var(--gris) !important; }

/* Footer institucional */
.site-footer {
  width: 100%;
  margin-top: 3rem;
  background: var(--gris-claro) !important;
  color: #1f2933;
  border-top: 1px solid #d5dce1 !important;
}
.footer-container {
  width: 100%;
  max-width: 1700px;
  margin: 0 auto;
  padding: 0 3%;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.18fr 1.05fr 1.05fr 1.38fr;
  min-height: 500px;
}
.footer-col { min-width: 0; padding: 42px 38px 38px; }
.footer-col + .footer-col { border-left: 1px solid var(--gris-borde); }
.footer-brand-col { display: flex; flex-direction: column; align-items: center; }
.footer-usco-logo {
  display: block;
  width: min(100%, 440px);
  height: auto;
  object-fit: contain;
  margin: 0 auto 28px;
}
.footer-center { text-align: center; }
.footer-strong { font-size: 1.08rem; font-weight: 700; line-height: 1.25; margin: 16px 0 4px; }
.footer-nit { font-size: 1.08rem; margin: 0 0 34px; }
.footer-certifications {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  width: 100%;
  margin-bottom: 38px;
}
.cert-badge {
  width: 58px;
  height: 78px;
  border-radius: 9px;
  background: #079bd3;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.05;
  padding: 4px;
  box-shadow: 0 1px 2px rgba(0,0,0,.08);
}
.cert-badge small { font-size: .45rem; margin-top: 5px; }
.iqnet-badge {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: #0d4f9e;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.05;
}
.iqnet-badge small { font-size: .38rem; margin-top: 4px; }
.footer-copy { font-size: 1rem; line-height: 1.35; margin: 0 0 2px; }
.footer-version { font-size: 1rem; margin: 0; }
.footer-location-block { margin-bottom: 29px; }
.footer-location-block:last-child { margin-bottom: 0; }
.footer-location-block h3,
.footer-location-block h4 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
}
.footer-location-block h3 {
  color: var(--azul-footer);
  font-size: 1.55rem;
  line-height: 1.15;
  margin: 0 0 17px;
}
.footer-location-block h4 {
  color: #111820;
  font-size: 1.28rem;
  line-height: 1.2;
  margin: 0 0 9px;
}
.footer-location-block p {
  color: #1f2933;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.02rem;
  line-height: 1.32;
  margin: 0;
}
.footer-contact-link {
  display: inline-block;
  margin-top: 18px;
  color: var(--azul-link) !important;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1rem;
  text-decoration: none;
}
.footer-contact-link:hover,
.footer-links-list a:hover { color: var(--vino) !important; text-decoration: underline; }
.footer-interest { margin-top: 12px; }
.footer-links-list { list-style: none; margin: 0; padding: 0; }
.footer-links-list li { margin: 0 0 8px; }
.footer-links-list a { color: var(--azul-link) !important; text-decoration: none; font-size: .98rem; }
.footer-colombia-link {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin-top: 28px;
  text-decoration: none;
}
.footer-colombia-logo {
  display: block;
  width: min(287px, 90%);
  height: auto;
}
.footer-colombia-link:hover .footer-colombia-logo { opacity: .92; }
.footer-bottom {
  border-top: 1px solid var(--gris-borde);
  padding: 16px 20px;
  text-align: center;
  font-size: .86rem;
  color: #53636e;
}

/* Compatibilidad con estilos Bootstrap existentes */
.btn-primary {
  --bs-btn-bg: var(--vino);
  --bs-btn-border-color: var(--vino);
  --bs-btn-hover-bg: var(--vino-oscuro);
  --bs-btn-hover-border-color: var(--vino-oscuro);
}
.btn-dark {
  --bs-btn-bg: var(--vino-oscuro);
  --bs-btn-border-color: var(--vino-oscuro);
  --bs-btn-hover-bg: var(--vino);
  --bs-btn-hover-border-color: var(--vino);
}
.btn-outline-secondary {
  --bs-btn-color: var(--gris);
  --bs-btn-border-color: var(--gris);
  --bs-btn-hover-bg: var(--gris);
  --bs-btn-hover-border-color: var(--gris);
}

/* Responsive */
@media (max-width: 1200px) {
  .footer-container { padding: 0 1.5%; }
  .footer-grid { grid-template-columns: 1.1fr 1fr 1fr 1.25fr; }
  .footer-col { padding: 36px 24px 30px; }
  .footer-location-block h3 { font-size: 1.35rem; }
  .footer-location-block h4 { font-size: 1.15rem; }
  .footer-location-block p { font-size: .95rem; }
}

@media (max-width: 991.98px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 18px; }
  .news-item .news-img { height: 210px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-col:nth-child(3) { border-left: 1px solid var(--gris-borde); }
  .footer-col:nth-child(3),
  .footer-col:nth-child(4) { border-top: 1px solid var(--gris-borde); }
}

@media (max-width: 575.98px) {
  .site-logo { width: 185px; height: auto; }
  .hero-logo { display: block; }
  .news-home { padding-left: 16px !important; padding-right: 16px !important; }
  .news-grid { grid-template-columns: 1fr; gap: 28px; }
  .news-item .news-img { height: 220px; }
  .news-title { font-size: 1.25rem; }
  .news-meta { font-size: .85rem; }
  .news-page-head h1 { font-size: 1.65rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-col,
  .footer-col:nth-child(3),
  .footer-col:nth-child(4) {
    border-left: 0;
    border-top: 0;
    padding: 32px 22px;
  }
  .footer-col + .footer-col { border-top: 1px solid var(--gris-borde); }
  .footer-usco-logo { max-width: 320px; margin-bottom: 20px; }
  .footer-location-block h3 { font-size: 1.3rem; }
  .footer-location-block h4 { font-size: 1.12rem; }
  .footer-colombia-logo { width: min(260px, 90%); }
}
