/*
Theme Name: Mantra Child
Template: mantra
*/

@import url("../mantra/style.css");


:root {
  --ab-red: #be0018;
  --ab-red-dark: #8f0012;
  --ab-ink: #1c1c1e;
  --ab-text: #3a3a3c;
  --ab-line: #e6e1da;
}

/* ===== Типография: Montserrat; зареждат се от functions.php ===== */
body, #access a, #access ul ul a, table.tbl_tren, input, textarea, button, select, .widget-area {
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif !important;
}
.entry-title, .entry-title a, .entry-content h1, .entry-content h2, .entry-content h3,
.entry-content h4, .entry-content h5, .entry-content h6 {
  font-family: "Montserrat", Arial, sans-serif !important;
}
body { font-size: 17px; line-height: 1.65; }

.entry-content h1, .entry-title { font-size: 34px !important; line-height: 1.2; }
.entry-content h2 { font-size: 28px !important; line-height: 1.25; }
.entry-content h3 { font-size: 24px !important; line-height: 1.3; }
.entry-content h4 { font-size: 20px !important; line-height: 1.35; }
.entry-content h5 { font-size: 18px !important; }
.entry-content h6 { font-size: 16px !important; }

#access a { font-size: 13px !important; }
#access ul ul a { font-size: 14px !important; padding-left: 24px !important; }   /* 14px от #prime_nav a + 10px отстъп */
#access a, #access ul ul a { color: #000 !important; }
#access a:hover,
#access li:hover > a,
#access ul li.current_page_item > a,
#access ul li.current-menu-item > a,
#access ul li.current-menu-ancestor > a,
#access ul li.current_page_ancestor > a,
#access ul li.current-menu-parent > a { color: var(--ab-red) !important; }

/* ===== Хедър и меню ===== */
#wrapper { padding-top: 0; }
#header, #branding, #masthead { background: #fff; }
#header { border-bottom: 3px solid var(--ab-red); }   /* като линията над футера */
#branding { box-shadow: 0 2px 14px rgba(0,0,0,.12); }
#bg_image { filter: grayscale(.15) contrast(1.05); }
#logo img { width: 74px; height: 100px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.25); }
#access { position: relative; margin-top: -25px; }
#prime_nav a { padding: 1px 14px; }

/* ===== Съдържание ===== */
.category .page-header,
.category #content > .page-header { display: none !important; }

#container, #content { max-width: 980px; margin-left: auto; margin-right: auto; }

/* празната странична колона (min-height 200px + padding) оставя дупка над футера на едноколонните страници */
.page-template-template-onecolumn #primary,
.page-template-template-onecolumn #secondary { display: none; }

.entry-content, .entry-summary { clear: both; padding: .5em 0; }

.entry-title {
  color: var(--ab-ink);
  text-align: center;
  font-weight: 400;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: 1em;
}
.entry-title::after {            /* червена черта под заглавието */
  content: "";
  display: block;
  width: 56px; height: 3px;
  background: var(--ab-red);
  margin: .6em auto 0;
}
.entry-content h3 {
  text-align: center;
  color: var(--ab-ink);
  font-weight: 400;
  margin: .2em 0 .4em;
}
.entry-content h4 { text-align: center; color: var(--ab-red); font-weight: 500; letter-spacing: .05em; }

/* <hr class="ab-line"> = червената черта като под заглавията; добави и "wide" за цяла ширина */
hr.ab-line {
  border: 0 !important;
  height: 3px !important;
  width: 56px;
  background: var(--ab-red) !important;
  margin: 1.5em auto !important;
}
hr.ab-line.wide { width: 100%; }

/* Видео */
.entry-content iframe,
.entry-content .epyt-video-wrapper,
.entry-content .fluid-width-video-wrapper {
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  overflow: hidden;
}
.entry-content iframe { display: block; margin: 1.5em auto; max-width: 100%; }
.entry-content iframe.__youtube_prefs__,
.entry-content iframe[src*="youtube.com"] { border-radius: 14px !important; }
/* миниатюрите под видеото (галерия на YouTube Embed Plus) */
.epyt-gallery-img-box,
.epyt-gallery-img { border-radius: 10px; overflow: hidden; }

