/* Основні змінні */
:root {
    --primary-color: #3498db;
    --primary-dark: #2980b9;
    --secondary-color: #2ecc71;
    --secondary-dark: #27ae60;
    --tertiary-color: #9b59b6;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #fff;
    --bg-light: #f9f9f9;
    --bg-dark: #2c3e50;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --header-height: 70px;
    --border-radius: 6px;
    --font-main: 'Roboto', 'Open Sans', sans-serif;
    --font-headings: 'Montserrat', 'Helvetica', sans-serif;
    --font-code: 'Fira Code', 'Courier New', monospace;
    --transition: all 0.3s ease;
}

/* Скидання стилів */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--bg-color);
}

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

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Кнопки */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    text-align: center;
}

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

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

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

.btn-tertiary {
    background-color: transparent;
    border: 1px solid var(--text-color);
    color: var(--text-color);
}

.btn-tertiary:hover {
    background-color: var(--text-color);
    color: white;
}

.btn-large {
    padding: 12px 24px;
    font-size: 1.1em;
}

/* Заголовки */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

/* Хедер */
header {
    background-color: white;
    box-shadow: 0 2px 10px var(--shadow-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo a {
    display: flex;
    align-items: center;
    color: var(--text-color);
}

.logo img {
    height: 40px;
    width: 40px;
    margin-right: 10px;
    border-radius: 50%;
    object-fit: cover;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-headings);
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--primary-color);
}

nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-color);
}

