/* ==========================================================================
   ЕТАП 0: ГЛОБАЛЬНІ СТИЛІ ТА НАЛАШТУВАННЯ
   ========================================================================== */

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

/* Налаштування змінних */
:root {
    --font-heading: 'Jost', sans-serif;
    --font-body: 'Manrope', sans-serif;

    --color-background: #F9FAFB;
    --color-text-main: #1F2937;
    --color-text-secondary: #6B7280;
    --color-primary: #3B82F6;
    --color-border: #E5E7EB;
    --color-white: #FFFFFF;

    --header-height: 70px;
}

/* Базові стилі для body */
body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-main);
    background-color: var(--color-background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.no-scroll {
    overflow: hidden;
}

/* Утиліти */
.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}

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

a:hover {
    color: #2563EB; /* Darker shade of primary */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
}

ul {
    list-style: none;
}

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

/* ==========================================================================
   ЕТАП 1: ХЕДЕР
   ========================================================================== */

.header {
    background-color: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 500;
    color: var(--color-text-main);
}

.header__logo:hover {
    color: var(--color-text-main);
}

.header__burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-main);
}

/* Навігація */
.nav__list {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav__link {
    font-size: 16px;
    font-weight: 500;
    color: var(--color-text-secondary);
    position: relative;
    padding: 4px 0;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--color-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease-out;
}

.nav__link:hover {
    color: var(--color-text-main);
}

.nav__link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}


/* Mobile-first: Адаптивність для хедера */
@media (max-width: 768px) {
    .header__burger-btn {
        display: block;
        z-index: 1002;
    }

    .nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--color-white);
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
        transform: translateX(100%);
        transition: transform 0.35s ease-in-out;
        padding-top: calc(var(--header-height) + 40px);
        padding-left: 30px;
    }

    .nav.is-open {
        transform: translateX(0);
    }
    
    .nav__list {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .nav__link {
        font-size: 20px;
    }
}


/* ==========================================================================
   ЕТАП 2: ФУТЕР
   ========================================================================== */

.footer {
    background-color: var(--color-white);
    border-top: 1px solid var(--color-border);
    padding-top: 60px;
    color: var(--color-text-secondary);
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 40px;
    padding-bottom: 60px;
}

@media (min-width: 640px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1.5fr 1.5fr;
        gap: 60px;
    }
}

.footer__logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 500;
    color: var(--color-text-main);
    margin-bottom: 12px;
    display: inline-block;
}

.footer__tagline {
    font-size: 15px;
    line-height: 1.5;
    max-width: 250px;
}

.footer__title {
    font-size: 18px;
    color: var(--color-text-main);
    margin-bottom: 16px;
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer__link {
    color: var(--color-text-secondary);
    font-size: 15px;
}

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

.footer__list--contacts li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer__contact-icon {
    flex-shrink: 0;
    margin-top: 3px;
    width: 16px;
    height: 16px;
    color: var(--color-text-secondary);
}

.footer__bottom {
    background-color: var(--color-background);
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
}

/* ... (попередні стилі для body, header, footer) ... */

/* ==========================================================================
   УТИЛІТИ: КНОПКИ
   ========================================================================== */

.button {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

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

.button--primary:hover {
    background-color: #2563EB; /* Darker primary */
    border-color: #2563EB;
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.button--secondary {
    background-color: transparent;
    color: var(--color-white);
    border-color: var(--color-white);
}

.button--secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    transform: translateY(-2px);
}


/* ==========================================================================
   ЕТАП 3: HERO СЕКЦІЯ
   ========================================================================== */

.hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: calc(90vh - var(--header-height));
    padding: 80px 0;
    color: var(--color-white);
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/bg.png');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero__bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(20, 25, 40, 0.8), rgba(31, 41, 55, 0.6));
}

.hero__container {
    position: relative;
    z-index: 2;
}

.hero__content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(2.5rem, 6vw, 4rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
  
}

.hero__subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 650px;
    margin: 24px auto 40px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
   
}

