/* =====================================================
   4UROK.RU  -  Образовательный Портал
   Main Stylesheet · v1.5.0
   Пропорции: infourok.ru  /  Цвета: новый логотип
   ===================================================== */

/* -- GOOGLE FONTS ----------------------------------- */
/* Fonts loaded via wp_enqueue_style in functions.php */

/* -- VARIABLES ---------------------------------------- */
:root {
    /* === Elegant Modern Palette (Anti-Infourok) === */
    --c-primary:        #6366f1;   /* Indigo 500 */
    --c-primary-dark:   #4338ca;   /* Indigo 700 */
    --c-primary-mid:    #a5b4fc;   /* Indigo 300 */
    --c-primary-light:  #e0e7ff;   /* Indigo 100 */
    --c-primary-xlight: #eef2ff;   /* Indigo 50 */
    
    --c-accent:         #f5901e;   /* Logo Orange */
    --c-accent-dark:    #d97a12;   /* Darker Orange */
    --c-accent-light:   #fef3c7;   /* Light Orange */
    --c-book-blue:      #fba240;   /* Secondary Orange */

    /* === Neutrals & Backgrounds === */
    --c-white:          #ffffff;
    --c-bg:             #f8fafc;   /* Slate 50 */
    --c-bg-alt:         #f1f5f9;   /* Slate 100 */
    --c-bg-card:        #ffffff;
    --c-border:         #e2e8f0;   /* Slate 200 */
    --c-border-light:   #f1f5f9;   /* Slate 100 */
    --c-text:           #0f172a;   /* Slate 900 */
    --c-text-sec:       #475569;   /* Slate 600 */
    --c-text-muted:     #94a3b8;   /* Slate 400 */

    /* === Modern Soft Shadows === */
    --sh-xs:    0 1px 2px rgba(15, 23, 42, 0.05);
    --sh-sm:    0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
    --sh-md:    0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
    --sh-lg:    0 20px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --sh-hover: 0 25px 35px -5px rgba(99, 102, 241, 0.15), 0 10px 10px -5px rgba(99, 102, 241, 0.05);
    --sh-card:  0 4px 20px rgba(15, 23, 42, 0.03);

    /* === Spacing === */
    --sp-1:4px; --sp-2:8px; --sp-3:12px; --sp-4:16px; --sp-5:20px;
    --sp-6:24px; --sp-8:32px; --sp-10:40px; --sp-12:48px; --sp-16:64px;

    /* === Highly Rounded Corners (Premium feel) === */
    --r-xs: 6px;
    --r-sm: 10px;    /* buttons */
    --r-md: 16px;    /* cards */
    --r-lg: 24px;    /* large blocks */
    --r-xl: 32px;
    --r-full: 9999px;

    /* === Typography === */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --fs-xs:  12px;
    --fs-sm:  14px;
    --fs-md:  15px;
    --fs-base:16px;
    --fs-lg:  18px;
    --fs-xl:  24px;
    --fs-2xl: 32px;
    --fs-3xl: 48px;

    /* === Layout === */
    --container:   1440px;
    --header-h:    80px;
    --sidebar-w:   280px;
    --card-radius: 16px;

    --tr:  .2s cubic-bezier(0.4, 0, 0.2, 1);
    --trs: .3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* -- RESET -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    font-size: var(--fs-base);
    color: var(--c-text);
    background: var(--c-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex; flex-direction: column;
    overflow-x: hidden;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; font-size: inherit; }

/* -- TYPOGRAPHY --------------------------------------- */
h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.25; color: var(--c-text); letter-spacing: -.02em; }
h1 { font-size: clamp(24px, 4vw, 40px); }
h2 { font-size: clamp(18px, 2.5vw, 26px); }
h3 { font-size: var(--fs-lg); }
p  { color: var(--c-text-sec); line-height: 1.7; }

/* -- CONTAINER ---------------------------------------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ======================================================
   BUTTONS  (infourok: h=40px, r=8px)
====================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 40px; padding: 0 20px;
    border-radius: var(--r-sm); font-size: var(--fs-md); font-weight: 600;
    cursor: pointer; transition: all var(--tr);
    border: 2px solid transparent; white-space: nowrap; text-decoration: none;
}
.btn--primary { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }
.btn--primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); color: #fff; box-shadow: var(--sh-sm); }
.btn--accent  { background: var(--c-accent);  color: #fff; border-color: var(--c-accent); }
.btn--accent:hover  { background: var(--c-accent-dark);  color: #fff; box-shadow: 0 4px 12px rgba(241,139,20,.35); }
.btn--secondary { background: transparent; color: var(--c-primary); border-color: var(--c-primary); }
.btn--secondary:hover { background: var(--c-primary-xlight); }
.btn--ghost { background: #f5f5f5; color: var(--c-text-sec); border-color: transparent; }
.btn--ghost:hover { background: #eee; color: var(--c-text); }
.btn--sm { height: 36px; padding: 0 14px; font-size: var(--fs-sm); }
.btn--lg { height: 52px; padding: 0 36px; font-size: var(--fs-lg); }

/* WPDM Tags Fix */
a.btn.btn-secondary.btn-xs[href*="document-tag"],
a.btn.btn-secondary.btn-xs[href*="wpdmtag"] {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ======================================================
   HEADER  (infourok: 64px fixed header)
====================================================== */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: #fff;
    border-bottom: 1px solid var(--c-border-light);
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow var(--tr);
}
body.admin-bar .site-header { top: 32px; }
@media screen and (max-width: 782px) {
    body.admin-bar .site-header { top: 46px; }
}
.site-header.is-scrolled { box-shadow: 0 4px 20px rgba(0,0,0,0.08); border-bottom: 1px solid var(--c-border-light); }

/* Цветная полоска  -  цвета логотипа */
.site-header::before {
    content: '';
    display: block;
    height: 3px;
    background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-book-blue) 50%, var(--c-accent) 100%);
}
.site-header__inner {
    display: flex; align-items: center; gap: var(--sp-5);
    height: var(--header-h);    /* 64px */
}

/* -- LOGO -------------------------------------------- */
.site-logo, .custom-logo-link { display: flex; align-items: center; flex-shrink: 0; text-decoration: none; height: 100%; }
.site-logo__svg { height: 56px !important; width: auto !important; }
.custom-logo-link img, .site-logo__img { 
    height: 56px !important; 
    max-height: calc(var(--header-h) - 16px) !important; 
    width: auto !important; 
    object-fit: contain;
}
.site-logo__beta {
    display: inline-block;
    margin-left: 12px; margin-top: -12px;
    background: transparent; border: 1.5px solid var(--c-primary); color: var(--c-primary);
    font-size: 10px; font-weight: 800;
    padding: 2px 6px; border-radius: 6px;
    letter-spacing: 0.05em; text-transform: uppercase;
}

