/* ============================================
   FLOWAXY THEME FRAMEWORK
   Каркас темы - статичный, не изменяется

   Примечание: CSS переменные подключены через variables.css
   ============================================ */

/* ============================================
   FONTS
   ============================================ */
@font-face {
    font-family: 'Raleway';
    src: url('../fonts/raleway/raleway-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('../fonts/raleway/raleway-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('../fonts/raleway/raleway-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('../fonts/raleway/raleway-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Raleway';
    src: url('../fonts/raleway/raleway-semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit';
    src: url('../fonts/kanit/kanit-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit';
    src: url('../fonts/kanit/kanit-bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit';
    src: url('../fonts/kanit/kanit-light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit';
    src: url('../fonts/kanit/kanit-medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Kanit';
    src: url('../fonts/kanit/kanit-semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    line-height: var(--line-height-base);
    color: var(--color-text);
    background-color: var(--color-bg);
    min-height: 100vh;
}

/* ============================================
   HEADER (Каркас)
   ============================================ */
.site-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-bottom: none;
    box-shadow: var(--shadow-header);
    padding: 10px 0;
    position: relative;
    z-index: var(--z-header);
}

.header-top {
    display: flex;
    align-items: center;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    gap: var(--spacing-xl);
}

.header-left {
    display: flex;
    align-items: center;
    width: 200px;
    flex-shrink: 0;
}

.header-center {
    display: flex;
    align-items: center;
    flex: 1;
}

.main-nav {
    display: flex;
    gap: var(--spacing-xxl);
}

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--color-primary-light);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.nav-link:hover {
    text-decoration: underline;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-base);
}

.logo-link:hover {
    opacity: 0.9;
}

.logo-image {
    height: 24px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--color-white);
    letter-spacing: 0.1px;
    line-height: 1;
}

.header-right {
    display: flex;
    align-items: center;
    width: var(--sidebar-right-width);
    flex-shrink: 0;
    justify-content: flex-end;
}

.search-container {
    position: relative;
    display: flex;
    align-items: stretch;
    gap: 0;
    width: var(--sidebar-right-width);
}

.search-input {
    flex: 1;
    height: 32px;
    padding: 0 var(--spacing-md);
    background-color: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-radius: 6px 0 0 6px;
    color: var(--color-text);
    font-size: var(--font-size-sm);
    border-right: none;
    transition: border-color var(--transition-base), background-color var(--transition-base);
}

.search-input::placeholder {
    color: var(--color-text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
    background-color: var(--color-white);
}

.search-btn {
    width: 36px;
    height: 32px;
    padding: 0;
    background-color: var(--color-white);
    border: 1px solid var(--color-border-light);
    border-left: none;
    border-radius: 0 6px 6px 0;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-base), border-color var(--transition-base);
    flex-shrink: 0;
}

.search-btn:hover {
    background-color: var(--color-bg-hover);
    border-color: var(--color-primary);
}

.search-btn:active {
    background-color: var(--color-bg-section);
}

.search-btn svg {
    width: var(--spacing-lg);
    height: var(--spacing-lg);
}

/* ============================================
   MAIN LAYOUT (Каркас)
   ============================================ */
.main-layout {
    display: flex;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: var(--spacing-xl);
    gap: var(--spacing-xl);
}

/* ============================================
   LEFT SIDEBAR (Каркас)
   ============================================ */
.sidebar-left {
    width: var(--sidebar-width);
    flex-shrink: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    position: sticky;
    top: var(--spacing-xl);
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.sidebar-section {
    margin-bottom: 0;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

.sidebar-nav-section {
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-bg-light);
}

.sidebar-nav-section .sidebar-title {
    margin: 0;
    padding: var(--spacing-lg);
    background-color: var(--color-bg-section);
    border: none;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--font-size-xs);
}

.sidebar-title {
    font-family: var(--font-family-heading);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-text);
    text-transform: uppercase;
    margin: 0 0 var(--spacing-lg) 0;
    letter-spacing: 1px;
    padding: 0;
    border: none;
}

.sidebar-info-section {
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 0;
    background-color: var(--color-bg-light);
    margin-bottom: 0;
}

.sidebar-info-section .sidebar-title {
    margin: 0;
    padding: var(--spacing-lg);
    background-color: var(--color-bg-section);
    border: none;
    border-bottom: 1px solid var(--color-border);
    font-size: var(--font-size-xs);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: 10px var(--spacing-md);
    color: var(--color-text);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: 0;
    transition: all var(--transition-base);
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background-color: var(--color-bg-section);
    border-left-color: var(--color-text);
    color: var(--color-text);
}

.nav-item.active {
    background-color: var(--color-bg-hover);
    border-left-color: var(--color-text);
    font-weight: 600;
}

.nav-icon {
    font-size: var(--font-size-base);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    color: var(--color-text-secondary);
    transition: color var(--transition-base);
}

.nav-item:hover .nav-icon {
    color: var(--color-text);
}

.nav-item.active .nav-icon {
    color: var(--color-text);
}

.nav-arrow {
    font-size: 10px;
    color: var(--color-text-light);
    margin-left: auto;
    transition: transform var(--transition-base), color var(--transition-base);
}

.nav-item.active .nav-arrow {
    color: var(--color-text);
    transform: rotate(90deg);
}

.nav-text {
    flex: 1;
    line-height: var(--line-height-relaxed);
}

.nav-subcategories {
    display: none;
    margin-top: var(--spacing-sm);
    padding-left: 30px;
    border-left: 2px solid var(--color-border-subtle);
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity var(--transition-slow), max-height var(--transition-slow);
}

.nav-subcategories.active {
    display: block;
    opacity: 1;
    max-height: 1000px;
}

.nav-subitem {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--font-size-sm);
    font-weight: 400;
    border-radius: 0;
    transition: all var(--transition-base);
    margin-bottom: 2px;
}

.nav-subitem:hover {
    background-color: var(--color-bg-section);
    color: var(--color-text);
    padding-left: var(--spacing-lg);
}

.nav-subicon {
    font-size: var(--font-size-sm);
    width: var(--spacing-lg);
    text-align: center;
    flex-shrink: 0;
    color: var(--color-text-muted);
    transition: color var(--transition-base);
}

.nav-subitem:hover .nav-subicon {
    color: var(--color-text);
}

.nav-subtext {
    flex: 1;
    line-height: var(--line-height-tight);
}

.sidebar-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
    border: none;
    border-radius: 0;
    background-color: var(--color-bg-light);
    padding: var(--spacing-lg);
}

.info-item {
    padding: 18px;
    background-color: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    transition: all var(--transition-slow);
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.info-item:hover {
    background-color: var(--color-bg-light);
    border-color: var(--color-text);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.info-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    border: none;
    border-radius: 0;
    transition: all var(--transition-slow);
    z-index: 1;
}

.info-icon-right {
    top: var(--spacing-md);
    right: var(--spacing-md);
    width: 32px;
    height: 32px;
    opacity: 0.04;
}

.info-item:hover .info-icon-right {
    opacity: 0.06;
    transform: scale(1.1) rotate(5deg);
}

.info-icon i {
    color: var(--color-text);
    font-size: 28px;
}

.info-content {
    width: 100%;
    position: relative;
    z-index: 2;
}

.info-title {
    font-size: var(--font-size-xs);
    font-weight: 700;
    color: var(--color-text);
    margin: 0 0 var(--spacing-sm) 0;
    line-height: var(--line-height-tight);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    word-spacing: -1px;
}

.info-text {
    font-size: var(--font-size-xs);
    color: var(--color-text-secondary);
    margin: 0;
    line-height: var(--line-height-base);
    font-weight: 400;
}

/* ============================================
   MAIN CONTENT (Каркас)
   ============================================ */
.content-main {
    flex: 1;
    min-width: 0;
    align-self: flex-start;
}

/* ============================================
   RIGHT SIDEBAR (Каркас)
   ============================================ */
.sidebar-right {
    width: var(--sidebar-right-width);
    flex-shrink: 0;
    position: sticky;
    top: var(--spacing-xl);
    align-self: flex-start;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

/* ============================================
   FOOTER (Каркас)
   ============================================ */
.site-footer {
    background-color: var(--color-bg-light);
    border-top: 1px solid var(--color-border-light);
    padding: var(--spacing-xl) 0 var(--spacing-lg);
    margin-top: 10px;
}

.footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-xl);
    gap: var(--spacing-lg);
}

.footer-left {
    white-space: nowrap;
}

.footer-copyright {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    line-height: var(--line-height-relaxed);
    color: var(--color-text);
    font-weight: 400;
}

.footer-copyright-symbol {
    font-size: var(--font-size-sm);
}

.footer-year {
    font-size: var(--font-size-sm);
}

.footer-domain {
    letter-spacing: 0.5px;
    font-size: var(--font-size-sm);
    text-decoration: none;
    color: inherit;
    transition: opacity var(--transition-base);
}

.footer-domain:hover {
    opacity: 0.6;
    text-decoration: none;
    color: inherit;
}

.footer-center {
    display: flex;
    justify-content: center;
    flex: 1;
    gap: 18px;
}

.footer-link {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    transition: color var(--transition-base);
}

.footer-link:hover {
    color: var(--color-primary);
}

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

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