/* =============================================================================
   WestDevice-Service | template.css
   Joomla 5 Template — Основные стили
   ============================================================================= */

/* ─── CSS ПЕРЕМЕННЫЕ (значения по умолчанию) ─────────────────────────────── */
:root {
    --wd-primary:       #FF6B00;
    --wd-secondary:     #FF8C00;
    --wd-accent:        #FF4500;
    --wd-dark:          #1A1A1A;
    --wd-light-bg:      #FFF8F0;
    --wd-text:          #333333;
    --wd-link:          #FF6B00;
    --wd-link-hover:    #CC5500;
    --wd-font-heading:  'Oswald', sans-serif;
    --wd-font-body:     'Open Sans', sans-serif;
    --wd-font-size:     16px;
    --wd-line-height:   1.65;
    --wd-site-width:    1280px;
    --wd-sidebar-width: 25%;
    --wd-content-width: 50%;
    --wd-header-bg:     #1A1A1A;
    --wd-topbar-bg:     #FF6B00;
    --wd-menu-bg:       #222222;
    --wd-menu-text:     #FFFFFF;
    --wd-menu-hover-bg: #FF6B00;
    --wd-dropdown-bg:   #2D2D2D;
    --wd-slideshow-height: 500px;
    --wd-slideshow-overlay: rgba(255,107,0,0.30);
    --wd-footer-bg:     #1A1A1A;
    --wd-footer-text:   #CCCCCC;
    --wd-copyright-bg:  #111111;
    --wd-footer-cols:   3;
    --wd-border-radius: 4px;
    --wd-shadow:        0 2px 12px rgba(0,0,0,0.18);
    --wd-module-bg:     #FFFFFF;

    /* Системные */
    --wd-gap:           24px;
    --wd-gap-sm:        16px;
    --wd-gap-lg:        40px;
    --wd-transition:    0.25s ease;
    --wd-white:         #FFFFFF;
    --wd-gray-100:      #F5F5F5;
    --wd-gray-200:      #EBEBEB;
    --wd-gray-300:      #D0D0D0;
    --wd-gray-500:      #888888;
    --wd-gray-700:      #555555;
}

/* ─── RESET & BASE ──────────────────────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: var(--wd-font-size);
}

body {
    font-family: var(--wd-font-body);
    font-size: var(--wd-font-size);
    line-height: var(--wd-line-height);
    color: var(--wd-text);
    background: var(--wd-light-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ─── ТИПОГРАФИКА ────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--wd-font-heading);
    color: var(--wd-dark);
    line-height: 1.25;
    margin-bottom: 0.75em;
    font-weight: 600;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1em; }

a {
    color: var(--wd-link);
    text-decoration: none;
    transition: color var(--wd-transition);
}
a:hover { color: var(--wd-link-hover); text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--wd-primary); outline-offset: 2px; }

ul, ol { padding-left: 1.5em; margin-bottom: 1em; }
li { margin-bottom: 0.25em; }

blockquote {
    border-left: 4px solid var(--wd-primary);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    background: var(--wd-light-bg);
    border-radius: 0 var(--wd-border-radius) var(--wd-border-radius) 0;
    font-style: italic;
    color: var(--wd-gray-700);
}

code, pre {
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.9em;
}
code {
    background: var(--wd-gray-100);
    padding: 0.15em 0.4em;
    border-radius: calc(var(--wd-border-radius) / 2);
    color: var(--wd-accent);
}
pre {
    background: var(--wd-dark);
    color: var(--wd-gray-200);
    padding: 1.25em;
    overflow-x: auto;
    border-radius: var(--wd-border-radius);
    margin-bottom: 1.5em;
}
pre code { background: none; color: inherit; padding: 0; }

hr {
    border: none;
    border-top: 2px solid var(--wd-gray-200);
    margin: 2em 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}
th {
    background: var(--wd-primary);
    color: var(--wd-white);
    padding: 0.75em 1em;
    text-align: left;
    font-family: var(--wd-font-heading);
    font-weight: 600;
}
td {
    padding: 0.65em 1em;
    border-bottom: 1px solid var(--wd-gray-200);
}
tr:nth-child(even) td { background: var(--wd-light-bg); }
tr:hover td { background: rgba(255,107,0,0.05); }

/* ─── КНОПКИ ──────────────────────────────────────────────────────────────── */
.btn,
button:not(.wd-nav-toggle):not(.wd-back-top),
input[type="submit"],
input[type="button"],
input[type="reset"] {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    padding: 0.65em 1.5em;
    border-radius: var(--wd-border-radius);
    font-family: var(--wd-font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--wd-transition);
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.4;
}

