/*
 Theme Name: Blocksy Child – Design Motion
 Template: blocksy
 Text Domain: blocksy-child-design-motion
*/
:root{

  --dm-gap: 12px;
}
.dm-visually-hidden{
  position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0;
}

.dm-header-min{
  padding:0 !important; margin:0 !important; border:none !important;
}

.dm-actions{
  display:flex; flex-wrap:wrap; gap:var(--dm-gap);
  align-items:center; justify-content:flex-start;
  margin-block:24px;
}
.dm-actions .dm-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 16px; border-radius:12px; text-decoration:none;
  border:1px solid currentColor;
}


header.site-header,
.ct-header{
  height:0 !important;
  min-height:0 !important;
  padding:0 !important;
  margin:0 !important;
  border:0 !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
.ct-header [data-row],
.ct-header [data-row*=top],
.ct-header [data-row*=middle],
.ct-header [data-row*=bottom]{
  min-height:0 !important;
  padding:0 !important;
  border:0 !important;
}

#main,
.site-main,
.content-area{
  padding-top:0 !important;
  margin-top:0 !important;
}

/* ===== Footer CTA (единая версия, без дублей) ===== */
.dm-footer-cta {
  --btn-fz: clamp(20px, 2vw, 40px);
  font-size: var(--btn-fz);
  line-height: 1;
  height: calc(var(--btn-fz) * 1.5 + 10px);
  padding: 6px 0;

  display: flex;
  justify-content: center;
  align-items: center;
  gap: 40px;

  white-space: nowrap;
  overflow: hidden;
}

.dm-footer-cta .dm-btn {
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0.02em;

  font-size: inherit;
  color: #1a3365;
  text-decoration: none;
  text-transform: none;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;

  transition: transform .2s ease, color .2s ease, text-decoration-color .2s ease;
  transform-origin: center bottom;
}

.dm-footer-cta .dm-btn:hover {
  color: #14213d;
  transform: scale(1.03);
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* ===== Legal (единая версия, без дублей) ===== */
.dm-legal {
  --legal-fz: clamp(12px, 1vw, 18px);
  font-size: var(--legal-fz);
  line-height: 1.4;
  text-align: center;

  color: rgba(26, 51, 101, 0.8);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;

  padding: 6px 8px 12px;
  margin: 0;
  user-select: none;
}

.dm-legal a {
  color: inherit;
  text-decoration: none;
  transition: color .25s ease;
  line-height: 1.2;
  margin: 0;
}

.dm-legal a:hover {
  color: #14213d;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (max-width: 1400px) {
  .dm-footer-cta {
    gap: 24px;
    --btn-fz: clamp(16px, 1.5vw, 34px);
  }

  .dm-legal {
    --legal-fz: clamp(11px, 0.9vw, 16px);
    padding-bottom: 8px;
  }
}

.dm-footer {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 1000;
  background: rgba(255,255,255,.18);
  backdrop-filter: saturate(120%) blur(2px);
  -webkit-backdrop-filter: saturate(120%) blur(2px);
}

.dm-main { padding-bottom: 140px; }
@media (max-width: 1400px) { .dm-main { padding-bottom: 110px; } }
@media (max-width: 1024px) { .dm-main { padding-bottom: 96px; } }

.dm-main {
  margin: 0 auto;
  width: 100%;
  max-width: 1920px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  position: relative;
}

/* === Design Motion (page-id-19) === */

.entry-header {
  height: auto !important;
  overflow: visible !important;
}

.entry-header .page-title,
.entry-header .ct-header-text,
.entry-header .dm-visually-hidden {
  display: none !important;
  visibility: hidden !important;
}


#main,
.site-main,
.content-area,
.entry-content,
.ct-container {
  margin: 0 !important;
  padding: 0 !important;
  max-width: 100% !important;
}


[data-vertical-spacing*="bottom"] {
  padding-bottom: 0 !important;
}


.dm-stage > p { margin: 0 !important; padding: 0 !important; }


.ct-footer,
footer.site-footer {
  position: static !important;
  z-index: auto !important;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  background: #fff;
}

body{
  background-color: #fff !important;
}

.dm-stage {
  position: relative;
  width: 100vw;
  height: calc(100vw * 9 / 16); /* 16:9 */
  max-width: none;
  overflow: hidden;
  margin: -0.25%;
  background: #fff;
}


.dm-stage .dm-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 1;
}


.dm-stage::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 110px; 
  background: linear-gradient(to bottom, rgba(255,255,255,0) 10%, rgba(255,255,255,1) 100%);
  z-index: 200;
  pointer-events: none;
}

