/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700&display=swap');

/* ===== VARIABLES ===== */
:root {
    /* Colors */
    --background-color: #FDFEFE;
    --text-color: #17202A;
    --primary-color: #1A5276;
    --primary-color-light: #2471A3;
    --secondary-color: #76D7C4;
    --light-gray-color: #D5D8DC;
    --white-color: #FFFFFF;

    /* Typography */
    --body-font: 'Inter', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.5rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Spacing */
    --header-height: 5rem;
    --spacing-unit: 1rem;
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

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

.container {
    max-width: 1200px;
    margin-left: var(--spacing-unit);
    margin-right: var(--spacing-unit);
    padding-left: 1rem;
    padding-right: 1rem;
}

/* ===== HEADER ===== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(253, 254, 254, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--light-gray-color);
}

.header__container {
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

.nav__list {
    display: flex;
    gap: calc(var(--spacing-unit) * 2);
}

.nav__link {
    font-weight: 500;
    position: relative;
    padding-bottom: 0.5rem;
    transition: color 0.3s ease;
}

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

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

.nav__link:hover::after {
    width: 100%;
}

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

/* ===== FOOTER ===== */
.footer {
    background-color: #1C2833;
    color: var(--light-gray-color);
    padding: calc(var(--spacing-unit) * 4) 0;
}

.footer__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: calc(var(--spacing-unit) * 3);
}

.footer__logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white-color);
    display: inline-block;
    margin-bottom: var(--spacing-unit);
}

.footer__copy {
    font-size: var(--small-font-size);
}

.footer__title {
    font-size: 1.2rem;
    color: var(--white-color);
    margin-bottom: 1.5rem;
}

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

