/* --- Google Fonts Import --- */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700&family=Montserrat:wght@600;700&display=swap');

/* --- CSS Variables --- */
:root {
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Lato', sans-serif;
    
    --color-bg: #F8F5F2; /* Миндальный */
    --color-text: #2C3E50; /* Грифельный */
    --color-dark-bg: #2C3E50; /* Грифельный */
    --color-light-text: #F8F5F2; /* Миндальный */
    --color-primary: #16a085; /* Бирюзовый */
    --color-accent: #e74c3c; /* Терракотовый */

    --container-width: 1200px;
    --container-padding: 1.5rem;
}

/* --- Global Styles & Reset --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

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

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

ul {
    list-style: none;
}

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

.container {
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
}

/* --- Header --- */
.header {
    background-color: var(--color-bg);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.header__logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.header__nav {
    display: none; /* Hidden on mobile */
}

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

.header__nav-link {
    font-weight: 600;
    color: var(--color-text);
    position: relative;
    padding-bottom: 0.25rem;
}

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

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

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

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

/* --- Footer --- */
.footer {
    background-color: var(--color-dark-bg);
    color: var(--color-light-text);
    padding: 4rem 0;
}

.footer__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
}

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

.footer__logo {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-light-text);
}

.footer__copyright {
    font-size: 0.9rem;
    opacity: 0.7;
}

.footer__title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--color-light-text);
}

.footer__list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer__link {
    color: var(--color-light-text);
    opacity: 0.8;
}

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

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

.footer__list--contacts i {
    flex-shrink: 0;
    margin-top: 4px;
    width: 18px;
    height: 18px;
    color: var(--color-primary);
}

