/* restore extras — generated by restore_04_polish.py */

/* Consent overlays: the restore ships no analytics or third-party tracking at all, so there
   is nothing to consent to. Their scripts are gone too, meaning the banner can never be
   dismissed and would cover the top of every page. Removing the markup is unreliable when a
   JS bundle re-renders it, so it is hidden here as well. */
.cookies-banner, .cookies-banner-content, .cookie-banner, .cookie-consent, .cookie-notice,
.cc-window, .cc-banner, #cookie-law-info-bar, #cookieChoiceInfo, .gdpr-banner,
#tarteaucitronRoot, .consent-overlay, .cookiebar {
  display: none !important;
}
body.cookie-banner-open, body.has-cookie-banner, html.cookies-open {
  overflow: auto !important;
}

/* Dead account/login modals left by the CMS (no backend on a static host) */
.modal-login, #loginModal, .login-modal { display: none !important; }

/* Carousel slots the platform's JS bundles would have filled at runtime: without a working
   bundle they stay as <img> elements with no src and render as broken-image icons. Nothing is
   lost by hiding them — they never had content in the restore. */
img:not([src]), img[src=""], img[src="#"] { display: none !important; }

/* The client's backlink block must read as the page's own copy. Where a theme only colours
   links inside specific containers, the anchor would otherwise look like plain text — inherit
   the surrounding colour but keep an underline so it is still visibly a link. */
.content-wraparea a { color: inherit; text-decoration: underline; }

/* A few px of horizontal overflow on phones (an absolutely-positioned login list, a wide footer
   logo) makes the whole page pannable sideways, which reads as broken.
   NB: use `clip`, never `hidden`, and never on html together with height:100%. `overflow:hidden`
   turns the element into a scroll container: on themes that set html{height:100%} it stops body's
   overflow propagating to the viewport, the window stops scrolling entirely and every
   scroll-driven behaviour (sticky nav, back-to-top, in-page anchors, PageDown/End) dies.
   `clip` suppresses the sideways pan without creating a scroll container. */
body { overflow-x: clip; }
/* ---- end generated block; anything below is preserved across re-runs ---- */

/* ============================================================================================
   A PHONE GETS A PHONE LAYOUT (o7 fixer, 2026-10-17)
   restore_03_seo.py INSERTED width=device-width into a 990px design that never reflowed, so a
   phone laid the page out at 390 and CROPPED the right 600px: the menu lost four of seven items,
   every paragraph ended mid-word and the whole sidebar (Contacto directo, Especialidades) was
   unreachable. Declaring a fixed width instead would shrink body copy to ~5px (order 4 tried it
   and the client rejected it), so the viewport stays device-width and the fixed-width containers
   are released here: .size_sm_990 / #contenido / #menu_principal ul lose their pixel widths, the
   70/30 columns stack, the absolutely-positioned header furniture falls back into the flow.
   ============================================================================================ */
@media (max-width: 768px) {
  html, body { max-width: 100%; }
  #contenedor, #barra_top_info, #cabecera, #contenido, #pie, #pie_info, #destacado,
  .bloque_contenedor, .size_sm_960, .size_sm_990 {
    width: auto !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }
  #contenido { margin: 10px 0; padding: 0 8px; overflow: visible; }
  #principal, #sidebar, #principal_full { float: none !important; width: 100% !important; overflow: visible; }
  .columna { padding: 0; }
  .bloque { float: none; width: auto; margin: 10px 0; }
  .bloque img, .cuerpo_bloque img, .texto_post img, #contenido img {
    max-width: 100% !important;
    height: auto !important;
  }
  .img_right, .img_left { float: none; display: block; margin: 0 auto 10px; }
  /* tables and embedded players inside article text */
  #contenido table { width: 100% !important; display: block; overflow-x: auto; }
  #contenido iframe, #contenido video, #contenido object, #contenido embed { max-width: 100% !important; }
  #contenido input, #contenido textarea, #contenido select { max-width: 100%; box-sizing: border-box; }

  /* header: logo, slogan, then the menu, all in the flow */
  #cabecera { height: auto !important; padding-bottom: 0; }
  #bg_cabecera { background-image: none; height: auto !important; overflow: visible; padding: 0 10px 10px; }
  .logotipos { float: none; width: auto; margin-top: 0; padding-top: 10px !important; }
  .logotipos img { max-width: 60%; height: auto; }
  #eslogan { position: static; font-size: 24px; margin: 4px 0 8px; }
  .profesional_cabecera { position: static; width: auto; }
  .profesional_cabecera img { display: none; }
  .datos_profesional { position: static; text-align: left; }
  .puestos_profesional, .areas_profesional { padding-right: 0; }
  #redes_sociales_top { float: none; margin: 2px auto; overflow: visible; height: auto; }
  #menu_principal { position: static; height: auto; width: auto; }
  #menu_principal ul { width: auto !important; height: auto; display: flex; flex-wrap: wrap; margin: 0; }
  #menu_principal li { float: none; height: auto; flex: 1 1 auto; }
  #menu_principal li a { display: block; padding: 9px 10px; line-height: 1.3; }

  /* footer */
  #pie { height: auto !important; }
  #pie_info { height: auto; padding: 8px 10px; }
  #pie_info h3 { display: block; font-size: 13px; }
  #pie_info h3 span.numero { font-size: 22px; }
  #pie_info h3 span { margin-left: 8px; }
  #pie_info img.icono_a { display: none; }
  #menu_pie { float: none; margin: 12px 0; padding: 0 10px; }
  #menu_pie li { display: inline-block; margin: 0 10px 6px 0; }
  #redes_sociales_pie { float: none; padding: 0 10px; overflow: hidden; }
  #datos_pie { float: none; margin-top: 12px; padding: 0 10px; }
  #datos_pie li { display: inline-block; margin-bottom: 4px; }
  .logotipos_pie { position: static; padding: 10px; width: auto; }

  /* sidebar sponsors: the carousel is frozen, so show the logos as a wrapped strip */
  #galeria_banners_colaboradores, #galeria_banners_colaboradores .flexslider,
  #galeria_banners_colaboradores .slides, #galeria_banners_colaboradores .slides li {
    height: auto !important; width: auto !important;
  }
  #galeria_banners_colaboradores .slides li a,
  #galeria_banners_colaboradores .slides li > img { display: inline-block; max-width: 46%; }
}

