/* UI tweaks (loaded after style_1.css) */

.fh5co_tagg {
    padding: 5px 7px !important;
    margin-right: 6px !important;
    margin-top: 4px !important;
    margin-bottom: 4px !important;
    font-size: 12px !important;
    line-height: 1.2 !important;
}

.agilog_card_title {
    margin: 0 !important;
    line-height: 1.15 !important;
    font-size: 18px !important;
    font-weight: 500 !important;
}

.fh5co_magna {
    line-height: 1.15 !important;
}

.agilog_search {
    display: flex;
    gap: 10px;
    align-items: center;
}

.agilog_search input {
    flex: 1 1 auto;
    height: 46px;
    border: 1px solid #d7d7d7;
    border-radius: 10px;
    padding: 0 14px;
    outline: none;
    color: #111;
    background: #fff;
}

.agilog_search input:focus {
    border-color: var(--outline-selected-color);
}

.agilog_search button {
    height: 46px;
    padding: 0 18px;
    border-radius: 10px;
    border: 1px solid #111;
    background: #111;
    color: #fff;
    font-weight: 800;
}

.agilog_search_sm input,
.agilog_search_sm button {
    height: 40px;
    border-radius: 10px;
}

.agilog_header_actions label {
    margin-bottom: 0;
}

.agilog_social_links {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.agilog_social_icon {
    width: 40px;
    height: 40px;
    display: block;
}

.agilog_header_sep {
    opacity: 0.22;
    padding: 0 5px;
    user-select: none;
}

.agilog_social_icon_dzen {
    border-radius: 10px;
}

.agilog_nohero {
    width: 100%;
    height: 220px;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.agilog_nohero_sm {
    height: 200px;
}

.agilog_nohero_article {
    height: 420px;
}

.agilog_nohero_logo {
    width: 140px;
    height: auto;
    opacity: 0.9;
}

.btn_pagging_ellipsis {
    pointer-events: none;
}

.btn_pagging_active {
    background: var(--nav-active-bg) !important;
    color: #fff !important;
    border-color: var(--nav-active-bg) !important;
}

.btn_pagging:hover,
.btn_pagging:focus {
    background: var(--accent-color) !important;
    color: #fff !important;
}

/* Keep active pagination stable on hover */
.btn_pagging_active:hover,
.btn_pagging_active:focus {
    background: var(--nav-active-bg) !important;
    color: #fff !important;
}

/* Pagination "Назад/Вперёд" buttons - same hover style as numbers */
.btn_mange_pagging:hover,
.btn_mange_pagging:focus {
    background: var(--accent-color) !important;
    color: #fff !important;
    font-weight: 800;
}

/* Make whole article card clickable on index page */
.agilog_card_link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.agilog_card_link:hover {
    text-decoration: none;
}

.agilog_card_link:focus-visible {
    outline: 3px solid var(--outline-selected-color);
    outline-offset: 6px;
}

.agilog_card_link:hover .agilog_card_title {
    text-decoration: underline;
}

/* Settings page */
.agilog_settings_block {
    margin-top: 10px;
    background: var(--block-color);
    border: 1px solid var(--data-block-border-color);
    border-radius: 14px;
    padding: 16px;
}

.agilog_settings_row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-bottom: 1px solid var(--data-block-border-color);
}

.agilog_settings_row:last-child {
    border-bottom: none;
}

.agilog_settings_label {
    font-weight: 900;
    color: var(--text-color);
}

.agilog_settings_section_title {
    margin-top: 18px;
    font-weight: 900;
    color: var(--text-color);
}

.agilog_color_current {
    margin-top: 10px;
    border-radius: 12px;
    border: 1px solid var(--data-block-border-color);
    padding: 12px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    background: var(--data-block-color);
}

.agilog_color_current_swatch {
    width: 56px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.18);
    background: var(--accent-color);
}

html[data-theme="dark"] .agilog_color_current_swatch {
    border-color: rgba(255, 255, 255, 0.18);
}

.agilog_color_current_text {
    flex: 1 1 auto;
}

.agilog_color_current_title {
    font-weight: 900;
    color: var(--text-color);
}

.agilog_color_current_hex {
    opacity: 0.85;
    color: var(--text-color);
    font-weight: 800;
    margin-top: 2px;
}

