/* Pet Care Website - Animal Themed Design */
:root {
    --primary: #4a7c59;
    --primary-dark: #3a6348;
    --secondary: #6b9f7a;
    --accent: #f4a261;
    --accent-light: #ffb87a;
    --success: #2a9d8f;
    --warning: #e76f51;
    --bg-light: #f5f7f6;
    --bg-white: #ffffff;
    --bg-pattern: linear-gradient(135deg, #f5f7f6 0%, #e8edea 100%);
    --text-dark: #2b2d42;
    --text-gray: #6c757d;
    --border: #d4e4d9;
    --shadow: 0 2px 12px rgba(74, 124, 89, 0.1);
    --shadow-lg: 0 4px 20px rgba(74, 124, 89, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.8;
    color: var(--text-dark);
    background: var(--bg-pattern);
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: 0.01em;
}

body.menu-open {
    overflow: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header - Steam Style */
header {
    background: linear-gradient(180deg, #ffffff 0%, #f8faf9 100%);
    box-shadow: 0 2px 16px rgba(74, 124, 89, 0.12);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid var(--primary);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    position: relative;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    letter-spacing: -0.02em;
}

.logo:hover {
    color: var(--secondary);
}

/* Navigation - Steam Style */
nav {
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin: 0;
    margin-left: 0;
    padding: 0;
    padding-left: 0;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a,
.nav-menu > li > .submenu-trigger {
    display: block;
    padding: 0.6rem 1rem;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    white-space: nowrap;
}

.nav-menu > li > a:hover,
.nav-menu > li > .submenu-trigger:hover {
    background: rgba(74, 124, 89, 0.08);
    color: var(--primary);
}

.nav-menu > li.has-submenu > .submenu-trigger::after {
    content: '▼';
    font-size: 0.7rem;
    margin-left: 0.5rem;
    display: inline-block;
    transition: var(--transition);
}

.nav-menu > li.has-submenu:hover > .submenu-trigger::after {
    transform: rotate(180deg);
}

/* Submenu - Steam Style Dropdown */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    min-width: 300px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    border-radius: 10px;
    padding: 0.75rem 0;
    margin-top: 0.75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1001;
    border: 2px solid var(--border);
    max-height: 80vh;
    overflow-y: auto;
}

.nav-menu > li.has-submenu:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    list-style: none;
}

.submenu a {
    display: block;
    padding: 0.875rem 1.75rem;
    color: var(--text-dark);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    border-left: 4px solid transparent;
    line-height: 1.6;
}

.submenu a:hover {
    background: linear-gradient(90deg, rgba(74, 124, 89, 0.1) 0%, rgba(107, 159, 122, 0.05) 100%);
    color: var(--primary);
    border-left-color: var(--primary);
    padding-left: 2rem;
    font-weight: 500;
}

.submenu a:last-child {
    border-top: 2px solid var(--border);
    margin-top: 0.75rem;
    padding-top: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    background: linear-gradient(90deg, rgba(74, 124, 89, 0.05) 0%, transparent 100%);
}

.submenu a:last-child:hover {
    background: linear-gradient(90deg, rgba(74, 124, 89, 0.12) 0%, rgba(107, 159, 122, 0.06) 100%);
}

/* Burger Menu */
.burger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
    z-index: 1002;
    position: relative;
}

.burger span {
    width: 28px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
    transition: var(--transition);
    display: block;
}

.burger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger.active span:nth-child(2) {
    opacity: 0;
}

.burger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    .burger {
        display: flex;
    }
    
    nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--bg-white);
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 1001;
        overflow-y: auto;
        padding: 5rem 2rem 2rem;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
        -webkit-overflow-scrolling: touch;
    }
    
    nav.active {
        transform: translateX(0);
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
    }
    
    .nav-menu > li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }
    
    .nav-menu > li:first-child {
        border-top: 1px solid var(--border);
    }
    
    .nav-menu > li > a,
    .nav-menu > li > .submenu-trigger {
        padding: 1.25rem 1rem;
        border-radius: 0;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1rem;
    }
    
    .nav-menu > li.has-submenu > .submenu-trigger {
        cursor: pointer;
        user-select: none;
    }
    
    .nav-menu > li.has-submenu > .submenu-trigger::after {
        transform: rotate(0deg);
        transition: transform 0.3s ease;
    }
    
    .nav-menu > li.has-submenu.active > .submenu-trigger::after {
        transform: rotate(180deg);
    }
    
    .nav-menu > li.has-submenu:not(.active) > .submenu-trigger::after {
        transform: rotate(0deg) !important;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border);
        margin: 0;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        background: var(--bg-light);
        min-width: auto;
    }
    
    .nav-menu > li.has-submenu > .submenu {
        max-height: 0;
    }
    
    .nav-menu > li.has-submenu.active > .submenu {
        max-height: 2000px;
    }
    
    .submenu li {
        border-bottom: 1px solid rgba(212, 228, 217, 0.5);
    }
    
    .submenu li:last-child {
        border-bottom: none;
    }
    
    .submenu a {
        padding: 1rem 1rem 1rem 2.5rem;
        border-left: none;
        font-size: 0.95rem;
    }
    
    .submenu a:hover {
        padding-left: 2.75rem;
        border-left: none;
        background: rgba(74, 124, 89, 0.12);
    }
    
    .submenu a:last-child {
        border-top: 2px solid var(--border);
        margin-top: 0.5rem;
        padding-top: 1.25rem;
        font-weight: 600;
        color: var(--primary);
    }
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 3rem 0;
}

