/*
Theme Name: DailyNet
Author: genrytop
Author URI: mailto:genrytop@gmail.com
Description: Новостная тема DailyNet для WordPress. Автор и поддержка: genrytop@gmail.com.
Version: 1.1.5
License: GPLv2 or later
Text Domain: dailynet
*/

@font-face {
    font-family: "Titillium Web";
    src: url("assets/fonts/TitilliumWeb/TitilliumWeb-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Titillium Web";
    src: url("assets/fonts/TitilliumWeb/TitilliumWeb-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Titillium Web";
    src: url("assets/fonts/TitilliumWeb/TitilliumWeb-Bold.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Titillium Web";
    src: url("assets/fonts/TitilliumWeb/TitilliumWeb-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

.screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.screen-reader-text:focus {
    width: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

.dailynet-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

.dailynet-card-link:hover,
.dailynet-card-link:focus {
    color: inherit;
    text-decoration: none;
}

/* Footer social icons configured in Appearance -> DailyNet Settings. */
nav.soc li a .social-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    vertical-align: middle;
    fill: currentColor;
    opacity: .75;
    transition: opacity .25s ease;
}

nav.soc li a:hover .social-icon {
    opacity: 1;
}

@media (max-width: 575.98px) {
    nav.soc li a .social-icon {
        width: 18px;
        height: 18px;
    }
}

/* Mobile header: keep logo, menu button and search in separate columns. */
@media (max-width: 991.98px) {
    header.top-line {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
    }

    header.top-line .logo {
        position: relative;
        left: auto;
        grid-column: 1;
        grid-row: 1;
        display: flex;
        align-items: center;
        min-width: 0;
        max-width: 100%;
        height: 65px;
        padding: 0 8px 0 12px;
        overflow: hidden;
        line-height: normal;
        white-space: nowrap;
        text-overflow: ellipsis;
        z-index: 2;
    }

    header.top-line .logo img {
        display: block;
        width: auto !important;
        max-width: 100% !important;
        height: auto !important;
        max-height: 44px !important;
        object-fit: contain;
        object-position: left center;
    }

    header.top-line .mobile-menu-button {
        position: relative;
        grid-column: 2;
        grid-row: 1;
        display: block;
        padding: 0 10px;
        z-index: 3;
    }

    header.top-line .search-wrap {
        position: static;
        grid-column: 3;
        grid-row: 1;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        min-width: 48px;
        height: 65px;
    }

    header.top-line .search-wrap .search {
        position: relative;
        top: auto;
        right: auto;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 48px;
        height: 65px;
        padding: 0;
        line-height: 1;
        z-index: 3;
    }

    header.top-line .search-wrap .search-field {
        left: 0;
        right: 0;
        top: 65px;
        width: 100%;
    }

    /* The cloned mobile navigation already sits below the header. The legacy
       .ispage .top-menu offset moved its contents by another 65px, leaving the
       last item outside the dark menu background. */
    body.ispage .mobile-menu .top-menu,
    .mobile-menu .top-menu {
        position: static;
        top: auto;
        margin: 0;
    }

    .mobile-menu {
        max-height: calc(100vh - 65px);
        max-height: calc(100dvh - 65px);
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 575.98px) {
    header.top-line .logo {
        padding-left: 10px;
    }

    header.top-line .logo img {
        max-height: 38px !important;
    }

    header.top-line .mobile-menu-button {
        padding-right: 6px;
        padding-left: 6px;
        font-size: 15px;
    }
}


/* -----------------------------------------------------------
   WordPress tweaks (comments instead of Disqus)
   ----------------------------------------------------------- */

#comments.comments {
    padding: 20px 0;
}

#comments .comments-title,
#comments .comment-reply-title {
    font-size: 21px;
    font-weight: 800;
    margin: 0 0 15px;
}

#comments .comment-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

#comments .comment-list .comment {
    border-bottom: 1px solid #eee;
    padding: 15px 0;
}

#comments .comment-list .comment:last-child {
    border-bottom: none;
}

#comments .comment-body {
    display: block;
}

#comments .comment-author {
    font-weight: 700;
}

#comments .comment-author .avatar {
    border-radius: 50%;
    margin-right: 10px;
}

#comments .comment-metadata {
    font-size: 12px;
    opacity: .8;
    margin-top: 4px;
}

#comments .comment-content {
    margin-top: 10px;
}

#comments .comment-content p:last-child {
    margin-bottom: 0;
}

#comments .reply {
    margin-top: 8px;
}

#comments a.comment-reply-link,
#comments a#cancel-comment-reply-link {
    color: #ec1c1c;
    text-decoration: none;
}

#comments a.comment-reply-link:hover,
#comments a#cancel-comment-reply-link:hover {
    text-decoration: underline;
}

