/* =========================
   БАЗОВИ НАСТРОЙКИ
   ========================= */

html, body {
    margin: 0;
    padding: 0;
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #222222;
}

img {
    max-width: 100%;
    height: auto;
    border: 0;
}

/* Центриране на цялата страница в по-широки екрани */
.page-wrapper {
    background-color: #f5f5f5;
    padding: 20px 0;
}

.page-wrapper > .container {
    background-color: #ffffff;
    max-width: 1200px;
    margin: 0 auto;
    box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
    padding-bottom: 20px;
}

/* Bootstrap контейнер – леко ограничаваме ширината */
.container {
    max-width: 1200px;
}

/* =========================
   ХЕДЪР И БРАНД
   ========================= */

#header {
    background-color: #800000;
    color: #ffffff;
    text-align: center;
    padding: 6px 10px;
    margin: 0 auto;
    width: 100%;
    font-size: 14px;
    letter-spacing: 0.5px;
}

/* Горен блок с марката и маркето */
#up {
    margin-top: 10px;
}

#up .thumbnail {
    border: none;
    box-shadow: none;
    background-color: transparent;
}

/* Лого-изображението вляво */
#up .col-md-2 .thumbnail img {
    display: block;
    margin: 0 auto;
}

/* Бранд – gabriell-e-lit */
.brand-inline {
    font-family: "Brush Script MT", "Dancing Script", cursive;
    font-size: 42px;
    font-weight: 400;
    color: #800000;
    letter-spacing: 1px;
    text-align: center;
    display: inline-block;
    margin-bottom: 0;
}

/* Подзаглавие АРТ ПЛАТФОРМА под бранда */
#up .col-md-3 .thumbnail div:last-child {
    font-family: 'Merriweather', Georgia, "Times New Roman", serif;
    font-weight: 700;
    letter-spacing: 2px;
}

/* Маркиращият ред с корици (marquee) */
#up .col-md-7 .thumbnail {
    padding: 5px;
    border-radius: 4px;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
}

/* Корици в marquee – центриране и малко въздух */
#up marquee img {
    margin: 0 4px;
}

/* =========================
   НАВИГАЦИЯ – ГОРНО МЕНЮ
   ========================= */

.navbar {
    border-radius: 0;
    margin-bottom: 15px;
}

.navbar-default {
    background-color: #fdfdfd;
    border-color: #dddddd;
}

.navbar-default .navbar-nav > li > a {
    color: #800000;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.navbar-default .navbar-nav > li > a:hover,
.navbar-default .navbar-nav > li > a:focus,
.navbar-default .navbar-nav > .open > a,
.navbar-default .navbar-nav > .open > a:hover,
.navbar-default .navbar-nav > .open > a:focus {
    background-color: #800000;
    color: #ffffff;
}

.dropdown-menu {
    border-radius: 0;
    border-color: #dddddd;
}

.dropdown-menu > li > a {
    color: #333333;
    font-size: 13px;
}

.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
    background-color: #800000;
    color: #ffffff;
}

/* =========================
   НАВИГАЦИЯ – ДОЛНО МЕНЮ (menu_bottom)
   ========================= */

.footer-nav {
    margin-top: 20px;
    border-radius: 0;
    background-color: #fdfdfd;
    border-color: #dddddd;
}

.footer-nav .navbar-nav {
    float: none;
    text-align: center;
}

.footer-nav .navbar-nav > li {
    float: none;
    display: inline-block;
}

.footer-nav .navbar-nav > li > a {
    color: #800000;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-nav .navbar-nav > li > a:hover,
.footer-nav .navbar-nav > li > a:focus {
    background-color: #800000;
    color: #ffffff;
}

/* Statcounter елемент – да не „разваля“ менюто */
.footer-nav .statcounter-item .caret {
    border: none;
}

/* =========================
   ФУУТЪР
   ========================= */

#footer {
    background-color: #800000;
    color: #ffffff;
    text-align: center;
    width: 100%;
    padding: 8px 10px;
    font-size: 12px;
    margin-top: 15px;
}

/* =========================
   ОСНОВНО СЪДЪРЖАНИЕ
   ========================= */

.main-content {
    padding: 20px 15px 30px;
    background-color: #ffffff;
}

/* Заглавия – центрирани */
.main-content h1,
.main-content h2,
.main-content h3,
.main-content h4 {
    text-align: center;
    font-family: 'Merriweather', Georgia, "Times New Roman", serif;
    color: #000888;
    margin-top: 10px;
    margin-bottom: 15px;
}

