/* Define the font faces */
@font-face {
    font-family: 'Cardo';
    src: url('../font/Cardo-Bold.ttf') format('truetype');
    font-weight: bold;
}

@font-face {
    font-family: 'Cardo';
    src: url('../font/Cardo-Italic.ttf') format('truetype');
    font-style: italic;
}

@font-face {
    font-family: 'Cardo';
    src: url('../font/Cardo-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

body {
    background: #fffcf3;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}


h3{
    letter-spacing: 1px;
}

/* Create classes for each font style */
.cardo_bold {
    font-family: 'Cardo';
    font-weight: bold;
}

.cardo_italic {
    font-family: 'Cardo';
    font-style: italic;
}

.cardo {
    font-family: 'Cardo';
    font-weight: normal;
    font-style: normal;
}

/* General non-regular class */
.cardo-non-regular {
    font-family: 'Cardo';
    font-weight: bold; /* or any other non-regular style you prefer */
}

    
    body{
        font-family: 'Cardo', serif;
    }


    input:focus, select:focus, textarea:focus, button:focus {
        outline: none;
    }
    .name_input{
        border: 0;
        border-bottom: 1px solid;
        border-radius: 0;
        width: 100%;
        text-transform: capitalize;
        font-size: 30px;
        line-height: 1.3;
        background: transparent;
    }
    .name_input::-webkit-input-placeholder {
        
        font-size: 30px;
    }
    .add_message{
        position: relative;
        padding: 6px 13px;
        border-radius: 2rem;
        background: #fef5e1;
        
        color: #121211;
        text-decoration: none;
        outline: none;
        cursor: pointer;
      }
      .add_message:hover{
        background: #fff6d8;
        color:#121211;
        text-decoration: none;
      }
      label{
        cursor: pointer;
      }
      .message {
        position: relative;
        background: #ffffff;
        border: 0;
        border-radius: 10px;
        outline: none;
        padding: 10px;
        border: 1px solid #daab77;
      }
    .go_form, .go_ajax{
        width: 100%;
        padding: 10px;
        border-radius: 25px;
        border: 0;
        background: #eee2c6;
        font-size: 1.5rem;
        color: #1f1f1f;
        text-transform: none;
        text-decoration: none;
        outline: none;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }
      .go_form:hover, .go_ajax:hover{
        background: #fff2d4;
        color:#1f1f1f;
        text-decoration: none;
      }
      .card{
        border: 1px solid #bb1c2d;
        border-radius: 10px;
      }
      #btn_go{
        
      }
      #term, #name_count{
        text-align: center;
        font-size: 1.3rem;
        height: auto;
        border-radius: 10px;
      }
      select {
        background-position: 38% center; /* Подвигает стрелку немного влево */
      }
      .cnt_sum{
        color: #75757591;
      }
      .card{
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
      }

      .checkbox-container {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #sub+label, #email_check+label, #free+label, #candle+label, #sub+label::before, #email_check+label::before, #free+label::before, #candle+label::before {
    display: inline-flex;
    align-items: center;
    user-select: none;
    cursor: pointer;
    }
    #sub, #email_check, #free, #candle {
    position: absolute;
    z-index: -1;
    opacity: 0;
    cursor: pointer;
    }
    #sub+label::before, #email_check+label::before, #free+label::before, #candle+label::before {
    content: '';
    display: inline-block;
    width: 1em;
    height: 1em;
    flex-shrink: 0;
    flex-grow: 0;
    border: 1px solid #adb5bd;
    border-radius: 0.25em;
    margin-right: 0.5em;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 50% 50%;
    cursor: pointer;
    }
    #sub:checked+label::before, #email_check:checked+label::before, #free:checked+label::before, #candle:checked+label::before {
    border-color: #d3b85e96;
    background-color: #d3b85e;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23fff' d='M6.564.75l-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
    }
    /* стили при наведении курсора на checkbox */
    #sub:not(:disabled):not(:checked)+label:hover::before, #email_check:not(:disabled):not(:checked)+label:hover::before, #free:not(:disabled):not(:checked)+label:hover::before, #candle:not(:disabled):not(:checked)+label:hover::before {
    border-color: #d3b85e;
    }
    /* стили для активного состоян чекбокса (при нжт на него) */
    #sub:not(:disabled):active+label::before, #email_check:not(:disabled):active+label::before, #free:not(:disabled):active+label::before, #candle:not(:disabled):active+label::before {
    background-color: #d3b85e;
    border-color: #d3b85e;
    }
    /* стили для екос, находщеося в оксе */
    #sub:focus+label::before, #email_check:focus+label::before, #free:focus+label::before, #candle:focus+label::before {
    box-shadow: 0 0 0 0.2rem rgb(218 210 26 / 25%);
    }
    /* стили дл чекбокса, находящегося в фокусе и не ахояегоя в сстони checked */
    #sub:focus:not(:checked)+label::before, #email_check:focus:not(:checked)+label::before, #free:focus:not(:checked)+label::before, #candle:focus:not(:checked)+label::before {
    border-color: #d3b85e96;
    }
    /* сили для чекокса, нахощегос в сстяни disabled */
    #sub:disabled+label::before, #email_check:disabled+label::before, #free:disabled+label::before, #candle:disabled+label::before {
    background-color: #e9ecef;
    }

    /* ===== DELETE-ICON ДЛЯ ПОЛЯ ИМЕНИ =================================== */
    .name-input-wrapper          { position: relative; }

    .name-input-wrapper .name_input {
    padding-right: 42px;                 /* место под иконку */
    }

    .remove-name {
    width: 38px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #b0b0b0;
    font-size: 1.25rem;
    cursor: pointer;
    transition: color .18s, transform .18s;
    right: 0;
    top: 0;
    }

    .remove-name:hover {
    color: #bb1c2d;                      /* красный при наведении */
    transform: scale(1.15);
    }

    .remove-name:active {
    transform: scale(0.9);
    }


    #form_data input{
        width: 100%;
        border: 2px solid #ebebeb;
        border-radius: 10px;
        height: 35px;
        padding-left: 5px;
        
    }
    #form_data input:focus{
        width: 100%;
        border: 2px solid #d3b85e;
        border-radius: 10px;
    }

    #form_data input::-webkit-input-placeholder {
        
        font-size: 18px;
        padding-left: 5px;
    }
    .back_btn{
        background: #ffffff;
        font-size: 1rem;
        color: #d3b85e;
        text-transform: none;
        text-decoration: none;
        outline: none;
        padding: 5px 20px;
        border-radius: 10px;
        border: 1px solid #d3b85e;
        cursor: pointer;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    .back_btn:hover{
        color:#968344;
    }
    a{
        color: #207ac4;
    }
    #cost_cnt{
        font-size: 3rem;
    }
    
    
         img {
            -webkit-user-select: none;
            -moz-user-select: none;
            user-select: none;
            pointer-events: none;
        }
    
        
        div a{
          text-decoration: none;
        }
        .boxer a{
          text-decoration: none;
        }

        .row-flex {
            display: flex;
            flex-wrap: wrap;
            align-items: stretch; /* This is the key to making sure all items are the same height */
          }
          .boxer {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            height: 100%; /* Make sure the block fills the height */
            border-radius: 32px;
            cursor: pointer;
            text-decoration: none;
          }
          .text-container { /* Replace with your actual text container class if it exists */
            text-align: center;
            width: 100%;
          }
          @media (max-width: 768px) {
            .row-flex {
              flex-direction: column;
            }
            .boxer {
              /* Adjust padding and margins as necessary when stacking vertically */
            }
          }
          
        /*.boxer{
          border: 1px solid #dbdbdb;
          background: #fff;
          border-radius: 10px;
          cursor: pointer;
          text-decoration: none;
          height: auto;
        }*/
        .boxer .prayer{
          color:#ba1514;
          text-decoration: none;
          font-size: clamp(1.5rem, 2vw, 1.5rem);
          border-bottom: 1px solid transparent !important;
        }

        .boxer .prayer:hover{
          border-bottom: 1px solid #ba1514 !important;
        }

        .entrusted{
          font-size: clamp(0.9rem, 2vw, 0.9rem);
        }

        a .entrusted{
          border-bottom: 1px solid transparent !important;
        }

        a .entrusted:hover{
          border-bottom: 1px solid #a2a2a27a !important;
        }

        .boxer .whom_name{
          color:#8c721e;
          text-decoration: none;
          
          cursor: pointer;
          margin-top: 10px;
          font-size: calc(8px + 16 * (100vw / 1280));
        }
        .boxer img{
          max-height:200px;
          position: relative;
          cursor: pointer;
        }

        .links{
          text-decoration: none;
        }
        .row-flex {
        display: flex;
        flex-flow: row wrap;
        }
        .link_tap{
          background: #fff;
          border-radius: 5px;
          display: block;
          padding: 10px;
          -webkit-box-shadow: -1px 4px 27px -14px rgba(34, 60, 80, 0.29);
          -moz-box-shadow: -1px 4px 27px -14px rgba(34, 60, 80, 0.29);
          box-shadow: -1px 4px 27px -14px rgba(34, 60, 80, 0.29);
        }
        a {
          color: #1879ca;
        }
        .go_form_2{
                padding: 10px;
                border: 1px solid #c2a64d;
                border-radius: 25px;
                background: #c2a64d;
                font-size: 1.6rem;
                color: #242529;
                text-transform: none;
                text-decoration: none;
                outline: none;
              }
              .go_form_2:hover{
                background: #3f3617;
                border: 1px solid #3f3617;
                color:#fff;
                text-decoration: none;
              }
    
              footer {
                margin-top: auto;
              }
              .go_t{
                width: 100%;
                padding: 10px 20px;
                border-radius: 25px;
                border: 0;
                background: #eee2c6;
                font-size: 18px;
                color: #1f1f1f;
                text-transform: none;
                text-decoration: none;
                outline: none;
                cursor: pointer;
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                user-select: none;
              }
              .go_t:hover{
                background: #fff2d4;
                text-decoration: none;
              }
              .go_time{
                width: 100%;
                padding: 5px 18px;
                border-radius: 25px;
                border: 0;
                background: #eee2c6;
                font-size: 18px;
                color: #1f1f1f;
                text-transform: none;
                text-decoration: none;
                outline: none;
                cursor: pointer;
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                user-select: none;
              }
              .go_time:hover{
                background: #fff2d4;
                text-decoration: none;
              }
              #add_name{
                    width: 100% !important;
                    text-align: center;
                    position: relative;
                    top: -10px;
                    z-index: 0;
                    border-radius: 0 0 10px 10px;
                    margin: 5px 0;
                    padding: 7.5px 20px;
                    background: 0;
                    border: 1px solid #3c3c3c;
                    cursor: pointer;
              }
              #add_name:hover{
                background: #fff2d4;
              }
              #add_name i{
                vertical-align: middle;
              }
              .warning-text{
                color:#bb1c2d;
                font-size:0.95rem;
            }
              #tabs_name .nav-tabs .nav-item{
                z-index: 1;
              }
              .tabs-inputs{
                position: relative;
                top: -15px;
              }
              .list_tag{
                width: auto !important;
                margin: 8px 8px;
                white-space: normal;
                word-break: keep-all;
                display: inline-block;
              }
              .list_time_tag{
                width: auto !important;
                margin: 5px 5px;
                white-space: normal;
                word-break: keep-all;
                display: inline-block;
              }
              .img_back{
                background-position: top center;
                height: 300px;
                background-repeat: no-repeat;
                background-attachment: inherit;
              }
              /*мобильная ерси*/
                @media (max-width: 800px) {
                    .img_back{
                    height: 300px;
                    }
                    .go_t{
                      font-size: 16px;
                      padding: 10px 14px;
                    }
                }
                @media (max-width: 576px) {
                    .img_back{
                    height: 280px;
                    }
                    .go_t{
                      font-size: 16px;
                      padding: 10px 14px;
                    }
                }
                @media (max-width: 320px) {
                    .img_back{
                    height: 100px;
                    }
                    .go_t{
                      font-size: 12px;
                      padding: 10px 14px;
                    }
                }
                
              .btn_mol{
                display: block;
                padding: 5px 10px;
              }

            .mol_card {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            height: 100%;
            border-bottom: 1px solid #d3b85e;
            border-radius: 0 !important;
            }

            .mol_card_content {
            flex: 1 1 auto;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            }

            .img_card {
            /* Не даём тексту заходить на картинку */
            margin-top: 24px; /* подбери под свой дизайн */
            }

            .img_card img {
            display: block;
            margin: 0 auto;
            max-height: 200px;
            min-width: 140px;
            object-fit: contain;
            }

              .opt_label{
                position: relative;
                top: -5px;
                color:#cacaca;
              }
              .theme_life{
                border-radius: 10px;
                border: 1px solid #d3b85d;
              }
              .theme_life h4{
                text-align: center;
                color: #ba1414;
              }
              .theme_life ul, .theme_dead ul{
                list-style: circle;
                padding-left: 20px;
              }
              .theme_life li{
                font-size: 24px;
              }
              .theme_life li a{
                color: #207ac4;
              }
              .theme_life li a:hover{
                border-bottom: 1px solid #207ac4;
              }
              /*мрачые цвета*/
              .theme_dead{
                border-radius: 10px;
                border: 1px solid #212529;
              }
              .theme_dead h4{
                text-align: center;
                color: #ba1414;
              }
              .theme_dead li{
                font-size: 24px;
              }
              .theme_dead li a{
                color: #ba1414;
              }
              .theme_dead li a:hover{
                border-bottom: 1px solid #ba1414;
              }
              
              .btn_mol_cat a{
                font-size: 1rem;
                font-family: 'Cardo';
                padding: 7px 15px;
                border: 1px solid #d3b85e !important;
                background: transparent;
                color: #3e3e3e;
                border-radius: 25px;
                border: 0;
                text-transform: none;
                text-decoration: none;
                outline: none;
                cursor: pointer;
                -webkit-user-select: none;
                -moz-user-select: none;
                -ms-user-select: none;
                user-select: none;
                box-shadow: none;
                -webkit-box-shadow: none;
                -moz-box-shadow: none;
              }
              .btn_mol_cat a:hover{
                background: #d3b85e;
              }
              .btn_mol_cat a:active, .btn_mol_cat a:not(:disabled):not(.disabled):active:focus{
                color: #3e3e3e !important;
                background: #d3b85e !important;
                border: 1px solid #d3b85e !important;
                box-shadow: none !important;
                -webkit-box-shadow: none !important;
                -moz-box-shadow: none !important;
              }
              /*аативны шифт дя кнопок*/
              @media (max-width: 768px) {
                .btn_mol_cat a{
                  font-size: 1.2rem;
                }
              }
              @media (max-width: 576px) {
                .btn_mol_cat a{
                  font-size: 0.9rem;
                }
              }
              @media (max-width: 320px) {
                .btn_mol_cat a{
                  font-size: 0.8rem;
                }
              }


            .req_link{
            }