main .container {
    max-width: 1200px;
    padding: 0 2.5rem;
    width: 100%;
    box-sizing: border-box;
}

/* Typography */
h1 {
    font-size: 2.75rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.25rem;
    color: var(--primary);
    margin: 2.5rem 0 1.25rem;
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 0.75rem;
    font-weight: 600;
    line-height: 1.3;
}

h3 {
    font-size: 1.75rem;
    color: var(--primary);
    margin: 2rem 0 1rem;
    font-weight: 600;
    line-height: 1.4;
}

h4 {
    font-size: 1.35rem;
    color: var(--text-dark);
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

p {
    margin-bottom: 1.25rem;
    line-height: 1.9;
    color: var(--text-dark);
}

p.lead {
    font-size: 1.2rem;
    line-height: 1.85;
    color: var(--text-gray);
    margin-bottom: 2rem;
}

strong {
    font-weight: 600;
    color: var(--text-dark);
}

/* Links - красивые ссылки без подчеркивания */
a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    border-bottom: 2px solid transparent;
    padding-bottom: 2px;
}

a:hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

a:visited {
    color: var(--primary-dark);
}

a:active {
    color: var(--primary-dark);
}

/* Ссылки в контенте с текстом */
p a,
.content-with-image .text-content a,
.alert a,
.card a:not(.card-link) {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid rgba(74, 124, 89, 0.3);
    padding-bottom: 2px;
    transition: var(--transition);
    font-weight: 500;
}

p a:hover,
.content-with-image .text-content a:hover,
.alert a:hover,
.card a:not(.card-link):hover {
    color: var(--secondary);
    border-bottom-color: var(--secondary);
}

/* Cards */
.card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 16px rgba(74, 124, 89, 0.1);
    margin-bottom: 2rem;
    transition: var(--transition);
    border: 2px solid var(--border);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary) 0%, var(--secondary) 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(74, 124, 89, 0.2);
    border-color: var(--secondary);
}

.card:hover::before {
    transform: scaleX(1);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

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

.card h3 {
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.3;
}

.card p {
    color: var(--text-gray);
    line-height: 1.75;
}

/* Lists */
ul, ol {
    margin: 1.5rem 0;
    padding-left: 2.5rem;
    line-height: 1.9;
    margin-left: 2rem;
    margin-right: 2rem;
}

li {
    margin-bottom: 0.75rem;
    position: relative;
}

ul li::marker {
    color: var(--secondary);
}

ol li::marker {
    color: var(--primary);
    font-weight: 600;
}

/* Checkbox Lists */
.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist li {
    padding-left: 2.5rem;
    position: relative;
    margin-bottom: 1rem;
    line-height: 1.85;
}

.checklist li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
    font-size: 1.4rem;
    font-weight: bold;
    top: 0;
    line-height: 1.4;
}