/* Filled (default) */
.wd-btn-filled .btn,
.wd-btn-filled button:not(.wd-nav-toggle):not(.wd-back-top),
.wd-btn-filled input[type="submit"],
.btn-primary, .btn.btn-primary {
    background: var(--wd-primary);
    color: var(--wd-white);
    border-color: var(--wd-primary);
    box-shadow: 0 2px 8px rgba(255,107,0,0.3);
}
.wd-btn-filled .btn:hover,
.wd-btn-filled button:not(.wd-nav-toggle):not(.wd-back-top):hover,
.wd-btn-filled input[type="submit"]:hover {
    background: var(--wd-accent);
    border-color: var(--wd-accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255,107,0,0.4);
    text-decoration: none;
}

/* Outline */
.wd-btn-outline .btn,
.wd-btn-outline button:not(.wd-nav-toggle):not(.wd-back-top),
.wd-btn-outline input[type="submit"] {
    background: transparent;
    color: var(--wd-primary);
    border-color: var(--wd-primary);
}
.wd-btn-outline .btn:hover {
    background: var(--wd-primary);
    color: var(--wd-white);
}

/* Gradient */
.wd-btn-gradient .btn,
.wd-btn-gradient button:not(.wd-nav-toggle):not(.wd-back-top),
.wd-btn-gradient input[type="submit"] {
    background: linear-gradient(135deg, var(--wd-primary), var(--wd-accent));
    color: var(--wd-white);
    border-color: transparent;
    box-shadow: 0 2px 10px rgba(255,107,0,0.35);
}
.wd-btn-gradient .btn:hover {
    background: linear-gradient(135deg, var(--wd-secondary), var(--wd-primary));
    transform: translateY(-1px);
}

/* Flat */
.wd-btn-flat .btn,
.wd-btn-flat button:not(.wd-nav-toggle):not(.wd-back-top),
.wd-btn-flat input[type="submit"] {
    background: rgba(255,107,0,0.12);
    color: var(--wd-primary);
    border-color: transparent;
    box-shadow: none;
}
.wd-btn-flat .btn:hover {
    background: rgba(255,107,0,0.22);
}

/* ─── ФОРМЫ ───────────────────────────────────────────────────────────────── */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 0.65em 1em;
    border: 2px solid var(--wd-gray-300);
    border-radius: var(--wd-border-radius);
    font-family: var(--wd-font-body);
    font-size: var(--wd-font-size);
    color: var(--wd-text);
    background: var(--wd-white);
    transition: border-color var(--wd-transition), box-shadow var(--wd-transition);
    -webkit-appearance: none;
    appearance: none;
}
input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--wd-primary);
    box-shadow: 0 0 0 3px rgba(255,107,0,0.15);
}
textarea { resize: vertical; min-height: 120px; }
label {
    display: block;
    margin-bottom: 0.4em;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--wd-dark);
}
.control-group { margin-bottom: 1.25em; }

