:root {
    --primary: #1a6b5c;
    --primary-dark: #145549;
    --primary-light: #e8f5f2;
    --accent: #2d9f8a;
    --accent-light: #4ecdc4;
    --text-dark: #1a2e2a;
    --text-muted: #5a7a72;
    --bg-light: #f7faf9;
    --bg-white: #ffffff;
    --border: #d4e8e3;
    --shadow: 0 4px 24px rgba(26, 107, 92, 0.08);
    --shadow-lg: 0 12px 48px rgba(26, 107, 92, 0.12);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* Header */
.site-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.95);
}

.navbar {
    padding: 0.75rem 0;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-dark) !important;
    text-decoration: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.brand-accent {
    color: var(--primary);
}

.nav-link {
    color: var(--text-muted) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary) !important;
    background: var(--primary-light);
}

/* Hero */
.hero-section {
    padding: 4rem 0 3rem;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-light) 100%);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(45, 159, 138, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-badge {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.25rem;
}

.text-accent {
    color: var(--primary);
}

.hero-text {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 520px;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

/* Survey Cards */
.cards-grid {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.survey-card {
    display: block;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.survey-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    transition: var(--transition);
}

.survey-card-parazity::before {
    background: var(--primary);
}

.survey-card-anketa::before {
    background: var(--accent);
}

.survey-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.survey-card .card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.survey-card-parazity .card-icon {
    background: var(--primary-light);
    color: var(--primary);
}

.survey-card-anketa .card-icon {
    background: rgba(45, 159, 138, 0.12);
    color: var(--accent);
}

.survey-card h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.survey-card p {
    color: var(--text-muted);
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.card-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.survey-card:hover .card-link i {
    transform: translateX(4px);
}

.card-link i {
    transition: var(--transition);
}

/* Features */
.features-section {
    padding: 4rem 0;
}

.feature-box {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
}

.feature-box:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1rem;
    display: block;
}

.feature-box h4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.feature-box p {
    color: var(--text-muted);
    margin: 0;
    font-size: 0.95rem;
}

/* Form Section */
.form-section {
    padding: 3rem 0 4rem;
}

.form-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.form-header-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
    box-shadow: var(--shadow);
}

.form-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.form-description {
    color: var(--text-muted);
    font-size: 1.05rem;
}

.form-progress-info {
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.form-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.email-section {
    background: var(--primary-light);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 0.5rem;
}

.email-section .form-label {
    font-weight: 600;
    color: var(--primary-dark);
}

.form-divider {
    border-color: var(--border);
    margin: 2rem 0;
}

.question-block {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid var(--border);
    animation: fadeIn 0.4s ease forwards;
}

.question-block:last-of-type {
    border-bottom: none;
}

.required-label::after {
    content: ' *';
    color: #dc3545;
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.form-control,
.form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 0.65rem 1rem;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 107, 92, 0.15);
}

.options-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.custom-check {
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    transition: var(--transition);
    margin: 0;
}

.custom-check:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.custom-check .form-check-input {
    margin-top: 0.3rem;
}

.custom-check .form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

.custom-check:has(.form-check-input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.form-text {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.honeypot-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form-submit-section {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
}

.btn-submit {
    min-width: 240px;
    padding: 0.85rem 2rem;
    font-weight: 600;
    border-radius: 50px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    transition: var(--transition);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(26, 107, 92, 0.3);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.submit-note {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Thank You */
.thank-you-section {
    padding: 5rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.thank-you-card {
    max-width: 560px;
    margin: 0 auto;
    text-align: center;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 3rem 2rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.success-icon {
    font-size: 4rem;
    color: var(--accent);
    margin-bottom: 1.5rem;
    animation: pulse 2s ease infinite;
}

.thank-you-card h1 {
    font-family: var(--font-display);
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.thank-you-message {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.thank-you-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Error Pages */
.error-section {
    padding: 5rem 0;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-card {
    max-width: 480px;
    margin: 0 auto;
}

.error-code {
    font-size: 5rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    opacity: 0.3;
}

/* Footer */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--primary);
}

/* Admin */
.admin-body {
    background: #f0f4f3;
    min-height: 100vh;
}

.admin-login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-login-card {
    background: white;
    border-radius: var(--radius);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.admin-login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.admin-login-header i {
    font-size: 2.5rem;
    color: var(--primary);
}

.admin-login-header h1 {
    font-size: 1.5rem;
    margin: 0.5rem 0 0;
}

.admin-login-header p {
    color: var(--text-muted);
    margin: 0;
}

.admin-navbar {
    background: var(--primary);
    color: white;
    padding: 0.75rem 0;
}

.admin-brand {
    font-weight: 700;
    font-size: 1.1rem;
}

.admin-nav-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-navbar .container-fluid {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-toolbar h2 {
    font-size: 1.35rem;
    margin: 0;
    flex: 1;
}

.admin-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.filter-group {
    min-width: 180px;
}

.export-buttons {
    display: flex;
    gap: 0.5rem;
}

.admin-table-wrapper {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-table {
    margin: 0;
}

.admin-table thead {
    background: var(--primary-light);
}

.admin-table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--text-muted);
    border: none;
    padding: 1rem;
}

.admin-table td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-color: var(--border);
}

.detail-card {
    background: white;
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.meta-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.meta-value {
    font-weight: 600;
    font-size: 1.05rem;
}

.detail-answers-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.answer-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.answer-question {
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--text-dark);
}

.answer-value {
    color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.7s ease forwards;
}

.animate-scale-in {
    animation: scaleIn 0.5s ease forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }

/* Responsive */
@media (max-width: 768px) {
    .form-card {
        padding: 1.5rem;
        margin: 0 0.5rem;
    }

    .hero-section {
        padding: 2.5rem 0 2rem;
    }

    .hero-stats {
        gap: 1.25rem;
    }

    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-filters {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    .btn-submit {
        width: 100%;
    }
}
