/* Дополнения к сохранённой теме CM4all. */
#logo a { display: block; }

/* Transparent theme spacers extracted as article thumbnails need a real photo. */
img[loading="lazy"][src$="/blank.gif"] { background: url("/.cm4all/iproc.php/Escuela-gr_jpeg/downsize_1280_0/Escuela-gr.jpeg") center / cover no-repeat; }

.mobile-menu-toggle { display: none; }

/* Responsive layout for phones and small tablets. The original template uses
   fixed desktop dimensions, so keep the desktop design and reflow it below. */
@media (max-width: 760px) {
  html {
    overflow-x: hidden;
    overflow-y: auto;
  }

  body {
    width: 100%;
    margin: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
  }

  #bgheader_wrapper {
    display: none;
  }

  #page_wrapper,
  #head_wrapper,
  #content_wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  #page_wrapper {
    margin: 0;
  }

  #header_top {
    height: auto;
    min-height: 92px;
    background-image: none;
    background-color: #ffffff;
  }

  #header_top #logo {
    position: relative;
    width: 100%;
    height: 92px;
    background-position: 18px 10px !important;
    background-size: 72px 72px !important;
  }

  #header_top #navigation_wrapper {
    position: relative;
    right: auto;
    bottom: auto;
    width: 100%;
    padding: 0 12px 12px;
    box-sizing: border-box;
    border: 0;
  }

  #header_top #navigation_wrapper #navigation_border {
    display: none;
  }

  #header_top #navigation_wrapper .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(51, 153, 102, 0.3);
    border-radius: 4px;
    color: #2f7d56;
    background: #ffffff;
    font: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-sizing: border-box;
  }

  #header_top #navigation_wrapper .mobile-menu-toggle:focus-visible {
    outline: 3px solid rgba(51, 153, 102, 0.35);
    outline-offset: 2px;
  }

  #header_top #navigation_wrapper .mobile-menu-icon {
    font-size: 22px;
    line-height: 18px;
  }

  #header_top #navigation_wrapper #cm_navigation {
    display: none;
  }

  #header_top #navigation_wrapper.mobile-menu-open #cm_navigation {
    display: block;
    margin-top: 9px;
  }

  #cm_navigation {
    width: 100%;
    border-top: 1px solid rgba(51, 153, 102, 0.22);
    border-bottom: 1px solid rgba(51, 153, 102, 0.22);
  }

  ul#cm_mainnavigation {
    width: 100%;
    margin: 0;
  }

  ul#cm_mainnavigation li,
  ul#cm_mainnavigation li a {
    float: none;
    width: 100%;
    box-sizing: border-box;
  }

  ul#cm_mainnavigation li {
    height: auto;
    margin: 0;
    border-bottom: 1px solid rgba(51, 153, 102, 0.14);
  }

  ul#cm_mainnavigation li:last-child {
    border-bottom: 0;
  }

  ul#cm_mainnavigation li a,
  ul#cm_mainnavigation li.cm_current a,
  ul#cm_mainnavigation li a:hover,
  ul#cm_mainnavigation li.cm_current a:hover {
    display: block;
    min-height: 44px;
    margin: 0;
    padding: 11px 14px;
    border: 0;
    line-height: 22px;
    font-size: 15px;
    background-image: none;
    background-color: transparent;
  }

  ul#cm_mainnavigation li.cm_current a,
  ul#cm_mainnavigation li a:hover,
  ul#cm_mainnavigation li a:focus {
    background-color: rgba(51, 153, 102, 0.11);
  }

  #header_btm {
    border-bottom: 0;
  }

  #header_btm > table,
  #header_btm > table > tbody,
  #header_btm > table > tbody > tr {
    display: block;
    width: 100%;
  }

  #header_btm > table > tbody > tr {
    display: flex;
    flex-direction: column;
  }

  #header_btm_left,
  #header_btm_right {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  #header_btm_left {
    display: block;
    order: 2;
  }

  #header_btm_left #cm_subnavigation {
    width: 100%;
  }

  #header_btm_left ul.cm_subnavigation {
    width: auto;
    margin: 0 12px 14px;
    border-top: 1px solid rgba(51, 153, 102, 0.22);
  }

  #header_btm_left ul.cm_subnavigation li {
    width: 100%;
    border-bottom: 1px solid rgba(51, 153, 102, 0.14);
  }

  #header_btm_left ul.cm_subnavigation li a {
    min-height: 42px;
    padding: 10px 12px;
    box-sizing: border-box;
    line-height: 22px;
  }

  #header_btm_right #keyvisual {
    width: 100%;
    height: clamp(165px, 42vw, 230px);
    background-position: center center !important;
    background-size: cover !important;
  }

  #header_btm_right #title_wrapper {
    width: 100%;
    height: auto;
    padding: 18px 16px 14px;
    box-sizing: border-box;
    text-align: center;
  }

  #header_btm_right #title_wrapper h1 {
    margin: 0 0 8px;
    font-size: clamp(1.35rem, 6vw, 2rem);
    line-height: 1.18;
  }

  #header_btm_right #title_wrapper h2 {
    margin: 0;
    font-size: 1rem;
    line-height: 1.45;
  }

  #content_wrapper {
    display: block;
    border-bottom: 0;
  }

  #content_wrapper > tbody,
  #content_wrapper > tbody > tr {
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  #content_right_wrapper,
  #content_left_wrapper {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  #content_right_wrapper {
    order: 1;
  }

  #content_left_wrapper {
    order: 2;
  }

  .content_main {
    width: 100%;
    padding: 22px 16px 30px;
    box-sizing: border-box;
    overflow: visible;
  }

  .content_sidebar {
    padding: 18px 16px 28px;
  }

  #widgetbar_page_1,
  #widgetbar_page_2,
  #widgetbar_site_1,
  #widgetbar_site_2 {
    width: 100%;
  }

  img,
  video,
  iframe {
    max-width: 100%;
    height: auto;
  }

  .content_main h1 {
    font-size: clamp(1.35rem, 6vw, 2rem);
    line-height: 1.2;
  }

  .content_main h1 span[style*="font-size: xx-large"] {
    font-size: clamp(1.45rem, 7vw, 2.15rem) !important;
    line-height: 1.2;
  }

  .content_main table {
    max-width: 100%;
    word-break: normal;
  }

  #CM1495b1c826dacd376777783 {
    display: block;
    width: 100%;
    margin: 10px 0;
  }

  #CM1495b1c826dacd376777783 tbody,
  #CM1495b1c826dacd376777783 tr,
  #CM1495b1c826dacd376777783 td {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  #CM1495b1c826dacd376777783 td {
    padding: 0 0 14px;
  }

  #CM1495b1c826dacd376777783 td:last-child {
    padding-bottom: 0;
  }

  a {
    overflow-wrap: anywhere;
  }

  #footer_wrapper {
    padding: 0 16px;
    box-sizing: border-box;
  }
}