/* Специално за голямото заглавие с gabriell-e-lit вътре */
.main-content h1 font[face="Brush Script MT"] {
    font-family: "Brush Script MT", "Dancing Script", cursive !important;
    font-size: 42px !important;
    font-weight: 400;
}

/* Параграфи – двустранно подравняване и сричкопренасяне */
.main-content p,
.main-content P {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 15px;
    line-height: 1.7;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    margin-bottom: 12px;
}

/* Центрирани параграфи, когато са зададени с ALIGN="center" */
.main-content p[align="center"],
.main-content P[ALIGN="center"] {
    text-align: center;
}

/* Хоризонтални линии – леко модернизирани */
.main-content hr,
.main-content HR {
    border: 0;
    height: 2px;
    background-color: #000888;
    margin: 15px 0;
}

/* Линкове в текста */
.main-content a {
    color: #800000;
    text-decoration: none;
}

.main-content a:hover,
.main-content a:focus {
    text-decoration: underline;
}

/* =========================
   ТАБЛИЦИ ОТ ТИП „КАРТИЧКИ“ (thumbnail блокове)
   ========================= */

.main-content .row {
    margin-bottom: 15px;
}

.main-content .thumbnail {
    text-align: center;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    background-color: #fafafa;
    padding: 10px;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.04);
}

/* Центриране на съдържанието в клетките – текст и изображения */
.main-content .thumbnail img {
    display: block;
    margin: 0 auto 6px auto;
}

.main-content .thumbnail font,
.main-content .thumbnail b,
.main-content .thumbnail B {
    display: block;
    text-align: center;
}

/* ============================================================
   UNIVERSAL GRID FOR ALL CELL BLOCKS
   Applies to: issues, books, gallery, guest editors, publications
   ============================================================ */

.cell-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.cell-grid .cell-item {
    width: calc(16.66% - 20px); /* 6 клетки на ред */
    min-height: 420px;          /* еднаква минимална височина */
    box-sizing: border-box;
}

.cell-grid .cell-item .thumbnail {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.cell-grid img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ============================================
   FORMAT ICONS (PDF, EPUB, P-BOOK, AUDIO)
   ============================================ */

.ebook-formats img,
.book-formats img {
    width: 40px;
    height: auto;
    margin: 0 3px;
}

/* =========================
   ХОРИЗОНТАЛНИ СПИСЪЦИ (ако решиш да ги ползваш като отделен компонент)
   ========================= */

.horizontal-list {
    list-style: none;
    padding: 0;
    margin: 0 auto 20px auto;
    text-align: center;
}

.horizontal-list li {
    display: inline-block;
    margin: 0 10px 5px 10px;
    vertical-align: middle;
}

.horizontal-list li a {
    color: #800000;
    font-weight: 600;
    text-decoration: none;
}

.horizontal-list li a:hover,
.horizontal-list li a:focus {
    text-decoration: underline;
}

.top-block-images {
    display: flex !important;
    flex-direction: row !important;
    gap: 10px;
    align-items: center;
}

.top-block-images img {
    width: auto !important;
    height: auto;
    display: inline-block !important;
}


/* =========================
   КАРУСЕЛ
   ========================= */

#myCarousel {
    margin: 20px auto;
    max-width: 600px;
}

#myCarousel .item {
    text-align: center;
}

#myCarousel img {
    margin: 0 auto;
    max-width: 100%;
    height: auto;
}

/* Надписите върху карусела – по-четими */
#myCarousel .carousel-caption {
    background: rgba(0, 0, 0, 0.55);
    padding: 8px 12px;
    border-radius: 4px;
    left: 50%;
    transform: translateX(-50%);
    right: auto;
    bottom: 10px;
    width: 80%;
}

#myCarousel .carousel-caption h3 {
    font-size: 18px;
    margin: 0 0 4px 0;
}

#myCarousel .carousel-caption p {
    font-size: 14px;
    margin: 0;
}

/* Индикатори – малко по-елегантни */
#myCarousel .carousel-indicators li {
    border: 1px solid #800000;
}

#myCarousel .carousel-indicators .active {
    background-color: #800000;
}

/* ============================================================
   PRINT CATALOG GRID – 3 книги на ред (двойни корици)
   ============================================================ */

.printcatalog-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: flex-start;
    margin-bottom: 40px;
}