/* ─── КОНТЕЙНЕР ──────────────────────────────────────────────────────────── */
.wd-container {
    max-width: var(--wd-site-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ─── WRAPPER ────────────────────────────────────────────────────────────── */
.wd-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: visible;
}

/* ─── PRELOADER ───────────────────────────────────────────────────────────── */
.wd-preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--wd-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}
.wd-preloader.wd-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.wd-preloader-inner { text-align: center; }
.wd-preloader-logo {
    font-family: var(--wd-font-heading);
    font-size: 3rem;
    font-weight: 700;
    color: var(--wd-primary);
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
    animation: wd-pulse 1.5s ease-in-out infinite;
}
.wd-preloader-bar {
    width: 200px;
    height: 3px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    overflow: hidden;
    margin: 0 auto;
}
.wd-preloader-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--wd-primary), var(--wd-secondary));
    border-radius: 10px;
    animation: wd-loading 1.2s ease-in-out infinite;
}

@keyframes wd-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
@keyframes wd-loading {
    0% { width: 0; transform: translateX(0); }
    50% { width: 60%; }
    100% { width: 0; transform: translateX(200px); }
}

/* ─── ТОПБАР ─────────────────────────────────────────────────────────────── */
.wd-topbar {
    background: var(--wd-topbar-bg);
    color: var(--wd-white);
    font-size: 0.82rem;
    padding: 0.45em 0;
    position: relative;
    z-index: 200;
}
.wd-topbar a { color: rgba(255,255,255,0.9); }
.wd-topbar a:hover { color: var(--wd-white); text-decoration: none; }
.wd-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1em;
    flex-wrap: wrap;
}
.wd-topbar-left, .wd-topbar-center, .wd-topbar-right {
    display: flex;
    align-items: center;
    gap: 1em;
}

/* ─── СОЦСЕТИ ────────────────────────────────────────────────────────────── */
.wd-social-icons {
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.wd-social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    color: var(--wd-white) !important;
    transition: background var(--wd-transition), transform var(--wd-transition);
}
.wd-social-icons a:hover {
    background: rgba(255,255,255,0.4);
    transform: translateY(-2px);
}

/* ─── ШАПКА ──────────────────────────────────────────────────────────────── */
.wd-header {
    background: var(--wd-header-bg);
    padding: 1.25rem 0;
    position: relative;
    z-index: 150;
}
.wd-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--wd-gap);
    flex-wrap: wrap;
}
.wd-header-logo { flex: 1; }
.wd-header-logo1,
.wd-header-logo2 { flex: 1; }

/* ─── БРЕНД ──────────────────────────────────────────────────────────────── */
.wd-site-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75em;
    text-decoration: none;
}
.wd-brand-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--wd-primary), var(--wd-accent));
    border-radius: var(--wd-border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--wd-font-heading);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--wd-white);
    letter-spacing: 0.05em;
    box-shadow: 0 2px 12px rgba(255,107,0,0.4);
    flex-shrink: 0;
}
.wd-brand-text {
    font-family: var(--wd-font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--wd-white);
    letter-spacing: 0.02em;
    line-height: 1;
}
.wd-site-brand:hover .wd-brand-text { color: var(--wd-primary); text-decoration: none; }
.wd-site-brand:hover { text-decoration: none; }

/* Стили шапки */
.wd-header-style2 { border-bottom: 4px solid var(--wd-primary); }
.wd-header-style3 .wd-container { max-width: 100%; }
.wd-header-style4 { padding: 0.75rem 0; }

/* ─── HEADER-BAND ────────────────────────────────────────────────────────── */
.wd-header-band {
    background: rgba(0,0,0,0.04);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.1);
    padding: 0.75rem 0;
}

/* ─── НАВИГАЦИЯ ──────────────────────────────────────────────────────────── */
.wd-nav {
    background: var(--wd-menu-bg);
    position: relative;
    z-index: 500;
    transition: box-shadow var(--wd-transition);
    overflow: visible;
}
.wd-nav.wd-nav-bordered {
    border-bottom: 3px solid var(--wd-primary);
}
.wd-nav.wd-stuck {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: wd-slidedown 0.3s ease;
}
@keyframes wd-slidedown {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}
.wd-nav-inner {
    display: flex;
    align-items: center;
    position: relative;
    overflow: visible;
}
.wd-menu-wrap { flex: 1; }

