/* ====================
   GLOBAL STYLES
   ==================== */
:root {
    --font-primary: 'Lato', sans-serif;
    --font-secondary: 'Playfair Display', serif;
    --color-text: #2c3e50;
    --color-bg-primary: #F5F5F3;
    --color-bg-secondary: #ffffff;
    --color-accent: #AF8B53;
    --color-footer-bg: #1e272e;
    --color-footer-text: #bdc3c7;
    --transition-speed: 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    font-family: var(--font-secondary);
    font-weight: 700;
}

.logo {
    font-family: var(--font-secondary);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
}


/* ====================
   HEADER
   ==================== */
.header {
    background-color: rgba(245, 245, 243, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

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

.header__nav-list {
    display: flex;
    gap: 2rem;
}

.header__nav-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-text);
    position: relative;
    padding-bottom: 5px;
}

.header__nav-link i {
    margin-right: 6px;
    color: var(--color-accent);
}

.header__nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: width var(--transition-speed);
}

.header__nav-link:hover::after {
    width: 100%;
}

.header__burger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

/* ====================
   FOOTER
   ==================== */
.footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 4rem 0 2rem;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer__column--logo {
    display: flex;
    flex-direction: column;
}

.footer .logo {
    color: var(--color-bg-primary);
    margin-bottom: 1rem;
}

.footer__copyright {
    font-size: 0.85rem;
    margin-top: auto;
}

.footer__title {
    font-family: var(--font-primary);
    font-size: 1.1rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer__list li {
    margin-bottom: 0.75rem;
}

.footer__link {
    font-size: 0.95rem;
    color: var(--color-footer-text);
}

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

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

.footer__contact-icon {
    font-size: 1rem;
    color: var(--color-accent);
    margin-right: 10px;
    width: 20px;
    text-align: center;
    padding-top: 4px;
}

/* ====================
   ADAPTIVE STYLES (Mobile-First)
   ==================== */
@media (max-width: 992px) {
    .header__nav {
        display: none;
    }
    .header__burger-btn {
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    .header__burger-btn span {
        display: block;
        width: 25px;
        height: 3px;
        background-color: var(--color-text);
        border-radius: 3px;
        transition: all var(--transition-speed);
    }
}

@media (max-width: 768px) {
    body {
        font-size: 15px;
    }
    .footer__container {
       grid-template-columns: 1fr;
       text-align: center;
    }
    .footer__column--logo {
        align-items: center;
    }
     .footer__list--contacts li {
        justify-content: center;
    }
    .footer__address {
        flex-direction: column;
        align-items: center;
    }
    .footer__address i {
        margin-bottom: 0.5rem;
    }
}

/* ====================
   BUTTONS
   ==================== */
.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-family: var(--font-primary);
    font-weight: 700;
    font-size: 1rem;
    color: #ffffff;
    background-color: var(--color-accent);
    border: 2px solid var(--color-accent);
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-speed);
}

.btn:hover {
    background-color: transparent;
    color: var(--color-accent);
}


/* ====================
   HERO SECTION
   ==================== */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    padding: 4rem 0;
}

.hero__container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.hero__content {
    flex: 1 1 55%;
}

.hero__title {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    min-height: 135px; /* Резервуємо місце для заголовка, щоб уникнути стрибків */
}

/* Стиль для курсора друкарської машинки */
.hero__title::after {
    content: '|';
    animation: blink 1s step-end infinite;
    font-weight: 400;
    color: var(--color-accent);
}

@keyframes blink {
    from, to { opacity: 1; }
    50% { opacity: 0; }
}

.hero__subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 550px;
}

.hero__image-wrapper {
    flex: 1 1 40%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* ====================
   ADAPTIVE STYLES (Mobile-First for Hero)
   ==================== */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2.8rem;
        min-height: 110px;
    }
    .hero__subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
        min-height: auto;
    }
    .hero__container {
        flex-direction: column;
    }
    .hero__content {
        order: 2;
    }
    .hero__image-wrapper {
        order: 1;
        margin-bottom: 2rem;
        width: 70%;
    }
    .hero__title {
        font-size: 2.5rem;
    }
}
/* ====================
   GENERAL SECTION STYLES
   ==================== */
.section {
    padding: 5rem 0;
}

.section__header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section__title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section__subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}

/* ====================
   ANALYTICS SECTION
   ==================== */
.analytics {
    background-color: var(--color-bg-secondary);
}

.analytics__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.analytics__card {
    background-color: var(--color-bg-primary);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.analytics__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.1);
}