.printcatalog-item {
    width: calc(33.33% - 25px); /* 3 клетки на ред */
    min-height: 480px;
    box-sizing: border-box;
}

.printcatalog-item .thumbnail {
    height: 100%;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 6px rgba(0,0,0,0.04);
}

/* Основна корица */
.printcatalog-item .cover-main {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
}

/* Двойна корица */
.printcatalog-item .cover-double {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 0 6px rgba(0,0,0,0.08);
}

/* Заглавие */
.printcatalog-item .title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #000080;
    text-align: center;
}

/* Автор */
.printcatalog-item .author a {
    color: #800000;
    text-decoration: none;
    font-size: 14px;
}

.printcatalog-item .author a:hover {
    text-decoration: underline;
}

/* PDF линк */
.printcatalog-item .pdf-link a {
    display: inline-block;
    margin-top: auto;
    padding: 6px 10px;
    background-color: #800000;
    color: #ffffff;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.printcatalog-item .pdf-link a:hover {
    background-color: #000080;
}

/* ============================================================
   RESPONSIVE – 2 книги на ред
   ============================================================ */
@media (max-width: 991px) {
    .printcatalog-item {
        width: calc(50% - 25px);
    }
}

/* ============================================================
   RESPONSIVE – 1 книга на ред
   ============================================================ */
@media (max-width: 600px) {
    .printcatalog-item {
        width: 100%;
    }
}

/* =========================
   РЕСПОНСИВНИ НАСТРОЙКИ
   ========================= */

@media (max-width: 991px) {
    .brand-inline {
        font-size: 34px;
    }

    #up .col-md-2,
    #up .col-md-3,
    #up .col-md-7 {
        margin-bottom: 10px;
    }

    #myCarousel {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .navbar-default .navbar-nav > li > a {
        font-size: 13px;
    }

    .footer-nav .navbar-nav > li {
        display: block;
        margin: 2px 0;
    }

    .main-content {
        padding: 15px 10px 25px;
    }

    .main-content h1 {
        font-size: 24px;
    }

    .main-content h3 {
        font-size: 18px;
    }
}
.section-text {
    max-width: 900px;
    margin: 0 auto 40px auto;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
}

.section-text p {
    font-family: 'Merriweather', Georgia, "Times New Roman", serif;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 1em;
}

.section-text .intro-paragraph {
    font-weight: 400;
}

.section-text a {
    color: #800000;
    text-decoration: none;
}

.section-text a:hover {
    text-decoration: underline;
}
.grid-block {
    margin: 20px 0;
}

.grid-cell {
    margin-bottom: 20px;
}

.grid-card {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    text-align: center;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.grid-card:hover {
    box-shadow: 0 0 10px rgba(0,0,0,0.08);
}

.grid-cover {
    max-width: 100%;
    height: auto;
    margin: 0 auto 10px auto;
    border-radius: 4px;
}

.grid-title {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #000080;
}

.grid-title a {
    color: #000080;
    text-decoration: none;
}

.grid-title a:hover {
    text-decoration: underline;
}

.grid-subtitle {
    font-size: 14px;
    margin-bottom: 10px;
}

.grid-subtitle a {
    color: #800000;
    text-decoration: none;
}

.grid-subtitle a:hover {
    text-decoration: underline;
}

.grid-formats {
    margin-top: auto;
}

.format-icon {
    margin: 0 4px;
    font-size: 18px;
    color: #800000;
}

.format-icon:hover {
    color: #000080;
}

.empty-cell {
    visibility: hidden;
}
#bookCarousel {
    max-width: 600px;
    margin: 30px auto;
}

.carousel-cover {
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.55);
    padding: 10px 14px;
    border-radius: 4px;
    bottom: 15px;
}

.carousel-caption h3 {
    font-size: 18px;
    margin: 0 0 4px 0;
}

.carousel-caption p {
    font-size: 14px;
    margin: 0;
}

.carousel-indicators li {
    border: 1px solid #800000;
}

.carousel-indicators .active {
    background-color: #800000;
}
.section-divider {
    width: 100%;
    margin: 30px auto;
    text-align: center;
}

.section-line {
    border: 0;
    height: 2px;
    background-color: #000888;
    width: 100%;
    margin: 0 auto;
}
.horizontal-list {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    text-align: center;
}

.horizontal-list li {
    display: inline-block;
    margin: 0 10px 6px 10px;
}

.horizontal-list a {
    color: #800000;
    font-weight: 600;
    text-decoration: none;
}