body.dm #page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

body.dm #page .site-main,
body.dm #page main.site-main {
  flex: 1;
  min-height: 0 !important;      
  display: grid;
  place-items: center;
  overflow: hidden;               
}

body.dm .dm-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: var(--dm-avail-h, 100dvh);
  height: min(var(--dm-avail-h, 100dvh), calc(100vw * 9 / 16));
  width:  min(100vw, calc(var(--dm-avail-h, 100dvh) * 16 / 9));
  margin: 0 auto;
  overflow: hidden;
}

body.dm .dm-footer, body.dm footer.site-footer { position: static !important; }

body.dm #page .content-area,
body.dm #page .entry-content,
body.dm #page .ct-container,
body.dm #page [class*="container"]{
  min-height: 0 !important;
  height: auto !important;
}

body.dm.admin-bar #page { min-height: calc(100dvh - 32px); }

@media (min-width: 1920px) {
  .dm .dm-stage {
    width: 1920px;
    height: 1080px;
  }
}



/* Desktop defaults: подсказку прячем, copyright ведем как часть legal */
.dm-rotate-hint { display: none; }

.dm-legal-links { /* чтобы на десктопе выглядело как обычный legal */
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
}

.dm-copyright { /* чтобы не "съезжал" и был как обычный текст футера */
  text-align: center;
  font-size: inherit;
  color: inherit;
  opacity: 0.7;
  padding: 0 8px 12px;
}


/* mob */
/* Мобила: портрет — подсказка сверху, меню по центру между подсказкой и низом, широкая полоса внизу */
@media (max-width: 768px) and (orientation: portrait) {

  .dm-footer{
    bottom: 0;
    display: flex;
    flex-direction: column;
    min-height: 52vh;
    padding: 14px 0 120px; /* место под полосу */
  }

	.dm-rotate-hint{
		display: block !important;
		margin: 0 auto 10px;
		padding: 10px 16px;
		text-align: center;
		font-size: 15px;
		line-height: 1.35;
		color: #E82630;
		opacity: 0.95;
		font-weight: 700;
		max-width: 380px;
	  }

  /* меню по центру зоны */
  .dm-footer-cta{
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    height: auto;
    white-space: normal;
    overflow: visible;
    margin-top: auto;
    margin-bottom: auto;
    padding: 10px 0;
    text-align: center;
  }

  .dm-footer-cta .dm-btn{
    font-size: 22px;
    line-height: 1.15;
  }

  /* legal links: в ряд, чуть крупнее, центр */
  .dm-legal-links{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;

    font-size: 12px;      /* было 14 */
    font-weight: 600;

    padding: 0 12px;
    margin: 0 auto 6px;
    text-align: center;

    flex-wrap: wrap;      /* ВОТ ЭТО спасает */
    white-space: normal;  /* вместо nowrap */
    line-height: 1.2;
  }

  .dm-legal-links span[aria-hidden="true"]{
    opacity: 0.7;
  }


  /* copyright: меньше и ближе к полосе */
  .dm-copyright{
    margin: 0 auto 10px;
    padding: 0 10px;
    text-align: center;
    font-size: 11px;
    line-height: 1.2;
    opacity: 0.75;
    color: #1a3365;
  }

  /* полоса в самый низ */
 .dm-footer::after{
    content:"";
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 120px;

    /* крутой градиент */
    background: linear-gradient(
      180deg,
      rgba(26, 51, 101, 0.00) 0%,
      rgba(26, 51, 101, 0.55) 18%,
      rgba(26, 51, 101, 0.92) 55%,
      rgba(20, 33, 61, 0.98) 100%
    );

    z-index: 999;
  }


  .dm-main{
    padding-bottom: 52vh;
  }
}


@media (max-width: 900px) and (orientation: landscape) {

  /* оставляем только меню */
  .dm-rotate-hint,
  .dm-legal-links,
  .dm-copyright{
    display: none !important;
  }

  /* убираем большую нижнюю полосу */
  .dm-footer::after{ content: none !important; }

  /* делаем низкую читаемую полосу-бар */
  .dm-footer{
    bottom: 0;
    min-height: auto;
    padding: 6px 0;
    display: block;
  }

  .dm-footer-cta{
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 14px;              /* сжали */
    height: auto;           /* чтобы не раздувало */
    padding: 2px 8px;       /* низкий бар */
    white-space: nowrap;
    overflow: hidden;
  }

  .dm-footer-cta .dm-btn{
    font-size: 16px;        /* читаемо и низко */
    line-height: 1.1;
  }

  .dm-main{
    padding-bottom: 60px;   /* чтобы не перекрывало контент */
  }
}