/* Мобильный тоггл */
.wd-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: auto;
}
.wd-nav-toggle span {
    display: block;
    height: 2px;
    background: var(--wd-menu-text);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.wd-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.wd-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.wd-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Joomla nav module overrides */
.wd-pos-menu .nav { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.wd-pos-menu .nav > li > a,
.wd-pos-menu .nav > li > span {
    display: flex;
    align-items: center;
    gap: 0.35em;
    padding: 1em 1.1em;
    color: var(--wd-menu-text);
    font-family: var(--wd-font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background var(--wd-transition), color var(--wd-transition);
    white-space: nowrap;
    position: relative;
}
.wd-pos-menu .nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--wd-primary);
    transition: width var(--wd-transition);
}
.wd-pos-menu .nav > li > a:hover::after,
.wd-pos-menu .nav > li.active > a::after,
.wd-pos-menu .nav > li.current > a::after { width: 60%; }
.wd-pos-menu .nav > li > a:hover,
.wd-pos-menu .nav > li.active > a,
.wd-pos-menu .nav > li.current > a {
    background: var(--wd-menu-hover-bg);
    color: var(--wd-white);
    text-decoration: none;
}
.wd-pos-menu .nav > li > a:hover::after { width: 0; }

/* Dropdown */
.wd-pos-menu .nav > li { position: relative; }
.wd-pos-menu .nav > li > ul,
.wd-pos-menu .nav > li > .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--wd-dropdown-bg);
    list-style: none;
    margin: 0;
    padding: 0.5em 0;
    box-shadow: var(--wd-shadow);
    border-top: 3px solid var(--wd-primary);
    border-radius: 0 0 var(--wd-border-radius) var(--wd-border-radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--wd-transition);
    z-index: 1000;
}
.wd-pos-menu .nav > li:hover > ul,
.wd-pos-menu .nav > li:hover > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.wd-pos-menu .nav > li > ul a,
.wd-pos-menu .nav > li > .dropdown-menu a {
    display: block;
    padding: 0.6em 1.25em;
    color: var(--wd-gray-300);
    font-size: 0.875rem;
    transition: all var(--wd-transition);
    text-decoration: none;
    border-left: 3px solid transparent;
}
.wd-pos-menu .nav > li > ul a:hover,
.wd-pos-menu .nav > li > .dropdown-menu a:hover {
    color: var(--wd-white);
    background: rgba(255,107,0,0.15);
    border-left-color: var(--wd-primary);
    padding-left: 1.6em;
}

/* ─── TOP-ROW ────────────────────────────────────────────────────────────── */
.wd-top-row {
    padding: var(--wd-gap) 0;
    background: var(--wd-white);
}
.wd-row {
    display: flex;
    gap: var(--wd-gap);
    flex-wrap: wrap;
}
.wd-row-3 > .wd-col { flex: 1 1 calc(33.333% - var(--wd-gap)); min-width: 200px; }
.wd-row-2 > .wd-col { flex: 1 1 calc(50% - var(--wd-gap)); min-width: 200px; }
.wd-row-4 > .wd-col { flex: 1 1 calc(25% - var(--wd-gap)); min-width: 180px; }

/* ─── СЛАЙДЕР ────────────────────────────────────────────────────────────── */
.wd-slideshow {
    min-height: var(--wd-slideshow-height);
    position: relative;
    overflow: hidden;
    background: transparent;
}
.wd-slideshow.wd-slideshow-overlay::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--wd-slideshow-overlay);
    z-index: 1;
    pointer-events: none;
}
.wd-pos-slideshow { position: relative; min-height: var(--wd-slideshow-height); }
.wd-slideshow img { width: 100%; height: var(--wd-slideshow-height); object-fit: cover; }