/* Таблица с график */
table.tbl_tren {
  width: 100% !important;
  max-width: 760px;
  margin: 1.5em auto 2.5em;
  border-collapse: separate !important;
  border-spacing: 0;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 24px rgba(0,0,0,.10);
}
table.tbl_tren th {
  background: #000;
  color: #fff;
  padding: 14px 16px;
  font-size: .8em;
  letter-spacing: .12em;
  text-align: left;
  border: 0;
}
table.tbl_tren td {
  padding: 13px 16px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--ab-line) !important;
  background-image: none;
  color: var(--ab-text);
}
/* по-меки пастелни цветове за старите bgcolor клетки */
table.tbl_tren td[bgcolor="#FFFFC7"] { background: #fffbe0 !important; }
table.tbl_tren td[bgcolor="#FFC7C7"] { background: #ffe9e9 !important; }
table.tbl_tren td[bgcolor="#B9DCFF"] { background: #e6f2ff !important; }
table.tbl_tren tr:hover td[bgcolor] { filter: brightness(.97); }

/* Заоблени снимки в галерията (плъгин aikibudo-gallery) */
.ag-wrap .ag-album img,
.ag-wrap .ag-photo img,
.ag-wrap .ag-album-image,
.ag-wrap .ag-no-thumb { border-radius: 12px; }
/* същото закръгление и за NextGEN галериите и единичните снимки */
.ngg-galleryoverview .ngg-gallery-thumbnail img,
.ngg-gallery-singlepic-image img,
img.ngg-singlepic,
/* водещите снимки в списъците със статии (категории, архиви) */
img.post-thumbnail { border-radius: 12px !important; }
/* NextGEN отворена снимка (SimpleLightbox): тъмен фон, бели бутони и брояч */
.sl-overlay { background: #000 !important; opacity: .9 !important; }
.sl-wrapper .sl-close,
.sl-wrapper .sl-counter,
.sl-wrapper .sl-navigation button { color: #fff !important; }

/* ===== Футър ===== */
#footer, #colophon { background: var(--ab-ink) !important; color: #bdbdbd; border-top: 3px solid var(--ab-red); }
#footer a, #colophon a { color: #fff; }
#footer a:hover { color: #ff6b7d; }
#footer2 { padding-bottom: 50px; }

/* Контакти във футера (Custom HTML уиджет с клас footer-contacts) */
.footer-contacts { text-align: center; line-height: 1.8; }
.footer-contacts b { color: #fff; }
.footer-contacts a { white-space: nowrap; }

/* Социални икони във футера (рисувани директно във footer.php) */
.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 15px 10px;
}
.footer-social a { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; }
.footer-social img { width: 26px; height: 26px; }

/* ===== Малки детайли ===== */
a { transition: color .2s; }
a:hover { color: var(--ab-red-dark); }
#toTop { background: var(--ab-red) !important; border-radius: 50%; }

/* ===== Мобилни ===== */
@media (max-width: 800px) {
  body { font-size: 17px !important; }   /* родителският style-mobile.css го смалява на .9em/.95em */
  #masthead { position: relative; }
  #nav-toggle {                   /* бургер вътре в хедъра, отдясно */
    display: block !important;
    position: absolute !important;
    top: 10px;
    right: 10px;
    z-index: 1000;                /* над отвореното меню */
    width: 44px !important;
    height: 44px !important;
    line-height: 44px !important;
    padding: 0 !important;
    margin: 0 !important;
    background: rgba(255,255,255,.9) !important;
    border: none !important;
    border-radius: 6px;
    box-shadow: 0 1px 6px rgba(0,0,0,.3) !important;
    text-align: center;
  }
  #nav-toggle span { display: none !important; }
  #nav-toggle:before {            /* три нарисувани чертички: не зависят от шрифта и са центрирани и на iPhone */
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 22px;
    height: 3px;
    margin: -1.5px 0 0 -11px;
    background: #c8102e;
    box-shadow: 0 -7px 0 #c8102e, 0 7px 0 #c8102e;
  }
  #access { margin: 0 !important; padding: 0 !important; }
  /* отвореното меню: панел вдясно, под хедъра, с по-едър текст */
  #access {
    position: absolute !important;
    top: 130px;                   /* височината на хедъра */
    right: 0;
    left: auto;
    width: 280px !important;
    max-width: 85%;
    z-index: 999;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
  }
  #access a { font-size: 18px !important; padding-top: 10px !important; padding-bottom: 10px !important; }
  #access ul ul a { font-size: 17px !important; }
  /* хедърът да не се свива: родителят го смалява до min-height 90px и картинката следва ширината */
  #branding, #bg_image { min-height: 130px !important; }
  #bg_image { height: 130px; object-fit: cover; object-position: center; }
}
@media (max-width: 480px) {
  body { font-size: 17px !important; }
}
@media (max-width: 640px) {
  .entry-content h1, .entry-title { font-size: 28px !important; }
  .entry-content h2 { font-size: 24px !important; }
  .entry-content h3 { font-size: 21px !important; }
  .entry-content h4 { font-size: 18px !important; }
  .entry-title { letter-spacing: .06em; }
  /* картинка, която на телефон да е по-малка: <img class="aligncenter img-small"> */
  img.img-small { width: auto; max-width: 60% !important; height: auto; }
  img.img-smaller { width: auto; max-width: 40% !important; height: auto; }
  /* NextGEN единични снимки: над текста, по средата, вместо плаващи до него */
  .ngg-gallery-singlepic-image.ngg-left,
  .ngg-gallery-singlepic-image.ngg-right { float: none !important; margin: 0 auto 1em !important; }
  .ngg-gallery-singlepic-image img { max-width: 100%; height: auto; }
  /* NextGEN галерии: по две снимки на ред (миниатюрите са 180px и иначе се нареждат по една) */
  .ngg-galleryoverview.default-view .ngg-gallery-thumbnail-box { width: 50%; }
  .ngg-galleryoverview.default-view .ngg-gallery-thumbnail img { width: 100%; height: auto; }
  /* таблица, чиито колони се редят една под друга: <table class="tbl-stack"> */
  table.tbl-stack, table.tbl-stack tbody, table.tbl-stack tr, table.tbl-stack td { display: block; width: 100% !important; box-sizing: border-box; }
  table.tbl-stack td { padding: 0 0 1em 0; border: 0; }
  table.tbl_tren th { letter-spacing: 0 !important; font-size: 11px !important; padding: 8px 5px !important; }
  table.tbl_tren td { font-size: 12.5px !important; padding: 8px 5px !important; }
}
