/* Fast preloader reset and Laravel-specific tweaks */
:root {
    --gd-accent-color: #f9e498;
    --gd-accent-hover-color: #f0dc85;
}

.site-preloader { transition: height 0.35s ease; }
.site-preloader .loader-logo {
    width: min(280px, 72vw);
    height: auto;
    display: block;
}
.gd-auth-card .form-control { border-radius: 0; }
.gd-auth-card .invalid-feedback,
.gd-auth-card .text-danger { font-size: 0.875rem; }
.gd-page-content img { max-width: 100%; height: auto; }

.gd-page-content .gd-post-figure {
    margin: 1rem 0;
}

.gd-page-content .gd-post-figure img {
    margin: 0;
    display: block;
}

.gd-page-content .gd-post-figure__caption {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.875rem;
    line-height: 1.45;
    color: #6b7280;
}

/* Disable custom cursor and extra nav effects */
body.gd-plain-nav .dl-cursor { display: none !important; pointer-events: none !important; visibility: hidden !important; }
body.gd-plain-nav header.main-header .nav-menu > li > a,
body.gd-plain-nav .sticky-header-wrap .nav-menu > li > a {
    transition: none !important;
}
body.gd-plain-nav header.main-header .nav-menu > li > a:hover,
body.gd-plain-nav header.main-header .nav-menu ul a:hover,
body.gd-plain-nav .sticky-header-wrap .nav-menu > li > a:hover,
body.gd-plain-nav .sticky-header-wrap .nav-menu ul a:hover {
    transform: none !important;
    letter-spacing: inherit !important;
}
body.gd-plain-nav header.main-header .nav-menu > li > a span,
body.gd-plain-nav .sticky-header-wrap .nav-menu > li > a span {
    transition: none !important;
    display: inline !important;
}
.theme-toggle { display: none !important; }

/* Верхняя полоса Trending: длинные заголовки — одна строка + … (полный текст в title у ссылки) */
.top-header-inner .top-left {
    min-width: 0;
}

.ticker-wrap {
    min-width: 0;
    width: 100%;
}

.ticker-slide-wrap {
    min-width: 0;
    flex: 1;
}

.ticker-slider {
    max-width: none;
    width: 100%;
}

.ticker-slider .swiper-slide {
    min-width: 0;
    box-sizing: border-box;
}

.ticker-slider .swiper-slide a {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 30px;
}

/* Top Stories: без крупной первой карточки — все строки компактные */
.gd-top-stories-widget .widget-post-item:first-child {
    display: grid;
    grid-template-columns: 100px 1fr;
    align-items: center;
    grid-gap: 15px;
}
.gd-top-stories-widget .widget-post-item:first-child .widget-post-thumb a {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 0;
}
.gd-top-stories-widget .widget-post-item:first-child .widget-post-content h3 {
    font-size: 18px;
    line-height: 22px;
}

