/* Юридична допомога пенсіонерам - Styles */

:root {
    --primary: #1e40af;
    --primary-hover: #1e3a8a;
    --secondary: #059669;
    --text: #1f2937;
    --muted: #6b7280;
    --bg: #f9fafb;
    --card: #ffffff;
    --line: #e5e7eb;
    --radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p { margin-bottom: 16px; }

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.link {
    color: var(--primary);
    transition: color 0.2s;
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

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

.btn-secondary:hover {
    background: #047857;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    text-decoration: none;
}

.btn-full {
    width: 100%;
}

/* Header */
.site-header {
    background: var(--card);
    position: relative;
}

.site-header.small {
    border-bottom: 1px solid var(--line);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

.brand img {
    border-radius: 8px;
}

.brand span {
    font-size: 18px;
}

.navbar ul {
    display: flex;
    gap: 32px;
    list-style: none;
}

.navbar a {
    color: var(--text);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.navbar a:hover,
.navbar a.active {
    color: var(--primary);
    text-decoration: none;
}

.navbar a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: all 0.3s;
}

/* Hero */
.hero {
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    color: white;
}

.hero .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 700px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 16px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 24px;
    opacity: 0.9;
}

.hero-small {
    padding: 60px 0 40px;
    background: var(--primary);
    color: white;
    text-align: center;
    position: relative;
    background-size: cover;
    background-position: center;
}

.hero-small .overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.hero-small h1 {
    font-size: 2.5rem;
}

.hero-small p {
    font-size: 1.125rem;
    opacity: 0.9;
}

/* Grid */
.grid {
    display: grid;
    gap: 24px;
}

.features {
    grid-template-columns: repeat(3, 1fr);
    padding-top: 60px;
}

/* Cards */
.card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}

.icon {
    width: 56px;
    height: 56px;
    background: #dbeafe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    margin-bottom: 16px;
}

/* Facts Section */
.facts {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px;
    margin: 60px auto;
    box-shadow: var(--shadow);
}

.facts-head {
    text-align: center;
    margin-bottom: 24px;
}

.facts-head h2 {
    margin-bottom: 8px;
}

.facts-head p {
    color: var(--muted);
}

.facts-list {
    list-style: none;
    display: grid;
    gap: 12px;
    margin-bottom: 24px;
}

.facts-list li {
    padding: 12px 16px;
    background: var(--bg);
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

/* Highlight Section */
.highlight {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 60px 0;
}

.highlight-text h2 {
    margin-bottom: 16px;
}

.highlight img {
    width: 100%;
    border-radius: var(--radius);
}

.icon-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.icon-inline {
    display: inline-flex;
}

/* About Page */
.about-intro {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-text h2 {
    color: var(--primary);
}

.about-list {
    list-style: none;
    padding: 0;
}

.about-list li {
    padding: 8px 0 8px 28px;
    position: relative;
}

.about-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border-radius: 50%;
}

.about-image img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Team */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.team-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.team-photo img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.team-info {
    padding: 20px;
}

.team-info h3 {
    margin-bottom: 4px;
}

.team-position {
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 4px !important;
}

.team-experience {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 12px !important;
}

/* Contact Page */
.contact-section {
    padding: 60px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
}

.contact-info h2 {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background: #dbeafe;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-item h3 {
    font-size: 16px;
    margin-bottom: 4px;
}

.contact-item p {
    margin-bottom: 4px;
}

.contact-map {
    margin-top: 30px;
}

/* Contact Form */
.contact-form-wrap {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form-wrap h2 {
    margin-bottom: 8px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    cursor: pointer;
}

.checkbox-label input {
    width: auto;
    margin-top: 4px;
}

.form-success {
    text-align: center;
    padding: 40px;
}

.form-success svg {
    color: var(--secondary);
    margin-bottom: 16px;
}

.form-success h3 {
    color: var(--secondary);
}

.form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

/* FAQ */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--card);
    border-radius: var(--radius);
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.faq-item summary {
    padding: 20px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    float: right;
    font-size: 24px;
    color: var(--primary);
}

.faq-item[open] summary::after {
    content: '-';
}

.faq-item p {
    padding: 0 20px 20px;
    color: var(--muted);
}

/* Blog */
.blog-section {
    padding: 60px 0;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 1100px) {
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .blog-grid {
        grid-template-columns: 1fr;
    }
}

.blog-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.15);
}

