/*
 * GUÍA DE GRECIA — modern.css
 * Capa visual complementaria. Conserva la estructura, los textos,
 * las imágenes y los destinos de los enlaces del sitio original.
 */

:root {
  color-scheme: light;
  --gg-blue: #174a68;
  --gg-blue-light: #367c96;
  --gg-terracotta: #b95738;
  --gg-ink: #202321;
  --gg-marble: #faf8f2;
  --gg-white: #fff;
  --gg-stone: #e9e2d5;
  --gg-border: #d8d0c2;
  --gg-shadow: 0 5px 18px rgba(32, 35, 33, .08);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--gg-marble);
  color: var(--gg-ink);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  text-align: left;
}

#contenedor {
  width: min(96%, 1200px);
  max-width: 1200px;
  margin: 0 auto;
  background: var(--gg-white);
  border: 0;
  box-shadow: 0 0 28px rgba(32, 35, 33, .06);
  text-align: left;
  font-size: 1rem;
}

/* Cabecera principal: se conservan el logotipo y la imagen originales. */
#contenedor > .caja-flex:first-child {
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1rem, 3vw, 2.2rem);
  color: var(--gg-white);
  background: var(--gg-blue);
  border-bottom: 5px solid var(--gg-terracotta);
}

#contenedor > .caja-flex:first-child .caja1 {
  flex: 1 1 280px;
  min-width: 0;
  margin: 0;
  padding: .5rem;
  color: var(--gg-white);
  background: transparent;
  border: 0;
  text-align: center;
}

#contenedor > .caja-flex:first-child .caja1 img {
  max-height: 210px;
  width: auto;
  object-fit: contain;
}

#contenedor > .caja-flex:first-child .caja1:first-child img {
  max-width: 100%;
}

#contenedor > .caja-flex:first-child .color-gris {
  display: inline-block;
  margin-top: .4rem;
  color: #f4eee3;
  font-family: Georgia, "Palatino Linotype", serif;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  font-weight: normal;
  line-height: 1.45;
}

/* Migas de pan */
#migadepan {
  padding: .65rem clamp(1rem, 2.5vw, 1.8rem);
  color: var(--gg-white);
  background: #10384f;
  font: .9rem/1.5 Arial, Helvetica, sans-serif;
}

#migadepan a {
  color: var(--gg-white);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Navegación de iconos y menú desplegable existente */
#cont-menu {
  position: relative;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .7rem 1rem;
  background: #fff;
  border-bottom: 1px solid var(--gg-stone);
}

#cont-menu > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: .25rem;
  border-radius: 4px;
  transition: background-color .18s ease, transform .18s ease;
}

#cont-menu > a img,
#cont-menu label img {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
}

#cont-menu > a:hover,
#cont-menu > a:focus-visible {
  background: #f4e6dc;
  transform: translateY(-2px);
}

#cont-menu label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  border-radius: 4px;
}

#cont-menu label:hover {
  background: #f4e6dc;
}

#cont-menu .slide-menu {
  z-index: 20;
  top: 100%;
  left: 0;
  width: min(340px, 92vw);
  height: auto;
  max-height: min(75vh, 650px);
  overflow-y: auto;
  background: var(--gg-blue);
  box-shadow: var(--gg-shadow);
  transform: translateX(-110%);
  visibility: hidden;
  transition: transform .25s ease, visibility .25s ease;
}

#cont-menu input[type="checkbox"]:checked ~ .slide-menu {
  transform: translateX(0);
  visibility: visible;
}

#cont-menu .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

#cont-menu .menu li {
  width: 100%;
  margin: 0;
  padding: 0;
}

#cont-menu .menu a {
  display: block;
  padding: .75rem 1rem;
  color: var(--gg-white);
  background: var(--gg-blue);
  border-bottom: 1px solid rgba(255,255,255,.16);
  box-shadow: none;
  font-size: .98rem;
  line-height: 1.45;
}

#cont-menu .menu a:hover,
#cont-menu .menu a:focus-visible {
  color: var(--gg-white);
  background: var(--gg-terracotta);
}

/* Contenedores flexibles y bloques de contenido */
.caja-flex {
  gap: 1rem;
  padding: .8rem;
  background: var(--gg-white);
}

.caja1,
.caja2,
.caja3 {
  margin: .25rem;
  padding: 1rem;
  background: var(--gg-white);
  border: 1px solid var(--gg-border);
  border-radius: 4px;
}