/* Pediatric page: its own header logos were never archived; the site logotipo now fills the slot
   and the title gets room instead of sitting against the top edge. */
#cabecera .titulo_cabecera { clear: both; padding: 14px 0 0; color: #004568; }

/* THE "TEMA DESTACADO" BAR GROWS WITH ITS CONTENT ON A PHONE (o7 fixer round 2)
   The phone repair above released the bar's WIDTH but its desktop height:60px (box) and
   height:55px (paragraph) stayed. At 390 the badge and "Tema Destacado:" fill the first line, the
   link wraps below them and fell out of the grey box, landing on the post card underneath.
   Governs only #destacado and its paragraph; nothing else uses these ids. */
@media (max-width: 768px) {
  #destacado { height: auto !important; margin: 14px 8px 12px; padding: 6px 8px 8px; box-sizing: border-box; }
  #destacado p { height: auto !important; margin: 0; }
  #destacado p a { display: block; margin-top: 4px; line-height: 1.35; }
}

/* ---- contrast fix (machine gate qa_legibility, oftalmar.es) ----
   WHAT WAS WRONG (measured by the gate on /actualidad-oftalmologica/41/ at every width):
   1. "Síguenos también en:" is painted #999 (general .redes_sociales li) on white, 2.85:1, and on the
      grey footer #e1dddd it is 2.11:1. Set to the site's own body text colour #333 (the top bar's
      colour in #barra_top_info), 12.6:1 on white and 9.4:1 on the footer grey.
   2. "Actualidad" in the main menu is white on the teal active tab #019fa2, 3.24:1. The footer's active
      link is the same teal on #e1dddd, 2.40:1. Darkened the SAME teal hue to #016a6d: 6.4:1 with white
      text on the tab, 4.75:1 as a link on the footer grey. Hue unchanged; only lightness.
   The change is confined to these selectors; hover and idle states keep the theme colours. */
#redes_sociales_top li, #redes_sociales_pie li { color: #333; }
#menu_principal li a.activo { background: #016a6d; }
#menu_pie li a.activo { color: #016a6d; }

/* ---- o7 r4 (2026-10-20): tap targets the legibility gate measured under 24px ------------------
   1. The "leer más" link under the home page's featured post was 66x14: 12px type with no padding.
      Five pixels above and below make it 24px tall; its sprite arrow moves down by the same five
      pixels so it stays level with the words. Nothing else about the link changes.
   2. The two home banners (pediatric unit, satisfaction survey) are images inside INLINE anchors,
      so each anchor's own box was the 16px line it sits on while the picture spilled out of it -
      the gate saw a 629x16 control. As inline-block the anchor is the picture's size; the picture
      does not move. Scoped to anchors whose only content is an image, in the content and sidebar
      columns. */
.pie_post a { display: inline-block; padding-top: 5px; padding-bottom: 5px; }
.pie_post a:before { top: 6px; }
#contenido a:has(> img:only-child) { display: inline-block; }

/* 3. The footer's agency badge is no longer a link (an outbound vendor credit, unwrapped by an
      authored regex rule); general.css placed it as `a#idominiun`, so the same placement is given to
      the element it now is. Same position, same size - only the link is gone. */