/* ─── NEW ────────────────────────────────────────────────────────────────── */
.wd-new {
    background: linear-gradient(135deg, var(--wd-primary), var(--wd-accent));
    padding: var(--wd-gap) 0;
    position: relative;
    overflow: hidden;
}
.wd-new::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -5%;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255,255,255,0.06);
    pointer-events: none;
}
.wd-new .wd-module-title,
.wd-new h2, .wd-new h3 { color: var(--wd-white); }
.wd-new a { color: rgba(255,255,255,0.85); }
.wd-new a:hover { color: var(--wd-white); }
.wd-new p { color: rgba(255,255,255,0.9); }

/* ─── ХЛЕБНЫЕ КРОШКИ ─────────────────────────────────────────────────────── */
.wd-breadcrumbs {
    background: var(--wd-gray-100);
    border-bottom: 1px solid var(--wd-gray-200);
    padding: 0.65rem 0;
    font-size: 0.85rem;
}
.wd-breadcrumbs .pathway,
.wd-breadcrumbs nav { display: flex; align-items: center; flex-wrap: wrap; gap: 0.3em; list-style: none; margin: 0; padding: 0; }
.wd-breadcrumbs .pathway li,
.wd-breadcrumbs nav li { display: flex; align-items: center; gap: 0.3em; }
.wd-breadcrumbs .pathway li + li::before,
.wd-breadcrumbs nav li + li::before { content: '›'; color: var(--wd-gray-500); font-size: 1.1em; }
.wd-breadcrumbs a { color: var(--wd-primary); }
.wd-breadcrumbs a:hover { color: var(--wd-accent); text-decoration: none; }
.wd-breadcrumbs .active,
.wd-breadcrumbs li:last-child { color: var(--wd-gray-500); }

/* ─── ОСНОВНОЙ КОНТЕНТ ───────────────────────────────────────────────────── */
.wd-main { flex: 1; padding: var(--wd-gap-lg) 0; }

.wd-content-layout {
    display: flex;
    gap: var(--wd-gap);
    align-items: flex-start;
}
.wd-component { flex: 1; min-width: 0; }

/* Колоночная сетка */
.col-main-both .wd-sidebar      { flex: 0 0 var(--wd-sidebar-width); }
.col-main-both .wd-component    { flex: 1; }
.col-main-one  .wd-sidebar      { flex: 0 0 var(--wd-sidebar-width); }
.col-main-one  .wd-component    { flex: 1; }
.col-main-full .wd-component    { flex: 1; }