.analytics__card-icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.analytics__card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.analytics__card-text {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ====================
   ADAPTIVE STYLES (Mobile-First for Sections)
   ==================== */
@media (max-width: 768px) {
    .section {
        padding: 3rem 0;
    }
    .section__title {
        font-size: 2rem;
    }
    .section__subtitle {
        font-size: 1rem;
    }
}

/* ====================
   STRATEGY SECTION
   ==================== */
.strategy {
    background-color: var(--color-bg-primary); /* Чергуємо фон для візуального розділення */
}

.strategy__steps-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.strategy__step {
    background-color: var(--color-bg-secondary);
    border-radius: 8px;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.strategy__step-number {
    position: absolute;
    top: -10px;
    right: 20px;
    font-size: 5rem;
    font-weight: 700;
    color: rgba(44, 62, 80, 0.05);
    z-index: 1;
}

.strategy__step-content {
    position: relative;
    z-index: 2;
}

.strategy__step-icon {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.strategy__step-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Лінії-конектори для мобільних пристроїв (вертикальні) */
.strategy__step:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: -25px; /* Половина gap + половина висоти */
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 25px;
    background: repeating-linear-gradient(
        0deg,
        var(--color-accent),
        var(--color-accent) 5px,
        transparent 5px,
        transparent 10px
    );
}

/* ====================
   ADAPTIVE STYLES (for Strategy Section)
   ==================== */
@media (min-width: 992px) {
    .strategy__steps-container {
        flex-direction: row;
        justify-content: space-between;
    }
    
    .strategy__step {
        flex-basis: 32%;
    }
    
    /* Лінії-конектори для десктопів (горизонтальні) */
    .strategy__step:not(:last-child)::after {
        bottom: 50%;
        left: 100%;
        transform: translateY(50%);
        width: 35px; /* Ширина між картками */
        height: 2px;
        background: repeating-linear-gradient(
            90deg,
            var(--color-accent),
            var(--color-accent) 5px,
            transparent 5px,
            transparent 10px
        );
    }
}

/* ====================
   CASES SECTION
   ==================== */
.cases {
    background-color: var(--color-bg-secondary);
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.cases__card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.05);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.cases__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.1);
}

.cases__card-image {
    overflow: hidden;
    height: 200px;
}

.cases__card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-speed);
}

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

.cases__card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Дозволяє футеру картки притискатися донизу */
}

.cases__card-category {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
    background-color: rgba(175, 139, 83, 0.1);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    margin-bottom: 1rem;
    align-self: flex-start; /* Вирівнювання по лівому краю */
}

.cases__card-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.cases__card-text {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Займає вільний простір, відсуваючи посилання вниз */
}

.cases__card-link {
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cases__card-link i {
    transition: transform var(--transition-speed);
}

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

.cases__card-link:hover i {
    transform: translateX(5px);
}

/* ====================
   PUBLICATIONS SECTION
   ==================== */
.publications {
    background-color: var(--color-bg-primary);
}

.publications__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.publications__card {
    background-color: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.05);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.publications__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(44, 62, 80, 0.1);
}

.publications__card-image {
    overflow: hidden;
    height: 200px;
}

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

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

.publications__card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.publications__card-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 1rem;
}

.publications__card-meta i {
    margin-right: 5px;
    color: var(--color-accent);
}

.publications__card-title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.publications__card-text {
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.publications__card-link {
    font-weight: 700;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: auto; /* Притискає посилання до низу картки */
}

.publications__card-link i {
    transition: transform var(--transition-speed);
}

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

.publications__card-link:hover i {
    transform: translateX(5px);
}

/* ====================
   CONTACT SECTION
   ==================== */
.contact {
    background-color: var(--color-bg-secondary);
}

.contact__wrapper {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.contact__form-container {
    flex: 1 1 60%;
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.08);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form__input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(175, 139, 83, 0.2);
}

.form__group--captcha .form__label span {
    font-weight: 900;
    color: var(--color-accent);
}

.form__group--checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin: 2rem 0;
}

.form__group--checkbox input[type="checkbox"] {
    margin-top: 4px;
    width: 16px;
    height: 16px;
}

.form__group--checkbox label {
    font-size: 0.9rem;
    line-height: 1.5;
}

.form__group--checkbox a {
    color: var(--color-accent);
    text-decoration: underline;
}

.contact__form-btn {
    width: 100%;
}

.form__error-message {
    color: #c0392b;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none; /* By default hidden */
}

.form__success-message {
    display: none; /* By default hidden */
    text-align: center;
    padding: 2rem;
}

.form__success-message i {
    font-size: 3rem;
    color: #27ae60;
    margin-bottom: 1rem;
}

.form__success-message h4 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.contact__info {
    flex: 1 1 35%;
    padding-top: 1rem;
}

.contact__info-image {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.contact__info-title {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* ====================
   ADAPTIVE STYLES (for Contact Section)
   ==================== */
@media (max-width: 992px) {
    .contact__wrapper {
        flex-direction: column;
    }
    .contact__info {
        text-align: center;
        padding-top: 0;
        margin-top: 2rem;
    }
}

/* ====================
   COOKIE POP-UP
   ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 1.5rem 2rem;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
    z-index: 2000;
}

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

.cookie-popup__text {
    text-align: center;
    margin: 0;
}

.cookie-popup__text a {
    color: #ffffff;
    text-decoration: underline;
}

.cookie-popup__text a:hover {
    color: var(--color-accent);
}

.btn--cookie {
    padding: 0.6rem 1.5rem;
    flex-shrink: 0; /* Щоб кнопка не стискалася */
}


/* ====================
   STYLES FOR POLICY PAGES (privacy.html, terms.html etc.)
   ==================== */
.pages {
    padding: 4rem 0;
    background-color: #ffffff;
}

.pages h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.pages h2 {
    font-size: 2rem;
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.pages p, .pages ul {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px; /* Для кращої читабельності */
    margin-bottom: 1.5rem;
}

.pages ul {
    list-style: disc;
    padding-left: 25px;
}

.pages li {
    margin-bottom: 0.75rem;
}

.pages a {
    color: var(--color-accent);
    font-weight: 700;
    text-decoration: none;
    border-bottom: 1px solid rgba(175, 139, 83, 0.3);
}

.pages a:hover {
    border-bottom-color: var(--color-accent);
}

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

/* Adaptive for pop-up and pages */
@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .pages h1 {
        font-size: 2.2rem;
    }

    .pages h2 {
        font-size: 1.8rem;
    }

    .pages p, .pages ul {
        font-size: 1rem;
    }
}