span#idominiun { bottom: 80px; height: 20px; position: absolute; right: 5px; width: 172px; display: block; }

/* ---- o7 r5 (2026-10-20): THE PROFESSIONAL CARD IN THE HEADER IS SHOWN AGAIN (desktop) ----------
   WHAT WAS WRONG. Every page's header carries a card naming one of the clinic's professionals
   (name, post, areas - the clinic's own published text) beside that person's photograph. general.css
   places it with `.profesional_cabecera{position:absolute;right:0}` and no `top`, so its vertical
   place is its STATIC position, and `.datos_profesional{position:absolute;bottom:10px}` hangs the
   text from the bottom of that box. Inside #bg_cabecera, which is overflow:hidden at the header's
   299px, the result depended on things the 2018 design never had to survive:
     - 57 pages keep the older `<img id="logo">` (2013 captures) IN FLOW, so the card started 190px
       down: the photograph was cut off by the menu bar (only the top of a head showed) and the text,
       hung from a box 264px below that, was clipped away entirely;
     - 16 pages (the home, the legal notice...) lost the photograph - the archive never kept it - so
       the box had no height, the text hung ABOVE the header's top edge and was clipped away.
   The 8 pages with the 2018 `.logotipos` logo and an archived photo rendered as designed: card at
   the top right, photo 270x264, text bottom-aligned to its left. qa_legibility reported the hidden
   text as NOT MEASURED (it could not photograph text that nothing showed).
   HOW. Pin the card to the top of the header and give it the photograph's own box height, which is
   exactly what the 8 intact pages already compute. Nothing is added: no photograph is substituted
   where the archive lost one - that slot stays empty - and the phone rules above are untouched
   (they already put the card in the flow). */
@media (min-width: 769px) {
  .profesional_cabecera { top: 0; min-height: 264px; }
}

/* ---- o7 r5: the financing calculator is a <div id="calculator"> now (see authored rule). general.css
   styles its labels, rows, inputs, select and the Calcular / Limpiar buttons through `form ...`
   selectors, which a div no longer matches - the first shot after the change showed borderless fields
   and the two buttons as plain words. These are THOSE SAME 18 rules, copied verbatim with `form`
   replaced by `div:where(#calculator)`: :where() adds no weight, so each keeps the exact specificity
   `form ...` had and the cascade (e.g. input[type="radio"] still beating `form input`) is unchanged. */
div:where(#calculator) { text-align: left; }
div:where(#calculator) fieldset { border:#ccc 1px solid; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; margin-bottom: 20px; padding: 10px; text-align: left; }
div:where(#calculator) fieldset legend { font-size: 1.3em; }
div:where(#calculator) fieldset p { margin-left: 5px; }
div:where(#calculator) label { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; display: block; font-size: 1.1em; padding-right: 2px; text-align: left !important; }
div:where(#calculator) .contenedor_input { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; float: left; min-width: 100px; padding: 5px; text-align: left; width: 100%; }
div:where(#calculator) p + input { margin-left: 5px; }
div:where(#calculator) div + p { padding-left: 5px; }
div:where(#calculator) .inline label,
div:where(#calculator) .inline input,
div:where(#calculator) .inline textarea { display: inline; margin: 0 !important; width: auto; }
div:where(#calculator) .inline label { padding-right: 5px; }
div:where(#calculator) input,
div:where(#calculator) textarea,
div:where(#calculator) select { background: #ccc; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; -o-box-sizing: border-box; box-sizing: border-box; color: #000; font-size: 1.0em; padding: 5px; width: 100%; }
div:where(#calculator) input { height: 30px; }
div:where(#calculator) textarea { height: 150px; max-width: 100%; min-height: 150px; min-width: 100%; }
div:where(#calculator) input.boton { background: #333; color: #ccc; cursor: mouse; cursor: pointer; height: 40px; margin-top: 15px; width: 100px; }
div:where(#calculator) input.boton:hover { background: #ccc; color: #333; }
div:where(#calculator) label { color: #004568; font-style: italic; }
div:where(#calculator) input,
div:where(#calculator) textarea,
div:where(#calculator) select { background-color: #fff; border: #ccc 1px solid; }
div:where(#calculator) input.boton { background-color: #019FA2; color: #fff; font-weight: bold; }
/* ---- o7 r5, second pass: once the professional card sits at the top of the header (above), its
   transparent 620x264 box lies over the slogan (#eslogan "Cuestión de vista", positioned absolutely
   in the same header). Nothing is drawn over the letters - the card's text starts below them and its
   photo to their right - but a pointer, and the legibility gate's camera, landed on the card's empty
   box instead of the slogan, which it then reported as NOT MEASURED. One layer up, the slogan is the
   topmost thing where it is drawn; nothing moves. */
@media (min-width: 769px) { #eslogan { z-index: 1; } }
