/* ==================== GLOBAL STYLES & VARIABLES ==================== */

/* Google Fonts Import - Already linked in HTML for performance */

:root {
    /* Colors */
    --background-color: #F8F5F2; /* Миндальное молоко */
    --text-color: #2C3E50; /* Полуночный экспресс */
    --primary-color: #00796B; /* Морская бирюза */
    --accent-color: #E67E22; /* Сицилийский апельсин */
    --footer-bg-color: #2C3E50;
    --footer-text-color: #E0E0E0;
    --light-gray-color: #BDC3C7;

    /* Typography */
    --font-main: 'Inter', sans-serif;
    --font-headings: 'Manrope', sans-serif;

    /* Layout */
    --container-width: 1140px;
    --container-padding: 1.5rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--text-color);
    -webkit-font-smoothing: antialiased;
}

ul {
    list-style: none;
}

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

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

h1, h2, h3, h4 {
    font-family: var(--font-headings);
    font-weight: 700;
    line-height: 1.3;
}

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: rgba(248, 245, 242, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid rgba(44, 62, 80, 0.1);
}

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

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

.header__nav {
    display: none; /* Mobile first: hidden by default */
}

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

/* Desktop styles */
@media (min-width: 992px) {
    .header__nav {
        display: block;
    }

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

    .header__nav-link {
        font-weight: 500;
        position: relative;
    }
    
    .header__nav-link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: var(--accent-color);
        transform: scaleX(0);
        transform-origin: right;
        transition: transform 0.3s ease-in-out;
    }

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

    .header__nav-link--button {
        background-color: var(--primary-color);
        color: white;
        padding: 0.5rem 1.5rem;
        border-radius: 50px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .header__nav-link--button:hover {
        background-color: var(--accent-color);
        color: white;
    }

    .header__nav-link--button::after {
        display: none; /* No underline effect for button */
    }

    .header__burger {
        display: none;
    }
}

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

.footer__grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}

.footer__logo {
    font-family: var(--font-headings);
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.footer__logo:hover {
    color: var(--light-gray-color);
}

.footer__tagline {
    color: var(--light-gray-color);
}

.footer__title {
    font-size: 1.1rem;
    color: white;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.footer__link {
    color: var(--footer-text-color);
}
.footer__link:hover {
    color: white;
    text-decoration: underline;
}

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

.footer__list--contact .footer__link, .footer__address {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.footer__bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(189, 195, 199, 0.2);
    font-size: 0.9rem;
    color: var(--light-gray-color);
}

/* Responsive Footer */
@media (min-width: 576px) {
    .footer__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .footer__grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
        gap: 3rem;
    }
}
/* ==================== BUTTONS ==================== */
.button {
    display: inline-block;
    padding: 0.9rem 2.5rem;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 50px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

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

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


/* ==================== HERO ==================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px; /* Offset for fixed header */
}

.hero__animation-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#hero-canvas {
    display: block;
    width: 100%;
    height: 100%;
}

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

.hero__content {
    max-width: 600px;
}

.hero__title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.hero__subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: var(--text-color);
    line-height: 1.6;
}

/* Responsive Hero */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2.8rem;
    }
    .hero__subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .hero {
        text-align: center;
    }
    .hero__content {
        margin: 0 auto;
    }
    .hero__title {
        font-size: 2.2rem;
    }
}
/* ==================== REUSABLE COMPONENTS ==================== */
.section {
    padding: 6rem 0;
}

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

.section__description {
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 650px;
    margin-bottom: 2.5rem;
}


/* ==================== CAREER SECTION ==================== */
.career__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.career__image-wrapper {
    max-width: 450px;
    margin: 0 auto;
}

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

.career__steps {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Card Component */
.card {
    background-color: #fff;
    border: 1px solid rgba(44, 62, 80, 0.1);
    border-radius: 12px;
    padding: 1.75rem;
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.card__icon-wrapper {
    background-color: rgba(0, 121, 107, 0.1); /* Light primary color */
    color: var(--primary-color);
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card__icon {
    width: 24px;
    height: 24px;
}

.card__title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

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

/* Responsive Career Section */
@media (min-width: 992px) {
    .career__grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 5rem;
    }
}
/* ==================== AUTOMATION SECTION ==================== */
.automation {
    background-color: #fff;
}

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

/* Tabs Component */
.tabs__nav {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.tabs__nav-button {
    background: none;
    border: none;
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    color: var(--text-color);
    position: relative;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease;
}

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

.tabs__nav-button--active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tabs__content-item {
    display: none;
    animation: fadeIn 0.6s ease;
}

.tabs__content-item--active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@media (min-width: 768px) {
    .tabs__content-grid {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }
}

.tabs__content-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
}

.tabs__content-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.tabs__feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.tabs__feature-list li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.tabs__feature-list i {
    color: var(--primary-color);
    width: 20px;
    height: 20px;
}

.tabs__content-image {
    border-radius: 12px;
    width: 100%;
    height: auto;
}

/* ==================== AI PRACTICES SECTION ==================== */
.ai-practices__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}

.ai-practices__image {
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.1);
}