.card_pray {
  border: 1px solid #d3b85d;
  border-radius: 0.65rem;
}
            
.saint-img {
  display: block;
  margin: 0 auto 1.5rem;
  max-height: 150px;
  width: auto;
}

.prayer-title {
  font-family: 'Cardo', serif;
  font-size: 2rem;
  color: #2c2c2c;
}

.prayer-content {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #2e2e2e;
}

.prayer-content p{
    user-select: auto !important;

}

.mol_other{
    font-size:18px;
}

.muted{
    color: #a2a2a27a !important;
}
         
.resp_text{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: min(4vw, 2rem); /* адаптивный размер */
  display: block;
  width: 100%;
  text-align: center;
}

.equal-col {               /* заставляем колонку быть flex‑контейнером */
  display: flex !important;
}

.pray_card .req_link:hover{
    text-decoration: none !important;
}

.pray_card {
  flex: 1 1 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.pray_card img {
  margin-top: auto;
  max-height: 200px;
  min-width: 150px;
  object-fit: contain;
}

.equal-col{display:flex!important;}               /* колонка тянется */
.boxer.top_pray{flex:1 1 auto;}

.top_pray:hover .prayer{
    border-bottom: 1px solid #a13231 !important;
}

/* фиксируем «окно» для иконки */
.border_img{
  height: auto;
  max-height: 150px;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

/* сама картинка вписывается в окно */
.border_img img{
  object-fit: contain;
  max-width: 80%;
}

.title_related{
    color: #ba1414;
    font-size: clamp(1.5rem, 2vw, 1.3rem);
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.lnk{
    color: #1879ca;
    cursor: pointer;
}
.lnk:hover{
    border-bottom: 1px solid #1879ca;
    -webkit-user-select: none; /* Safari */
    -ms-user-select: none; /* IE 10 and IE 11 */
    user-select: none; /* Standard syntax */
}

.why_btn{
    font-size: 1.2rem;
}

#why {
  display: none;          /* изначально скрыт и места не занимает */
  opacity: 0;
  transition: opacity .35s ease;
}
#why.visible {            /* будет добавляться JS‑ом */
  display: block;         /* в потоке */
  opacity: 1;
}
.pray-card {
  border-radius: 32px;
  padding: 32px 28px;
  min-height: 210px;
  display: flex;
  text-align: left;
  align-items: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.06);
  width: 100%;
  box-sizing: border-box;
  transition: box-shadow .18s;
}

