/* 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 fixed 960px IONOS layout that never
   reflowed, so a 390px phone laid out the 960px canvas and CROPPED everything right of the
   sidebar: the content column was simply gone. A fixed viewport would shrink body copy to ~4px
   (order 4 tried that and the client rejected it), so device-width stays and the pixel-pinned
   containers are released here: #container, #menu_img_bg, #header, #footer lose their widths,
   #left_column (270px) and #content (640px) stack with the text FIRST and the contact sidebar
   after it, the 960px menu bar wraps instead of running off the edge.
   ============================================================================================ */
@media (max-width: 768px) {
  .diyw #container, .diyw #container_ende, .diyw #menu, .diyw #menu_bg, .diyw #menu_img_bg,
  .diyw #header, .diyw #page, .diyw #footer, .diyw #contentfooter,
  .diyw #container_rounded_center {
    width: auto !important; max-width: 100% !important; min-width: 0 !important;
    box-sizing: border-box;
  }
  .diyw #container_rounded_left, .diyw #container_rounded_right { display: none; }
  .diyw #background { display: none; }
  .diyw #header { padding: 0 8px; }
  .diyw #header_round_left, .diyw #header_round_right { display: none; }
  .diyw div#emotion-header { max-width: 100%; }
  .diyw div#emotion-header img#emotion-header-img { width: 100%; height: auto; }

  /* menu: the nowrap floats wrap into rows instead of leaving the screen */
  .diyw #menu ul.mainNav1 { display: flex; flex-wrap: wrap; }
  .diyw #menu ul.mainNav1 li { display: block; }
  .diyw #menu ul.mainNav1 li a { float: none; padding: 8px 12px; height: auto; white-space: normal; }

  /* columns: text first, then the contact sidebar */
  .diyw #page { display: flex; flex-direction: column; }
  .diyw #content { order: 1; float: none; width: auto !important; margin: 10px 0 0;
    padding: 8px 12px; box-sizing: border-box; }
  .diyw #left_column { order: 2; float: none; width: auto !important; }
  .diyw #sidebar { float: none; width: auto !important; padding: 8px 12px; box-sizing: border-box; }
  .diyw .sb_background.top, .diyw .sb_background.bottom { display: none; }
  .diyw .sb_background.center { float: none; display: block; width: auto !important;
    box-sizing: border-box; padding: 0 8px; background: #f4f4f4; }
  .diyw ul.mainNav2 { width: auto; margin: 10px 12px 0; }

  .diyw #content img, .diyw #sidebar img { max-width: 100% !important; height: auto !important; }
  .diyw #content table { display: block; max-width: 100%; overflow-x: auto; }
  .diyw #content iframe, .diyw #content video, .diyw #content object { max-width: 100% !important; }
  .diyw .align-container { max-width: 100% !important; }
  .diyw .imgright, .diyw .imgleft { float: none !important; margin: 0 auto 10px; }
  .diyw input, .diyw textarea, .diyw select { max-width: 100%; box-sizing: border-box; }
  .diyw p, .diyw td { font-size: 14px; }
  .diyw h1 { font-size: 18px; }
  .diyw h2 { font-size: 15px; }
  .diyw #footer { padding: 10px 12px; }
  .diyw div#contentfooter div.rightrow { float: none; width: auto; text-align: left; }
}

/* ===== CONTRAST ROUND (2026-10-19, gate legibility) ======================================
   Main navigation labels were white (#FFF) on the translucent menu band, which sits on the light
   grey page ground: 2.65:1 for "Inicio" and "Sobre la clinica", against 4.5 wanted. The site's
   own hover and current-page state for this same menu is #333333, so the resting colour takes
   that value instead of inventing a new one. #333333 measures about 4.8:1 on the ground the gate
   reported (the ground was inferred from the gate's 2.65:1, not sampled). Side effect: hover and
   current no longer differ from the resting colour in this menu. */
/* WITHDRAWN 2026-10-20 (o7 round 5). The rule that stood here (.diyw #menu ul.mainNav1 li a
   { color:#333333 }) turned every resting menu label from the site's own white into its
   CURRENT-PAGE colour, so the menu no longer said which page the visitor is on, and the whole bar
   changed from the published white-on-green to grey-on-green. It was written for a category that
   does not block the gate (low contrast), against a ground that was inferred rather than sampled.
   The labels are bold uppercase white on the green band image, as IONOS published them; the
   original #333333 hover/current state in layout-*.css is untouched and is again the only dark
   item. qa_legibility will report those labels as low contrast (informative, not blocking). */

/* ===== FOOTER AND AUTHORED PAGES (o7 round 3, 2026-10-20) ================================
   1. The footer line is the site's own 11px (#footer and div#contentfooter both set it), under
      the 12px floor for running text on every page. Raised to 12px, nothing else about it moved.
   2. Its links ("Politica de privacidad | Politica de cookies", which replaced the dead print
      popup and the "Mapa del sitio" link that only led back to "/") were 13px-tall line boxes:
      too small to hit on a phone. Each link gets a 26px line box - the WCAG 2.5.8 floor is 24 -
      without changing its size, colour or underline.
   3. At phone width the footer's left row kept its desktop width:55%, so the lines wrapped in a
      ~200px column under a ~370px page (visual review round 2). It takes the full row there.
   4. The three authored pages (/politica-de-cookies/, /politica-de-privacidad/, /404.html) put
      their h2 and paragraphs straight into the content matrix, without the IONOS module wrappers
      (div.n = padding 5px) and the module-type-header h1 every original page opens with. So the
      heading was 16px against the 20px headline used everywhere else, the paragraphs ran
      together and the column started 5px left of its siblings. Only those pages have an h2 or
      p as a direct child of .sortable-matrix (checked on all 13 pages), so this touches nothing
      else. */
.diyw #footer, .diyw div#contentfooter { font-size: 12px; }
.diyw div#contentfooter div.leftrow a { display: inline-block; line-height: 26px; }
@media (max-width: 768px) {
  .diyw div#contentfooter div.leftrow { float: none; width: auto; }
}
.diyw #content_area .sortable-matrix > h2 {
  font: bold 20px/140% "Times New Roman", Times, serif; color: #333333;
  margin: 0; padding: 5px 5px 10px;
}
.diyw #content_area .sortable-matrix > p,
.diyw #content_area .sortable-matrix > ul { margin: 0 0 10px; padding-left: 5px; padding-right: 5px; }
.diyw #content_area .sortable-matrix > ul { padding-left: 25px; }
