/* Global Vision Lima - estilos nativos (sin frameworks) */

:root {
  --ink: #0b3047;
  --blue: #206297;
  --blue-link: #096cbe;
  --blue-light: #97c9f2;
  --footer: #0b3047;
  --page-width: 1060px;
  --font: Arial, "Arial Unicode MS", Helvetica, sans-serif;
  --font-body: "Century Gothic", Arial, "Arial Unicode MS", Helvetica, sans-serif;
}

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

html { height: 100%; }

body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font: 13px/1.5 var(--font-body);
  background: #002247 linear-gradient(to bottom, #002247 0%, #005ab3 71%, #00294d 100%) no-repeat;
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; border: 0; }

h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }

.container {
  width: min(var(--page-width), calc(100% - 16px));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: #fff;
  color: var(--ink);
  padding: 8px 12px;
  z-index: 1000;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Encabezado ---------- */

.site-header {
  margin-top: 10px;
  height: 140px;
  border-radius: 5px;
  box-shadow: 0 0 2px 1px rgba(0, 0, 0, .1);
  background:
    url("../images/template/object1496352091.png") 8px 14px no-repeat,
    url("../images/template/object1675479306.png") 510px -5px no-repeat,
    url("../images/template/header.png") 0 0 no-repeat;
}

.site-header .brand {
  display: block;
  height: 100%;
}

/* ---------- Navegación ---------- */

.site-nav {
  position: relative;
  z-index: 50;
  margin-top: 10px;
  padding: 6px 16px;
  border-radius: 5px;
  background: linear-gradient(to bottom, #011933 0%, #00376b 100%);
}

.nav-toggle {
  display: none;
  width: 100%;
  padding: 0 16px;
  height: 36px;
  border: 1px solid #2e93e5;
  border-radius: 6px;
  background: #07599d;
  color: #fff;
  font: 14px var(--font);
  text-align: left;
  cursor: pointer;
}

.menu { display: flex; flex-wrap: wrap; }

.menu > li { position: relative; }

.menu > li + li::before {
  content: "";
  position: absolute;
  top: 0;
  left: -9px;
  width: 9px;
  height: 33px;
  background: url("../images/template/menuseparator.png") center no-repeat;
}

.menu > li + li { margin-left: 9px; }
.menu > li:first-child { margin-left: 4px; }

.menu a {
  display: block;
  color: #fff;
  font: 14px/33px var(--font);
  text-decoration: none;
  white-space: nowrap;
}

.menu > li > a {
  height: 35px;
  padding: 0 23px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.menu > li > a:hover,
.menu > li:hover > a,
.menu > li:focus-within > a {
  color: #dfeffb;
  background: linear-gradient(to bottom, #0775cf 0, #054b85 100%);
  border-color: #60adeb;
}

.menu > li > a.active {
  color: #b6d9f6;
  background: linear-gradient(to bottom, #086fc4 0, #05467a 100%);
  border-color: #2e93e5;
}

.submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: -8px;
  min-width: 100%;
  padding: 6px;
  border: 1px solid #60adeb;
  border-radius: 7px;
  background: #2e93e5;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .3);
}

.menu > li:hover > .submenu,
.menu > li:focus-within > .submenu,
.menu > li.open > .submenu { display: block; }

.submenu a {
  height: 25px;
  padding: 0 16px;
  border-radius: 7px;
  line-height: 25px;
}
.submenu li + li { margin-top: 2px; }
.submenu a:hover,
.submenu a:focus { background: #065493; }

/* ---------- Hoja principal ---------- */

.sheet {
  margin-top: 10px;
  padding: 10px;
  border-radius: 5px;
  background: #fff;
}

.layout { display: flex; align-items: flex-start; }
.layout > .content { flex: 1 1 0; min-width: 0; }
.layout > .sidebar { flex: 0 0 300px; }

.post { margin: 10px; padding: 5px; }

.post-header {
  margin-bottom: 5px;
  padding: 1px;
  border-bottom: 1px solid var(--blue-light);
}

.post-title {
  margin: 5px 0;
  color: var(--ink);
  font: bold 22px/1.3 var(--font);
  text-transform: uppercase;
}

.post-title a { color: var(--ink); text-decoration: none; }
.post-title a:hover { color: #1c89e3; }

.post-content {
  color: var(--ink);
  font: 14px/150% var(--font);
}

.post-content p { margin: 7px 0; }

.post-content h1 {
  margin: 12px 0;
  color: var(--ink);
  font-size: 24px;
  text-transform: uppercase;
}

.post-content h2 {
  margin: 20px 0 10px;
  color: var(--blue);
  font-size: 18px;
  font-weight: normal;
}

.post-content a { color: var(--blue-link); text-decoration: none; }
.post-content a:hover { color: #690218; text-decoration: underline; }

.text-center { text-align: center; }
.text-justify { text-align: justify; }

.img-center { display: block; margin-inline: auto; }

/* Rejilla simple (reemplaza row-fluid / span* de Bootstrap) */

.row { display: flex; flex-wrap: wrap; gap: 2.5641%; }
.row > .col-4 { flex: 0 0 31.624%; max-width: 31.624%; }
.row > .col-6 { flex: 0 0 48.718%; max-width: 48.718%; }
.row img { display: block; }

/* Inicio */

.intro-img { float: right; margin: 0 0 10px 20px; }
.intro::after { content: ""; display: table; clear: both; }

/* Servicios */

.service {
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0 20px 30px;
}
.service img { flex: 0 0 auto; width: 355px; }
.service h2 { margin: 0; }

.ametropias { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 10px 0 30px; }
.ametropias img { flex: 0 1 auto; }

.service-solo { margin: 0 20px 30px; }

/* Contacto */

.map { width: 100%; height: 350px; border: 0; margin-top: 10px; }

/* Bloques con imagen enlazable (efecto original .opacidad) */

.opacidad a img { transition: opacity .3s; }
.opacidad a:hover img { opacity: .8; }

/* ---------- Barra lateral ---------- */

.sidebar .block { margin-bottom: 10px; }

.block-header { padding: 6px 10px; background: var(--blue); }

.block-header h3 {
  margin: 0 10px 0 5px;
  color: #fff;
  font: normal 14px/1.5 var(--font);
}

.block-content { padding: 10px; background: #fcfcfc; font: 14px var(--font); }

.block-content li {
  margin: 10px 0;
  padding-left: 10px;
  font: 13px/125% var(--font-body);
}
.block-content li::before {
  content: url("../images/template/blockbullets.png");
  display: inline-block;
  margin: 0 6px 0 -10px;
  font-size: 0;
  line-height: 0;
  position: relative;
  bottom: 2px;
  vertical-align: middle;
}
.block-content a { color: var(--ink); text-decoration: none; }
.block-content a:hover { color: var(--blue-link); text-decoration: underline; }

.fb-link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 4px;
  background: #1877f2;
  color: #fff !important;
  font: bold 14px var(--font);
}
.fb-link:hover { background: #0f5fc7; text-decoration: none !important; }

/* Listado de programas */

.post-list .post { margin-bottom: 20px; }

/* Paginación */

.pager-wrap { margin: 10px; }
.counter { margin-bottom: 6px; color: var(--ink); font: 13px var(--font-body); }

.pager {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 5px;
  border-radius: 2px;
  background: linear-gradient(to bottom, #1f94f4 0, #0b8bf4 13%, #054070 100%);
}

.pager a,
.pager span {
  padding: 7px;
  border-radius: 2px;
  color: #fff;
  font-family: var(--font-body);
  text-decoration: none;
}
.pager span.disabled { cursor: default; opacity: .75; }
.pager span.current { background: linear-gradient(to bottom, #ba032a 0, #190006 100%); }
.pager a:hover { color: #bfbfbf; background: linear-gradient(to bottom, #595959 0, #000 100%); }

/* ---------- Pie de página ---------- */

.site-footer {
  margin-top: 20px;
  background: var(--footer);
  color: #fff;
  font: 13px/1.5 var(--font-body);
}

.footer-inner {
  display: grid;
  grid-template-columns: 33fr 34fr 33fr;
  width: min(var(--page-width), calc(100% - 16px));
  margin-inline: auto;
  padding: 0 10px;
}

.footer-inner > div { padding: 25px; }
.footer-inner p { margin: 0 0 8px; }
.footer-inner img { display: block; }
.footer-inner a { color: #ededed; text-decoration: none; }
.footer-inner a:hover { color: #b6bfc9; text-decoration: underline; }

.social a,
.social img { display: inline-block; }
.social img { margin: 10px 5px; }

/* ---------- Adaptación a pantallas pequeñas ---------- */

@media (max-width: 1060px) {
  .site-header {
    background:
      url("../images/template/object1496352091.png") 8px 14px no-repeat,
      url("../images/template/header.png") center / cover no-repeat;
  }
}

@media (max-width: 1000px) and (min-width: 721px) {
  .menu > li > a { padding: 0 12px; }
}

@media (max-width: 820px) {
  .layout { flex-direction: column; }
  .layout > .sidebar { flex-basis: auto; width: 100%; }
  .service { flex-direction: column; align-items: flex-start; margin-inline: 0; }
  .service img { width: 100%; max-width: 360px; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-inner > div { padding: 15px 25px; }
}

@media (max-width: 720px) {
  .nav-toggle { display: block; }
  .menu { display: none; flex-direction: column; margin-top: 6px; }
  .menu.open { display: flex; }
  .menu > li + li { margin-left: 0; margin-top: 2px; }
  .menu > li + li::before { display: none; }
  .menu > li:first-child { margin-left: 0; }
  .menu > li > a { height: 35px; }
  .submenu {
    position: static;
    display: none;
    margin: 2px 0 2px 16px;
    box-shadow: none;
  }
  .menu > li:hover > .submenu,
  .menu > li:focus-within > .submenu { display: none; }
  .menu > li.open > .submenu { display: block; }
  .row > .col-4,
  .row > .col-6 { flex-basis: 100%; max-width: 100%; }
  .intro-img { float: none; display: block; margin: 0 auto 10px; }
  .post { margin: 10px 0; }
}

@media (max-width: 560px) {
  .site-header { height: 100px; background-size: 100% auto, cover; background-position: 0 14px, center; }
  .site-header { background-image: url("../images/template/object1496352091.png"), url("../images/template/header.png"); }
}