.pray-card img {
  width: 178px;
  height: 178px;
  object-fit: contain;
  flex-shrink: 0;
  text-align: center;
}

.pray-content {
  flex: 1;
  min-width: 0;
  position: absolute;
  left: 45%;
  padding: 20px;
}

.pray-content h5 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.pray-content p {
  font-size: 1.08rem;
  line-height: 1.4;
  margin-bottom: 16px;
}

.pray-card .btn {
  font-size: 1.02rem;
  padding: 7px 22px;
  border-radius: 10px;
  font-weight: 600;
}

.bg-red-gold  { background: linear-gradient(135deg, #812828, #b34a32); color: #f0d792; }
.bg-olive     { background: linear-gradient(135deg, #6d7346, #b5a95a); color: #f7f7d0; }
.bg-honey     { background: linear-gradient(135deg, #ffe39b, #e3bb66); color: #593c19; }
.bg-parchment { background: linear-gradient(135deg, #d1a85b, #bb854b); color: #593c19; }

.btn-outline-light { border: 2px solid #fff; color: #fff; background: transparent; }
.btn-warning { background:#ffe39b !important; color: #4a3b18 !important; border: none; }
.btn-light.text-dark { background: #fff8de !important; border: none; color: #4a3b18 !important; }

/* Сохраняем прямоугольные блоки на десктопе/планшете */
@media (max-width: 991px) {
  .pray-card {
    padding: 18px 10px;
    min-height: 148px;
    border-radius: 20px;
  }
  .pray-content {padding: 10px;left:45%;}
  .pray-card img {width: 45%; height: 100%; }
  .pray-content h5 { font-size: 1.18rem; }
  .pray-content p { font-size: 0.96rem; }
}

@media (min-width: 541px) and (max-width: 990px) {
    .pray-card {padding: 0; min-height: 180px;}
    .pray-content {position: relative;padding: 10px;left:0;}
    .pray-card img {width: 35%; height: auto;}
    .pray-card .btn {padding: 7px 12px;}
    .pray-content h5 {margin-top:10px;margin-bottom: 5px;}
    .pray-content p {margin-bottom: 15px;}
}

/* Квадраты на очень маленьких экранах (до 540px) */
@media (max-width: 540px) {
  .col-6.d-flex {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 6px;
    display: flex;
  }
  .pray-content {position: relative;padding: 10px;left:0%;}
  .pray-card {
    flex-direction: column;
    min-height: unset;
    aspect-ratio: 1/1;        /* Квадрат */
    justify-content: center;
    text-align: center;
    padding: 14px 4px 12px 4px;
  }
  .pray-card img {
    width: 80px; height: 80px;
  }
  .pray-content h5 { font-size: 1rem; }
  .pray-content p { font-size: 0.88rem; }
  .pray-card .btn { width: 100%; font-size: 0.93rem; padding: 6px 10px;}
}



/* =========================================================
   SINGLE-SOURCE NAVBAR STYLES  (обновлено)
   – Линия на всю ширину
   – Меню всегда строго по центру экрана
   – Desktop-логотип слева        (.navbar-brand-desktop)
   – Mobile-логотип по центру     (.navbar-brand-mobile)
=========================================================== */

/* ---------- NAVBAR (родитель) ---------- */
.custom-navbar{
  position:relative;               /* теперь именно nav – “якорь” для absolute-меню */
  width:100%;
  background:#fffcf3;
  box-shadow:none;
  padding:0;
}

/* ---------- Внутренний контейнер ---------- */
.custom-navbar .container{
  display:flex;
  align-items:center;
  padding:0.5rem 1rem;
  /* БЕЗ position:relative; иначе меню пляшет! */
}

/* ---------- ЛОГО (desktop) ---------- */
.navbar-brand-desktop{margin-right:1.5rem;}
.navbar-brand-desktop img{
  height:60px;
  border-radius:6px;
  background:none;
  box-shadow:none;
  transition:opacity .15s;
}
.navbar-brand-desktop img:hover{opacity:.85;}

/* ---------- ЛОГО (mobile) – скрыт по умолчанию ---------- */
.navbar-brand-mobile{display:none;}   /* покажем в медиаправиле */
.navbar-brand-mobile img{
  height:48px;
  border-radius:6px;
  background:none;
  box-shadow:none;
}

/* ---------- ЦЕНТРАЛЬНОЕ МЕНЮ ---------- */
.navbar-nav{
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%,-50%);
  display:flex;
  gap:5px;              /* равные промежутки */
  margin:0;
  padding:0;
  list-style:none;
}

/* ---------- Ссылки ---------- */
.navbar-nav .nav-link{
  font-family:'Cardo',serif;
  font-size:1.13rem;
  font-weight:500;
  color:#78602d;
  letter-spacing:.03em;
  padding:8px 20px;
  background:none;
  border:none;
  text-decoration:none;
  transition:color .16s;
  border-bottom:2.5px solid transparent;
  white-space:nowrap;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus{
  color:#b79d3c;
  border-bottom-color:#d3b85e;
}
.navbar-nav .nav-link.active,
.navbar-nav .nav-link[aria-current="page"]{
  color:#b79d3c;
  border-bottom-color:#d3b85e;
}

/* ---------- MOBILE / TABLET ---------- */
@media(max-width:640px){

  /* прячем desktop-логотип, показываем mobile-логотип */
  .navbar-brand-desktop{display:none;}
  .navbar-brand-mobile{
    display:block;
    position:absolute;
    left:50%;
    top:0;
    transform:translate(-50%,-60%);   /* чуть выше линии */
  }

  /* даём место под mobile-логотип */
  .custom-navbar .container{margin-bottom: 14px;}
  /* адаптив размер шрифта */
  .navbar-nav .nav-link{
    font-size:calc(10px + (18 - 12) * ((100vw - 320px) / (991 - 320)));
    padding:0 2px;
    margin-top: 10px;
  }
}

@media (min-width: 641px) and (max-width: 1024px) {
  .navbar-brand-desktop {
    display: none;
  }
  .navbar-brand-mobile {
    display: block;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translate(-50%, -60%);
  }

  .custom-navbar .container {
    margin-bottom: 14px;
  }

  .navbar-nav .nav-link {
    font-size: calc(14px + (18 - 12) * ((100vw - 641px) / (1024 - 641)));
    padding: 0 9px;
    margin-top: 10px;
  }
}


.footer {
  background: #fffcf3;
  border-top: 1px solid #e0d7bd;
  font-family: 'Cardo', serif;
  font-size: 15px;
  color: #555;
}

.footer-link {
  color: #555;
  text-decoration: none;
  font-weight: 100;
  border-bottom: 1px solid transparent;
  letter-spacing: .03em;
}

.footer-link:hover {
  color: #b79d3c;
  border-bottom: 1px solid #b79d3c;
}

.footer-partners img {
  max-height: 20px;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.footer-partners img:hover {
  opacity: 1;
}


#recentIntentionsBlock {
  background: #fffefc;
  border: 1px solid #d3b85d;
  border-radius: 15px;
  padding: 30px 20px;
  transition: all 0.3s ease;
}

#recentIntentionsBlock h4 {
  color: #ba1414;
  font-size: 1.8rem;
  margin-bottom: 20px;
  letter-spacing: 0.5px;
}

#recentIntentionsContent {
  min-height: 80px;
}

#recentIntentionsContent p {
  font-family: 'Cardo';
  font-style: italic;
  color: #3e3e3e;
  font-size: 1.2rem;
  margin: 0;
  transition: opacity 0.3s;
}

#recentIntentionsContent a.go_t {
  max-width: 300px;
}


.pagination .page-link {
  color: #a67c00;
  border: 1px solid #e2d5a6;
}
.pagination .active .page-link {
  background-color: #d3b85e;
  border-color: #d3b85e;
  color: white;
}
.cardo.active {
    background: #bb1c2d;
    color: #ffffff !important;
}



.prayer-entry{display:flex;flex-direction:column;padding:1.2rem .3rem;border-bottom:1px solid #e4d8b9;}
.prayer-row-main{display:flex;align-items:center;width:100%;}
.prayer-author{flex:0 0 160px;font-size:.95rem;color:#888;text-align:left;}
.prayer-text{flex:1 1 auto;text-align:center;font-size:1.05rem;padding:0 .5rem;}
.prayer-likebox{flex:0 0 120px;text-align:right;display:flex;align-items:center;justify-content:flex-end;}
.prayer-date{font-size:.97rem;color:#a2a2a2b2;margin-bottom:.35rem;}

.like-btn{background:none;border:none;padding:0;font-size:1.45rem;color:#c45050;cursor:pointer;display:inline-flex;align-items:center;gap:.45rem;transition:transform .2s;}
.like-btn:active{transform:scale(.88);}
.heart-icon{transition:color .2s,transform .2s;}
.like-label{opacity:0;visibility:hidden;font-size:.98rem;color:#c45050;margin-right:.4rem;min-width:62px;transition:opacity .28s,visibility .28s;white-space:nowrap;}
.like-btn:hover .like-label,.like-btn.liked .like-label,.like-btn:focus .like-label{opacity:1;visibility:visible;animation:appear .32s;}
@keyframes appear{from{opacity:0;}to{opacity:1;}}
.like-btn.liked .heart-icon,.like-btn:hover .heart-icon{color:#bb2222;}
.like-btn.liked .heart-icon{animation:heartpop .3s;}
@keyframes heartpop{0%{transform:scale(.8);}60%{transform:scale(1.25);}100%{transform:scale(1);}}

.pagination .page-link{color:#a67c00;border:1px solid #e2d5a6;}
.pagination .active .page-link{background:#d3b85e;border-color:#d3b85e;color:#fff;}
.tab-btn {
  margin: 0 6px;
  padding: 6px 16px;
  font-size: 1rem;
  border-radius: 25px;
  border: 1px solid #d3b85e;
  color: #3e3e3e;
  background-color: transparent;
  transition: all 0.25s ease;
}

.tab-btn:hover {
  background-color: #bb1c2d;
  border-color: #bb1c2d;
  color: #fff;
  text-decoration: none;
}

.tab-btn.active {
  background-color: #bb1c2d;
  border-color: #bb1c2d;
  color: white !important;
}

@media (max-width: 576px) {
  .tab-btn {
    margin: 4px 4px;
    font-size: 0.95rem;
    padding: 6px 12px;
  }
}

/* Mobile */
@media(max-width:767.98px){
  .prayer-entry{padding-bottom:.7rem;}
  .prayer-row-main{display:block;}
  .prayer-author{display:none;}
  .prayer-text{text-align:left;font-size:1rem;padding:.5rem .2rem .4rem .2rem;}
  .prayer-likebox{display:none;}
  .prayer-bottom-row{display:flex!important;width:100%;justify-content:space-between;align-items:center;margin-top:-2px;padding:0 .1rem;}
  .prayer-author-mobile{font-size:.93rem;color:#888;text-align:left;}
  .like-btn{font-size:1.32rem;}
  .like-label{margin-right:.35rem;font-size:.97rem;}
  .prayer-date{text-align:left;font-size:.94rem;margin-bottom:.2rem;}
}

.like-count{font-size:.95rem;}


 .hero-img img   {max-width:100%;height:auto;border:1px solid #d3b85e;border-radius:12px;}
    .hero-text h2   {font-size:clamp(2.2rem,4vw,3rem);margin:.3rem 0 .1rem;}
    .hero-text h3   {font-size:clamp(1.9rem,3.3vw,2.5rem);color:#bb1c2d;margin-bottom:1rem;}
    .hero-btn       {display:inline-block;padding:12px 30px;font-size:1.25rem;border-radius:30px;
                     background:#bb1c2d;color:#fff;text-decoration:none;}
    .hero-btn:hover {background:#9a1625;}
    .intent-list    {list-style:none;margin:18px 0 6px 0;padding-left:0;font-size:1.12rem;}
    .intent-list li::before{content:"• ";color:#78602d;padding-right:4px;}
    .intent-link    {font-size:1.05rem;color:#207ac4;}
    .intent-link:hover{text-decoration:underline;}

    .saints-outer {
      position: relative;
      height: 130px;
    }
    .saints-outer::before,
    .saints-outer::after {
      content: '';
      position: absolute;
      top: 0;
      height: 100%;
      width: 60px;
      pointer-events: none;
      z-index: 2;
    }
    .saints-outer::before {
      left: 0;
      background: linear-gradient(to right, #fffcf3 0%, rgba(255,252,243,0) 100%);
    }
    .saints-outer::after {
      right: 0;
      background: linear-gradient(to left, #fffcf3 0%, rgba(255,252,243,0) 100%);
    }

    .saints-wrapper {
      overflow-x: auto;
      white-space: nowrap;
      padding: 0 75px 26px 60px;
      scroll-behavior: auto;
    }
    .saints-wrapper::-webkit-scrollbar {
      display: none;
    }

    .saint-item {
      display: inline-block;
      width: 150px;
      margin-right: 30px;
      text-align: center;
      cursor: pointer;
    }
    .saint-item img {
      width: 90px;
      height: 90px;
      object-fit: cover;
      border-radius: 50%;
      border: 2px solid #d3b85e;
      background: #fffefc;
    }
    .saint-name {
      font-size: 1rem;
      margin-top: 8px;
      color: #78602d;
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }


    #candlesGrid{
      margin-bottom: 100px;
      margin-left: 0;
      margin-right: 0;
    }
    .candle-item {
      height: 140px;
      border: 1px solid #d3b85e;
      border-radius: 12px;
      background: #fffefc;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      color: #78602d;
      cursor: pointer;
      transition: box-shadow .25s;
    }
    .candle-item.candle-lit:hover {
      box-shadow: 0 0 12px rgba(187,28,45,.35);
    }
    .candle-empty {
      background: #f6eee0;
      color: #bb1c2d;
      font-weight: 600;
    }

    @media(max-width:991.98px){
      .saint-item{width:120px;margin-right:24px;}
      .candles-grid{grid-template-columns:repeat(2,1fr);}
    }


    /* --- сетка --- */
.grid-holder{display:block;position: relative; min-height: 300px; padding: 0 !important;}

.grid-holder .candle{transform:scale(.53);transform-origin:bottom center}

@media (max-width: 1024px) and (min-width: 768px) {
  .grid-holder {min-height: 350px;}
}

@media (max-width: 767px) {
  .grid-holder{min-height:300px;}.grid-holder:nth-child(1),.grid-holder:nth-child(2){height:200px;}
}

/* --- Свеча (светлый градиент) --- */
.candle{--h:300px;position:absolute;width:150px;height:var(--h);border-radius:150px/40px;
        background:linear-gradient(#fff7c8 0%,#ffe7a0 25%,#ffd67d 55%,#f7b34e 100%);
        box-shadow:inset 6px -12px 25px rgba(0,0,0,.15),inset -6px 12px 20px rgba(255,255,255,.45);
        bottom: 0; cursor: pointer;}
.candle:before{content:"";position:absolute;top:0;width:100%;height:40px;border-radius:50%;
               background:radial-gradient(#fffbe2 0%,#f9dfa5 80%);box-shadow:inset 0 3px 6px rgba(0,0,0,.12)}
.candle:after{content:"";position:absolute;top:14px;left:50%;transform:translateX(-50%);
              width:38px;height:12px;border-radius:50%;background:radial-gradient(rgba(0,0,0,.3),transparent 60%)}
.candle.small{--h:200px}.candle.medium{--h:300px}.candle.large{--h:400px}

.flame {
  position: absolute;
  bottom: 100%; left: 50%;
  width: 24px; height: 120px;
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  border-radius: 50% 50% 22% 22%;
  background: linear-gradient(white 60%, rgba(255,180,0,0) 100%);
  will-change: transform;                /* GPU-акселерация */
  z-index: 2;
}
.flame::before {                         /* лёгкое свечение */
  content:""; position:absolute; inset:0; border-radius:inherit;
  box-shadow: 0 0 14px rgba(255,190,50,.7), 0 -4px 3px rgba(255,240,160,.8);
}

.thread {
  position:absolute; bottom:100%; left:50%; transform:translate(-50%,6px);
  width:4px; height:26px; border-radius:2px;
  background:linear-gradient(#e8d9c5 0%, #756556 60%, #1d120c 100%);
  z-index:3;
  cursor: pointer;
}

.glow {                                  /* объёмное сияние */
  position:absolute; bottom:100%; left:50%;
  transform:translate(-50%,10px);
  width:80px; height:160px; border-radius:50%;
  background:rgba(255,190,60,.45); filter:blur(50px);
  cursor: pointer;
  z-index:1;
}

/* незажжённая свеча */
.candle.unlit .flame, .candle.unlit .glow { display:none; }

.candle-wrapper{
    position: absolute;
    bottom: 50px;
    width: 100%;
    display: flex;
    justify-content: center;
}
/* подпись */
.candle-caption{
    position: absolute;
    font-size: 14px;
    line-height: 1.2;
    z-index: 99;
    text-align: center;
    bottom: -40px;
}
.candle-name{
  font-family:'Cardo',serif;
  line-height: 3;
  color: #fff1cf;
}
.candle-time{
  color:#555;
}
.extend-link{
  color:#d29500;
  text-decoration:none;
}
.extend-link:hover{
  text-decoration:underline;
}
.ignite-btn{
  font-family:'Cardo',serif;
  padding:4px 10px;
}


/* =========================================================
   NEWS / ARTICLE CARDS (список новостей)
   ========================================================= */
.news-card {
  display: flex;
  align-items: flex-start;
  border: 1px solid #bb1c2d;
  border-radius: 10px;
  background: #fffefc;
  padding: 14px 18px;
  height: 100%;
  transition: box-shadow .25s, transform .15s;
}
.news-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
  transform: translateY(-2px);
}
.news-img {
  flex: 0 0 95px;
  max-width: 95px;
  margin-right: 17px;
}
.news-img img {
  width: 95px;
  height: 95px;
  object-fit: contain;
  border-radius: 6px;
  border: 2px solid #d3b85e;
  background: #fffcf3;
}
.news-body { flex: 1 1 auto; }
.news-title {
  font-family: 'Cardo', serif;
  font-size: 1.15rem;
  color: #bb1c2d;
  margin: 0 0 .35rem 0;
  line-height: 1.25;
}
.news-excerpt {
  font-size: 1rem;
  color: #4a4a4a;
  margin-bottom: 0;
}
.news-meta {
  font-size: 0.95rem;
  color: #999;
}
.news-noimg .news-body { margin-left: 0; }
.news-noimg .news-excerpt { margin-top: .25rem; }

@media(max-width: 576px) {
  .news-card { flex-direction: column; padding: 12px; }
  .news-img { margin: 0 0 10px 0; width: 100%; max-width: none; }
  .news-img img { width: 100%; height: auto; }
}


/* =========================================================
   ARTICLE PAGE  (чтение статьи)
   ========================================================= */
.article-content p,
.article-content ul,
.article-content ol {
  font-size: 1.15rem;
  line-height: 1.75;
  color: #2e2e2e;
  margin-bottom: 1.1rem;
}
.article-content h2,
.article-content h3 {
  margin: 1.8rem 0 .9rem;
  color: #bb1c2d;
  font-family: 'Cardo', serif;
}
.article-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.2rem auto;
  border: 1px solid #d3b85e;
  border-radius: 12px;
}


/* =========================================================
   BOTTOM BANNER  (Lighting a Candle / Submit Request)
   ========================================================= */
.article-banner {
  border: 1px solid #d3b85e;
  border-radius: 12px;
  background: #fffefc;
  overflow: hidden;
  transition: box-shadow .25s;
}
.article-banner:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}
.article-banner-inner {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}
.banner-img {
  flex: 0 0 50%;
  text-align: center;
  padding-top: 10px;
}
.banner-img img {
  max-height: 180px;
  width: auto;
  object-fit: contain;
}
.banner-body {
  flex: 0 0 50%;
  padding: 18px;
  text-align: center;
}
.banner-body h3 {
  font-family: 'Cardo', serif;
  font-size: 21px;
  color: #bb1c2d;
  margin-bottom: 5px;
}
.banner-btn {
  display: inline-block;
  padding: 10px 26px;
  border: 1px solid #bb1c2d;
  border-radius: 25px;
  background: #bb1c2d;
  color: #fff;
  font-size: 1.1rem;
  transition: background .2s, border .2s;
  text-decoration: none;
}
.banner-btn:hover {
  background: #9a1625;
  border-color: #9a1625;
  color: #fff;
}
@media(max-width: 768px) {
  .banner-img,
  .banner-body { flex: 0 0 100%; }
  .banner-img { padding-bottom: 0; }
}


/* =========================================================
   SHARE BUTTONS (Top + Bottom of article)
   ========================================================= */
.share-buttons {
  gap: 10px;
}
.share-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 1rem;
  border-radius: 50%;
  background: #e5e5e5;
  color: #333;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}
.share-buttons a:hover {
  background: #bb1c2d;
  color: #fff;
  transform: scale(1.05);
}

.share-facebook  { background: #3b5998; color: #fff; }
.share-x         { background: #000;     color: #fff; }
.share-whatsapp  { background: #25D366; color: #fff; }
.share-linkedin  { background: #0077b5; color: #fff; }
.share-telegram  { background: #0088cc; color: #fff; }

/* ARTICLE META (дата, автор, просмотры) */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.95rem;
  color: #666;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* SHARE BUTTONS FIXED (в статье) */
.share-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-left: auto;
}

.lnk_banner_non_border{
  text-decoration: none !important;
  color: #bb1c2d !important;
}

.lnk_banner{
  text-decoration: none !important;
  color: #bb1c2d;
  border-bottom: 1px solid transparent !important;
}

.lnk_banner:hover{
  border-bottom: 1px solid #bb1c2d !important;
}

figcaption{
    text-align: center;
    background: #ececec;
}


/* ——— Блокировка фоновой страницы, чтобы не появлялся второй скролл ——— */
html.modal-open,
body.modal-open {
  height: 100dvh;           /* 100 % высоты с учётом динамического safe-area */
  overflow: hidden !important;
  position: fixed !important;
  width: 100vw;
  touch-action: none !important;
}

/* ——— Полупрозрачный фон ——— */
#lightCandleOverlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 30, 30, .44);
  z-index: 1999;
  touch-action: none;
}

/* ——— Сам «sheet» ——— */
#lightCandleSheet {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100dvh;           /* гарантируем ровно один вьюпорт */
  min-height: -webkit-fill-available;
  background: #fff;
  z-index: 2000;
  box-shadow: 0 10px 32px rgba(0, 0, 0, .09);
  animation: sheetDrop .34s cubic-bezier(.62, .2, .17, 1.04);
  overscroll-behavior: none;
}

/* Анимация появления */
@keyframes sheetDrop {
  from { transform: translateY(-16%); opacity: .7; }
  to   { transform: none;              opacity: 1; }
}

/* ——— Шапка ——— */
.sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2vh 5vw 1vh;
  min-height: 60px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
  position: sticky; top: 0; z-index: 2;
}
.sheet-header img {
  max-height: 44px;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.13));
}
.sheet-close {
  margin-left: 18px;
  font-size: 1.07rem;
  color: #aaa;
  cursor: pointer;
  user-select: none;
  opacity: .5;
  transition: opacity .2s, color .2s;
}
.sheet-close:hover { opacity: .93; color: #b01c2d; }

/* ——— ЕДИНСТВЕННЫЙ скролл ——— */
.sheet-scroll {
  flex: 1 1 0;              /* занимает всё доступное, но не расталкивает footer */
  overflow-y: auto;
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
  padding-bottom: calc(100px + env(safe-area-inset-bottom)); /* под фиксированный футер */
  min-height: 0;            /* критично для корректного flex-скролла */
}

/* ——— Форма ——— */
.sheet-form {
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.45vh;
  padding: 10px;
}

/* Поля */
.sheet-form .form-group { display: flex; flex-direction: column; margin-bottom: 0 !important;}
.sheet-form .form-group label {
  margin-bottom: 4px !important;
  font-size: 1.03rem;
  font-weight: 500;
  color: #2d2d2d;
}
.sheet-form .form-group input,
.sheet-form .form-group select,
.sheet-form .form-group textarea {
  width: 100%;
  font-size: 1rem;
  line-height: 1.2;
  padding: 0 12px;
  min-height: 44px;
  box-sizing: border-box;
  border: 1px solid #d1d1d1;
  border-radius: 7px;
  background: #fafafd;
  transition: border .16s;
  appearance: none;
  -webkit-appearance: none;
}
.sheet-form .form-group textarea {
  resize: none;
  padding-top: 10px;
  padding-bottom: 10px;
  min-height: 88px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: #c5a100;
  outline: none;
}
.form-group select {
  padding-right: 38px;
  background: #fafafd url('data:image/svg+xml;utf8,<svg fill="gray" height="16" width="16" xmlns="http://www.w3.org/2000/svg"><polygon points="0,0 16,0 8,8" /></svg>') no-repeat right 12px center / 16px 16px;
}

/* Чекбоксы */
#lightCandleSheet .form-check {
  display: flex;
  align-items: center;
  font-size: 1rem;
  padding-left: 0 !important;
}
#lightCandleSheet .form-check input[type="checkbox"] {
  width: 18px; height: 18px;
  border-radius: 4px;
  accent-color: #e5be3d;
}
#lightCandleSheet .form-check label { cursor: pointer; margin-top: 8px; margin-left: 5px;}

/* Цена */
.price-line {
  margin: .6rem 0 1rem;
  text-align: center;
  font-size: 1.13rem;
  font-weight: 600;
  color: #644900;
}

/* ——— Футер (фиксирован) ——— */
.sheet-footer {
  position: fixed; left: 0; right: 0; bottom: 0;
  display: flex; justify-content: center;
  width: 100vw;
  padding: 1.2rem 0 1.6rem;
  background: #fff;
  border-top: 1px solid #f3e7c3;
  box-shadow: 0 -2px 10px rgba(224,200,70,.03);
  z-index: 2200;
}
#submitCandle {
  width: 100%;
  max-width: 410px;
  margin: 0 20px;
  padding: 13px 0;
  font-size: 1.13rem;
  font-weight: 700;
  color: #2d2d2d;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: linear-gradient(90deg, #e5be3d 70%, #e5cf3d 100%);
  box-shadow: 0 2px 10px rgba(224,200,70,.07);
  transition: background .2s, box-shadow .18s, color .18s;
}
#submitCandle:hover { background: #c7a308; color: #fff; }

/* ——— MEDIA ——— */
@media (max-width: 600px) {
  .sheet-header { min-height: 54px; padding: 1.2vh 4vw 1vh; }
  #submitCandle { max-width: none; margin: 10px; }
  .sheet-footer { padding: 10px;}
}

@media (min-width: 601px) and (max-width: 1024px) {
  /* На планшетах скролл точно один: высота всё та же 100dvh */
}

#submitCandle.at-bottom {
  background: linear-gradient(90deg,#c7a308 0%,#e5be3d 100%);
  color:#fff;
  box-shadow:0 0 12px rgba(199,163,8,.4);
}

#text_error{
    color: #bb1c2d;
}