.caja4 {
  flex: 1 1 260px;
  min-width: 0;
  margin: .25rem;
  padding: 1rem;
  color: var(--gg-ink);
  background: var(--gg-white);
  border: 1px solid var(--gg-border);
  border-top: 3px solid var(--gg-terracotta);
  border-radius: 4px;
  box-shadow: var(--gg-shadow);
  line-height: 1.65;
}

#caja98 {
  width: auto;
  max-width: 100%;
  margin: 0 auto;
  padding: 1rem clamp(.75rem, 2.5vw, 1.5rem);
}

/* Títulos: inspiración editorial clásica, sin fuentes externas obligatorias */
h1, h2, h3, h4, h5, h6 {
  color: var(--gg-blue);
  font-family: Georgia, "Palatino Linotype", "Book Antiqua", serif;
  font-weight: 600;
  line-height: 1.28;
  text-decoration: none;
  text-shadow: none;
  text-wrap: balance;
}

h1 {
  margin: .6em 0 .45em;
  font-size: clamp(1.8rem, 3.8vw, 2.7rem);
  text-align: center;
  border-bottom: 2px solid var(--gg-terracotta);
  padding-bottom: .35em;
}

h2 {
  margin: 1.1em 0 .45em;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  text-align: center;
}

h3 {
  margin: 1em 0 .4em;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  text-align: left;
}

h4, h5, h6 {
  margin: .9em 0 .4em;
  font-size: 1.15rem;
  text-align: left;
}

p {
  margin: 0 0 1.05em;
  font-size: 1rem;
  line-height: 1.75;
  text-align: left;
}

ul, ol {
  padding-left: 1.6rem;
  line-height: 1.75;
}

li {
  padding-left: .1rem;
}

hr {
  width: 96%;
  height: 0;
  margin: 1.5rem auto;
  border: 0;
  border-top: 1px solid var(--gg-border);
}

/* Enlaces: estados claros sin alterar sus destinos */
a {
  color: var(--gg-blue);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
}

a:visited {
  color: #5a4a69;
}

a:hover {
  color: var(--gg-terracotta);
  background-color: transparent;
  font-size: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gg-terracotta);
  outline-offset: 3px;
}

/* Imágenes y medios */
img, object, embed, video, iframe {
  max-width: 100%;
}

img {
  height: auto;
}

img.float-left {
  margin: .2rem .8rem .5rem 0;
}

img.float-right {
  margin: .2rem 0 .5rem .8rem;
}

.img-centrar {
  max-width: 100%;
  text-align: center;
}

/* Tablas */
table {
  width: 100%;
  max-width: 100%;
  margin: 1rem auto;
  border-collapse: collapse;
  border-spacing: 0;
  background: var(--gg-white);
}

th, td {
  padding: .65rem .8rem;
  border: 1px solid var(--gg-border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--gg-white);
  background: var(--gg-blue);
}

/* Pie de página */
#pie {
  width: 100%;
  margin: 2rem auto 0;
  padding: 1.5rem 1rem;
  color: var(--gg-ink);
  background: var(--gg-marble);
  border-top: 3px solid var(--gg-terracotta);
  font-size: .95rem;
  line-height: 1.6;
}

#copy {
  width: 100%;
  padding: .5rem 1rem 1rem;
  color: var(--gg-blue);
  font-size: .9rem;
}

/* Utilidades heredadas */
span.color-gris { color: #f4eee3; }
span.azul, span.verde { color: var(--gg-blue); }
span.rojo, span.color-burdeos { color: #8f3524; }
.naranja { color: #8f3524; }
.caja-f {
  padding: .75rem;
  color: var(--gg-blue);
  background: var(--gg-marble);
  border-left: 4px solid var(--gg-terracotta);
  font-weight: 700;
}

/* Adaptación a pantallas pequeñas */
@media (max-width: 700px) {
  #contenedor {
    width: 100%;
    box-shadow: none;
  }

  #contenedor > .caja-flex:first-child {
    gap: .5rem;
    padding: 1rem .6rem;
  }

  #contenedor > .caja-flex:first-child .caja1 {
    flex-basis: 100%;
  }

  #contenedor > .caja-flex:first-child .caja1 img {
    max-height: 155px;
  }

  #cont-menu {
    gap: .25rem;
    padding: .5rem .35rem;
  }

  #cont-menu > a img,
  #cont-menu label img {
    width: 34px;
    height: 34px;
  }

  .caja-flex {
    padding: .45rem;
    gap: .55rem;
  }

  .caja1, .caja2, .caja3, .caja4 {
    flex-basis: 100%;
    margin: .2rem 0;
    padding: .8rem;
  }

  #caja98 {
    padding: .75rem;
  }

  img.float-left,
  img.float-right {
    max-width: 42%;
  }

  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