.footer__link {
    font-size: var(--normal-font-size);
    color: var(--light-gray-color);
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.footer__link:hover {
    color: var(--white-color);
    padding-left: 5px;
}

.footer__icon {
    width: 18px;
    height: 18px;
}

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

.footer__list--contacts .footer__icon {
    margin-top: 3px;
    flex-shrink: 0;
}

/* ===== RESPONSIVE DESIGN ===== */
@media screen and (max-width: 768px) {
    .nav {
        position: fixed;
        top: var(--header-height);
        right: -100%;
        width: 60%;
        height: 100vh;
        background-color: var(--background-color);
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        padding: 2rem;
        transition: right 0.4s ease-in-out;
    }

    .nav--open {
        right: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: 2rem;
    }

    .header__burger {
        display: block;
    }
}

@media screen and (min-width: 1216px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== REUSABLE COMPONENTS ===== */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 0.9rem 1.8rem;
    border-radius: 5px;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.button:hover {
    background-color: var(--primary-color-light);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.button__icon {
    width: 20px;
    height: 20px;
}

/* ===== HERO SECTION ===== */
.hero {
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden; /* Для коректної роботи анімації */
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.hero__title {
    font-size: var(--h1-font-size);
    line-height: 1.3;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

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

.hero__image {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* ===== RESPONSIVE DESIGN FOR HERO ===== */
@media screen and (max-width: 992px) {
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero__content {
        order: 2; /* Текст буде під картинкою на мобільних */
    }

    .hero__image-wrapper {
        order: 1;
        margin-bottom: 2rem;
    }

    .hero__description {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 576px) {
    :root {
        --h1-font-size: 2rem;
    }
    .hero {
        min-height: auto;
    }
}

/* ===== REUSABLE COMPONENTS (SECTION HEADER) ===== */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header__subtitle {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    background-color: #EBF5FB;
    padding: 0.3rem 1rem;
    border-radius: 20px;
    font-size: var(--small-font-size);
}

.section-header__title {
    font-size: var(--h2-font-size);
    max-width: 600px;
    margin: 0 auto;
}


/* ===== SERVICES SECTION ===== */
.services {
    padding: 6rem 0;
    background-color: #F4F6F7;
}

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

.service-card {
    background-color: var(--white-color);
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-align: center;
    border: 1px solid var(--light-gray-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(23, 32, 42, 0.1);
}

.service-card__icon-wrapper {
    margin: 0 auto 1.5rem auto;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #EBF5FB;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-card__icon {
    width: 32px;
    height: 32px;
    color: var(--primary-color);
}

.service-card__title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.service-card__description {
    font-size: var(--normal-font-size);
    line-height: 1.7;
    color: #566573;
}

.services__footer {
    text-align: center;
    margin-top: 4rem;
    font-size: 1.1rem;
}

.services__footer a {
    color: var(--primary-color);
    font-weight: 500;
    text-decoration: underline;
    transition: color 0.3s;
}

.services__footer a:hover {
    color: var(--primary-color-light);
}


/* ===== RESPONSIVE DESIGN FOR SERVICES ===== */
@media screen and (max-width: 576px) {
    .services {
        padding: 4rem 0;
    }
    :root {
        --h2-font-size: 1.8rem;
    }
    .section-header {
        margin-bottom: 3rem;
    }
}

/* ===== REUSABLE COMPONENTS (MODIFIER FOR SECTION HEADER) ===== */
.section-header--left {
    text-align: left;
    margin-bottom: 2rem; /* Adjusted margin for this layout */
}

.section-header--left .section-header__title,
.section-header--left .section-header__subtitle {
    margin-left: 0;
    margin-right: 0;
}

/* ===== ADVANTAGES SECTION ===== */
.advantages {
    padding: 6rem 0;
    background-color: var(--background-color);
}

.advantages__container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 4rem;
}

.advantages__image-wrapper {
    width: 100%;
}

.advantages__image {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.advantages__description {
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #566573;
}

.advantages__list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.advantages__item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

.advantages__item-icon {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    color: var(--primary-color);
    margin-top: 5px;
}

.advantages__item-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.advantages__item-text {
    color: #566573;
}


/* ===== RESPONSIVE DESIGN FOR ADVANTAGES ===== */
@media screen and (max-width: 992px) {
    .advantages__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media screen and (max-width: 576px) {
    .advantages {
        padding: 4rem 0;
    }

    .section-header--left {
        text-align: center;
    }
}

/* ===== CASES SECTION ===== */
.cases {
    padding: 6rem 0;
    background-color: #F4F6F7; /* Alternate background color */
}

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

.case-card {
    background-color: var(--white-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(23, 32, 42, 0.1);
}

.case-card__image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

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

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

.case-card__content {
    padding: 1.5rem 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes content fill the space */
}

.case-card__tag {
    display: inline-block;
    margin-bottom: 1rem;
    font-size: var(--small-font-size);
    font-weight: 500;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
    align-self: flex-start; /* Aligns tag to the start of the flex container */
}

.case-card__title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.case-card__description {
    color: #566573;
    line-height: 1.7;
    flex-grow: 1; /* Makes description fill available space */
    margin-bottom: 1.5rem;
}

.case-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: auto; /* Pushes link to the bottom */
    transition: color 0.3s ease, gap 0.3s ease;
}

.case-card__link:hover {
    color: var(--primary-color-light);
    gap: 0.8rem;
}

.case-card__link-icon {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.case-card__link:hover .case-card__link-icon {
    transform: translateX(3px);
}

/* ===== RESPONSIVE DESIGN FOR CASES ===== */
@media screen and (max-width: 576px) {
    .cases {
        padding: 4rem 0;
    }
}
/* ===== BLOG SECTION ===== */
.blog {
    padding: 6rem 0;
    background-color: var(--background-color);
}

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

.blog-card {
    display: block;
    border: 1px solid var(--light-gray-color);
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    color: var(--text-color);
    background-color: var(--white-color);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.blog-card:hover {
    box-shadow: 0 15px 30px rgba(23, 32, 42, 0.1);
    transform: translateY(-5px);
}

.blog-card__image-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-card__content {
    padding: 1.5rem 2rem;
}

.blog-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    font-size: var(--small-font-size);
    color: #566573;
}

.blog-card__tag {
    font-weight: 500;
    color: var(--primary-color);
    background-color: #EBF5FB;
    padding: 0.2rem 0.8rem;
    border-radius: 15px;
}

.blog-card__title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    color: var(--text-color);
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card__title {
    color: var(--primary-color);
}

.blog-card__excerpt {
    color: #566573;
    line-height: 1.7;
}

/* ===== RESPONSIVE DESIGN FOR BLOG ===== */
@media screen and (max-width: 576px) {
    .blog {
        padding: 4rem 0;
    }
}

/* ===== CONTACT SECTION ===== */
.contact {
    padding: 6rem 0;
    background-color: #F4F6F7;
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact__info-title {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
}

.contact__info-text {
    color: #566573;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact__details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact__detail-item {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.contact__form {
    background-color: var(--white-color);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form__input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--light-gray-color);
    border-radius: 5px;
    font-size: var(--normal-font-size);
    font-family: var(--body-font);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form__input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(36, 113, 163, 0.2);
}

.form__group--captcha {
    max-width: 200px;
}

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

.form__checkbox {
    margin-top: 5px;
    flex-shrink: 0;
}

.form__checkbox-label {
    font-size: var(--small-font-size);
    color: #566573;
}

.form__checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.contact__submit-btn {
    width: 100%;
    justify-content: center;
    padding-top: 1rem;
    padding-bottom: 1rem;
    font-size: 1.1rem;
}

.form__message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: 500;
    display: none; /* Hidden by default */
}

.form__message--success {
    background-color: #D1F2EB;
    color: #0E6251;
    display: block;
}

.form__message--error {
    background-color: #FADBD8;
    color: #922B21;
    display: block;
}

/* ===== RESPONSIVE DESIGN FOR CONTACT ===== */
@media screen and (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
}

@media screen and (max-width: 576px) {
    .contact {
        padding: 4rem 0;
    }
    .contact__form {
        padding: 2rem;
    }
}

/* ===== COOKIE POP-UP ===== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #1C2833; /* Footer color */
    color: var(--light-gray-color);
    padding: 1.5rem 2rem;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.1);
    transform: translateY(0);
    transition: transform 0.5s ease-in-out;
}

.cookie-popup--hidden {
    transform: translateY(150%);
}

.cookie-popup__text {
    font-size: var(--small-font-size);
}

.cookie-popup__link {
    text-decoration: underline;
    color: var(--white-color);
    font-weight: 500;
}

.cookie-popup__btn {
    padding: 0.6rem 1.5rem;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    flex-shrink: 0; /* Prevents button from shrinking */
}

/* ===== STYLES FOR POLICY PAGES (privacy.html, terms.html, etc.) ===== */
.pages {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
}

.pages .container {
    max-width: 800px; /* Optimal width for reading text */
}

.pages h1, .pages h2 {
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

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

.pages h2 {
    font-size: var(--h2-font-size);
    margin-top: 3rem;
}

.pages p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #566573;
}

.pages ul {
    list-style: disc;
    padding-left: 2rem;
    margin-bottom: 1.5rem;
}

.pages li {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: #566573;
}

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

.pages a:hover {
    color: var(--primary-color-light);
}

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


/* ===== RESPONSIVE DESIGN FOR COOKIE POP-UP ===== */
@media screen and (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}