/* ─── СООБЩЕНИЯ СИСТЕМЫ ───────────────────────────────────────────────────── */
.wd-component .alert,
div.alert {
    padding: 1em 1.25em;
    border-radius: var(--wd-border-radius);
    margin-bottom: 1.25em;
    border-left: 4px solid;
    font-size: 0.9rem;
}
.alert-success, .alert-message  { background: #f0fff4; border-color: #48bb78; color: #276749; }
.alert-info                     { background: #ebf8ff; border-color: #4299e1; color: #2b6cb0; }
.alert-warning                  { background: #fffaf0; border-color: var(--wd-secondary); color: #975a16; }
.alert-error, .alert-danger     { background: #fff5f5; border-color: #fc8181; color: #c53030; }

/* ─── MAIN-ROW ───────────────────────────────────────────────────────────── */
.wd-main-row {
    background: var(--wd-light-bg);
    padding: var(--wd-gap-lg) 0;
    border-top: 1px solid var(--wd-gray-200);
}

/* ─── CONT-ROW ───────────────────────────────────────────────────────────── */
.wd-cont-row {
    background: var(--wd-white);
    padding: var(--wd-gap-lg) 0;
    border-top: 1px solid var(--wd-gray-200);
}

/* ─── BOTTOM ─────────────────────────────────────────────────────────────── */
.wd-bottom {
    background: var(--wd-gray-100);
    padding: var(--wd-gap) 0;
    border-top: 1px solid var(--wd-gray-200);
}

/* ─── YANDEX ─────────────────────────────────────────────────────────────── */
.wd-yandex { line-height: 0; overflow: hidden; }
.wd-yandex iframe,
.wd-yandex [class*="ymaps"] { max-width: 100% !important; }

/* ─── FOOTER ─────────────────────────────────────────────────────────────── */
.wd-footer {
    background: var(--wd-footer-bg);
    color: var(--wd-footer-text);
    padding: var(--wd-gap-lg) 0 var(--wd-gap) 0;
    margin-top: auto;
}
.wd-footer.wd-footer-bordered {
    border-top: 4px solid var(--wd-primary);
}
.wd-footer a { color: rgba(255,255,255,0.7); }
.wd-footer a:hover { color: var(--wd-primary); text-decoration: none; }
.wd-footer h2, .wd-footer h3, .wd-footer h4 {
    color: var(--wd-white);
    font-size: 1rem;
    margin-bottom: 1em;
    padding-bottom: 0.5em;
    border-bottom: 2px solid var(--wd-primary);
    display: inline-block;
}
.wd-footer ul { list-style: none; padding: 0; margin: 0; }
.wd-footer ul li { padding: 0.3em 0; border-bottom: 1px solid rgba(255,255,255,0.06); }
.wd-footer ul li:last-child { border-bottom: none; }
.wd-footer ul li a::before { content: '→ '; color: var(--wd-primary); font-size: 0.8em; margin-right: 0.2em; }
.wd-footer p { color: var(--wd-footer-text); }

/* Колонки футера */
.wd-footer-columns { display: flex; gap: var(--wd-gap-lg); flex-wrap: wrap; }
.wd-footer-cols-1 .wd-pos-footer > .wd-module-wrap { flex: 0 0 100%; }
.wd-footer-cols-2 .wd-pos-footer > .wd-module-wrap { flex: 1 1 calc(50% - var(--wd-gap)); }
.wd-footer-cols-3 .wd-pos-footer > .wd-module-wrap { flex: 1 1 calc(33.333% - var(--wd-gap)); }
.wd-footer-cols-4 .wd-pos-footer > .wd-module-wrap { flex: 1 1 calc(25% - var(--wd-gap)); }

/* ─── COPYRIGHT ───────────────────────────────────────────────────────────── */
.wd-copyright {
    background: var(--wd-copyright-bg);
    padding: 0.875em 0;
    font-size: 0.82rem;
}
.wd-copyright-default {
    text-align: center;
    color: var(--wd-gray-500);
    margin: 0;
}
.wd-copyright a { color: var(--wd-primary); }
.wd-copyright a:hover { color: var(--wd-secondary); text-decoration: none; }

/* ─── DEBUG ───────────────────────────────────────────────────────────────── */
.wd-debug {
    background: #0d1117;
    color: #c9d1d9;
    font-family: 'Consolas', monospace;
    font-size: 0.8rem;
    padding: var(--wd-gap) 0;
    border-top: 2px solid var(--wd-primary);
}
.wd-debug a { color: var(--wd-secondary); }

/* ─── КНОПКА НАВЕРХ ──────────────────────────────────────────────────────── */
.wd-back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    width: 46px;
    height: 46px;
    background: var(--wd-primary);
    color: var(--wd-white);
    border: none;
    border-radius: var(--wd-border-radius);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(255,107,0,0.4);
    transition: all var(--wd-transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}
.wd-back-top.wd-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.wd-back-top:hover {
    background: var(--wd-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255,107,0,0.5);
}

/* ─── АНИМАЦИИ ПОЯВЛЕНИЯ ──────────────────────────────────────────────────── */
.wd-animate .wd-fadein {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.wd-animate .wd-fadein.wd-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── СЛУЖЕБНЫЕ КЛАССЫ ────────────────────────────────────────────────────── */
.wd-clearfix::after { content: ''; display: table; clear: both; }
.wd-text-center { text-align: center; }
.wd-text-right  { text-align: right; }
.wd-hide        { display: none !important; }
.wd-sr-only     { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.wd-badge {
    display: inline-block;
    padding: 0.2em 0.6em;
    background: var(--wd-primary);
    color: var(--wd-white);
    border-radius: var(--wd-border-radius);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.wd-divider {
    display: flex;
    align-items: center;
    gap: 1em;
    margin: 1.5em 0;
    color: var(--wd-gray-500);
}
.wd-divider::before,
.wd-divider::after { content: ''; flex: 1; height: 1px; background: var(--wd-gray-200); }

/* ─── КОМПОНЕНТНЫЕ СТИЛИ ──────────────────────────────────────────────────── */
/* Записи (articles) */
.blog, .com-content-article { max-width: 100%; }
.blog .items-leading, .blog-items-leading { margin-bottom: var(--wd-gap); }

article.item-page, .article-item {
    background: var(--wd-white);
    padding: var(--wd-gap);
    border-radius: var(--wd-border-radius);
    box-shadow: var(--wd-shadow);
    margin-bottom: var(--wd-gap);
}

/* Изображение статьи */
.article-info-term { color: var(--wd-gray-500); font-size: 0.85rem; }
.article-info .tag-link {
    display: inline-block;
    padding: 0.2em 0.7em;
    background: var(--wd-light-bg);
    border: 1px solid var(--wd-gray-200);
    border-radius: calc(var(--wd-border-radius) * 2);
    font-size: 0.8rem;
    color: var(--wd-primary);
    margin: 0.15em;
    transition: all var(--wd-transition);
}
.article-info .tag-link:hover {
    background: var(--wd-primary);
    color: var(--wd-white);
    border-color: var(--wd-primary);
    text-decoration: none;
}

/* Пагинация */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35em;
    margin: var(--wd-gap) 0;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}
.pagination .page-item .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.6em;
    background: var(--wd-white);
    border: 2px solid var(--wd-gray-200);
    border-radius: var(--wd-border-radius);
    color: var(--wd-text);
    font-weight: 600;
    font-size: 0.875rem;
    transition: all var(--wd-transition);
    text-decoration: none;
}
.pagination .page-item.active .page-link,
.pagination .page-item .page-link:hover {
    background: var(--wd-primary);
    border-color: var(--wd-primary);
    color: var(--wd-white);
}
.pagination .page-item.disabled .page-link { opacity: 0.5; pointer-events: none; }

/* Категории */
.categories-list, .category-list {
    list-style: none;
    padding: 0;
}
.categories-list li {
    padding: 0.5em 0;
    border-bottom: 1px solid var(--wd-gray-200);
}
.categories-list li:last-child { border-bottom: none; }

/* Поиск */
#searchword, #search-searchword {
    border-radius: var(--wd-border-radius) 0 0 var(--wd-border-radius);
}
#search-btn {
    border-radius: 0 var(--wd-border-radius) var(--wd-border-radius) 0;
    background: var(--wd-primary);
    color: var(--wd-white);
    border: 2px solid var(--wd-primary);
    padding: 0.65em 1.25em;
    cursor: pointer;
    font-weight: 600;
    transition: background var(--wd-transition);
}
#search-btn:hover { background: var(--wd-accent); border-color: var(--wd-accent); }


/* ─── ФИКС ВЫПАДАЮЩИХ МЕНЮ ──────────────────────────────────────────────── */
.wd-wrapper { overflow: visible !important; overflow-x: visible !important; }
.wd-header { overflow: visible !important; }
.wd-header-inner { overflow: visible !important; }
.wd-nav { overflow: visible !important; }
.wd-nav-inner { overflow: visible !important; }
.wd-menu-wrap { overflow: visible !important; }