@media (max-width: 900px) and (orientation: landscape) {

  /* 1) “Убираем футер” визуально: фон/высоту/подложки */
  .dm-footer{
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    height: 0 !important;        /* футер как контейнер схлопнули */
    overflow: visible !important; /* чтобы fixed CTA не резалось */
  }

  /* 2) скрываем всё, кроме CTA */
  .dm-rotate-hint,
  .dm-legal-links,
  .dm-copyright{
    display: none !important;
  }

  /* 3) CTA — как оверлей снизу, перекрывает фон */
  .dm-footer-cta{
    position: fixed !important;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;

    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;

    gap: 14px;
    padding: 6px 10px;

    white-space: nowrap;
    overflow: hidden;

    /* легкая подложка, чтобы читалось поверх bg */
    background: rgba(255,255,255,.18);
    backdrop-filter: saturate(120%) blur(2px);
    -webkit-backdrop-filter: saturate(120%) blur(2px);
  }

  .dm-footer-cta .dm-btn{
    font-size: 16px;
    line-height: 1.1;
  }

  /* 4) Убираем градиентную “полосу” из portrait */
  .dm-footer::after{
    content: none !important;
  }

  /* 5) Чтоб контент не уезжал под CTA (если надо) */
  .dm-main{
    padding-bottom: 52px !important;
  }
}









/* ===== Overlay (lighter, gradient) ===== */
.dm-fs{
  position:fixed; inset:0;
  width:100vw; height:100vh;
  z-index:99999;
	align-items:center;
	padding-top: max(10px, env(safe-area-inset-top));
	padding-bottom: max(24px, env(safe-area-inset-bottom));


	/* safe-area сверху/снизу + нормальные поля */
	padding:
	  max(16px, env(safe-area-inset-top))
	  16px
	  max(16px, env(safe-area-inset-bottom));

  background: linear-gradient(
    180deg,
    rgba(255,255,255,0.00) 0%,
    rgba(255,255,255,0.35) 40%,
    rgba(255,255,255,0.70) 100%
  );
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.dm-fs.hidden{ display:none; }

.dm-fs__card{
  max-height: calc(100vh - 2 * max(16px, env(safe-area-inset-bottom)));
  overflow: auto;
}

.dm-fs__card{
  width: min(560px, 94vw);
  border-radius: 18px;
  padding: 14px 16px 12px;

  background: rgba(255,255,255,.86);
  border: 1px solid rgba(26,51,101,.10);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);

  color: #1a3365;
  font-family: inherit;
}

.dm-fs__title{
  font-weight: 500;
  font-size: 16px;
  line-height: 1.15;
}
.dm-fs__text{
  margin-top: 6px;
  font-size: 13px;
  opacity: .85;
}

/* ===== Buttons (one style, DM-like) ===== */
.dm-fs__actions{
  display:flex;
  gap:16px;
  margin-top:10px;
  justify-content:flex-start;
  align-items:center;
  flex-wrap:wrap;
}

.dm-fs__btn,
.dm-fs__skip{
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0.02em;

  font-size: 14px;
  color: #1a3365;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;

  border: none;
  background: transparent;
  padding: 0;
  margin: 0;

  cursor: pointer;
  transition: transform .2s ease, color .2s ease, opacity .2s ease;
  transform-origin: center bottom;
}

.dm-fs__skip{
  opacity: .55;          /* отличие только прозрачностью */
}

.dm-fs__btn:hover,
.dm-fs__btn:active,
.dm-fs__skip:hover,
.dm-fs__skip:active{
  transform: scale(1.04);
  color: #0f2550;
  opacity: 1;
}

/* ===== Mini button in landscape (re-open) ===== */
.dm-fs-mini{
  position:fixed;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 99998;

  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0.02em;

  font-size: 13px;
  color: #1a3365;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(26,51,101,.12);
  border-radius: 999px;
  padding: 10px 12px;

  box-shadow: 0 12px 40px rgba(0,0,0,.14);
  cursor:pointer;
  transition: transform .2s ease, opacity .2s ease;
  transform-origin: center bottom;
}
.dm-fs-mini.hidden{ display:none; }
.dm-fs-mini:hover,
.dm-fs-mini:active{ transform: scale(1.03); }

/* ===== Desktop: вообще выключаем ===== */
@media (hover: hover) and (pointer: fine){
  .dm-fs, .dm-fs-mini{ display:none !important; }
}