/* Герой-секція */
.hero {
    background-color: var(--bg-dark);
    color: white;
    padding: 100px 0;
    text-align: center;
    background-image: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('images/1.jpg');
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Секція з постами */
.featured-posts {
    padding: 80px 0;
    background-color: var(--bg-light);
}

.featured-posts h2 {
    text-align: center;
    margin-bottom: 50px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.post-card {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.post-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.post-content {
    padding: 20px;
}

.post-content h3 {
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.post-content p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.read-more {
    display: inline-flex;
    align-items: center;
    color: var(--primary-color);
    font-weight: 500;
}

.read-more i {
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(5px);
}

/* Секція підписки */
.subscribe {
    padding: 80px 0;
    background-color: var(--primary-color);
    color: white;
    text-align: center;
}

.subscribe h2 {
    color: white;
    margin-bottom: 20px;
}

.subscribe p {
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.subscribe-form {
    display: flex;
    max-width: 500px;
    margin: 0 auto;
}

.subscribe-form input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    font-size: 1rem;
}

.subscribe-form button {
    padding: 12px 20px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.subscribe-form button:hover {
    background-color: var(--secondary-dark);
}

/* Футер */
footer {
    background-color: var(--bg-dark);
    color: white;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.footer-logo p {
    opacity: 0.8;
}

.footer-links h3,
.footer-posts h3,
.footer-contact h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h3::after,
.footer-posts h3::after,
.footer-contact h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-links ul li,
.footer-posts ul li {
    margin-bottom: 10px;
}

.footer-links ul li a,
.footer-posts ul li a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-links ul li a:hover,
.footer-posts ul li a:hover {
    color: white;
    padding-left: 5px;
}

.footer-contact p {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.footer-contact p i {
    margin-right: 10px;
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer-legal {
    margin-bottom: 15px;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.8);
    margin: 0 10px;
}

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

/* Cookie Notice */
.cookie-notice {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--bg-dark);
    color: white;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 15px 0;
    display: none;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.cookie-content p {
    margin-bottom: 15px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.cookie-notice a {
    color: var(--primary-color);
    text-decoration: underline;
}

.cookie-notice a:hover {
    color: var(--primary-dark);
}

/* Сторінка посту */
.page-header {
    background-color: var(--bg-dark);
    color: white;
    padding: 100px 0 60px;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.8));
}

.page-header .container {
    position: relative;
    z-index: 1;
}

.page-header h1 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.post-meta span {
    display: flex;
    align-items: center;
}

.post-meta span i {
    margin-right: 5px;
}

.post-content {
    padding: 60px 0;
}

.post-content .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
}

.post-intro {
    font-size: 1.2rem;
    color: var(--text-light);
    margin-bottom: 30px;
    border-left: 3px solid var(--primary-color);
    padding-left: 20px;
}

.post-body h2 {
    margin-top: 40px;
    margin-bottom: 20px;
}

.post-body h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-body ul, 
.post-body ol {
    margin-bottom: 20px;
    padding-left: 20px;
}

.post-body ul li, 
.post-body ol li {
    margin-bottom: 10px;
}

.post-body .post-image {
    margin: 30px 0;
    height: auto;
}

.post-body .image-caption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 10px;
}

.code-block {
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 20px 0;
    overflow-x: auto;
}

.code-block code {
    font-family: var(--font-code);
    color: #333;
    line-height: 1.6;
}

.summary-box {
    background-color: #f9f9f9;
    border-left: 3px solid var(--primary-color);
    padding: 20px;
    margin: 30px 0;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.summary-box h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.post-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 50px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.prev-post, 
.next-post {
    display: flex;
    align-items: center;
    max-width: 45%;
}

.prev-post i {
    margin-right: 10px;
}

.next-post i {
    margin-left: 10px;
}

.sidebar {
    position: sticky;
    top: calc(var(--header-height) + 20px);
    align-self: start;
}

.widget {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
    padding: 20px;
    margin-bottom: 30px;
}

.widget h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li {
    margin-bottom: 10px;
}

.widget ul li a {
    display: block;
    padding: 5px 0;
    transition: var(--transition);
}

.widget ul li a:hover {
    padding-left: 5px;
}

#sidebar-subscribe-form {
    display: flex;
    flex-direction: column;
}

#sidebar-subscribe-form input {
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

/* Сторінка "Про нас" */
.about-header {
    background-image: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('images/2.jpg');
}

.about-content {
    padding: 60px 0;
}

.about-intro {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.about-image img {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.about-text h2 {
    margin-top: 0;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 60px;
}

.mission, 
.vision {
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    text-align: center;
}

.mission i, 
.vision i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.team-section {
    margin-bottom: 60px;
    text-align: center;
}

.team-intro {
    max-width: 700px;
    margin: 0 auto 40px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    background-color: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
    transition: var(--transition);
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow-color);
}

.member-image {
    height: 250px;
    overflow: hidden;
}

.member-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member:hover .member-image img {
    transform: scale(1.05);
}

.team-member h3 {
    margin: 20px 0 5px;
}

.member-title {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.team-member p {
    padding: 0 20px;
    margin-bottom: 20px;
}

.member-social {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-bottom: 20px;
}

.member-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--bg-light);
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
}

.member-social a:hover {
    background-color: var(--primary-color);
    color: white;
}

.values-section {
    margin-bottom: 60px;
    text-align: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.value-item {
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.value-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--shadow-color);
}

.value-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.value-item h3 {
    margin-bottom: 15px;
}

.cta-section {
    text-align: center;
    padding: 60px 0;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
}

.cta-section p {
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Сторінка контактів */
.contact-header {
    background-image: linear-gradient(rgba(44, 62, 80, 0.8), rgba(44, 62, 80, 0.8)), url('images/3.jpg');
}

.contact-section {
    padding: 60px 0;
}

.contact-section .container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
}

.contact-info {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    padding: 30px;
}

.contact-methods {
    margin-bottom: 40px;
}

.contact-item {
    margin-bottom: 30px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-item h3 {
    margin-bottom: 10px;
}

.contact-item p {
    color: var(--text-light);
}

.contact-item a {
    color: var(--text-light);
}

.contact-item a:hover {
    color: var(--primary-color);
}

.social-links h3 {
    margin-bottom: 20px;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: white;
    border-radius: 50%;
    color: var(--primary-color);
    transition: var(--transition);
}

.social-icons a:hover {
    background-color: var(--primary-color);
    color: white;
}

.contact-form-container {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.contact-form-container h2 {
    margin-bottom: 20px;
}

.contact-form-container p {
    margin-bottom: 30px;
    color: var(--text-light);
}

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

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

.form-group.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
}

.form-group:nth-child(3),
.form-group:nth-child(4),
.form-group:nth-child(5),
.form-group:nth-child(6) {
    grid-column: span 2;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-main);
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.required {
    color: #e74c3c;
}

.contact-form button {
    grid-column: span 2;
    padding: 12px;
    font-size: 1.1rem;
}

.map-section {
    padding: 60px 0;
    background-color: var(--bg-light);
}

.map-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.map-container {
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 15px var(--shadow-color);
}

.map-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.faq-section {
    padding: 60px 0;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-light);
    cursor: pointer;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.1rem;
}

.faq-toggle {
    font-size: 1.2rem;
    color: var(--primary-color);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 1000px;
}

.faq-item.active .faq-toggle i::before {
    content: "\f068";
}

/* Модальне вікно */
.modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow: auto;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: var(--border-radius);
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.success-icon {
    font-size: 4rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.modal h2 {
    margin-bottom: 15px;
}

.modal p {
    margin-bottom: 25px;
}

/* Адаптивність */
@media (max-width: 992px) {
    .post-content .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
    }
    
    .about-intro {
        grid-template-columns: 1fr;
    }
    
    .about-image {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .contact-section .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    .hero {
        padding: 60px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 80%;
        height: calc(100vh - var(--header-height));
        background-color: white;
        box-shadow: 5px 0 10px var(--shadow-color);
        transition: var(--transition);
        z-index: 1000;
    }
    
    nav.active {
        left: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 20px;
    }
    
    nav ul li {
        margin: 0 0 20px 0;
    }
    
    .mission-vision {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group:nth-child(3),
    .form-group:nth-child(4),
    .form-group:nth-child(5),
    .form-group:nth-child(6),
    .contact-form button {
        grid-column: auto;
    }
}

@media (max-width: 576px) {
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .subscribe-form {
        flex-direction: column;
    }
    
    .subscribe-form input {
        border-radius: var(--border-radius);
        margin-bottom: 10px;
    }
    
    .subscribe-form button {
        border-radius: var(--border-radius);
    }
    
    .post-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .post-navigation {
        flex-direction: column;
        gap: 20px;
    }
    
    .prev-post, 
    .next-post {
        max-width: 100%;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
}