#comments .comment-respond {
    margin-top: 20px;
}

#comments .comment-form p {
    margin-bottom: 10px;
}

#comments .comment-form input[type="text"],
#comments .comment-form input[type="email"],
#comments .comment-form input[type="url"],
#comments .comment-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

#comments .comment-form textarea {
    min-height: 140px;
}

#comments .comment-form .submit {
    background: #ec1c1c;
    color: #fff;
    border: 0;
    padding: 10px 18px;
    border-radius: 4px;
    cursor: pointer;
}

#comments .comment-form .submit:hover {
    opacity: .9;
}

/* Compact comments preview on single post pages. */
#comments .geektop-comments {
    --comments-accent: var(--geektop-accent, #ec1c1c);
    --comments-link: var(--geektop-link, #ec1c1c);
    padding-top: 18px;
}

#comments .geektop-comments-heading {
    border-bottom: 1px solid #e8e8e8;
    margin-bottom: 34px;
}

#comments .geektop-comments-heading .comments-title {
    display: inline-block;
    margin: 0 0 -1px;
    padding: 0 6px 11px;
    border-bottom: 2px solid var(--comments-accent);
    color: #555;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

#comments .geektop-comments-preview,
#comments .geektop-comments-full {
    max-width: 930px;
}

#comments .geektop-comment-card {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    margin: 0 0 18px;
}

#comments .geektop-comment-preview.is-reply {
    margin-left: 84px;
}

#comments .geektop-comment-avatar {
    flex: 0 0 64px;
}

#comments .geektop-comment-avatar img {
    display: block;
    width: 64px;
    height: 64px;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #d8d8d8;
}

#comments .geektop-comment-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 16px 20px 14px;
    border-left: 3px solid var(--comments-accent);
    background: #f6f6f6;
}

#comments .geektop-comment-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 8px;
}

#comments .geektop-comment-author,
#comments .geektop-comment-author a {
    color: var(--comments-link);
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
}

#comments .geektop-comment-date {
    color: #999;
    font-size: 12px;
    text-decoration: none;
}

#comments .geektop-comment-date:hover {
    color: var(--comments-link);
}

#comments .geektop-comment-text {
    color: #6d6d6d;
    font-size: 16px;
    line-height: 1.6;
}

#comments .geektop-comment-text p {
    margin: 0 0 8px;
}

#comments .geektop-comment-actions {
    margin-top: 8px;
}

#comments .geektop-comment-actions a,
#comments .geektop-preview-reply {
    padding: 0;
    border: 0;
    background: transparent;
    color: #999;
    font: inherit;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
}

#comments .geektop-comment-actions a:hover,
#comments .geektop-preview-reply:hover {
    color: var(--comments-link);
}

#comments .geektop-comments-toggle-wrap {
    margin: 8px 0 26px;
    text-align: center;
}

#comments .geektop-comments-toggle {
    min-width: 280px;
    padding: 11px 24px;
    border: 1px solid var(--comments-accent);
    border-radius: 3px;
    background: var(--comments-accent);
    box-shadow: 0 2px 5px rgba(0, 0, 0, .16);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
}

#comments .geektop-comments-toggle:hover,
#comments .geektop-comments-toggle:focus {
    opacity: .9;
    color: #fff;
}

#comments .geektop-comments-full[hidden],
#comments .geektop-comments-preview[hidden] {
    display: none !important;
}

#comments .geektop-comments-full .comment-list,
#comments .geektop-comments-full .children {
    list-style: none;
    margin: 0;
    padding: 0;
}

#comments .geektop-comments-full .children {
    margin-left: 82px;
}

#comments .geektop-comments-full .comment {
    padding: 0;
    border: 0;
}

#comments .geektop-comment-awaiting {
    margin: 0 0 8px;
    color: var(--comments-accent);
    font-size: 13px;
}

#comments .comment-respond {
    padding-top: 16px;
    border-top: 1px solid #e8e8e8;
}

#comments .comment-form .submit {
    background: var(--comments-accent);
}

@media (max-width: 767.98px) {
    #comments .geektop-comments-heading {
        margin-bottom: 24px;
    }

    #comments .geektop-comment-card {
        gap: 12px;
    }

    #comments .geektop-comment-avatar {
        flex-basis: 46px;
    }

    #comments .geektop-comment-avatar img {
        width: 46px;
        height: 46px;
    }

    #comments .geektop-comment-main {
        padding: 13px 14px 11px;
    }

    #comments .geektop-comment-preview.is-reply,
    #comments .geektop-comments-full .children {
        margin-left: 28px;
    }

    #comments .geektop-comments-toggle {
        width: 100%;
        min-width: 0;
    }
}



/* Customizer color overrides are printed inline in <head> (see functions.php). */



