/*
Theme Name: Dahadaev Official
Version: 8.0
*/
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');

* { box-sizing: border-box; }

/* === ОСНОВНЫЕ СТИЛИ И ФИКСАЦИЯ ШАПКИ === */
body { 
    margin: 0; 
    padding: 0; 
    font-family: 'Roboto', sans-serif; 
    background-color: #f4f6f9; 
    color: #333; 
    padding-top: 115px; /* Отступ для фиксированной шапки */
    overflow-x: hidden; /* Предотвращает горизонтальную прокрутку */
}
.container { max-width: 1350px; margin: 0 auto; padding: 0 15px; }

.fixed-header-wrapper { position: fixed; top: 0; left: 0; width: 100%; z-index: 9999; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,0.08); transition: top 0.3s ease; }
body.admin-bar .fixed-header-wrapper { top: 32px; }
@media (max-width: 782px) { body.admin-bar .fixed-header-wrapper { top: 46px; } }

/* === ВЕРХНЯЯ ПАНЕЛЬ === */
.top-bar { background: #00508c; color: #fff; padding: 10px 0; font-size: 13px; }
.top-bar-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.top-bar-left { display: flex; align-items: center; font-weight: 500; font-size: 14px; }
.top-logo { height: 35px; width: auto; margin-right: 15px; }
.top-bar-right { display: flex; align-items: center; gap: 25px; }
.lk-link { color: #fff; text-decoration: none; transition: opacity 0.2s; }
.lk-link:hover { opacity: 0.8; }
.bvi-default-wrapper a { color: #fff !important; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.bvi-default-wrapper a:hover { opacity: 0.8; }

/* === ГЛАВНОЕ МЕНЮ И ВЫПАДАЮЩИЕ СПИСКИ === */
.main-navigation { border-bottom: 1px solid #eaeaea; }
.nav-container-flex { display: flex; justify-content: space-between; align-items: center; }
.main-menu-horizontal { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; flex-grow: 1; transition: max-height 0.3s ease; }
.main-menu-horizontal > li { position: relative; }
.main-menu-horizontal > li > a { display: block; padding: 16px 14px; color: #333; text-decoration: none; font-size: 12px; text-transform: uppercase; font-weight: 700; transition: all 0.2s ease; position: relative; }
.main-menu-horizontal > li:hover > a { color: #00508c; background: #f8f9fa; }
.main-menu-horizontal li.menu-item-has-children > a { padding-right: 25px; }
.main-menu-horizontal li.menu-item-has-children > a::after { content: "\f107"; font-family: "Font Awesome 6 Free"; font-weight: 900; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font-size: 12px; color: #888; transition: transform 0.2s; }
.main-menu-horizontal li.menu-item-has-children:hover > a::after { color: #00508c; transform: translateY(-50%) rotate(180deg); }
.main-menu-horizontal > li.is-wrapped-item { display: none; }
.main-menu-horizontal.menu-expanded > li.is-wrapped-item { display: block; }
.menu-toggle-btn { background: transparent; border: none; color: #00508c; padding: 16px 14px; font-weight: 700; font-size: 12px; text-transform: uppercase; cursor: pointer; display: none; align-items: center; gap: 6px; transition: all 0.2s; white-space: nowrap; margin-left: 10px; font-family: 'Roboto', sans-serif; }
.menu-toggle-btn:hover { background: #f8f9fa; color: #003d6a; }
.main-menu-horizontal .sub-menu { display: none; position: absolute; top: 100%; left: 0; background: #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.1); padding: 0; margin: 0; list-style: none; min-width: 260px; z-index: 999; border-radius: 0 0 4px 4px; border: 1px solid #eee; border-top: 2px solid #00508c; }
.main-menu-horizontal li:hover > .sub-menu { display: block; }
.main-menu-horizontal .sub-menu li { border-bottom: 1px solid #f4f4f4; }
.main-menu-horizontal .sub-menu li:last-child { border-bottom: none; }
.main-menu-horizontal .sub-menu li a { display: block; padding: 12px 20px; color: #444; text-decoration: none; font-size: 13px; font-weight: 400; transition: background 0.2s, color 0.2s; text-transform: none; }
.main-menu-horizontal .sub-menu li a:hover { background: #00508c; color: #fff; }

/* === БАННЕР С ГЛАВОЙ === */
.hero { background: #6c757d url('img/landscape.jpg') no-repeat center center; background-size: cover; height: 280px; position: relative; display: flex; align-items: flex-end; z-index: 10; }
.hero-inner { max-width: 1350px; width: 100%; margin: 0 auto; padding: 0 15px; position: relative; display: flex; align-items: flex-end; }
.hero-glava-img { max-height: 250px; width: auto; display: block; position: relative; margin-right: 20px; bottom: -1px; z-index: 2; }
.hero-text { background: rgba(0,0,0,0.6); display: inline-block; padding: 15px 25px; color: white; border-left: 5px solid #ffc107; border-radius: 0 4px 4px 0; backdrop-filter: blur(2px); margin-bottom: 30px; z-index: 2; }
.hero-text h1 { margin: 0 0 5px 0; font-size: 20px; font-weight: 700; }
.hero-text p { margin: 0; font-size: 14px; opacity: 0.9; }

/* === ОСНОВНОЙ КОНТЕНТ (СЕТКА) === */
.main-grid { display: grid; grid-template-columns: 3fr 1fr; gap: 30px; margin-top: 40px; align-items: start; }
.section-title { display: flex; justify-content: space-between; align-items: center; border-bottom: 2px solid #eaeaea; padding-bottom: 10px; margin-bottom: 20px; }
.section-title h2 { margin: 0; font-size: 18px; text-transform: uppercase; color: #222; }
.section-title a { color: #777; text-decoration: none; font-size: 12px; }

/* === НОВОСТИ НА ГЛАВНОЙ === */
.news-main { background: #fff; border: 1px solid #eee; display: flex; margin-bottom: 25px; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.02); min-height: 200px; }
.news-main-img { width: 50%; min-height: 200px; color: white; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.news-badge { font-size: 12px; background: #fff; color: #006eb7; padding: 4px 8px; border-radius: 3px; font-weight: bold; }
.news-main-text { width: 50%; padding: 30px; display: flex; flex-direction: column; justify-content: center; }
.news-main-text h3 { margin: 0 0 15px 0; font-size: 18px; line-height: 1.4; }
.news-main-text h3 a { color: #111; text-decoration: none; transition: color 0.2s; }
.news-main-text h3 a:hover { color: #00508c; }
.news-main-text p { font-size: 13px; color: #555; margin-bottom: 15px; line-height: 1.5; }
.news-date { font-size: 12px; color: #888; display: block; margin-top: auto; }
.news-subgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.news-card { background: #fff; border: 1px solid #eee; border-radius: 6px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.02); display: flex; flex-direction: column; }
.news-card img { width: 100%; height: 160px; object-fit: cover; display: block; }
.news-card-body { padding: 15px; display: flex; flex-direction: column; flex-grow: 1; }
.news-card-body h4 { margin: 0 0 10px 0; font-size: 14px; line-height: 1.4; }
.news-card-body h4 a { color: #222; text-decoration: none; transition: color 0.2s; }
.news-card-body h4 a:hover { color: #00508c; }
.news-card-body .news-date { margin-top: auto; }

/* === ИКОНКИ ВНИЗУ (ПЛИТКИ ПО 3 В РЯД) === */
.icons-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-bottom: 40px; }
.icon-box { background: #fff; border: 1px solid #e2e6ea; padding: 30px 15px; border-radius: 10px; text-align: center; text-decoration: none; color: #004a80; display: flex; flex-direction: column; align-items: center; justify-content: center; transition: all 0.3s ease; }
.icon-box:hover { background: #004a80; color: white; transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,74,128,0.15); border-color: #004a80; }
.icon-box i { font-size: 36px; margin-bottom: 15px; }
.icon-box span { font-size: 13px; font-weight: bold; text-transform: uppercase; line-height: 1.4; }

/* === САЙДБАР (ПРАВАЯ КОЛОНКА) === */
.sidebar { padding: 0; }
.sidebar-widgets-container { width: 100%; }
.widget-box { background: #fff; padding: 25px 20px; border-radius: 10px; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border-top: 4px solid #00508c; }
.widget-box:last-child { margin-bottom: 0; }
.widget-title { font-size: 15px; margin: 0 0 20px 0; color: #00508c; border-bottom: 1px solid #eee; padding-bottom: 10px; text-align: center; font-weight: 700; text-transform: uppercase; }
.widget-box ul { list-style: none; padding: 0; margin: 0; }
.widget-box ul li { border-bottom: 1px solid #f4f4f4; padding: 8px 0; }
.widget-box ul li:last-child { border-bottom: none; padding-bottom: 0; }
.widget-box ul li a { text-decoration: none; color: #444; font-size: 13px; transition: color 0.3s; display: flex; align-items: center; }
.widget-box ul li a::before { content: "\f105"; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-right: 8px; color: #00508c; font-size: 12px; }
.widget-box ul li a:hover { color: #00508c; }
.widget-box img { max-width: 100%; height: auto; display: block; border-radius: 6px; margin: 0 auto; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }

/* === ОФОРМЛЕНИЕ ВНУТРЕННИХ СТРАНИЦ И НОВОСТЕЙ === */
.content-wrapper { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); border-top: 4px solid #00508c; margin-bottom: 30px; }
.content-title { margin-top: 0; color: #111; font-size: 32px; line-height: 1.3; margin-bottom: 25px; font-weight: 700; }
.post-meta-top { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid #eaeaea; color: #666; font-size: 13px; font-weight: 500; }
.post-author-meta { display: flex; align-items: center; gap: 10px; color: #111; font-weight: 700; }
.author-avatar { border-radius: 50%; border: 2px solid #eaeaea; }
.post-date-meta i, .post-cat-meta i { color: #00508c; margin-right: 5px; }
.post-cat-meta a { color: #666; text-decoration: none; transition: color 0.2s; }
.post-cat-meta a:hover { color: #00508c; }
.post-thumbnail { margin-bottom: 35px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
.post-thumbnail img { width: 100%; height: auto; display: block; }

/* Типографика текста статьи */
.the-content { font-size: 17px; color: #333; line-height: 1.8; }
.the-content p { margin-bottom: 25px; }
.the-content h2 { font-size: 24px; color: #00508c; margin: 40px 0 20px; font-weight: 700; }
.the-content h3 { font-size: 20px; color: #111; margin: 30px 0 15px; font-weight: 700; }
.the-content ul, .the-content ol { margin-bottom: 25px; padding-left: 20px; }
.the-content li { margin-bottom: 10px; }
.the-content a { color: #00508c; text-decoration: underline; text-underline-offset: 4px; transition: color 0.2s; font-weight: 500; }
.the-content a:hover { color: #ff9900; }
.the-content blockquote { border-left: 4px solid #00508c; margin: 30px 0; padding: 20px 25px; font-style: italic; color: #555; background: #f4f6f9; border-radius: 0 8px 8px 0; font-size: 18px; line-height: 1.6; }

/* === ГАЛЕРЕИ И КАРТИНКИ (ИСПРАВЛЕНИЕ СЕТКИ) === */
.the-content p { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; justify-content: flex-start; } /* Заставляет картинки в абзаце выстраиваться в ряд */
.the-content img { max-width: 100%; height: auto; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin: 0; }
img.aligncenter, .aligncenter img, .wp-block-image .aligncenter { display: block; margin: 20px auto; }
img.alignleft, .alignleft img { float: left; margin: 10px 20px 20px 0; }
img.alignright, .alignright img { float: right; margin: 10px 0 20px 20px; }
.gallery { display: flex; flex-wrap: wrap; justify-content: center; gap: 15px; margin-bottom: 30px; }
.gallery-item { margin: 0; text-align: center; }
.gallery-icon img { margin: 0; display: block; }
.gallery-caption { font-size: 12px; color: #777; padding-top: 8px; }

/* === ПОДВАЛ СТАТЬИ И КОММЕНТАРИИ === */
.post-footer-meta { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eaeaea; gap: 15px; }
.post-tags a { background: #f0f2f5; color: #555; text-decoration: none; padding: 6px 12px; border-radius: 4px; font-size: 12px; margin-right: 5px; transition: all 0.2s; font-weight: bold; }
.post-tags a:hover { background: #00508c; color: #fff; }
.post-tags i { color: #888; margin-right: 5px; }
.like-placeholder { background: #fff5f5; color: #d9534f; padding: 10px 20px; border-radius: 30px; font-size: 13px; font-weight: 700; border: 1px solid #fadbd8; }
.like-placeholder i { margin-right: 5px; }
.author-box { display: flex; align-items: center; gap: 20px; background: #f9f9f9; padding: 25px; border-radius: 10px; margin-top: 30px; border-left: 4px solid #ffc107; }
.author-box-avatar img { border-radius: 50%; box-shadow: 0 4px 10px rgba(0,0,0,0.1); width: 80px; height: 80px; }
.author-box-info h4 { margin: 0 0 5px 0; font-size: 18px; color: #111; }
.author-box-info p { margin: 0; font-size: 14px; color: #666; line-height: 1.5; }
.comments-wrapper { background: #fff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.04); margin-bottom: 40px; }
.comments-title, .comment-reply-title { font-size: 22px; color: #111; margin-top: 0; margin-bottom: 25px; font-weight: 700; border-bottom: 2px solid #eaeaea; padding-bottom: 10px; }
.comment-list { list-style: none; padding: 0; margin: 0; }
.comment-list li { margin-bottom: 30px; }
.comment-body { display: flex; gap: 20px; background: #f9f9f9; padding: 25px; border-radius: 8px; position: relative; }
.comment-author img { border-radius: 50%; width: 50px; height: 50px; }
.comment-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.comment-meta .fn { font-weight: 700; color: #111; font-style: normal; font-size: 15px; }
.comment-metadata a { color: #888; font-size: 12px; text-decoration: none; }
.comment-content { font-size: 14px; color: #444; line-height: 1.6; }
.comment-content p { margin-bottom: 10px; }
.reply a { display: inline-block; margin-top: 10px; background: #00508c; color: #fff; text-decoration: none; font-size: 11px; text-transform: uppercase; padding: 5px 12px; border-radius: 4px; font-weight: bold; transition: background 0.2s; }
.reply a:hover { background: #ff9900; }
.children { padding-left: 40px; list-style: none; margin-top: 30px; border-left: 2px solid #eaeaea; }
.comment-respond { margin-top: 40px; }
.comment-form-comment label, .comment-form-author label, .comment-form-email label, .comment-form-url label { display: block; font-size: 13px; font-weight: 600; color: #555; margin-bottom: 5px; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { width: 100%; padding: 12px 15px; border: 1px solid #ddd; border-radius: 6px; background: #fff; font-family: inherit; font-size: 14px; transition: border-color 0.3s; }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: #00508c; box-shadow: 0 0 0 3px rgba(0,80,140,0.1); }
.comment-form textarea { height: 120px; resize: vertical; }
.form-submit input[type="submit"] { background: #00508c; color: #fff; border: none; padding: 12px 25px; font-size: 14px; font-weight: 700; text-transform: uppercase; border-radius: 6px; cursor: pointer; transition: background 0.3s; }
.form-submit input[type="submit"]:hover { background: #ff9900; }

/* === КНОПКИ ПОДЕЛИТЬСЯ === */
.post-share-block { display: flex; align-items: center; gap: 15px; margin-top: 15px; background: #f9f9f9; padding: 15px 20px; border-radius: 8px; border-left: 4px solid #00508c; }
.share-title { font-size: 14px; font-weight: 700; color: #333; text-transform: uppercase; }
.share-buttons { display: flex; gap: 10px; }
.share-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; font-size: 16px; text-decoration: none; transition: all 0.3s ease; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.share-btn:hover { transform: translateY(-3px); box-shadow: 0 5px 12px rgba(0,0,0,0.2); color: #fff; }
.share-vk { background: #0077FF; }
.share-tg { background: #229ED9; }
.share-ok { background: #EE8208; }
.share-wa { background: #25D366; }

/* === АВТОМАТИЧЕСКАЯ БЕГУЩАЯ СТРОКА (КАРУСЕЛЬ) === */
.carousel-container { width: 100%; overflow: hidden; padding: 25px 0; margin-top: 40px; margin-bottom: 40px; border-top: 1px solid #e2e6ea; border-bottom: 1px solid #e2e6ea; background: #fff; position: relative; }
.carousel-track { display: flex; align-items: center; gap: 50px; width: max-content; animation: scroll-carousel 25s linear infinite; }
.carousel-track:hover { animation-play-state: paused; }
.carousel-track a { flex-shrink: 0; display: block; }
.carousel-track img { max-height: 45px; width: auto; opacity: 0.7; transition: opacity 0.3s ease; filter: grayscale(100%); }
.carousel-track a:hover img { opacity: 1; filter: grayscale(0%); }
@keyframes scroll-carousel { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-50% - 25px)); } }

/* === ПОДВАЛ (FOOTER) === */
.site-footer { 
    background: #003d6a; 
    color: #fff; 
    padding: 50px 0 20px; 
    font-size: 13px; 
    margin-top: 0; 
    width: 100vw; /* ЖЕСТКАЯ ШИРИНА НА ВЕСЬ ЭКРАН */
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; margin-bottom: 30px; }
.footer-col h4 { margin: 0 0 10px 0; font-size: 15px; font-weight: 700; line-height: 1.4; color: #fff; }
.footer-col h5 { margin: 0 0 15px 0; font-size: 14px; text-transform: uppercase; color: #99c2ff; border-bottom: 1px solid rgba(255,255,255,0.1); padding-bottom: 8px; }
.footer-logo { max-height: 50px; margin-bottom: 15px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col ul li { margin-bottom: 12px; display: flex; align-items: flex-start; gap: 10px; color: #d0e1f9; line-height: 1.4; }
.footer-col ul li i { margin-top: 3px; color: #99c2ff; font-size: 14px; }
.footer-col a { color: #d0e1f9; text-decoration: none; transition: color 0.2s; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.copyright { color: #88b0df; margin-bottom: 10px; }
.age-limit { border: 1px solid #88b0df; display: inline-flex; align-items: center; justify-content: center; padding: 2px 8px; border-radius: 4px; color: #88b0df; font-size: 12px; font-weight: bold; margin-top: 5px; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: rgba(255,255,255,0.1); border-radius: 50%; color: #fff; font-size: 18px; transition: all 0.3s ease; }
.footer-socials a:hover { background: #006eb7; transform: translateY(-3px); box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.cookie-notice { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; text-align: center; color: #88b0df; font-size: 11px; line-height: 1.6; }
.cookie-notice a { color: #99c2ff; text-decoration: underline; }
@media (max-width: 992px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .footer-grid { grid-template-columns: 1fr; } .footer-col { margin-bottom: 20px; } }

/* === ОФОРМЛЕНИЕ ЛАЙТБОКСА С ГАЛЕРЕЕЙ === */
.custom-lightbox {
    display: none; 
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 15, 30, 0.92); /* Более темный фон для контраста */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    flex-direction: column;
}

.custom-lightbox img {
    max-width: 85vw; /* Занимает 85% ширины экрана */
    max-height: 85vh; /* Занимает 85% высоты экрана */
    object-fit: contain; /* ВАЖНО: Картинка никогда не будет срезана! */
    box-shadow: 0 10px 40px rgba(0,0,0,0.6);
    border-radius: 4px;
    animation: fadeInPhoto 0.3s ease-out;
    user-select: none;
}

/* Кнопка закрытия (Крестик) */
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
    z-index: 10;
}

/* Кнопки переключения (Влево / Вправо) */
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    padding: 20px;
    user-select: none;
    transition: 0.2s;
    z-index: 10;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    color: #ff9900;
}

/* Счетчик фотографий (1 / 10) */
.lightbox-counter {
    position: absolute;
    bottom: 25px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 2px;
}

/* Анимация плавного появления */
@keyframes fadeInPhoto {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Адаптация для телефонов */
@media (max-width: 768px) {
    .lightbox-prev, .lightbox-next { padding: 10px; font-size: 35px; }
    .lightbox-prev { left: 5px; }
    .lightbox-next { right: 5px; }
    .custom-lightbox img { max-width: 100vw; max-height: 80vh; border-radius: 0; }
}