.horizontal-list a:hover {
    text-decoration: underline;
}
.title-two-lines {
    text-align: center;
    margin: 20px 0;
}

.title-two-lines span {
    display: block;
}

.title-normal {
    font-family: 'Open Sans', Arial, sans-serif;
    font-size: 28px;
    font-weight: 600;
    color: #000888;
}

.title-script {
    font-family: "Brush Script MT", "Dancing Script", cursive;
    font-size: 42px;
    font-weight: 400;
    color: #800000;
}
.center-all {
    text-align: center;
}

.center-all img,
.center-all iframe {
    display: block;
    margin-left: auto;
    margin-right: auto;
}
#up marquee img {
    display: inline-block !important;
    width: auto !important;
    height: 150px !important;
}
/* --- Секция за основното съдържание на gabriell-e-lit --- */

/* 1. Основен контейнер */
.main-content-wrapper {
    display: block !important;
    text-align: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

/* 2. Пълно пренаписване на старите таблици */
.main-content-wrapper table {
    width: 100% !important;        /* Пренебрегва width="650" */
    max-width: 850px !important;   /* Оптимална ширина за четене */
    margin-left: auto !important;  /* Центриране отляво */
    margin-right: auto !important; /* Центриране отдясно */
    border-collapse: collapse;
    display: table !important;
    float: none !important;        /* Пренебрегва align="left/right" */
    table-layout: auto !important;
    word-break: break-word;        /* Пречупва дълги думи */
    overflow-wrap: break-word;
}

/* 3. Фикс за клетките и подравняване на текста в тях */
.main-content-wrapper td {
    word-break: break-word;
    vertical-align: top;
    text-align: left;              /* Текстът вътре в таблицата обикновено е по-добре вляво */
    padding: 8px;                  /* Малко разстояние за по-добра четимост */
}

/* 4. Изображения (Галерия и Корици) */
.main-content-wrapper img {
    max-width: 100% !important;
    height: auto !important;
    display: inline-block;
    margin: 15px auto;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* 5. Разделителна линия */
.content-divider {
    width: 100%;
    height: 1px;
    background-color: #000888;
    margin: 30px 0;
    border: none;
}

/* 6. Адаптивност за мобилни устройства */
@media (max-width: 768px) {
    .main-content-wrapper {
        padding: 10px;
    }
    .main-content-wrapper img {
        box-shadow: none;
        margin: 10px auto;
    }
    .main-content-wrapper table {
        display: block;            /* Помага за скролване при много малки екрани */
        overflow-x: auto;
    }
}/* === Pagination / Навигация по букви === */

.centered-title {
    text-align: center;
    margin-top: 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0;
    list-style: none;
}

.pagination li a {
    display: block;
    padding: 4px 8px;
}
p:not([align]) {
    text-align: center;
}
.book-title {
    text-transform: uppercase;
}
/* ============================================================
   PRINT CATALOG GRID – 3 книги на ред (двойни корици)
   ============================================================ */

.bookstore-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    justify-content: flex-start;
    margin-bottom: 40px;
}

.bookstore-item {
    width: calc(33.33% - 25px); /* 3 клетки на ред */
    min-height: 480px;
    box-sizing: border-box;
}

.bookstore-item .thumbnail {
    height: 100%;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 6px rgba(0,0,0,0.04);
}

/* Двойна корица */
.bookstore-item img {
    width: 100%;
    height: auto;
    border-radius: 6px;
    margin-bottom: 10px;
    box-shadow: 0 0 6px rgba(0,0,0,0.08);
}

/* Заглавие */
.bookstore-item .caption strong {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 6px;
    color: #000080;
    display: block;
}

/* Автори */
.bookstore-item .caption a {
    color: #800000;
    text-decoration: none;
    font-size: 14px;
}

.bookstore-item .caption a:hover {
    text-decoration: underline;
}

/* Формати (само p-book) */
.bookstore-formats {
    margin-top: auto;
    text-align: center;
}

.bookstore-formats img {
    width: 40px;
    height: auto;
}

/* ============================================================
   RESPONSIVE – 2 книги на ред
   ============================================================ */
@media (max-width: 991px) {
    .bookstore-item {
        width: calc(50% - 25px);
    }
}

/* ============================================================
   RESPONSIVE – 1 книга на ред
   ============================================================ */
@media (max-width: 600px) {
    .bookstore-item {
        width: 100%;
    }
}
