
/* =========================================
   1. CSS Reset & Base Styles
   ========================================= */
:root {
    /* Цветовая палитра */
    --color-primary: #3b82f6;
    --color-primary-dark: #1d4ed8;
    --color-secondary: #10b981;
    --color-accent: #f59e0b;
    --color-background: #f3f4f6;
    --color-surface: #ffffff;
    --color-text-main: #111827;
    --color-text-secondary: #4b5563;
    --color-border: #e5e7eb;
    
    /* Типографика */
    --font-family-base: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-size-base: 1rem;
    --line-height-base: 1.6;
    --font-size-h1: clamp(2rem, 5vw, 3.5rem);
    --font-size-h2: clamp(1.5rem, 3vw, 2.25rem);
    
    /* Отступы и размеры */
    --spacing-unit: 1rem;
    --container-width: 75rem; /* ~1200px */
    --border-radius-sm: 0.375rem;
    --border-radius-md: 0.75rem;
    --border-radius-lg: 1.5rem;
    
    /* Эффекты */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-glow: 0 0 15px rgba(59, 130, 246, 0.5);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--color-background);
    color: var(--color-text-main);
    line-height: var(--line-height-base);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Ссылка для скринридеров */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-sm);
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--color-primary);
    display: block;
    font-size: 0.875rem;
    font-weight: bold;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* =========================================
   2. Layout & Container
   ========================================= */
.site {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: var(--container-width);
    margin-inline: auto;
    padding-inline: var(--spacing-unit);
}

.site-content {
    padding-block: 3rem;
}

/* =========================================
   3. Typography
   ========================================= */
h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-main);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

p {
    margin-bottom: 1.5rem;
    color: var(--color-text-secondary);
    font-size: 1.125rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition-base);
    background-image: linear-gradient(var(--color-primary), var(--color-primary));
    background-position: 0% 100%;
    background-repeat: no-repeat;
    background-size: 0% 2px;
}

a:hover {
    color: var(--color-primary-dark);
    background-size: 100% 2px;
}

/* =========================================
   4. Article & Card Styles
   ========================================= */
article {
    background-color: var(--color-surface);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    padding: clamp(1.5rem, 5vw, 4rem);
    margin-bottom: 2rem;
    animation: fadeInUp 0.8s ease-out;
}

.entry-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--color-border);
}

.entry-title {
    font-size: var(--font-size-h1);
    background: linear-gradient(135deg, var(--color-text-main) 0%, var(--color-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.wp-block-heading {
    margin-top: 3rem;
    font-size: var(--font-size-h2);
    position: relative;
    padding-left: 1rem;
}

.wp-block-heading::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.25em;
    bottom: 0.25em;
    width: 4px;
    background: var(--color-secondary);
    border-radius: 2px;
}

/* =========================================
   5. Buttons (Modern Gradient & 3D)
   ========================================= */
.wp-block-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-block: 2rem;
}

.btn-box {
    display: inline-block;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: white;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    border-radius: 50rem; /* Pill shape */
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition-base);
    text-align: center;
    background-image: none; /* Reset link underline gradient */
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 100%);
    z-index: -1;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.6);
    color: white;
    background-size: 100% 100%; /* Override generic link hover */
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(37, 99, 235, 0.4);
}

.btn:focus-visible {
    outline: 3px solid var(--color-accent);
    outline-offset: 2px;
}

/* =========================================
   6. Images
   ========================================= */
.wp-block-image {
    margin-block: 2.5rem;
    text-align: center;
}

.wp-block-image img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-lg);
    transition: transform 0.5s ease;
    filter: brightness(0.95);
}

.wp-block-image img:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =========================================
   7. Form Elements (Generic Support)
   ========================================= */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--color-border);
    border-radius: var(--border-radius-sm);
    background-color: #fafafa;
    transition: var(--transition-base);
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
    background-color: var(--color-surface);
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: var(--color-primary);
    width: 1.25rem;
    height: 1.25rem;
    cursor: pointer;
}

/* =========================================
   8. Animations
   ========================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 40px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* =========================================
   9. Responsive Design
   ========================================= */
@media (max-width: 768px) {
    :root {
        --spacing-unit: 1rem;
    }

    .site-content {
        padding-block: 1.5rem;
    }

    article {
        padding: 1.5rem;
    }
    
    .entry-header {
        margin-bottom: 2rem;
    }

    .wp-block-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-box, .btn {
        width: 100%;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding-inline: 2rem;
    }
}

/* =========================================
   10. Lists & Misc Elements within Content
   ========================================= */
.entry-content ul, 
.entry-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: var(--color-text-secondary);
}

.entry-content li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}

.entry-content li::marker {
    color: var(--color-primary);
    font-weight: bold;
}