.agilog_color_grid {
    margin-top: 12px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

@media (min-width: 768px) {
    .agilog_color_grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.agilog_settings_block {
    max-width: 980px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 992px) {
    .agilog_color_grid {
        grid-template-columns: repeat(8, minmax(0, 1fr));
    }
}

.agilog_color_cell {
    border: 1px solid rgba(0, 0, 0, 0.18);
    border-radius: 12px;
    padding: 10px 8px;
    background: #fff;
    color: #111;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    min-height: 52px;
    max-height: 60px;
    justify-content: center;
}

.agilog_color_cell:hover {
    transform: translateY(-1px);
}

.agilog_color_cell.is-selected {
    outline: 3px solid var(--outline-selected-color);
    outline-offset: 2px;
}

.agilog_color_name {
    font-weight: 900;
    font-size: 12px;
}

.agilog_color_hex {
    font-weight: 800;
    opacity: 0.85;
    font-size: 12px;
}

/* Footer rail (replaces footer_sub_tipik.png) */
.agilog_footer_rail {
    top: 60px;
    bottom: 20px;
    height: auto;
}

.agilog_footer_rail_line {
    position: absolute;
    left: 2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 999px;
}

.agilog_footer_rail_dot {
    position: absolute;
    left: -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-color);
    border: 1px solid var(--agilog-title-color);
}

.agilog_footer_rail_dot:nth-of-type(2) { top: 10px; }
.agilog_footer_rail_dot:nth-of-type(3) { top: 34%; }
.agilog_footer_rail_dot:nth-of-type(4) { top: 62%; }
.agilog_footer_rail_dot:nth-of-type(5) { bottom: 10px; }

html[data-theme="dark"] .agilog_footer_rail_dot {
    border-color: rgba(255, 255, 255, 0.55);
}

.agilog_social_links_footer {
    margin-top: 10px;
}

.agilog_settings_demo {
    margin-top: 16px;
    color: var(--text-color);
}

.agilog_settings_save_row {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
}

/* Reduce vertical spacing helpers (override Bootstrap) */
.py-3 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.py-2 {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.agilog_bottom_bar {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid #e8e8e8;
    flex-wrap: wrap;
}

.agilog_bottom_links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    font-weight: 800;
}

.agilog_bottom_links a {
    color: var(--link-color);
    text-decoration: none;
    opacity: 0.9;
}

.agilog_bottom_links a:hover {
    text-decoration: underline;
    opacity: 1;
}

.fh5co_hover_news_img:hover > .fh5co_news_img {
    top: 0 !important;
}

:root {
    --agilog_img_border_time: 8s;
    --agilog_img_border_path: 2px;
}

.fh5co_news_img {
    z-index: 0;
}

.fh5co_news_img > img,
.fh5co_news_img .agilog_nohero {
    transition: filter 180ms ease;
    will-change: filter;
}

.fh5co_hover_news_img:hover .fh5co_news_img > img,
.fh5co_hover_news_img:hover .fh5co_news_img .agilog_nohero {
    filter: brightness(0.88);
}

.agilog_card_link:hover .fh5co_news_img > img,
.agilog_card_link:hover .fh5co_news_img .agilog_nohero {
    filter: brightness(0.88);
}

.fh5co_news_img::before,
.fh5co_news_img::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    border: var(--agilog_img_border_path) solid var(--accent-color);
    pointer-events: none;
    opacity: 0;
    z-index: 2;
    -webkit-clip-path: inset(0 0 calc(100% - var(--agilog_img_border_path)) 0);
    clip-path: inset(0 0 calc(100% - var(--agilog_img_border_path)) 0);
}

.fh5co_hover_news_img:hover .fh5co_news_img::before {
    opacity: 1;
    animation: agilog_clip_border var(--agilog_img_border_time) linear infinite;
}

.fh5co_hover_news_img:hover .fh5co_news_img::after {
    opacity: 1;
    animation: agilog_clip_border var(--agilog_img_border_time) linear infinite;
    animation-delay: -4s;
}

.agilog_card_link:hover .fh5co_news_img::before {
    opacity: 1;
    animation: agilog_clip_border var(--agilog_img_border_time) linear infinite;
}

.agilog_card_link:hover .fh5co_news_img::after {
    opacity: 1;
    animation: agilog_clip_border var(--agilog_img_border_time) linear infinite;
    animation-delay: -4s;
}

@keyframes agilog_clip_border {
    0%,
    100% {
        -webkit-clip-path: inset(0 0 calc(100% - var(--agilog_img_border_path)) 0);
        clip-path: inset(0 0 calc(100% - var(--agilog_img_border_path)) 0);
    }
    25% {
        -webkit-clip-path: inset(0 calc(100% - var(--agilog_img_border_path)) 0 0);
        clip-path: inset(0 calc(100% - var(--agilog_img_border_path)) 0 0);
    }
    50% {
        -webkit-clip-path: inset(calc(100% - var(--agilog_img_border_path)) 0 0 0);
        clip-path: inset(calc(100% - var(--agilog_img_border_path)) 0 0 0);
    }
    75% {
        -webkit-clip-path: inset(0 0 0 calc(100% - var(--agilog_img_border_path)));
        clip-path: inset(0 0 0 calc(100% - var(--agilog_img_border_path)));
    }
}

.agilog_popular_item {
    display: flow-root;
    padding-bottom: 16px;
}

.agilog_popular_thumb {
    float: left;
    width: 92px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 12px 6px 0;
    display: block;
}

.agilog_popular_title {
    display: block;
    line-height: 1.25;
}

.agilog_popular_date {
    margin-top: 6px;
}

/* Owl Carousel navigation buttons - use accent color */
.owl-theme .owl-nav [class*='owl-']:hover {
    background: var(--accent-color) !important;
    color: #fff !important;
    text-decoration: none;
}

/* "Go to top" button - use accent color */
.gototop a {
    background: var(--accent-color) !important;
    color: white !important;
}

.gototop a:hover,
.gototop a:active,
.gototop a:focus {
    background: var(--accent-color) !important;
    opacity: 0.85;
    text-decoration: none;
    outline: none;
}