/* Alert/Info Boxes */
.alert {
    padding: 1.5rem 2rem;
    border-radius: 12px;
    margin: 2rem 0;
    border-left: 5px solid;
    line-height: 1.8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: relative;
    background: var(--bg-white);
}

.alert::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    border-radius: 12px 0 0 12px;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: var(--secondary);
    color: #0c5460;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success);
    color: #155724;
}

/* Quick Answer Block */
.quick-answer {
    background: var(--bg-white);
    border: 2px solid var(--secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.quick-answer h3 {
    color: var(--secondary);
    margin-top: 0;
    border: none;
}

/* Table of Contents */
.toc {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.5rem;
    margin: 2rem 0;
}

.toc h3 {
    margin-top: 0;
    border: none;
}

.toc ul {
    list-style: none;
    padding-left: 0;
}

.toc a {
    color: var(--secondary);
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.5rem 0;
}

.toc a:hover {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 2px solid var(--primary);
    padding-left: 0.5rem;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
}

/* Image with text layouts */
.content-with-image {
    display: grid;
    grid-template-columns: minmax(280px, 350px) 1fr;
    gap: 2rem;
    align-items: start;
    margin: 2.5rem -2.5rem;
    padding: 1.5rem 2.5rem;
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    width: calc(100% + 5rem);
    max-width: calc(100% + 5rem);
    box-sizing: border-box;
    overflow: hidden;
}

/* Когда изображение идет первым (по умолчанию) - только для блоков без image-left/image-right */
.content-with-image:not(.image-left):not(.image-right):not(.reverse) > img:first-child {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}

.content-with-image:not(.image-left):not(.image-right):not(.reverse) > img:first-child ~ .text-content {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
}

/* Когда текст идет первым, а изображение вторым - только для блоков без image-left/image-right */
.content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child {
    grid-column: 1;
    grid-row: 1;
    align-self: start;
}

.content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child ~ img {
    grid-column: 2;
    grid-row: 1;
    align-self: start;
}

.content-with-image img {
    width: 100%;
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
    display: block;
    margin: 0;
}

.content-with-image .text-content {
    padding: 0;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    width: 100%;
    box-sizing: border-box;
}

/* Reverse layout for image-right */
.content-with-image.reverse,
.content-with-image.image-right {
    grid-template-columns: 1fr minmax(280px, 350px);
}

/* Для image-right: текст слева, изображение справа - независимо от порядка в HTML */
.content-with-image.image-right > .text-content {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.content-with-image.image-right > img {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.content-with-image.reverse > .text-content {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: start;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.content-with-image.reverse > img {
    grid-column: 2 !important;
    grid-row: 1 !important;
    align-self: start;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

/* Image left layout */
.content-with-image.image-left {
    grid-template-columns: minmax(280px, 350px) 1fr;
}

/* Для image-left: изображение слева, текст справа - независимо от порядка в HTML */
.content-with-image.image-left > img {
    grid-column: 1 !important;
    grid-row: 1 !important;
    max-width: 100%;
    align-self: start;
    position: relative;
    z-index: 1;
    width: 100%;
}

.content-with-image.image-left > .text-content {
    grid-column: 2 !important;
    grid-row: 1 !important;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    align-self: start;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

.content-with-image .text-content ul,
.content-with-image .text-content ol {
    margin-left: 1.5rem;
    padding-left: 2rem;
    margin-right: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.content-with-image .text-content p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: normal;
    max-width: 100%;
    width: 100%;
    line-height: 1.75;
    margin-bottom: 1rem;
    box-sizing: border-box;
    white-space: normal;
}

.content-with-image .text-content h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    white-space: normal;
    word-break: normal;
}

.content-with-image .text-content * {
    white-space: normal;
    max-width: 100%;
    box-sizing: border-box;
}

/* Защита от вертикального отображения текста */
.content-with-image .text-content,
.content-with-image .text-content p,
.content-with-image .text-content h3,
.content-with-image .text-content h2,
.content-with-image .text-content h1 {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    direction: ltr;
}

.content-with-image.image-left + *,
.content-with-image.image-right + * {
    clear: both;
    margin-top: 2rem;
}

.image-left + ul,
.image-left + ol,
.image-right + ul,
.image-right + ol {
    margin-left: 2rem;
    padding-left: 2.5rem;
    clear: both;
}

.content-with-image.reverse {
    flex-direction: row-reverse;
}

.image-left {
    float: left;
    margin: 0 2.5rem 1.5rem 0;
    max-width: 420px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
}

.image-right {
    float: right;
    margin: 0 0 1.5rem 2.5rem;
    max-width: 420px;
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    object-fit: cover;
}

.image-center {
    display: block;
    margin: 2.5rem auto;
    max-width: 650px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 0.5rem;
    font-style: italic;
}

.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.image-grid img {
    margin: 0;
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4/3;
}

/* Footer */
footer {
    background: linear-gradient(180deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: #fff;
    padding: 3rem 0 2rem;
    margin-top: 5rem;
    border-top: 3px solid var(--secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 1rem;
}

.footer-section a {
    color: #e0e0e0;
    text-decoration: none;
    display: block;
    margin-bottom: 0.75rem;
    transition: var(--transition);
    padding: 0.25rem 0;
}

.footer-section a:hover {
    color: #fff;
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 1.5rem;
    z-index: 10000;
    display: none;
}

.cookie-banner.active {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cookie-text {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-text p {
    margin: 0;
}

.cookie-text a {
    color: var(--secondary);
    text-decoration: none;
    border-bottom: 2px solid rgba(107, 159, 122, 0.3);
    padding-bottom: 2px;
    font-weight: 500;
    transition: var(--transition);
}

.cookie-text a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    flex: 1;
    min-width: 120px;
    font-size: 0.95rem;
}

.cookie-btn-accept {
    background: var(--success);
    color: white;
}

.cookie-btn-reject {
    background: var(--text-gray);
    color: white;
}

.cookie-btn-settings {
    background: var(--secondary);
    color: white;
}

.cookie-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.cookie-settings {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.cookie-settings.active {
    display: block;
}

.cookie-category {
    margin: 1rem 0;
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 6px;
}

.cookie-category label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.cookie-category input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.cookie-category.disabled {
    opacity: 0.6;
}

.cookie-category.disabled input {
    cursor: not-allowed;
}

/* Form */
form {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin: 2rem 0;
}

.form-group {
    margin-bottom: 1.75rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(107, 159, 122, 0.1);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-group .error {
    color: var(--warning);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error .error {
    display: block;
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--warning);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 0.25rem;
}

.btn-submit {
    background: var(--primary);
    color: white;
    padding: 0.875rem 2.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-submit:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Toast Notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--success);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    z-index: 10001;
    display: none;
    animation: slideIn 0.3s;
}

.toast.error {
    background: var(--warning);
}

.toast.active {
    display: block;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Search */
.search-box {
    margin: 2rem 0;
}

.search-box input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

.search-results {
    margin-top: 1rem;
}

.search-result-item {
    background: var(--bg-white);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid var(--secondary);
}

.search-result-item a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.search-result-item a:hover {
    text-decoration: none;
    border-bottom: 2px solid var(--primary);
    color: var(--secondary);
}


/* Responsive */
@media (min-width: 769px) and (max-width: 1200px) {
    .header-content {
        padding: 0.6rem 0;
    }
    
    .logo {
        font-size: 1.35rem;
    }
    
    .nav-menu > li > a,
    .nav-menu > li > .submenu-trigger {
        padding: 0.5rem 0.85rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 1024px) {
    .nav-menu {
        gap: 0.25rem;
    }
    
    .nav-menu > li > a,
    .nav-menu > li > .submenu-trigger {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Desktop and Laptop styles - адаптивность для ПК/ноутбуков */
@media (min-width: 1025px) and (max-width: 1440px) {
    .content-with-image {
        grid-template-columns: minmax(250px, 320px) 1fr;
        gap: 1.75rem;
        padding: 1.25rem 2.5rem;
        margin: 2.5rem -2.5rem;
        width: calc(100% + 5rem);
        max-width: calc(100% + 5rem);
    }
    
    /* Когда текст идет первым, изображение справа - только для блоков без image-left/image-right */
    .content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child {
        grid-column: 1;
    }
    
    .content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child ~ img {
        grid-column: 2;
    }
    
    /* Усиливаем специфичность для image-right и image-left */
    .content-with-image.image-right > .text-content {
        grid-column: 1 !important;
    }
    
    .content-with-image.image-right > img {
        grid-column: 2 !important;
    }
    
    .content-with-image.image-left > img {
        grid-column: 1 !important;
    }
    
    .content-with-image.image-left > .text-content {
        grid-column: 2 !important;
    }
    
    .cookie-banner {
        padding: 1.35rem;
    }
    
    .cookie-text {
        font-size: 0.95rem;
    }
    
    .cookie-btn {
        padding: 0.8rem 1.4rem;
        font-size: 0.95rem;
    }
    
    .content-with-image.image-left {
        grid-template-columns: minmax(250px, 320px) 1fr;
    }
    
    .content-with-image.image-right,
    .content-with-image.reverse {
        grid-template-columns: 1fr minmax(250px, 320px);
    }
    
    .content-with-image .text-content {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
}

@media (min-width: 1441px) {
    .content-with-image {
        grid-template-columns: minmax(300px, 400px) 1fr;
        gap: 2.5rem;
        padding: 2rem 2.5rem;
        margin: 2.5rem -2.5rem;
        width: calc(100% + 5rem);
        max-width: calc(100% + 5rem);
    }
    
    /* Когда текст идет первым, изображение справа - только для блоков без image-left/image-right */
    .content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child {
        grid-column: 1;
    }
    
    .content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child ~ img {
        grid-column: 2;
    }
    
    /* Усиливаем специфичность для image-right и image-left */
    .content-with-image.image-right > .text-content {
        grid-column: 1 !important;
    }
    
    .content-with-image.image-right > img {
        grid-column: 2 !important;
    }
    
    .content-with-image.image-left > img {
        grid-column: 1 !important;
    }
    
    .content-with-image.image-left > .text-content {
        grid-column: 2 !important;
    }
    
    .cookie-banner {
        padding: 1.5rem;
    }
    
    .cookie-content {
        max-width: 1400px;
    }
    
    .content-with-image.image-left {
        grid-template-columns: minmax(300px, 400px) 1fr;
    }
    
    .content-with-image.image-right,
    .content-with-image.reverse {
        grid-template-columns: 1fr minmax(300px, 400px);
    }
    
    .content-with-image .text-content {
        min-width: 0;
        max-width: 100%;
        width: 100%;
    }
}

/* Tablet styles */
@media (min-width: 769px) and (max-width: 1024px) {
    .content-with-image {
        grid-template-columns: minmax(220px, 280px) 1fr;
        gap: 1.5rem;
        width: calc(100% + 5rem);
        max-width: calc(100% + 5rem);
        padding: 1.25rem 2.5rem;
        margin: 2.5rem -2.5rem;
    }
    
    /* Когда текст идет первым, изображение справа - только для блоков без image-left/image-right */
    .content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child {
        grid-column: 1;
    }
    
    .content-with-image:not(.image-left):not(.image-right):not(.reverse) > .text-content:first-child ~ img {
        grid-column: 2;
    }
    
    /* Усиливаем специфичность для image-right и image-left */
    .content-with-image.image-right > .text-content {
        grid-column: 1 !important;
    }
    
    .content-with-image.image-right > img {
        grid-column: 2 !important;
    }
    
    .content-with-image.image-left > img {
        grid-column: 1 !important;
    }
    
    .content-with-image.image-left > .text-content {
        grid-column: 2 !important;
    }
    
    .content-with-image.image-left {
        grid-template-columns: minmax(220px, 280px) 1fr;
    }
    
    .content-with-image.image-right,
    .content-with-image.reverse {
        grid-template-columns: 1fr minmax(220px, 280px);
    }
    
    .cookie-banner {
        padding: 1.25rem;
    }
    
    .cookie-text {
        font-size: 0.92rem;
    }
    
    .cookie-btn {
        padding: 0.8rem 1.35rem;
        font-size: 0.92rem;
    }
    
    .content-with-image .text-content {
        min-width: 0;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: normal;
        width: 100%;
        box-sizing: border-box;
    }
    
    .content-with-image .text-content p {
        width: 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.25rem;
    }
    
    h2 {
        font-size: 1.9rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    .card-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content {
        padding: 0;
    }
    
    .cookie-text {
        font-size: 0.9rem;
        margin-bottom: 0.75rem;
    }
    
    .cookie-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
        min-width: auto;
    }
    
    .cookie-settings {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
    }
    
    .cookie-category {
        margin: 0.75rem 0;
        padding: 0.875rem;
    }
    
    .cookie-category label {
        font-size: 0.9rem;
        gap: 0.5rem;
    }
    
    .cookie-category p {
        font-size: 0.85rem;
        margin-top: 0.5rem;
    }
}

/* Very small screens */
@media (max-width: 480px) {
    .cookie-banner {
        padding: 0.875rem;
    }
    
    .cookie-text {
        font-size: 0.85rem;
        line-height: 1.5;
        margin-bottom: 0.625rem;
    }
    
    .cookie-buttons {
        gap: 0.625rem;
    }
    
    .cookie-btn {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    
    .cookie-settings h4 {
        font-size: 1rem;
    }
    
    .cookie-category {
        padding: 0.75rem;
        margin: 0.625rem 0;
    }
    
    .cookie-category label {
        font-size: 0.85rem;
    }
    
    .cookie-category p {
        font-size: 0.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .toast {
        right: 10px;
        left: 10px;
    }
    
    .content-with-image {
        grid-template-columns: 1fr;
        padding: 1rem;
        margin: 1.5rem 0;
        gap: 1.5rem;
        width: 100%;
        max-width: 100%;
    }
    
    .content-with-image img {
        grid-column: 1;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-bottom: 0;
        align-self: start;
    }
    
    .content-with-image .text-content {
        grid-column: 1;
        min-width: 0;
        max-width: 100%;
        overflow-wrap: break-word;
        word-wrap: break-word;
        word-break: normal;
        width: 100%;
        box-sizing: border-box;
    }
    
    .content-with-image.reverse,
    .content-with-image.image-right,
    .content-with-image.image-left {
        grid-template-columns: 1fr;
    }
    
    /* На мобильных все элементы в одной колонке, порядок сохраняется из HTML */
    .content-with-image img,
    .content-with-image .text-content,
    .content-with-image.reverse img,
    .content-with-image.reverse .text-content,
    .content-with-image.image-right img,
    .content-with-image.image-right .text-content,
    .content-with-image.image-left img,
    .content-with-image.image-left .text-content {
        grid-column: 1 !important;
        grid-row: auto !important;
    }
    
    .image-left,
    .image-right {
        float: none;
        margin: 1rem 0;
        max-width: 100%;
    }
    
    .image-left + ul,
    .image-left + ol,
    .image-right + ul,
    .image-right + ol {
        margin-left: 0;
        padding-left: 2.5rem;
        clear: both;
        margin-top: 1.5rem;
    }
    
    .content-with-image .text-content ul,
    .content-with-image .text-content ol {
        margin-left: 1rem;
        padding-left: 2rem;
        margin-right: 0;
    }
    
    main {
        padding: 2rem 0;
    }
    
    .logo {
        font-size: 1.5rem;
    }
    
    .header-content {
        padding: 0.75rem 0;
    }
    
    .submenu {
        max-height: 60vh;
    }
}

/* Print Styles */
@media print {
    .cookie-banner,
    nav,
    footer,
    .search-box {
        display: none;
    }
    
    .checklist li:before {
        content: "✓";
    }
    
    .content-with-image {
        page-break-inside: avoid;
    }
    
    img {
        page-break-inside: avoid;
    }
}