/* Accordion Component */
.accordion {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

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

.accordion__item:last-child {
    border-bottom: none;
}

.accordion__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1.25rem 1.5rem;
    background-color: #fff;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font-headings);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: background-color 0.3s ease;
}

.accordion__header:hover {
    background-color: #f9f9f9;
}

.accordion__header-icon {
    transition: transform 0.4s ease;
    flex-shrink: 0;
    margin-left: 1rem;
}

.accordion__content {
    max-height: 0;
    overflow: hidden;
    background-color: #fff;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
}

.accordion__body {
    padding: 0 1.5rem;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #555;
}

/* Active state for Accordion */
.accordion__item--active .accordion__header-icon {
    transform: rotate(180deg);
    color: var(--primary-color);
}

.accordion__item--active .accordion__content {
    /* A large enough value to accommodate content */
    max-height: 300px;
    padding-top: 0;
    padding-bottom: 1.5rem;
}


/* Responsive AI Practices Section */
@media (min-width: 992px) {
    .ai-practices__grid {
        grid-template-columns: 1.2fr 1fr;
        gap: 5rem;
    }
}
/* ==================== KNOWLEDGE BASE SECTION ==================== */
.knowledge {
    background-color: #fff;
}

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

/* Post Card Component */
.post-card {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(44, 62, 80, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.post-card__link-wrapper {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card__image-wrapper {
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

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

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

.post-card__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-card__category {
    display: inline-block;
    background-color: rgba(0, 121, 107, 0.1);
    color: var(--primary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    align-self: flex-start;
}

.post-card__title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    flex-grow: 1;
}

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

.post-card__footer {
    padding: 0 1.5rem 1.5rem;
}

.post-card__footer a {
    font-weight: 600;
    color: var(--primary-color);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.post-card__footer a i {
    transition: transform 0.3s ease;
}

.post-card__footer a:hover i {
    transform: translateX(4px);
}
/* ==================== CONTACT SECTION ==================== */
.contact {
    background-color: var(--background-color);
}

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

@media (min-width: 992px) {
    .contact__grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 5rem;
    }
}

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

.contact__info-text {
    margin-bottom: 2rem;
}

.contact__info-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact__info-list a {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-color);
    font-weight: 500;
    font-size: 1.1rem;
}

.contact__info-list a:hover {
    color: var(--primary-color);
}

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


/* Form Styles */
.contact__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form__group {
    display: flex;
    flex-direction: column;
}

.form__label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: var(--font-main);
    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(0, 121, 107, 0.15);
}

.form__group--captcha {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1rem;
}

.form__group--captcha .form__label {
    margin-bottom: 0;
}

.form__group--checkbox {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9rem;
}
.form__group--checkbox input {
    width: 1.2em;
    height: 1.2em;
}
.form__group--checkbox label {
    margin: 0;
}

.form__submit-btn {
    width: 100%;
    padding: 1rem;
}

.form__message {
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    text-align: center;
}

.form__message--success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form__message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: calc(100% - 2rem);
    background-color: #fff;
    color: var(--text-color);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(44, 62, 80, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup--show {
    bottom: 1.5rem;
}

.cookie-popup__text {
    font-size: 0.9rem;
    line-height: 1.6;
}

.cookie-popup__text a {
    font-weight: 600;
    text-decoration: underline;
}

.cookie-popup__button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color 0.3s ease;
}

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

@media (max-width: 576px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
    }
}

/* ==================== GENERIC PAGES (Privacy, Terms, etc.) ==================== */
.pages {
    padding-top: 120px; /* Offset for fixed header + extra space */
    padding-bottom: 6rem;
    background-color: #fff;
}

.pages .container {
    max-width: 800px;
}

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

.pages h1 {
    font-size: 2.8rem;
}

.pages h2 {
    font-size: 2rem;
    margin-top: 3rem;
}

.pages p, .pages ul {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 1.5rem;
}

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

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

.pages a {
    text-decoration: underline;
}

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

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