/* -- HAMBURGER ---------------------------------------- */
.menu-toggle {
    display: none; flex-direction: column; gap: 5px;
    padding: 8px; border-radius: var(--r-sm); flex-shrink: 0;
}
.menu-toggle__bar {
    display: block; width: 22px; height: 2px;
    background: var(--c-text); border-radius: 2px; transition: all var(--tr);
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -- SITE NAV --------------------------------------- */
/* Menu starts near logo, grows to the right */
.site-nav { flex: 1; display: flex; justify-content: flex-start; align-items: center; }
.site-nav__list { 
    display: flex; 
    align-items: center; 
    gap: 4px; 
}
.site-nav__list > li { position: relative; }
.site-nav__list > li > a {
    display: flex; 
    align-items: center; 
    height: 40px;           /* Reduced from 64px fill to look like a pill */
    padding: 0 16px;
    font-size: var(--fs-md);
    font-weight: 500; 
    color: var(--c-text-sec);
    border-radius: var(--r-sm);
    white-space: nowrap; 
    transition: all var(--tr);
}
.site-nav__list > li > a:hover,
.site-nav__list > .current-menu-item > a,
.site-nav__list > .current-menu-ancestor > a { 
    color: var(--c-primary); 
    background: var(--c-primary-xlight);
}

/* dropdown */
.site-nav__list .sub-menu {
    position: absolute; top: 100%; left: 0; min-width: 200px; z-index: 500;
    background: #fff; border-radius: var(--r-md);
    box-shadow: var(--sh-lg); border: 1px solid var(--c-border-light);
    overflow: hidden; opacity: 0; pointer-events: none;
    transform: translateY(6px); transition: opacity var(--tr), transform var(--tr);
}
.site-nav__list > li:hover > .sub-menu { opacity: 1; pointer-events: all; transform: translateY(0); }
.site-nav__list .sub-menu a {
    display: block; padding: 10px 16px; font-size: var(--fs-sm);
    color: var(--c-text-sec); transition: all var(--tr);
}
.site-nav__list .sub-menu a:hover { color: var(--c-primary); background: var(--c-primary-xlight); }

/* -- MOBILE NAV --------------------------------------- */
.mobile-nav {
    position: fixed; top: 0; right: -100%;
    width: min(320px, 86vw); height: 100vh;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    z-index: 1100; overflow-y: auto;
    padding-top: var(--header-h); transition: right var(--trs);
}
.mobile-nav.is-open { right: 0; box-shadow: var(--sh-lg); }
.mobile-nav__inner { padding: var(--sp-5); }
.mobile-nav__list li { border-bottom: 1px solid var(--c-border-light); }
.mobile-nav__list a {
    display: flex; align-items: center; padding: 12px 0;
    font-size: var(--fs-md); color: var(--c-text); font-weight: 500; transition: color var(--tr);
}
.mobile-nav__list a:hover { color: var(--c-primary); }
.mobile-overlay {
    position: fixed; inset: 0; background: rgba(15, 23, 42, 0.4); 
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    z-index: 1099; opacity: 0; pointer-events: none; transition: opacity var(--trs);
}
.mobile-overlay.is-visible { opacity: 1; pointer-events: all; }

/* Mobile Search */
.mobile-search { display: flex; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.mobile-search__input {
    flex: 1; height: 44px; padding: 0 16px;
    border: 1.5px solid var(--c-border); border-radius: var(--r-full);
    outline: none; color: var(--c-text); transition: border-color var(--tr);
    min-width: 0;
}
.mobile-search__input:focus { border-color: var(--c-primary); }
.mobile-search__btn {
    width: 44px; height: 44px; background: var(--c-primary); color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* Search Dropdown */
.search-dropdown {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0;
    background: #fff; border-radius: var(--r-md);
    box-shadow: var(--sh-lg); overflow: hidden; display: none; z-index: 1051;
    border: 1px solid var(--c-border-light);
}
.search-dropdown.is-open { display: block; }
.search-dropdown__item {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: 10px 16px; cursor: pointer; transition: background var(--tr);
    text-decoration: none; color: var(--c-text);
}
.search-dropdown__item:hover { background: var(--c-bg); }
.search-dropdown__thumb {
    width: 48px; height: 36px; border-radius: var(--r-xs);
    flex-shrink: 0; background: var(--c-bg-alt); overflow: hidden;
}
.search-dropdown__thumb img { width: 100%; height: 100%; object-fit: cover; }
.search-dropdown__title { font-size: var(--fs-sm); font-weight: 500; }
.search-dropdown__title mark { background: rgba(12,79,123,.12); color: var(--c-primary); border-radius: 2px; }

/* ======================================================
   HERO  -  тёмно-синий из логотипа, поиск 720px/56px
====================================================== */
.hero {
    background: #072134;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    padding: 64px 0 80px;
    position: relative;
    overflow: visible;
    z-index: 10;
}

/* Фоны и свечения */
.hero__bg-fx {
    position: absolute; inset: 0; pointer-events: none; overflow: hidden;
}
.hero__bg-fx::before {
    content: ''; position: absolute; right: -10%; top: -20%;
    width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(111,183,223,.15) 0%, transparent 65%);
    filter: blur(40px);
}
.hero__bg-fx::after {
    content: ''; position: absolute; left: -10%; bottom: -20%;
    width: 400px; height: 400px; border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 163, 255, 0.1) 0%, transparent 70%);
    filter: blur(40px);
}