/* Sidebar / compact lists: post titles max 2 lines */
.widget-post-content h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    line-height: 1.35;
}
.widget-category-list li a::before {
    background: rgba(0, 0, 0, 0.42) !important;
    opacity: 1 !important;
}
.widget-category-list li a {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
}
.gd-category-title {
    font-size: clamp(1.9rem, 2.8vw, 2.6rem);
    line-height: 1.15;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Ad slots & placeholders (AdSense etc.) */
.gd-banner-leaderboard-wrap {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 0.75rem 0;
    background: #fafafa;
}
.gd-banner-leaderboard-wrap .gd-banner-slot {
    max-width: 970px;
    margin-left: auto;
    margin-right: auto;
}
/* Полноширинные полосы (под меню и над футером) */
.gd-banner-leaderboard-wrap--full-bleed {
    width: 100%;
    max-width: none;
    margin: 0;
    box-sizing: border-box;
}
.gd-banner-leaderboard-wrap--full-bleed .gd-banner-slot {
    max-width: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
}
.gd-banner-slot--header_leaderboard .gd-ad-placeholder,
.gd-banner-slot--footer_leaderboard .gd-ad-placeholder {
    min-height: 90px;
    max-width: 728px;
    margin-left: auto;
    margin-right: auto;
}
.gd-banner-leaderboard-wrap--full-bleed .gd-banner-slot--header_leaderboard .gd-ad-placeholder,
.gd-banner-leaderboard-wrap--full-bleed .gd-banner-slot--footer_leaderboard .gd-ad-placeholder {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    border-radius: 0;
}
.gd-banner-leaderboard-wrap--full-bleed .gd-banner-embed {
    width: 100%;
}
.gd-banner-leaderboard-wrap--full-bleed .gd-banner-embed iframe,
.gd-banner-leaderboard-wrap--full-bleed .gd-banner-embed ins {
    max-width: 100% !important;
}
.gd-banner-slot--sidebar_above_categories .gd-ad-placeholder {
    min-height: 250px;
}
.gd-banner-slot--in_content .gd-ad-placeholder {
    min-height: 200px;
    margin: 1.5rem 0;
}
.gd-banner-slot--category_feed_card .gd-ad-placeholder {
    min-height: 360px;
    height: 100%;
}
.gd-category-feed-ad {
    height: 100%;
}
.gd-category-feed-ad .gd-banner-slot,
.gd-category-feed-ad .gd-banner-embed,
.gd-category-feed-ad .gd-ad-placeholder {
    height: 100%;
}
.gd-category-feed-ad .gd-banner-embed {
    display: flex;
    align-items: stretch;
    justify-content: center;
}
.gd-ad-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1rem 1.25rem;
    border: 2px dashed rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: linear-gradient(145deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #4b5563;
    font-size: 0.8125rem;
    text-align: center;
}
.gd-ad-placeholder__tag {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
}
.gd-ad-placeholder__label {
    font-weight: 600;
    color: #374151;
}
.gd-ad-placeholder__hint {
    font-size: 0.75rem;
    color: #6b7280;
}
.gd-banner-embed {
    text-align: center;
}
.gd-banner-embed iframe,
.gd-banner-embed ins {
    max-width: 100% !important;
}

/* Статья: полноэкранный hero с обложкой и заголовком */
.gd-post-hero {
    position: relative;
    isolation: isolate;
    min-height: 100svh;
    min-height: 100vh;
    overflow: hidden;
    background: #1a1a1a;
}
.gd-post-hero--no-image {
    background: linear-gradient(165deg, #252525 0%, #121212 100%);
}
.gd-post-hero__media {
    position: absolute;
    left: 0;
    right: 0;
    top: -12%;
    height: 124%;
    z-index: 0;
    will-change: transform;
}
.gd-post-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
@media (prefers-reduced-motion: reduce) {
    .gd-post-hero__media {
        top: 0;
        height: 100%;
        transform: none !important;
        will-change: auto;
    }
}
.gd-post-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: rgba(0, 0, 0, 0.52);
}
.gd-post-hero__layout {
    position: relative;
    z-index: 2;
    min-height: 100svh;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.gd-post-hero__title-wrap {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(5rem, 12vw, 7rem) clamp(1.25rem, 5vw, 2rem) clamp(1.5rem, 4vw, 2rem);
    text-align: center;
}
.gd-post-hero__title {
    margin: 0;
    max-width: 52rem;
    color: #fff;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-size: clamp(1.85rem, 4.2vw + 0.5rem, 3.15rem);
    text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
}
.gd-post-hero__meta-bar {
    flex-shrink: 0;
    width: 100%;
    max-width: 32rem;
    margin: 0 auto;
    padding: 0 1.25rem clamp(1.35rem, 4vw, 2rem);
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.9375rem;
    line-height: 1.45;
    text-shadow: 0 1px 14px rgba(0, 0, 0, 0.45);
}
.gd-post-hero__meta-line {
    margin: 0;
}
.gd-post-hero__meta-line + .gd-post-hero__meta-line {
    margin-top: 0.3rem;
}
.gd-post-hero__meta-line--author {
    margin-top: 0.55rem;
    padding-top: 0.55rem;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}
.gd-post-hero__meta-line--muted {
    opacity: 0.82;
    font-size: 0.875rem;
}
.gd-post-content--flush-top {
    padding-top: 0.15rem;
}

/* Studio /dashboard/profile — live preview (same structure as public author page) */
.gd-studio-preview-frame {
    margin-top: 1.5rem;
    border: 2px solid #d4cfae;
    background: #f5f2e8;
    padding: 0.75rem 0.75rem 0;
}
@media (min-width: 640px) {
    .gd-studio-preview-frame {
        margin-top: 2rem;
        padding: 1rem 1rem 0;
    }
}
.gd-studio-preview-frame__label {
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #525252;
}
.gd-studio-author-preview {
    --dl-heading-color: #000;
    --dl-body-color: #202124;
    margin-bottom: 0;
}
.gd-studio-author-preview .gd-studio-author-container {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}
/* В Studio не подключается main.css: нужен непрозрачный фон до Alpine и без обложки */
.gd-studio-author-preview .page-content-wrap {
    background-color: #e5e2d8;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    width: 100%;
    min-height: 320px;
    padding: 80px 50px 100px;
    border-radius: 0;
    position: relative;
    overflow: hidden;
    border: 1px solid #c9c2b4;
}
/* Пустой фон: явная заглушка вместо «пустого» или чужого превью */
.gd-studio-author-preview .page-content-wrap.is-cover-empty {
    background-color: #e5e2d8;
    background-image: linear-gradient(
        160deg,
        rgba(249, 228, 152, 0.5) 0%,
        rgba(232, 228, 204, 0.95) 45%,
        #d4cfc4 100%
    );
}
.gd-studio-author-preview .page-content-wrap .gd-studio-cover-empty-layer {
    position: absolute;
    inset: 14px;
    z-index: 0;
    pointer-events: none;
    border: 2px dashed #9c9588;
    border-radius: 2px;
    background: rgba(253, 250, 240, 0.35);
    background-image: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.035) 10px,
        rgba(0, 0, 0, 0.035) 20px
    );
}
.gd-studio-author-preview .gd-studio-preview-text {
    position: relative;
    z-index: 1;
}
.gd-studio-author-preview .gd-studio-cover-hint {
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #4a4740;
    line-height: 1.45;
}
/* Аватар не загружен */
.gd-studio-author-preview .author-thumb .gd-studio-avatar-placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    background: linear-gradient(160deg, #faf6eb 0%, #ebe4d4 100%);
    border: 2px dashed #9c9588;
    box-sizing: border-box;
    color: #5c574c;
}
.gd-studio-author-preview .author-thumb .gd-studio-avatar-placeholder svg {
    width: 2.25rem;
    height: 2.25rem;
    opacity: 0.55;
}
.gd-studio-author-preview .author-thumb .gd-studio-avatar-placeholder .gd-studio-avatar-placeholder-letter {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.02em;
}
/* Мини-превью в форме */
.gd-studio-form-cover-empty {
    display: flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    font-size: 0.875rem;
    line-height: 1.4;
    color: #525252;
    background: #e8e4dc !important;
    border: 2px dashed #b8b3a8 !important;
}
.gd-studio-form-avatar-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.125rem;
    background: linear-gradient(160deg, #faf6eb, #ebe4d4) !important;
    border: 2px dashed #b8b3a8 !important;
    color: #5c574c;
}
.gd-studio-form-avatar-empty svg {
    width: 1.75rem;
    height: 1.75rem;
    opacity: 0.5;
}
.gd-studio-form-avatar-empty .gd-studio-avatar-placeholder-letter {
    font-size: 1.25rem;
    font-weight: 600;
}
@media (max-width: 767px) {
    .gd-studio-author-preview .page-content-wrap {
        padding: 80px 40px 100px;
    }
}
.gd-studio-author-preview.page-header .page-content {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}
@media (min-width: 993px) {
    .gd-studio-author-preview.page-header .page-content {
        max-width: 50%;
    }
}
.gd-studio-author-preview.page-header .page-content h4 {
    font-size: 16px;
    font-weight: 400;
    letter-spacing: 0;
    color: var(--dl-heading-color);
}
.gd-studio-author-preview.page-header .page-content h2 {
    font-size: clamp(1.75rem, 4vw, 2.625rem);
    font-weight: 400;
    letter-spacing: 0;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.1;
    color: var(--dl-heading-color);
}
.gd-studio-author-preview.page-header .page-content p {
    color: var(--dl-body-color);
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
}
.gd-studio-author-preview.author-page .author-thumb {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    position: absolute;
    left: 50%;
    bottom: calc(-150px / 2);
    transform: translateX(-50%);
    overflow: hidden;
    isolation: isolate;
}
.gd-studio-author-preview.author-page .author-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.gd-studio-author-meta {
    max-width: 1140px;
    margin-left: auto;
    margin-right: auto;
    padding: 100px 15px 40px;
}
@media (max-width: 992px) {
    .gd-studio-author-meta {
        padding-top: 80px;
    }
}
@media (max-width: 767px) {
    .gd-studio-author-meta {
        padding-top: 60px;
    }
}
.gd-studio-author-meta .author-page-info {
    text-align: center;
    width: 100%;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}