/* --- Media Queries (Tablet and up) --- */
@media (min-width: 768px) {
    .header__nav {
        display: block;
    }

    .header__burger-menu {
        display: none;
    }
    
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Media Queries (Desktop) --- */
@media (min-width: 1024px) {
    .footer__container {
        grid-template-columns: 2fr 1fr 1fr 2fr;
        gap: 2rem;
    }
}

/* --- Hero Section --- */
.hero {
    padding: 4rem 0;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.hero__content {
    text-align: center;
}

.hero__title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    /* Min-height to prevent layout shift during animation */
    min-height: 120px; 
}

/* Styles for animated letters */
.hero__title span {
    display: inline-block;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero__subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero__cta {
    display: inline-block;
    background-color: var(--color-primary);
    color: #fff;
    padding: 0.9rem 2.5rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero__cta:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}

.hero__image {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* --- Media Queries (Tablet and up) --- */
@media (min-width: 768px) {
    .hero__title {
        font-size: 3rem;
        min-height: 144px;
    }
}

/* --- Media Queries (Desktop) --- */
@media (min-width: 1024px) {
    .hero {
        padding: 5rem 0;
        min-height: auto;
    }
    .hero__container {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
    .hero__content {
        text-align: left;
    }
    .hero__subtitle {
        margin-left: 0;
        margin-right: 0;
    }
    .hero__title {
        font-size: 3.5rem;
        min-height: 168px;
    }
}

/* --- Add this to :root variables --- */
:root {
    /* ... existing variables ... */
    --color-bg-alt: #FFFFFF;
}

/* --- Strategy Section --- */
.strategy {
    padding: 5rem 0;
    background-color: var(--color-bg-alt);
}

.strategy__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.strategy__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.strategy__subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

.strategy__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

.strategy-card {
    background-color: var(--color-bg);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    border: 1px solid #EAEAEA;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.strategy-card__icon-wrapper {
    width: 70px;
    height: 70px;
    margin: 0 auto 1.5rem auto;
    border-radius: 50%;
    background-color: var(--color-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.strategy-card__icon {
    width: 32px;
    height: 32px;
}

.strategy-card__title {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.strategy-card__text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #555;
}

/* --- Media Queries (Tablet and up) --- */
@media (min-width: 768px) {
    .strategy__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Media Queries (Desktop) --- */
@media (min-width: 1024px) {
    .strategy {
        padding: 6rem 0;
    }
    .strategy__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* --- Skills Section --- */
.skills {
    padding: 5rem 0;
    background-color: var(--color-bg); /* Back to the main background color */
}

.skills__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.skills__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

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

/* --- Accordion --- */
.accordion {
    border-top: 1px solid #ddd;
}

.accordion__item {
    border-bottom: 1px solid #ddd;
}

.accordion__button {
    width: 100%;
    background: none;
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0.5rem;
    cursor: pointer;
    text-align: left;
}

.accordion__title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
}

.accordion__icon {
    flex-shrink: 0;
    color: var(--color-primary);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.4s ease;
}

.accordion__list {
    list-style: disc;
    padding-left: 1.5rem;
    padding-bottom: 1.5rem;
    color: #555;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Active State Styles */
.accordion__item--active .accordion__icon {
    transform: rotate(180deg);
}

.accordion__item--active .accordion__content {
    /* Set a large enough max-height to show content */
    max-height: 500px; 
}


/* --- Media Queries (Desktop) --- */
@media (min-width: 1024px) {
    .skills {
        padding: 6rem 0;
    }
    .skills__container {
        grid-template-columns: 1fr 1.2fr; /* Give more space to accordion */
        gap: 5rem;
    }
}
/* --- Search Section --- */
.search {
    padding: 5rem 0;
    background-color: var(--color-bg-alt); /* Alternate background color */
}

.search__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.search__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.search__subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

/* --- Timeline --- */
.timeline {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
}

/* The vertical line for the timeline */
.timeline::after {
    content: '';
    position: absolute;
    width: 3px;
    background-color: var(--color-primary);
    opacity: 0.2;
    top: 0;
    bottom: 0;
    left: 20px; 
}

.timeline__item {
    padding: 1rem 0 3rem 60px; /* Left padding for content */
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.timeline__step {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    position: absolute;
    left: -19px; /* Position over the line */
    top: -5px;
    background-color: var(--color-bg-alt);
    padding: 0.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 3px solid var(--color-primary);
    border-radius: 50%;
}

.timeline__title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline__text {
    line-height: 1.7;
    color: #555;
}

.timeline__image {
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.07);
    width: 100%;
    object-fit: cover;
}

/* Media query for tablet */
@media (min-width: 768px) {
    .timeline__item {
        grid-template-columns: 1fr 1fr;
        align-items: center;
        padding-left: 80px;
    }

    /* Put images on the right side for odd elements */
    .timeline__item:nth-child(odd) .timeline__visual {
        order: 2;
    }
}

/* Media query for desktop - The classic alternating timeline */
@media (min-width: 1024px) {
    .search {
        padding: 6rem 0;
    }
    
    .timeline::after {
        left: 50%;
        margin-left: -1.5px;
    }
    
    .timeline__item {
        padding: 1rem 0;
        width: 50%;
        padding-right: 50px;
    }

    /* Position items to the left of the line */
    .timeline__item:nth-child(odd) {
        left: 0;
        text-align: right;
        padding-left: 0;
        padding-right: 80px;
    }

    /* Position items to the right of the line */
    .timeline__item:nth-child(even) {
        left: 50%;
        padding-left: 80px;
    }

    .timeline__item:nth-child(odd) .timeline__visual {
        order: 1; /* Image on the left */
    }
     .timeline__item:nth-child(even) .timeline__visual {
        order: 2; /* Image on the right */
    }

    .timeline__step {
        left: 50%;
        margin-left: -20px; /* Center the circle on the line */
        top: 1.5rem;
    }
}
/* --- Cases Section --- */
.cases {
    padding: 5rem 0;
    background-color: var(--color-bg);
}

.cases__header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.cases__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.cases__subtitle {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
}

/* --- Swiper & Case Card --- */
.cases__slider {
    padding: 1rem 0 3rem 0; /* Extra padding for pagination */
}

.case-card {
    background-color: var(--color-bg-alt);
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.case-card__quote {
    font-size: 1.05rem;
    line-height: 1.7;
    font-style: italic;
    color: var(--color-text);
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.case-card__quote::before {
    content: '“';
    font-size: 2.5rem;
    color: var(--color-primary);
    opacity: 0.5;
    margin-right: 0.25rem;
    font-weight: 700;
}

.case-card__author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.case-card__avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-primary);
}

.case-card__name {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 700;
}

.case-card__role {
    font-size: 0.9rem;
    color: #555;
}

/* Swiper Controls Customization */
.swiper-pagination-bullet {
    background-color: var(--color-primary);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    transform: scale(1.1);
}

@media (max-width: 767px) {
    .swiper-button-next,
    .swiper-button-prev {
        display: none;
    }
}
/* --- Contact Section --- */
.contact {
    padding: 5rem 0;
    background-color: var(--color-bg-alt);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.contact__title {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

.contact__subtitle {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #555;
    margin-bottom: 2rem;
}

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

.contact__link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    font-weight: 600;
}

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

.contact__link i {
    color: var(--color-primary);
}

/* --- Form Styles --- */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group__label {
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group__input {
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group__input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(22, 160, 133, 0.2);
}

/* Error state */
.form-group__input.error {
    border-color: var(--color-accent);
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.form-group--checkbox a {
    color: var(--color-primary);
    text-decoration: underline;
}

.contact-form__button {
    background-color: var(--color-primary);
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-form__button:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
}

.form-success-message {
    display: none; /* Hidden by default */
    background-color: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #a5d6a7;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    margin-top: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

/* Media Queries */
@media (min-width: 1024px) {
    .contact {
        padding: 6rem 0;
    }
    .contact__container {
        grid-template-columns: 1fr 1.2fr;
        gap: 5rem;
    }
}

/* --- Cookie Popup --- */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-dark-bg);
    color: var(--color-light-text);
    padding: 1.5rem 0;
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.cookie-popup__container {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.cookie-popup__text {
    font-size: 0.9rem;
    text-align: center;
}

.cookie-popup__text a {
    color: #fff;
    text-decoration: underline;
    font-weight: bold;
}

.cookie-popup__button {
    background-color: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.5rem;
    cursor: pointer;
    font-weight: 600;
    flex-shrink: 0;
    transition: background-color 0.3s ease;
}

.cookie-popup__button:hover {
    background-color: var(--color-accent);
}

@media (min-width: 768px) {
    .cookie-popup__container {
        flex-direction: row;
    }
    .cookie-popup__text {
        text-align: left;
    }
}
/* --- Policy Pages Styles --- */
.pages {
    padding: 4rem 0;
    background-color: var(--color-bg-alt);
    min-height: 80vh;
}

.pages .container {
    max-width: 800px; /* Narrower container for better readability */
}

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

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

.pages p, 
.pages li {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.pages p {
    margin-bottom: 1rem;
}

.pages ul, 
.pages ol {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

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

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

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

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