/* --- Fix sidebar "Последние статьи" layout --- */
.main-aside .latest-box .lb-list,
.main-aside .latest-box .lb-item,
.main-aside .latest-box .lb-body{
  background: none !important;
}

.main-aside .latest-box .lb-item{
  position: relative;
  display: block;
  overflow: hidden; /* contain any floats from main.min.css */
  margin: 0 0 18px;
  padding: 0 0 14px;
}

.main-aside .latest-box .lb-catname{
  display: inline-block;
  position: static !important;
  margin: 0 0 8px;
  text-decoration: none;
}

.main-aside .latest-box .lb-body{
  display: block;
  clear: both;
}

.main-aside .latest-box .lb-item-header{
  display: block;
  margin: 0 0 8px;
  line-height: 1.25;
}

.main-aside .latest-box .lb-footer{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-aside .latest-box .item-comments{
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.main-aside .latest-box .item-comments a{
  display: inline-block;
}


/* Sidebar latest posts: category blocks layout like original */
.main-aside .latest-box .lb-list{
  margin: 0;
  padding: 0;
}
.main-aside .latest-box .lb-item{
  display: flex !important;
  align-items: stretch;
  /* tighter vertical rhythm between sidebar items (match original) */
  margin: 0 !important;
  padding: 0 !important;
  background: #fff !important;
  overflow: hidden;
  border-bottom: 8px solid transparent; /* subtle separation without big gaps */
}
.main-aside .latest-box .lb-catname{
  flex: 0 0 150px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  background: #f1f1f1;
  color: #777 !important;
  font-weight: 700;
  text-decoration: none !important;
}
.main-aside .latest-box .lb-body{
  flex: 1 1 auto;
  padding: 6px 12px;
  background: #fff;
}
.main-aside .latest-box .lb-item-header{
  display: inline-block;
  color: #111 !important;
  text-decoration: underline;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 4px !important;
}

/* Keep footer meta compact like original */
.main-aside .latest-box .lb-footer{
  gap: 6px;
  flex-wrap: nowrap;
}
.main-aside .latest-box .lb-footer .item-comments,
.main-aside .latest-box .lb-footer .item-comments a,
.main-aside .latest-box .lb-footer .item-comments .date{
  color: #9a9a9a !important;
  text-decoration: none !important;
  font-size: 13px;
}

/* Hover state (red block like in original screenshot) */
.main-aside .latest-box .lb-item:hover .lb-catname{
  background: #ec1c1c;
  color: #fff !important;
}
.main-aside .latest-box .lb-item:hover .lb-item-header{
  color: #ec1c1c !important;
  text-decoration: underline !important;
}


/* === Sidebar "Последние статьи" — fixed height & compact layout (like original) === */
.main-aside .latest-box .lb-list .lb-item{
  display:flex !important;
  align-items:stretch !important;
  margin:0 0 10px 0 !important;
  height:92px !important;
  min-height:92px !important;
}

.main-aside .latest-box .lb-list .lb-item .lb-catname{
  flex:0 0 150px !important;
  width:150px !important;
  min-width:0 !important;
  margin:0 !important;
  padding:0 10px !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  text-align:center !important;
  font-size:var(--geektop-cat-font-size, 16px) !important;
  line-height:1.15 !important;
  overflow:hidden !important;
  overflow-wrap:anywhere;
  word-break:normal;
  hyphens:auto;
  text-wrap:balance;
  background:#f2f2f2 !important;
  color:#8a8a8a !important;
  font-weight:700 !important;
  text-decoration:none !important;
}

.main-aside .latest-box .lb-list .lb-item .lb-body{
  flex:1 1 auto !important;
  padding:12px 12px !important;
  display:flex !important;
  flex-direction:column !important;
  justify-content:space-between !important;
  background:#ffffff !important;
}

.main-aside .latest-box .lb-list .lb-item .lb-item-header{
  margin:0 !important;
  line-height:1.2 !important;
  font-weight:700 !important;
  display:-webkit-box !important;
  -webkit-box-orient:vertical !important;
  -webkit-line-clamp:2 !important;
  overflow:hidden !important;
  text-decoration:underline !important; /* как в оригинале у заголовков */
}

.main-aside .latest-box .lb-list .lb-item .lb-footer{
  margin:6px 0 0 0 !important;
}

.main-aside .latest-box .lb-list .lb-item .item-comments{
  white-space:nowrap !important;
  line-height:1.1 !important;
}

/* Hover state (red highlight like original screenshot) */
.main-aside .latest-box .lb-list .lb-item:hover .lb-catname{
  background:#ec1c1c !important;
  color:#fff !important;
  text-decoration:underline !important;
}

.main-aside .latest-box .lb-list .lb-item:hover .lb-item-header{
  color:#ec1c1c !important;
  text-decoration:underline !important;
}