.gd-studio-author-meta .author-page-info p {
    margin-bottom: 0;
    color: var(--dl-body-color);
    font-size: 17px;
    line-height: 1.65;
    white-space: pre-line;
}
.gd-studio-profile-field-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e8e4cc;
    background: #fdfaf0;
    color: #404040;
}

/* Заголовок страницы: без фоновой текстуры (перекрывает main.css и тёмную тему) */
.page-header .page-content-wrap {
    background-image: none !important;
    background-color: transparent;
}
[data-theme="dark"] .page-header .page-content-wrap {
    background-image: none !important;
    background-color: transparent;
}

/* У страницы авторов: без лишнего зазора между шапкой блока и плиткой */
.main-post-area.gd-main-post-area--tight-top.padding {
    padding-top: 0;
}

/* Список авторов /authors — плитка, круглые аватары */
.gd-authors-grid {
    --gd-authors-avatar: 96px;
}
.gd-authors-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
    padding: 1.5rem 1rem;
    border: 1px solid #e8e4dc;
    background: #fdfaf5;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.gd-authors-tile:hover {
    border-color: #c4bdab;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    color: inherit;
}
.gd-authors-tile__avatar {
    width: var(--gd-authors-avatar);
    height: var(--gd-authors-avatar);
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    margin-bottom: 1rem;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gd-authors-tile__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.gd-authors-tile__initial {
    font-size: clamp(1.75rem, 5vw, 2.25rem);
    font-weight: 700;
    line-height: 1;
    color: #ffffff;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: -0.02em;
    user-select: none;
}
.gd-authors-tile__name {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dl-heading-color, #1a1a1a);
    margin-bottom: 0.25rem;
}
.gd-authors-tile__username {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}
.gd-authors-tile__meta {
    font-size: 0.8125rem;
    color: #7a7568;
    margin-bottom: 0.5rem;
}
.gd-authors-tile__bio {
    font-size: 0.8125rem;
    line-height: 1.45;
    color: var(--dl-body-color, #4a4740);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Футер Vixto: «On this site» и «Information» — одинаковая колонка ссылок (.footer-links) */
.footer-widget .footer-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-widget .footer-links a {
    color: var(--dl-body-color);
    position: relative;
    line-height: 1;
}

.footer-widget .footer-links a:not(:last-child) {
    margin-bottom: 10px;
}

.footer-widget .footer-links a:hover {
    color: var(--dl-heading-color);
}

.footer-widget .footer-links a::before {
    background-color: var(--dl-body-color);
    content: "";
    width: 0%;
    height: 1px;
    position: absolute;
    left: 0;
    bottom: 3px;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.5, 1, 0.89, 1);
}

.footer-widget .footer-links a:hover::before {
    width: 100%;
    visibility: visible;
    opacity: 1;
    transition: all 0.5s cubic-bezier(0.5, 1, 0.89, 1);
}

/* Header nav: extra items only for mobile menu clone */
.gd-mobile-only-nav-item {
    display: none !important;
}
@media (max-width: 991px) {
    .mobile-navigation-menu .gd-mobile-only-nav-item {
        display: list-item !important;
    }
    .mobile-navigation-menu .gd-mobile-nav-cta > a {
        background-color: #f9e498;
        color: var(--dl-heading-color, #1a1a1a) !important;
        font-weight: 700;
    }
    .mobile-navigation-menu .gd-mobile-nav-cta > a:hover {
        background-color: #f0dc85;
    }
}

/* 404: site background + readable text */
.page-header.error-page {
    position: relative;
    isolation: isolate;
    background-image: url("/images/background.png");
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    min-height: 500px;
}

.page-header.error-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

.page-header.error-page > .container {
    position: relative;
    z-index: 1;
}