.hero__inner {
    position: relative; z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

@media screen and (max-width: 992px) {
    .hero__inner { grid-template-columns: 1fr; text-align: center; }
    .hero__graphics { display: none !important; }
    .hero { padding: 48px 0 64px; }
}

.hero__content {
    display: flex; flex-direction: column;
    align-items: flex-start;
}
@media screen and (max-width: 992px) {
    .hero__content { align-items: center; }
}

.hero__label {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(111,183,223,.15); border: 1px solid rgba(111,183,223,.3);
    color: var(--c-book-blue); border-radius: var(--r-full);
    padding: 6px 16px; font-size: var(--fs-xs); font-weight: 700;
    letter-spacing: .08em; text-transform: uppercase;
    margin-bottom: var(--sp-4);
    box-shadow: 0 4px 12px rgba(111,183,223,.1);
}

.hero__title {
    font-size: clamp(32px, 4vw, 56px);
    font-weight: 900; line-height: 1.1; letter-spacing: -.03em;
    color: #fff; margin-bottom: var(--sp-4);
}
.hero__subtitle {
    font-size: clamp(16px, 1.5vw, 18px);
    color: rgba(255,255,255,.7); font-weight: 400; line-height: 1.5;
    margin-bottom: var(--sp-8); max-width: 520px;
}

/* Hero Search */
.hero-search {
    position: relative; width: 100%; max-width: 600px;
    margin-bottom: var(--sp-5); z-index: 1050;
}
.hero-search__wrapper {
    display: flex; position: relative; width: 100%;
}
.hero-search__icon {
    position: absolute; left: 20px; top: 50%; transform: translateY(-50%);
    color: rgba(255,255,255,.5); pointer-events: none;
}
.hero-search__input {
    width: 100%; height: 60px; padding: 0 140px 0 52px;
    border-radius: var(--r-full); border: 2px solid rgba(255,255,255,.1);
    background: rgba(255,255,255,.12); color: #fff; font-size: 16px;
    outline: none; transition: border-color var(--tr), background var(--tr), box-shadow var(--tr);
}
.hero-search__input:focus {
    border-color: var(--c-book-blue);
    background: rgba(255,255,255,.1);
    box-shadow: 0 0 0 4px rgba(111,183,223,.15);
}
.hero-search__input::placeholder { color: rgba(255,255,255,.4); }

.hero-search__btn {
    position: absolute; right: 6px; top: 6px; bottom: 6px;
    padding: 0 24px; border: none; cursor: pointer;
    background: var(--c-primary); color: #fff;
    border-radius: var(--r-full); font-weight: 600;
    transition: background var(--tr), transform var(--tr);
}
.hero-search__btn:hover { background: var(--c-accent); transform: scale(1.02); }

/* Trends */
.hero__trends {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
@media screen and (max-width: 992px) {
    .hero__trends { justify-content: center; }
}
.hero__trends-title { font-size: 13px; color: rgba(255,255,255,.4); font-weight: 500; }
.hero__trend-tag {
    font-size: 13px; font-weight: 500; color: rgba(255,255,255,.8);
    background: rgba(255,255,255,.08); padding: 6px 14px;
    border-radius: var(--r-full); border: 1px solid rgba(255,255,255,.1);
    transition: background var(--tr), color var(--tr), border-color var(--tr);
}
.hero__trend-tag:hover {
    background: rgba(111,183,223,.2); color: #fff; border-color: rgba(111,183,223,.4);
}

/* Graphics right column */
.hero__graphics {
    position: relative; width: 100%; height: 400px;
    display: flex; align-items: center; justify-content: center;
}

/* Badges */
.hero-badge {
    position: absolute; display: flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.2);
    backdrop-filter: blur(8px); padding: 8px 16px; border-radius: var(--r-lg);
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
    z-index: 10; animation: floatBadge 6s ease-in-out infinite;
}
.hero-badge--1 { top: 10%; left: 0; animation-delay: 0s; }
.hero-badge--2 { bottom: 10%; right: 0; animation-delay: 2s; }
.hero-badge--3 { top: 40%; right: -40px; animation-delay: 4s; }

.hero-badge__icon { font-size: 20px; }
.hero-badge__text { font-size: 13px; font-weight: 600; color: #fff; }

@keyframes floatBadge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* CSS Illustration (Documents) */
.hero-illustration {
    position: relative; width: 280px; height: 280px;
    perspective: 1000px;
}
.hero-doc {
    position: absolute; width: 160px; height: 220px;
    background: #fff; border-radius: 8px; box-shadow: 0 20px 40px rgba(0,0,0,.3);
    padding: 20px; display: flex; flex-direction: column; gap: 12px;
}
.hero-doc--prez {
    top: 0; left: 0; transform: rotateY(15deg) rotateZ(-5deg); z-index: 2;
    animation: floatDoc 8s ease-in-out infinite alternate;
}
.hero-doc--list {
    top: 40px; right: 0; transform: rotateY(-15deg) rotateZ(10deg); z-index: 1;
    background: #f8f9fa;
    animation: floatDoc 8s ease-in-out infinite alternate-reverse;
}

.hero-doc__line { height: 8px; background: #e2e8f0; border-radius: 4px; width: 100%; }
.hero-doc__line--short { width: 60%; }
.hero-doc__chart { flex: 1; background: var(--c-book-blue); border-radius: 4px; opacity: 0.8; margin-top: 10px; }
.hero-doc__circle { width: 40px; height: 40px; background: var(--c-accent); border-radius: 50%; margin-bottom: 10px; opacity: 0.8; }

@keyframes floatDoc {
    0% { transform: translateY(0) rotateZ(-5deg) scale(1); }
    100% { transform: translateY(-15px) rotateZ(-2deg) scale(1.02); }
}

/* ======================================================
   FILTERS  -  infourok: 42px chips, 15px, 0 20px padding,
             fully rounded, 8px gap, centered
====================================================== */
.filters-section {
    background: #fff;
    border-bottom: 1px solid var(--c-border);
    padding: 0;
}
.filter-group {
    display: flex; align-items: center;
    border-bottom: 1px solid var(--c-border-light);
}
.filter-group:last-child { border-bottom: none; }
.filter-group__label {
    font-size: 11px; font-weight: 700; color: var(--c-text-muted);
    text-transform: uppercase; letter-spacing: .08em;
    padding: 0 20px; white-space: nowrap;
    border-right: 1px solid var(--c-border-light);
    height: 64px;    /* matches chip height + padding */
    display: flex; align-items: center;
    flex-shrink: 0; min-width: 100px;
}
.filter-row {
    display: flex; align-items: center; justify-content: center;
    flex-wrap: wrap;
    gap: 8px;        /* infourok: 8px */
    flex: 1;
    padding: 12px 20px;   /* infourok: 12px vertical */
}
@media (min-width: 901px) {
    .filter-row {
        max-width: var(--container);
        margin: 0 auto;
        padding-left: 24px;
        padding-right: 24px;
        justify-content: flex-start;
    }
}

/* Chip  -  infourok: h=42px, 15px font, 0 20px padding, full rounded */
.filter-chip {
    display: inline-flex; align-items: center;
    height: 42px;           /* infourok: 42px */
    padding: 0 20px;        /* infourok: 0 20px */
    border-radius: var(--r-full);   /* full oval */
    font-size: var(--fs-md);        /* 15px */
    font-weight: 500;
    cursor: pointer; white-space: nowrap; flex-shrink: 0;
    color: var(--c-text-sec);
    background: transparent;
    border: 1.5px solid var(--c-border);
    text-decoration: none;
    transition: all var(--tr);
}
.filter-chip:hover { color: var(--c-primary); border-color: var(--c-primary); background: var(--c-primary-xlight); }
.filter-chip.is-active {
    background: var(--c-primary);   /* синий для активного, в стиле логотипа */
    color: #fff; border-color: var(--c-primary);
    font-weight: 600;
}

.filter-btn-reset {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 500; color: var(--c-text-muted);
    text-decoration: none; padding: 6px 12px; border-radius: var(--r-full);
    background: var(--c-bg); border: 1px solid var(--c-border);
    transition: all var(--tr);
}
.filter-btn-reset:hover {
    color: var(--c-danger); border-color: var(--c-danger); background: #fff0f0;
}
.filters-actions {
    padding: 0 20px;
    margin-top: 8px;
    margin-bottom: 32px;
}
@media (min-width: 901px) {
    .filters-actions {
        max-width: var(--container);
        margin-left: auto;
        margin-right: auto;
        padding-left: 24px;
        padding-right: 24px;
    }
}

/* ======================================================
   PACKAGES  -  infourok: 5 колонок, 24px gap
====================================================== */
.packages-section { padding: 24px 0 64px; }
.packages-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}

/* Hide WPDM aggressively injected duplicate thumbnails in descriptions */
.single-pkg__description .wpdm-post-thumb,
.single-pkg__description .w3eden .row > .col-md-12 > img,
.single-pkg__description .w3eden .card.hide_empty,
.single-pkg__description .w3eden > img {
    display: none !important;
}

/* Clean up material page sidebar and remove blue meta block */
body.single-wpdmpro .single-pkg__meta,
body.single-wpdmpro .single-pkg__download,
body.single-wpdmpro .widget_search,
body.single-wpdmpro .widget_recent_entries,
body.single-wpdmpro .widget_recent_comments,
body.single-wpdmpro .widget_recent_posts,
body.single-wpdmpro .widget_pages,
body.single-wpdmpro .widget_meta,
body.single-wpdmpro .widget_archive {
    display: none !important;
}

/* Ensure no WPDM default blue boxes appear */
body.single-wpdmpro .w3eden .card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.packages-total { font-size: var(--fs-md); color: var(--c-text-sec); }
.packages-total strong { color: var(--c-text); font-weight: 700; }
.sort-select {
    padding: 8px 32px 8px 14px; border: 1.5px solid var(--c-border);
    border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--c-text);
    background: #fff; cursor: pointer; outline: none; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    transition: border-color var(--tr);
}
.sort-select:focus { border-color: var(--c-primary); }

/* Grid  -  infourok: 5 columns */
.packages-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;   /* infourok: 24px */
}

