/* Modern Light & Colorful Design - Spravka123.store */
/* Vibrant, Airy & Friendly Aesthetics */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600&display=swap');

:root {
    /* Brand Colors - Vibrant */
    --primary: #6366f1;
    /* Indigo 500 */
    --secondary: #ec4899;
    /* Pink 500 */
    --accent: #f59e0b;
    /* Amber 500 */
    --success: #10b981;
    /* Emerald 500 */

    /* Backgrounds */
    --bg-main: #f8fafc;
    /* Slate 50 */
    --surface-white: #ffffff;
    --surface-glass: rgba(255, 255, 255, 0.75);

    /* Text */
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #6366f1 0%, #d946ef 100%);
    --gradient-text: linear-gradient(to right, #4f46e5, #ec4899);
    --gradient-card-hover: linear-gradient(to bottom right, #ffffff, #f0f9ff);

    /* Shadows */
    --shadow-soft: 0 4px 20px -5px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 25px -5px rgba(99, 102, 241, 0.15), 0 8px 10px -6px rgba(99, 102, 241, 0.1);
    --shadow-input: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

body {
    font-family: 'Outfit', 'Inter', sans-serif;
    background-color: var(--bg-main);
    /* Subtle colorful mesh background */
    background-image:
        radial-gradient(at 0% 0%, hsla(253, 100%, 96%, 1) 0, transparent 50%),
        radial-gradient(at 50% 0%, hsla(225, 100%, 94%, 1) 0, transparent 50%),
        radial-gradient(at 100% 0%, hsla(339, 100%, 94%, 1) 0, transparent 50%);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-main);
    margin: 0;
    line-height: 1.6;
    min-height: 100vh;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.6rem;
    font-weight: 800;
    text-decoration: none;
    letter-spacing: -0.02em;
}

/* Make logo icon colorful too if it's SVG, handled via filter/css if possible, otherwise text is key */
.logo-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

nav ul {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.6rem 1.2rem;
    border-radius: 99px;
    transition: all 0.2s ease;
    background: transparent;
}

nav a:hover,
nav a.active {
    color: var(--primary);
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 6rem 0 5rem;
    text-align: center;
    overflow: hidden;
}

/* Friendly colorful blobs */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    z-index: -1;
}

.hero::before {
    background: #fae8ff;
    /* Light Pink */
    top: -100px;
    left: -100px;
    animation: float 8s infinite ease-in-out alternate;
}

.hero::after {
    background: #e0f2fe;
    /* Light Blue */
    bottom: -50px;
    right: -100px;
    animation: float 10s infinite ease-in-out alternate-reverse;
}

@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(20px, 20px);
    }
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--text-main);
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    padding-bottom: 10px;
    /* fix clipped text */
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 3rem;
    font-weight: 400;
}

/* Search Box - Clean & White */
.search-box-wrapper {
    background: white;
    padding: 1rem;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-hover);
    max-width: 720px;
    margin: 0 auto;
    border: 1px solid #f1f5f9;
    transform: translateY(0);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.search-box-wrapper:hover {
    transform: translateY(-4px);
}

.search-input-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem;
    background: #f8fafc;
    border-radius: 1rem;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.search-input-container:focus-within {
    background: white;
    border-color: var(--primary);
    box-shadow: var(--shadow-input);
}

.search-icon {
    color: var(--primary);
    margin-left: 0.75rem;
}

#site-search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    font-size: 1.1rem;
    padding: 0.75rem;
    color: var(--text-main);
    outline: none;
    font-family: inherit;
    font-weight: 500;
}

#site-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

#search-submit-btn {
    background: var(--gradient-hero);
    color: white;
    border: none;
    padding: 0.8rem 2.5rem;
    border-radius: 0.8rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#search-submit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.tool-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2.5rem;
    box-shadow: var(--shadow-soft);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tool-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: #e0e7ff;
    background: linear-gradient(to bottom, #ffffff, #fafaff);
}

.tool-card h3 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.tool-card h3::before {
    content: '';
    width: 6px;
    height: 24px;
    background: var(--primary);
    border-radius: 10px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.input-wrapper input {
    width: 100%;
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 1rem;
    font-size: 1.1rem;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 500;
    transition: all 0.2s;
    box-sizing: border-box;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: var(--shadow-input);
}

.check-btn {
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 1rem;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 1.5rem;
}

.check-btn:hover {
    background: #4f46e5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
}

/* Result Box */
.result-box {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 1rem;
    display: none;
    border: 2px dashed #e2e8f0;
    background: #f8fafc;
}

.result-box.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-box.success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #064e3b;
}

.result-box.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
}

/* Articles Section */
.section-title {
    text-align: center;
    margin: 6rem 0 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-main);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding-bottom: 6rem;
}

.article-card {
    background: white;
    border: 1px solid #f1f5f9;
    border-radius: 1.5rem;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-soft);
}

.article-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: #e0e7ff;
}

.article-content {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-tag {
    align-self: flex-start;
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

/* Category Colors (Pastel & Bright) */
.category-snils .article-tag {
    background: #e0e7ff;
    color: #4338ca;
}

.category-inn .article-tag {
    background: #fae8ff;
    color: #a21caf;
}

.category-fines .article-tag {
    background: #ffe4e6;
    color: #be123c;
}

.category-education .article-tag {
    background: #ecfccb;
    color: #4d7c0f;
}

.category-terms .article-tag {
    background: #cffafe;
    color: #0e7490;
}

.category-economics .article-tag {
    background: #ffedd5;
    color: #c2410c;
}

.category-default .article-tag {
    background: #f1f5f9;
    color: #475569;
}

.article-content h3 {
    margin: 0 0 1rem;
    font-size: 1.35rem;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-main);
}

.article-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.read-btn {
    text-decoration: none;
    display: block;
    text-align: center;
    padding: 0.8rem;
    border-radius: 1rem;
    background: #f8fafc;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.2s;
}

.read-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.25);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.6rem 1.2rem;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 0.75rem;
    cursor: pointer;
    color: var(--text-main);
    transition: all 0.2s;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

/* Footer */
footer {
    border-top: 1px solid #e2e8f0;
    background: white;
    margin-top: auto;
}

/* Article Page Specifics */
.article-full {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 2rem;
    padding: 3rem;
    box-shadow: var(--shadow-soft);
    margin-top: 2rem;
}

.article-full h1 {
    color: var(--text-main);
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.article-meta {
    color: var(--text-muted);
    font-size: 0.9rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.full-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #334155;
}

.back-link {
    background: white;
    color: var(--text-muted);
    border: 1px solid #e2e8f0;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
    transition: 0.2s;
}

.back-link:hover {
    color: var(--primary);
    border-color: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .hero {
        padding: 4rem 1rem 3rem;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .nav-wrapper {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 0;
        height: auto;
    }

    .tools-grid {
        grid-template-columns: 1fr;
    }

    .article-full {
        padding: 1.5rem;
        border-radius: 1.5rem;
    }

    nav ul {
        gap: 0.5rem;
        justify-content: center;
    }

    nav a {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .search-input-container {
        flex-wrap: wrap;
    }

    #search-submit-btn {
        width: 100%;
        margin-top: 0.5rem;
    }
}