.hero__actions {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Адаптивність для Hero */
@media (min-width: 768px) {
    .hero {
        min-height: calc(100vh - var(--header-height));
    }
    .hero__content {
        text-align: left;
        margin: 0;
    }
    .hero__actions {
        justify-content: flex-start;
    }
    .hero__subtitle {
        margin-left: 0;
        margin-right: 0;
    }
}

/* ... (попередні стилі для hero, кнопок, etc.) ... */

/* ==========================================================================
   ЕТАП 3: СЕКЦІЯ ИСТОРИЙ (STORIES)
   ========================================================================== */

.stories {
    padding: 80px 0;
    background-color: var(--color-white);
}

@media (min-width: 768px) {
    .stories {
        padding: 100px 0;
    }
}

.stories__title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-text-main);
}

.stories__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 640px) {
    .stories__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .stories__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.story-card {
    display: block; /* Makes the whole <a> area a block */
    color: var(--color-text-main);
    background-color: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.story-card:hover {
    color: var(--color-text-main);
    transform: translateY(-8px);
    box-shadow: 0 10px 25px -5px rgba(31, 41, 55, 0.08), 0 8px 10px -6px rgba(31, 41, 55, 0.05);
}

.story-card__image-wrapper {
    aspect-ratio: 16 / 10;
    background-color: var(--color-background);
}

.story-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-card__image {
    transform: scale(1.05);
}

.story-card__content {
    padding: 24px;
}

.story-card__category {
    display: inline-block;
    margin-bottom: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-card__title {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.story-card__excerpt {
    font-size: 15px;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ... (попередні стилі) ... */

/* ==========================================================================
   ЕТАП 3: СЕКЦІЯ АВТОРІВ (AUTHORS)
   ========================================================================== */

.authors {
    padding: 80px 0;
    background-color: var(--color-background);
}

@media (min-width: 768px) {
    .authors {
        padding: 100px 0;
    }
}

.authors__title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-text-main);
}

.authors__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 60px 30px;
    max-width: 960px;
    margin: 0 auto;
}

@media (min-width: 560px) {
    .authors__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 820px) {
    .authors__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.author-profile {
    text-align: center;
}

.author-profile__photo-wrapper {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.author-profile__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.author-profile__socials {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(59, 130, 246, 0.85); /* Primary color with transparency */
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.author-profile:hover .author-profile__photo {
    transform: scale(1.1);
}

.author-profile:hover .author-profile__socials {
    opacity: 1;
}

.author-profile__social-link {
    color: var(--color-white);
}
.author-profile__social-link:hover {
    color: var(--color-white);
    transform: scale(1.15);
}
.author-profile__social-link i {
    width: 24px;
    height: 24px;
}

.author-profile__name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: var(--color-text-main);
}

.author-profile__role {
    font-size: 15px;
    color: var(--color-text-secondary);
}

/* ... (попередні стилі) ... */

/* ==========================================================================
   ЕТАП 3: СЕКЦІЯ МАНИФЕСТА (MANIFESTO)
   ========================================================================== */

.manifesto {
    padding: 80px 0;
    background-color: var(--color-white);
}

@media (min-width: 768px) {
    .manifesto {
        padding: 100px 0;
    }
}

.manifesto__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

@media (min-width: 992px) {
    .manifesto__grid {
        grid-template-columns: 1fr 1.1fr; /* Левая колонка чуть меньше правой */
        gap: 60px;
        align-items: center;
    }
}

.manifesto__image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    max-height: 500px;
}

.manifesto__title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.manifesto__intro {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 40px;
}

.manifesto__items-wrapper {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.manifesto__item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.manifesto__item-icon {
    flex-shrink: 0;
    color: var(--color-primary);
    background-color: #EFF6FF; /* Light blue background */
    border-radius: 8px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.manifesto__item-icon i {
    width: 24px;
    height: 24px;
}

.manifesto__item-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.manifesto__item-text {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ... (попередні стилі) ... */

/* ==========================================================================
   ЕТАП 4: СЕКЦІЯ КОНТАКТІВ (CONTACT)
   ========================================================================== */

.contact {
    padding: 80px 0;
    background-color: var(--color-background);
}

@media (min-width: 768px) {
    .contact {
        padding: 100px 0;
    }
}

.contact__title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 16px;
    color: var(--color-text-main);
}

.contact__subtitle {
    font-size: 1.1rem;
    color: var(--color-text-secondary);
    text-align: center;
    max-width: 500px;
    margin: 0 auto 60px;
}

.contact__form-wrapper {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-white);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 25px -5px rgba(31, 41, 55, 0.04);
}

@media (min-width: 768px) {
    .contact__form-wrapper {
        padding: 50px;
    }
}

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

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.form-input {
    display: block;
    width: 100%;
    padding: 12px 16px;
    font-size: 16px;
    font-family: var(--font-body);
    color: var(--color-text-main);
    background-color: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

textarea.form-input {
    resize: vertical;
    min-height: 120px;
}

.form-captcha-question {
    font-weight: 600;
}

.contact-form__button {
    width: 100%;
    padding: 16px;
    font-size: 18px;
}
.contact-form__button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Success Message */
.form-success-message {
    display: none; /* Hidden by default */
    text-align: center;
    padding: 40px;
}

.form-success-message__icon {
    color: #10B981; /* Green color */
    margin-bottom: 16px;
}
.form-success-message__icon i {
    width: 60px;
    height: 60px;
}

.form-success-message__title {
    font-size: 24px;
    margin-bottom: 8px;
}

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

/* ... (попередні стилі) ... */

/* ==========================================================================
   ЕТАП 5.1: COOKIE POP-UP
   ========================================================================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-text-main);
    color: var(--color-white);
    padding: 20px;
    z-index: 2000;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;

    transform: translateY(120%);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    transform: translateY(0);
}

@media (min-width: 768px) {
    .cookie-popup {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.cookie-popup__text {
    font-size: 15px;
}

.cookie-popup__link {
    color: var(--color-white);
    text-decoration: underline;
}
.cookie-popup__link:hover {
    color: #d1d5db; /* Lighter gray */
}

.cookie-popup__btn {
    flex-shrink: 0;
    padding: 8px 24px;
}

/* ... (попередні стилі) ... */

/* ==========================================================================
   ЕТАП 5.2: СТИЛІ ДЛЯ СТОРІНОК ПОЛІТИК
   ========================================================================== */

/* Цей блок стилізує контент на сторінках типу privacy.html, terms.html etc. */
.pages {
    padding: 60px 0;
    background-color: var(--color-white);
}

@media (min-width: 768px) {
    .pages {
        padding: 80px 0;
    }
}

.pages .container {
    max-width: 840px; /* Вужчий контейнер для кращої читабельності тексту */
}

.pages h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    margin-bottom: 32px;
}

.pages h2 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    margin-top: 48px;
    margin-bottom: 24px;
}

.pages p {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
}

.pages a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: 500;
}

.pages a:hover {
    text-decoration: none;
}

.pages ul,
.pages ol {
    margin-bottom: 24px;
    padding-left: 24px;
}

.pages li {
    font-size: 17px;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 12px;
}

.pages strong {
    color: var(--color-text-main);
    font-weight: 600;
}


/* ... (попередні стилі) ... */

/* ==========================================================================
   ЕТАП 3: СЕКЦІЯ ТЕМ (TOPICS)
   ========================================================================== */

.topics {
    padding: 80px 0;
    background-color: var(--color-white);
}

@media (min-width: 768px) {
    .topics {
        padding: 100px 0;
    }
}

.topics__title {
    font-size: clamp(2rem, 5vw, 2.5rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--color-text-main);
}

.topics__grid {
    display: grid;
    gap: 24px;
    /* Адаптивна сітка без медіа-запитів */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.topic-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: var(--color-background);
    padding: 40px 20px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    text-align: center;
    color: var(--color-text-main);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.topic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(31, 41, 55, 0.07);
    color: var(--color-primary);
}

.topic-card__icon {
    width: 40px;
    height: 40px;
    margin-bottom: 20px;
    color: var(--color-primary);
    transition: color 0.3s ease;
}

.topic-card:hover .topic-card__icon {
    color: var(--color-primary); /* Іконка залишається синьою, але можна змінити */
}

.topic-card__title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
}