/* ======================================================
   CARD  -  infourok: r=16px, img r=12px, title 14px,
           btn h=36px r=8px
====================================================== */
.pkg-card {
    display: flex; flex-direction: column; height: 100%;
    background: var(--c-bg-card);
    border-radius: var(--r-md); border: 1px solid var(--c-border-light);
    box-shadow: var(--sh-xs); overflow: hidden;
    transition: var(--trs); position: relative;
    will-change: transform, box-shadow;
}
.pkg-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sh-hover);
    border-color: var(--c-primary-light);
}
.pkg-card:nth-child(2) { animation-delay:.04s }
.pkg-card:nth-child(3) { animation-delay:.08s }
.pkg-card:nth-child(4) { animation-delay:.12s }
.pkg-card:nth-child(5) { animation-delay:.16s }

/* Цветная полоска сверху  -  из палитры логотипа */
.pkg-card::before {
    content: '';
    display: block; height: 3px;
    background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-book-blue) 100%);
    flex-shrink: 0;
}
.pkg-card:hover::before {
    background: linear-gradient(90deg, var(--c-primary) 0%, var(--c-accent) 100%);
}

/* Bookmark */
.pkg-card__bookmark {
    position: absolute; top: 12px; right: 10px;
    width: 28px; height: 28px; background: rgba(255,255,255,.9);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; z-index: 2; border: 1px solid rgba(0,0,0,.08);
    transition: all var(--tr);
    opacity: 0;
    pointer-events: none;
}
@media (max-width: 768px) {
    .single-pkg__title { font-size: clamp(20px, 4vw, 24px); }
    .pkg-card__bookmark { opacity: 1; pointer-events: auto; }
}
.pkg-card:hover .pkg-card__bookmark { opacity: 1; pointer-events: auto; }
.pkg-card__bookmark.is-saved { opacity: 1; pointer-events: auto; }
.pkg-card__bookmark:hover { transform: scale(1.15); }
.pkg-card__bookmark svg { color: var(--c-text-muted); transition: color var(--tr); }
.pkg-card__bookmark.is-saved svg { color: var(--c-primary); fill: var(--c-primary); }

/* Thumbnail  -  infourok: aspect ~4/3 */
.pkg-card__thumb-link { display: block; flex-shrink: 0; }
.pkg-card__thumb {
    position: relative; width: 100%; aspect-ratio: 16/9;
    overflow: hidden; background: #fff;
    border-radius: 0;   /* image fills card, card has border-radius overflow hidden */
}
.pkg-card__thumb img { width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform .4s ease; background: #fff; }
.pkg-card:hover .pkg-card__thumb img { transform: scale(1.03); }
.pkg-card__no-thumb {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--c-primary-xlight), var(--c-bg-alt));
}