.blog-image {
    display: block;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 12px;
}

.blog-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.blog-content h2,
.blog-content h3 {
    font-size: 1.2rem;
    margin-bottom: 12px;
    line-height: 1.4;
}

.blog-content h2 a,
.blog-content h3 a {
    color: var(--text);
    transition: color 0.2s;
}

.blog-content h2 a:hover,
.blog-content h3 a:hover {
    color: var(--primary);
    text-decoration: none;
}

.blog-content p {
    color: var(--muted);
    margin-bottom: 16px;
    flex-grow: 1;
    font-size: 15px;
    line-height: 1.6;
}

.blog-content .btn {
    align-self: flex-start;
}

/* Post Page */
.breadcrumb {
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb span {
    color: white;
}

.post {
    background: var(--card);
    border-radius: var(--radius);
    padding: 40px;
    margin: -40px auto 60px;
    max-width: 800px;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow);
}

.post-header {
    text-align: center;
    margin-bottom: 30px;
}

.post-header h1 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 24px;
    color: var(--muted);
    font-size: 14px;
}

.post-image {
    margin: 0 -40px 30px;
}

.post-image img {
    width: 100%;
}

.post-content h2 {
    font-size: 1.5rem;
    margin-top: 32px;
    margin-bottom: 16px;
    color: var(--primary);
}

.post-content h3 {
    font-size: 1.25rem;
    margin-top: 24px;
}

.post-content ul,
.post-content ol {
    margin: 16px 0;
    padding-left: 24px;
}

.post-content li {
    margin-bottom: 8px;
}

.post-footer {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--line);
}

.post-cta {
    background: var(--bg);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
}

.post-cta h3 {
    margin-bottom: 8px;
}

.post-cta p {
    color: var(--muted);
    margin-bottom: 20px;
}

/* Footer */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 60px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

.site-footer h4 {
    color: white;
    margin-bottom: 20px;
}

.site-footer a {
    color: #9ca3af;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: white;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.copy {
    margin-top: 30px;
    font-size: 14px;
    color: #6b7280;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.cookie-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-inner p {
    margin: 0;
    font-size: 14px;
}

.cookie-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Modal */
.thanks-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.thanks-modal.open {
    opacity: 1;
    visibility: visible;
}

.thanks-card {
    background: var(--card);
    padding: 40px;
    border-radius: var(--radius);
    text-align: center;
    max-width: 400px;
}

/* Responsive */
@media (max-width: 992px) {
    .features,
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .highlight,
    .about-intro,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .hero h1 { font-size: 2rem; }
    .hero { min-height: 400px; }

    .nav-toggle {
        display: flex;
        z-index: 1002;
    }

    .navbar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--card);
        padding: 80px 30px 30px;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
        overflow-y: auto;
    }

    .navbar.open {
        transform: translateX(0);
    }

    .navbar ul {
        flex-direction: column;
        gap: 0;
    }

    .navbar a {
        display: block;
        padding: 16px 0;
        font-size: 1.25rem;
        border-bottom: 1px solid var(--line);
    }

    .navbar a:last-child {
        border-bottom: none;
    }

    /* Hamburger animation */
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

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

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

    .features,
    .team-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .facts {
        padding: 24px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .cookie-inner {
        flex-direction: column;
        text-align: center;
    }

    .post {
        padding: 20px;
        margin: -20px 10px 40px;
    }

    .post-image {
        margin: 0 -20px 20px;
    }
}
