/*
Theme Name: Biblioteca Mea Magic
Theme URI: https://bibliotecamea.com/
Author: Biblioteca Mea
Description: Custom child-friendly theme for BibliotecaMea.com with a soft storybook layout.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: bibliotecamea-magic
*/

@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800;900&display=swap');

:root {
  --bm-site-ink: #101858;
  --bm-site-red: #ff3f3f;
  --bm-site-green: #2d8a55;
  --bm-site-line: rgba(16, 24, 88, .13);
  --bm-site-soft: #fffaf0;
  --bm-site-cream: #fffdf8;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--bm-site-ink);
  background:
    radial-gradient(circle at 13% 7%, rgba(255, 229, 176, .42), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(235, 241, 255, .58), transparent 30%),
    linear-gradient(180deg, #fffdf7 0%, #fffaf0 52%, #fffdf8 100%);
  font-family: "Nunito", "Trebuchet MS", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

body,
button,
input,
textarea,
select {
  font-family: "Nunito", "Trebuchet MS", Arial, sans-serif;
}

a {
  color: inherit;
}

.bm-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 248, .88);
  border-bottom: 1px solid rgba(16, 24, 88, .08);
  backdrop-filter: blur(16px);
}

.bm-header-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 28px;
  align-items: center;
  width: min(1180px, calc(100% - 28px));
  min-height: 92px;
  margin: 0 auto;
}

.bm-brand {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  color: var(--bm-site-ink);
  text-decoration: none;
}

.bm-brand-mark {
  display: grid;
  width: 74px;
  height: 62px;
  place-items: center;
  font-size: 46px;
  line-height: 1;
}

.bm-brand-name {
  display: block;
  font-size: clamp(27px, 3vw, 34px);
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.bm-brand-name span {
  color: var(--bm-site-red);
}

.bm-brand-tagline {
  display: block;
  margin-top: 7px;
  color: rgba(16, 24, 88, .9);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.bm-main-nav {
  display: flex;
  justify-content: center;
  min-width: 0;
}

.bm-main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 24px;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.bm-main-nav a {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  border-bottom: 3px solid transparent;
  color: var(--bm-site-ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.bm-main-nav .current-menu-item > a,
.bm-main-nav a:hover,
.bm-main-nav a:focus-visible {
  border-bottom-color: var(--bm-site-red);
  color: var(--bm-site-red);
}

.bm-header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.bm-icon-button {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(16, 24, 88, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .72);
  color: var(--bm-site-ink);
  font-size: 22px;
  line-height: 1;
  text-decoration: none;
}

.bm-page-shell {
  width: 100%;
}

.bm-content-frame {
  width: min(1180px, calc(100% - 28px));
  margin: 0 auto;
}

.bm-content-frame > :first-child {
  margin-top: 0;
}

.bm-site-footer {
  margin-top: 44px;
  border-top: 1px solid rgba(16, 24, 88, .09);
  background: rgba(255, 253, 248, .68);
}

.bm-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 28px));
  min-height: 84px;
  margin: 0 auto;
  color: rgba(16, 24, 88, .7);
  font-size: 14px;
  font-weight: 700;
}

.bm-footer-inner a {
  color: var(--bm-site-ink);
  text-decoration: none;
}

@media (max-width: 920px) {
  .bm-header-inner {
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 14px 0;
  }

  .bm-main-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .bm-main-nav ul {
    flex-wrap: nowrap;
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .bm-header-inner,
  .bm-content-frame,
  .bm-footer-inner {
    width: min(100% - 20px, 1180px);
  }

  .bm-brand {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .bm-brand-mark {
    width: 54px;
    height: 48px;
    font-size: 34px;
  }

  .bm-brand-name {
    font-size: 24px;
  }

  .bm-brand-tagline {
    white-space: normal;
    font-size: 13px;
  }

  .bm-icon-button {
    width: 42px;
    height: 42px;
    font-size: 19px;
  }
}