/* File format badge */
.file-badge {
    position: absolute; bottom: 8px; left: 8px;
    padding: 4px 8px; border-radius: 4px;
    background: rgba(0,0,0,0.65);
    font-size: 10px; font-weight: 800; letter-spacing: .07em;
    color: #fff; z-index: 1;
}
.badge--pdf  { background: #0284c7; }
.badge--ppt  { background: #e11d48; }
.badge--doc  { background: #2563eb; }
.badge--xls  { background: #16a34a; }
.badge--other{ background: #7c3aed; }

/* Card body  -  infourok: 16px padding */
.pkg-card__body { padding: 16px; display: flex; flex-direction: column; flex: 1; }

/* Categories */
.pkg-cats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.pkg-cat-link {
    font-size: 11px; color: var(--c-primary);
    background: var(--c-primary-xlight); padding: 2px 8px;
    border-radius: var(--r-xs); font-weight: 600; transition: all var(--tr);
}
.pkg-cat-link:hover { background: var(--c-primary-light); }

/* Title  -  infourok: 14px, 3 lines */
.pkg-card__title {
    font-size: 14px;   /* infourok: 14px */
    font-weight: 600; line-height: 1.4;   /* infourok: 1.4 */
    margin-bottom: 8px; flex: 1; letter-spacing: 0;
    display: -webkit-box; -webkit-line-clamp: 3;   /* infourok: 3 lines */
    -webkit-box-orient: vertical; overflow: hidden;
}
.pkg-card__title a { color: var(--c-text); transition: color var(--tr); }
.pkg-card__title a:hover { color: var(--c-primary); }

/* Excerpt */
.pkg-card__excerpt {
    font-size: 12px; color: var(--c-text-muted); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2;
    -webkit-box-orient: vertical; overflow: hidden;
    margin-bottom: 12px;
}

/* Footer */
.pkg-card__footer {
    display: flex; align-items: center; justify-content: space-between;
    gap: 8px; margin-top: auto;
    padding-top: 12px; border-top: 1px solid var(--c-border-light);
}
.pkg-card__meta { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--c-text-muted); }
.pkg-card__downloads { display: flex; align-items: center; gap: 3px; }

/* Download button  -  infourok: h=36px, r=8px, orange accent */
.pkg-card__btn {
    height: 36px;   /* infourok: 36px */
    padding: 0 14px;
    border-radius: var(--r-sm);   /* infourok: 8px */
    background: var(--c-accent); color: #fff;
    font-size: 13px; font-weight: 600; white-space: nowrap;
    display: inline-flex; align-items: center;
    transition: all var(--tr);
}
.pkg-card__btn:hover { background: var(--c-accent-dark); color: #fff; }

/* WPDM overrides */
.wpdm-download-link, .wpdm_download_link, .package-download-link,
.wpdm-download-link a, .wpdm-button {
    background: var(--c-accent) !important; color: #fff !important;
    border: none !important; border-radius: var(--r-sm) !important;
    padding: 0 14px !important; height: 36px !important;
    font-size: 13px !important; font-weight: 600 !important;
    display: inline-flex !important; align-items: center !important;
    text-decoration: none !important; transition: all var(--tr) !important;
}
.wpdm-download-link:hover, .wpdm_download_link:hover {
    background: var(--c-accent-dark) !important;
}

/* -- LOAD MORE --------------------------------------- */
.load-more-wrap { text-align: center; margin-top: 40px; }
.btn-load-more.is-loading { opacity: .7; pointer-events: none; }

/* -- PAGINATION -------------------------------------- */
.pagination-wrap { margin-top: 40px; display: flex; justify-content: center; }
.page-numbers { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.page-numbers li a, .page-numbers li span {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: var(--r-sm);
    font-size: var(--fs-sm); font-weight: 500; color: var(--c-text-sec);
    border: 1.5px solid var(--c-border); background: #fff;
    text-decoration: none; transition: all var(--tr);
}
.page-numbers li a:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-xlight); }
.page-numbers li span.current { background: var(--c-primary); color: #fff; border-color: var(--c-primary); }

/* -- BREADCRUMBS ------------------------------------- */
.breadcrumbs { padding: 16px 0; }
.bc__list { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 14px; color: var(--c-text-muted); }
.bc__item a { color: var(--c-text-sec); transition: color var(--tr); }
.bc__item a:hover { color: var(--c-primary); }
.bc__item--current span { color: var(--c-text); font-weight: 500; }
.bc__sep { color: var(--c-text-muted); margin: 0 6px; }

.rank-math-breadcrumb { font-size: 14px; color: var(--c-text-muted); margin: 0; padding: 0; }
.rank-math-breadcrumb a { color: var(--c-text-sec); transition: color var(--tr); }
.rank-math-breadcrumb a:hover { color: var(--c-primary); }
.rank-math-breadcrumb .separator { color: var(--c-text-muted); margin: 0 6px; }
.rank-math-breadcrumb .last { color: var(--c-text); font-weight: 500; }

/* ======================================================
   TAXONOMY HEADER
====================================================== */
.taxonomy-header {
    background: #fff; padding: 32px 0;
    border-bottom: 1px solid var(--c-border);
    border-left: 4px solid var(--c-primary);
}
.taxonomy-header__inner { display: flex; align-items: center; gap: 20px; }
.taxonomy-header__icon {
    width: 64px; height: 64px;
    background: var(--c-primary-xlight); border: 2px solid var(--c-primary-light);
    border-radius: var(--r-lg); display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; font-size: 28px;
}
.taxonomy-header__title { font-size: clamp(18px, 3vw, 28px); font-weight: 800; margin-bottom: 4px; }
.taxonomy-header__desc { color: var(--c-text-sec); font-size: var(--fs-md); }
.taxonomy-header__count {
    display: inline-flex; align-items: center; font-size: var(--fs-sm);
    color: var(--c-primary); font-weight: 700;
    background: var(--c-primary-xlight); padding: 2px 10px;
    border-radius: var(--r-full); margin-top: 6px;
}
.subcats-section { padding: 16px 0; background: var(--c-bg); border-bottom: 1px solid var(--c-border-light); }
.subcats-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.subcat-card {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; background: #fff; border: 1.5px solid var(--c-border);
    border-radius: var(--r-sm); font-size: var(--fs-sm); color: var(--c-text-sec);
    text-decoration: none; font-weight: 500; transition: all var(--tr);
}
.subcat-card:hover { border-color: var(--c-primary); color: var(--c-primary); background: var(--c-primary-xlight); }
.subcat-card__count { background: var(--c-bg); padding: 1px 6px; border-radius: var(--r-full); font-size: 11px; color: var(--c-text-muted); }

/* ======================================================
   SINGLE PACKAGE PAGE
====================================================== */
.single-pkg { padding: 0 0 64px; }
.single-pkg__inner { display: grid; grid-template-columns: 1fr var(--sidebar-w); gap: 32px; align-items: start; }
.single-pkg__type-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.type-badge {
    padding: 3px 10px; border-radius: var(--r-xs);
    font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
.type-badge--pdf { background: rgba(192,57,43,.08); color: #c0392b; }
.type-badge--ppt { background: rgba(196,62,28,.08);  color: #C43E1C; }
.type-badge--doc { background: rgba(12,79,123,.08); color: var(--c-primary); }
.single-pkg__title { font-size: clamp(18px, 2.5vw, 26px); font-weight: 800; line-height: 1.3; margin-bottom: 16px; }
.single-pkg__meta {
    display: flex; align-items: center; flex-wrap: wrap; gap: 20px;
    padding: 16px 20px; background: var(--c-primary-xlight);
    border-radius: var(--r-md); border-left: 3px solid var(--c-primary);
    margin-bottom: 24px;
}
.single-pkg__meta-item { display: flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--c-text-muted); }
.single-pkg__meta-item svg { color: var(--c-primary); }
.single-pkg__meta-item strong { color: var(--c-text); font-weight: 700; }
.single-pkg__download {
    background: #072134;   /* тёмный синий */
    border-radius: var(--r-lg); padding: 24px; margin-bottom: 24px; text-align: center;
    position: relative; overflow: hidden;
}
.single-pkg__download::before {
    content: ''; position: absolute; top: -50px; right: -50px;
    width: 180px; height: 180px; border-radius: 50%;
    background: radial-gradient(circle, rgba(111,183,223,.18), transparent 65%);
}
.single-pkg__download-title { font-size: var(--fs-lg); font-weight: 700; color: #fff; margin-bottom: 8px; position: relative; }
.single-pkg__download-subtitle { font-size: var(--fs-sm); color: rgba(255,255,255,.5); margin-bottom: 20px; position: relative; }
.single-pkg__download a.btn, .single-pkg__download .btn--lg { position: relative; }
.single-pkg__image { 
    margin-bottom: 24px; border-radius: var(--r-md); overflow: hidden; 
    box-shadow: var(--sh-md); 
    background: #1e293b; /* Dark background for letterboxing */
    width: 100%;
    aspect-ratio: 16/9;
}
.single-pkg__image img { 
    width: 100%; 
    height: 100%; 
    display: block;
    object-fit: contain; /* Prevents cropping */
    object-position: center;
}
.single-pkg__description {
    font-size: var(--fs-md); line-height: 1.6; color: var(--c-text);
    margin-bottom: 24px; padding: 20px; background: #fff;
    border-radius: var(--r-md); border: 1px solid var(--c-border-light);
}
/* Apply text color only to direct content, avoiding w3eden templates */
.single-pkg__description > p, 
.single-pkg__description > ul, 
.single-pkg__description > ol,
.single-pkg__description > p *, 
.single-pkg__description > ul *, 
.single-pkg__description > ol * { color: var(--c-text) !important; font-family: inherit !important; }
.single-pkg__description h1, .single-pkg__description h2, .single-pkg__description h3, .single-pkg__description h4, .single-pkg__description h5, .single-pkg__description h6 { color: var(--c-heading) !important; margin-bottom: 12px; }
.single-pkg__description p { margin-bottom: 12px; }
.single-pkg__description { margin-bottom: 40px; }
.single-pkg__description * { color: var(--c-text); } /* Override Gutenberg white text on white bg */

/* -- SIDEBAR ----------------------------------------- */
.widget {
    background: #fff; border-radius: var(--r-md);
    padding: 20px; margin-bottom: 16px;
    border: 1px solid var(--c-border-light);
}
.widget__title {
    font-size: var(--fs-md); font-weight: 700; color: var(--c-text);
    margin-bottom: 16px; padding-bottom: 12px;
    border-bottom: 2px solid var(--c-primary-light);
}
.category-list { display: flex; flex-direction: column; gap: 1px; }
.category-list__item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 10px; border-radius: var(--r-sm);
    font-size: var(--fs-sm); color: var(--c-text-sec);
    text-decoration: none; transition: all var(--tr);
}
.category-list__item:hover, .category-list__item.is-active { background: var(--c-primary-xlight); color: var(--c-primary); }
.category-list__count {
    font-size: 11px; background: var(--c-bg); padding: 1px 7px;
    border-radius: var(--r-full); color: var(--c-text-muted);
}

/* -- AD BLOCKS (РСЯ) --------------------------------- */
.promo-box { margin-bottom: 20px; text-align: center; }
.promo-box a { display: inline-block; text-align: center; margin: 0 auto; max-width: 100%; }
.promo-box img { margin: 0 auto; display: block; max-width: 100%; height: auto; }
.promo-box--archive { margin: 30px 0 6px 0; }
.promo-box--archive a { margin: 0 auto; }
.promo-placeholder {
    background: var(--c-bg); border: 1.5px dashed var(--c-border);
    border-radius: var(--r-md); padding: 20px;
    text-align: center; font-size: var(--fs-sm); color: var(--c-text-muted);
    min-height: 90px; display: flex; align-items: center; justify-content: center;
    margin-bottom: 20px;
}

/* -- EMPTY STATE ------------------------------------- */
.empty-state { text-align: center; padding: 64px 32px; }
.empty-state__icon { margin-bottom: 20px; color: var(--c-primary-mid); }
.empty-state__title { margin-bottom: 12px; }
.empty-state__text a { color: var(--c-primary); text-decoration: underline; }

/* -- SEARCH page ------------------------------------- */
.search-header { padding: 24px 0 16px; }
.search-header__query { font-weight: 700; color: var(--c-primary); }

/* ======================================================
   FOOTER  -  тёмный сине-графитовый, цвета логотипа
====================================================== */
.site-footer {
    background-color: #051623;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    color: rgba(255,255,255,.6);
    padding: 0 0 24px; margin-top: auto;
    position: relative; overflow: hidden;
}
.footer__bg-fx {
    position: absolute; top: 0; left: 0; right: 0; height: 100%;
    background: radial-gradient(circle at 80% 10%, rgba(99, 102, 241, 0.05) 0%, transparent 60%);
    pointer-events: none;
}
.site-footer::before {
    content: ''; display: block; height: 3px;
    background: linear-gradient(90deg, var(--c-primary), var(--c-book-blue), var(--c-accent));
    margin-bottom: 48px; position: relative; z-index: 1;
}
/* CTA */
.footer-cta {
    background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--r-lg); padding: 32px 40px; margin-bottom: 48px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
    backdrop-filter: blur(10px); position: relative; z-index: 1;
}
.footer-cta__title { color: #fff; font-size: var(--fs-lg); margin-bottom: 8px; }
.footer-cta__text { color: rgba(255, 255, 255, 0.6); font-size: var(--fs-md); max-width: 600px; margin-bottom: 0; }
.footer-cta__btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: #0077FF; color: #fff; padding: 12px 24px;
    border-radius: var(--r-full); font-weight: 600; text-decoration: none;
    transition: var(--trs); flex-shrink: 0;
}
.footer-cta__btn:hover { background: #005ce6; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 16px rgba(0, 119, 255, 0.3); }

.site-footer a { color: rgba(255,255,255,.45); transition: color var(--tr); }
.site-footer a:hover { color: var(--c-book-blue); }
.footer__top {
    display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px; padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,.07); margin-bottom: 24px;
}
.footer__logo {
    font-size: 20px; font-weight: 900; color: #fff;
    text-decoration: none; display: inline-block; margin-bottom: 12px;
}
.footer__logo span { color: var(--c-book-blue); }
.footer__tagline { font-size: 13px; color: rgba(255,255,255,.3); line-height: 1.7; max-width: 240px; }
.footer__col-title {
    font-size: 10px; font-weight: 700; color: rgba(255,255,255,.6);
    margin-bottom: 16px; text-transform: uppercase; letter-spacing: .1em;
}
.footer__links { display: flex; flex-direction: column; gap: 8px; }
.footer__links a, .footer__links span { font-size: 13px; color: rgba(255,255,255,.38); }
.footer__links a:hover { color: var(--c-book-blue); }
.footer__bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; }
.footer__copyright { font-size: 12px; color: rgba(255,255,255,.2); }
.footer__bottom-links { display: flex; gap: 20px; align-items: center; }
.footer__bottom-menu { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer__bottom-links a, .footer__bottom-menu a { font-size: 12px; color: rgba(255,255,255,.2); }
.footer__bottom-links a:hover, .footer__bottom-menu a:hover { color: rgba(255,255,255,.5); }

/* -- 404 --------------------------------------------- */
.error-404 { padding: 64px 0; text-align: center; }
.error-404__code { font-size: clamp(72px, 14vw, 140px); font-weight: 900; color: var(--c-primary-light); line-height: 1; }
.error-404__title { font-size: var(--fs-2xl); margin: 16px 0 12px; }
.error-404__text { color: var(--c-text-sec); margin-bottom: 32px; }

/* -- UTILS ------------------------------------------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.text-center { text-align: center; }
mark { background: rgba(12,79,123,.12); color: var(--c-primary); border-radius: 2px; padding: 0 2px; }

/* ======================================================
   RESPONSIVE
====================================================== */
@media (max-width: 1400px) {
    .packages-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 1100px) {
    .packages-grid { grid-template-columns: repeat(3, 1fr); }
    .footer__top { grid-template-columns: 1fr 1fr 1fr; }
    .footer__brand { grid-column: 1 / -1; }
    .single-pkg__inner { grid-template-columns: 1fr; }
    
    /* Make long widgets scrollable on mobile to prevent "portyanki" */
    .pkg-sidebar .widget {
        max-height: 350px;
        overflow-y: auto;
        overscroll-behavior: contain;
    }
    .pkg-sidebar .widget::-webkit-scrollbar { width: 4px; }
    .pkg-sidebar .widget::-webkit-scrollbar-thumb { background: var(--c-border); border-radius: 4px; }
    
    .footer-cta { flex-direction: column; text-align: center; padding: 24px; }
    .footer-cta__btn { width: 100%; justify-content: center; }
}
@media (max-width: 900px) {
    .site-nav { display: none; }
    .menu-toggle { display: flex; }
    .packages-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
    .footer__top { grid-template-columns: 1fr 1fr; gap: 20px; }
    .footer__brand { grid-column: 1 / -1; }
    .filter-row { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; justify-content: flex-start; scrollbar-width: none; -ms-overflow-style: none; padding: 12px 16px; }
    .filter-row::-webkit-scrollbar { display: none; }
    .filter-row::after { content: ''; display: block; min-width: 120px; flex-shrink: 0; }
    .filter-chip { flex-shrink: 0; }
}
@media (max-width: 500px) {
    .packages-grid { grid-template-columns: 1fr; }
    .footer__top { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ======================================================
   ANIMATIONS
====================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes skeletonShimmer {
    0%   { background-position: -200% 0; }
    100% { background-position:  200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #eff2f5 25%, #e4eaee 50%, #eff2f5 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.5s infinite;
    border-radius: var(--r-sm);
}

.single-pkg__description > p:first-of-type > img.wp-post-image,
.single-pkg__description > img.wp-post-image {
    display: none !important;
}
/* === Modern Redesign Touches === */
.pkg-card {
    transition: transform var(--tr), box-shadow var(--tr);
    background: var(--c-bg-card);
    border: 1px solid var(--c-border-light);
}
.pkg-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--sh-hover);
    border-color: var(--c-primary-light);
}
.filter-chip {
    border-radius: var(--r-full);
    font-weight: 500;
    transition: all var(--tr);
}
.filter-chip.is-active, .filter-chip:hover {
    background: var(--c-primary);
    color: var(--c-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}
.hero-section {
    background: linear-gradient(135deg, var(--c-primary-dark), var(--c-primary));
    position: relative;
    overflow: hidden;
}
.hero-section::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: radial-gradient(circle, rgba(236,72,153,0.15) 0%, transparent 50%);
    pointer-events: none;
}
.hero__bg-fx::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 20%, var(--c-primary-dark) 120%);
    pointer-events: none;
}

/* Dynamic Blobs */
.hero__blob {
    position: absolute; border-radius: 50%;
    filter: blur(80px); opacity: 0.4; pointer-events: none;
    z-index: 1; animation: blob-float 12s infinite alternate ease-in-out;
}
.hero__blob--1 {
    width: 400px; height: 400px; background: var(--c-primary-mid);
    top: -100px; left: -100px; animation-duration: 15s;
}
.hero__blob--2 {
    width: 300px; height: 300px; background: var(--c-accent);
    bottom: -50px; right: 10%; animation-duration: 10s; animation-direction: alternate-reverse;
}

@keyframes blob-float {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -50px) scale(1.1); }
    100% { transform: translate(-20px, 20px) scale(0.9); }
}
.btn-load-more {
    background: var(--c-primary);
    color: #fff;
    border: none;
    border-radius: var(--r-full);
    font-weight: 600;
    box-shadow: none;
    transition: background var(--tr), transform var(--tr);
}
.btn-load-more:hover {
    background: var(--c-accent);
    color: #fff;
    border: none;
    transform: scale(1.02);
    box-shadow: none;
}

/* === Horizontal Carousels === */
.home-carousels-wrapper {
    margin-bottom: 24px;
}
.carousel-section {
    margin-bottom: 32px;
}
.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.carousel-title {
    font-size: var(--fs-xl);
    font-weight: 800;
}
.carousel-link {
    font-weight: 600;
    color: var(--c-primary);
    text-decoration: underline;
    font-size: var(--fs-md);
}
.carousel-track-wrapper {
    overflow-x: auto;
    padding-bottom: 16px;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    /* Hide scrollbar for cleaner look */
    -ms-overflow-style: none;  
    scrollbar-width: none;  
}
.carousel-track-wrapper::-webkit-scrollbar {
    display: none;
}
.carousel-track {
    display: inline-flex;
    gap: 24px;
}
.carousel-slide {
    width: min(280px, 85vw);
    flex-shrink: 0;
}

/* === Quick View Button === */
.pkg-card__quickview {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    background: rgba(255, 255, 255, 0.9);
    color: var(--c-primary);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 10;
}
.pkg-card__thumb-wrap:hover .pkg-card__quickview {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}
.pkg-card__quickview:hover {
    background: var(--c-primary);
    color: white;
}

/* === Quick View Modal === */
.quickview-modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.quickview-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
.quickview-modal {
    background: var(--c-bg-card);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    border-radius: var(--r-xl);
    display: flex;
    flex-direction: row;
    overflow: hidden;
    position: relative;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: var(--sh-hover);
}
.quickview-modal-overlay.is-active .quickview-modal {
    transform: translateY(0);
}
.quickview-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 32px; height: 32px;
    background: var(--c-bg-alt);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--c-text);
    z-index: 10;
}
.quickview-close:hover {
    background: var(--c-border);
}
.quickview-image {
    flex: 1;
    background: var(--c-bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.quickview-image img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--r-md);
    box-shadow: var(--sh-md);
}
.quickview-content {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}
.quickview-title {
    font-size: var(--fs-xl);
    margin-bottom: 16px;
}
.quickview-meta {
    display: flex; gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
@media(max-width: 768px) {
    .quickview-modal {
        flex-direction: column;
    }
    .quickview-image {
        max-height: 300px;
    }
}



/* Disable WPDM Dark Mode by forcing light variables */
.w3eden {
    --bs-body-color: var(--c-text) !important;
    --bs-body-bg: #fff !important;
    --bs-light: #f8f9fa !important;
    --bs-dark: #212529 !important;
    --bs-list-group-color: var(--c-text) !important;
    --bs-list-group-bg: #fff !important;
    --bs-list-group-border-color: rgba(0,0,0,.125) !important;
    --bs-card-bg: #fff !important;
    --bs-card-border-color: rgba(0,0,0,.125) !important;
}

@media (prefers-color-scheme: dark) {
    .w3eden .list-group-item,
    .w3eden .card {
        background-color: #fff !important;
        color: var(--c-text) !important;
        border-color: rgba(0,0,0,.125) !important;
    }
    .w3eden .text-muted {
        color: var(--c-text-sec) !important;
    }
}

/* -- WPDM Archive & File Cards Fixes -- */
.w3eden .wpdm-archive-page { background: transparent !important; }
.w3eden .wpdm-archive-page .card { background: #fff !important; color: var(--c-text) !important; box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important; border: 1px solid #eaeaea !important; border-radius: 8px !important; }
.w3eden .list-group-item { background: #fff !important; color: var(--c-text) !important; border-color: #eaeaea !important; }
.w3eden .list-group-item .text-muted { color: var(--c-text-sec) !important; }

/* Fix Search Box in Archive */
.w3eden .wpdm-archive-page .navbar { display: none !important; }

/* Fix Single Page Attached Files */
.w3eden #wpdm-downloads-list { background: transparent !important; border: none !important; }
.w3eden #wpdm-downloads-list .list-group-item { background: #fff !important; border-radius: 8px !important; margin-bottom: 10px; border: 1px solid #eaeaea !important; }
.w3eden #wpdm-downloads-list .card-header,
.w3eden #wpdm-downloads-list .panel-heading,
.w3eden #wpdm-downloads-list input {
    display: none !important;
}


/* Custom HTML Promo Banner */
.custom-promo-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #2AABEE 0%, #2288cc 100%);
    color: #fff !important;
    border-radius: 12px;
    padding: 24px 32px;
    text-decoration: none !important;
    box-shadow: 0 4px 15px rgba(42, 171, 238, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 20px 0;
    min-height: 120px;
}
.custom-promo-banner:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(42, 171, 238, 0.3);
    color: #fff !important;
}
.custom-promo-content {
    flex: 1;
    text-align: left;
}
.custom-promo-title {
    font-size: 24px;
    font-weight: 800;
    margin: 0 0 8px 0;
    line-height: 1.2;
    color: #fff;
}
.custom-promo-desc {
    font-size: 16px;
    margin: 0;
    opacity: 0.9;
    line-height: 1.4;
}
.custom-promo-btn {
    background: #fff;
    color: #2AABEE;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 28px;
    border-radius: 8px;
    margin-left: 24px;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
@media (max-width: 768px) {
    .custom-promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .custom-promo-content {
        text-align: center;
        margin-bottom: 20px;
    }
    .custom-promo-title {
        font-size: 22px;
    }
    .custom-promo-btn {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}

.wpdm-filelist-search { display: none !important; }

@media (max-width: 768px) { .hide-on-mobile { display: none !important; } }
@media (min-width: 769px) { .show-on-mobile { display: none !important; } }

.pinned-section {
    margin-bottom: 32px;
    background: #fffaf0;
    padding: 24px;
    border-radius: 20px;
    border: 1px solid #ffedd5;
}
.pinned-section .carousel-track-wrapper {
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
}
@media (max-width: 768px) {
    .pinned-section {
        padding: 16px 12px;
    }
    .pinned-section .carousel-track-wrapper {
        margin: 0 -12px;
        padding-left: 12px;
        padding-right: 12px;
    }
    .carousel-slide {
        width: min(260px, 80vw);
    }
}

/* Custom styling for native search cancel button (X) */
input[type=""search""]::-webkit-search-cancel-button {
    -webkit-appearance: none;
    height: 18px;
    width: 18px;
    background-image: url(""data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><line x1='18' y1='6' x2='6' y2='18'></line><line x1='6' y1='6' x2='18' y2='18'></line></svg>"");
    background-size: contain;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    margin-right: 8px; /* Give it some breathing room from the submit button if needed */
}
input[type=""search""]::-webkit-search-cancel-button:hover {
    opacity: 1;
}


/* --- Document Preview Styles --- */
.preview-btn-container {
    margin-bottom: 20px;
}
.btn-preview-toggle {
    display: inline-flex;
    align-items: center;
    background: var(--c-primary);
    color: #fff !important;
    border: none;
    border-radius: var(--r-md);
    padding: 10px 20px;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--tr), transform var(--tr);
}
.btn-preview-toggle:hover {
    background: var(--c-primary-dark, #168f41);
    transform: translateY(-1px);
}
.btn-preview-toggle.is-active {
    background: var(--c-accent, #ff8364);
}
.preview-iframe-wrapper {
    position: relative;
    width: 100%;
    height: 600px;
    margin-top: 20px;
    border-radius: var(--r-md);
    overflow: hidden;
    border: 1px solid var(--c-border-light);
    background: #fff;
}
.preview-iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
}
.preview-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--c-text-sec);
    font-size: var(--fs-md);
    background: var(--c-bg-alt);
    z-index: 1;
}
.preview-loader .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top-color: var(--c-primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
    margin-bottom: 12px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@media (max-width: 768px) {
    .preview-iframe-wrapper {
        height: 450px;
    }
}
