/* ==================== GLOBAL STYLES ==================== */
/* Google Fonts Import is in HTML <head> */

:root {
    --color-background: #111827;
    --color-surface: #1F2937;
    --color-primary: #6366F1;
    --color-primary-hover: #4F46E5;
    --color-text-primary: #E5E7EB;
    --color-text-secondary: #9CA3AF;
    --font-family-headings: 'Manrope', sans-serif;
    --font-family-body: 'Inter', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

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

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

ul {
    list-style: none;
}

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

/* ==================== HEADER ==================== */
.header {
    background-color: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--color-surface);
}

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

.header__logo {
    font-family: var(--font-family-headings);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--color-text-primary);
}

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

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

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

.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;
}

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

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

.header__nav-link--cta {
    background-color: var(--color-primary);
    color: white;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

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

.header__nav-link--cta::after {
    display: none;
}

.header__menu-button {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    color: var(--color-text-primary);
    cursor: pointer;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--color-surface);
    padding: 4rem 0 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer__logo {
    font-family: var(--font-family-headings);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.footer__tagline {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    max-width: 250px;
}

.footer__title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-text-primary);
}

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

.footer__link {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

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

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

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

.footer__text {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
}

.footer__bottom {
    margin-top: 4rem;
    padding: 1.5rem 0;
    text-align: center;
    border-top: 1px solid var(--color-background);
    color: var(--color-text-secondary);
    font-size: 0.85rem;
}

/* ==================== ADAPTIVE STYLES (Mobile First) ==================== */
@media (max-width: 992px) {
    .footer__container {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .header__nav {
        /* Mobile menu logic will be added later with JS */
        display: none;
    }
    .header__menu-button {
        display: block;
    }
}

@media (max-width: 576px) {
    .footer__container {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

/* ==================== BUTTONS ==================== */
.button {
    display: inline-block;
    padding: 0.85rem 2rem;
    font-family: var(--font-family-body);
    font-weight: 500;
    font-size: 1rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

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

.button--primary:hover {
    background-color: var(--color-primary-hover);
    color: white;
    transform: translateY(-3px);
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding: 6rem 0;
    overflow: hidden;
}

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

.hero__content {
    flex: 1;
    max-width: 600px;
}

.hero__title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero__description {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--color-text-secondary);
    margin-bottom: 2.5rem;
}

.hero__animated-word-container {
    color: var(--color-text-primary);
    font-weight: 500;
    position: relative;
    display: inline-block;
}

.hero__animated-word::after {
    content: '|';
    display: inline-block;
    color: var(--color-primary);
    animation: blink 0.7s infinite;
    position: relative;
    right: -2px;
}

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

.hero__visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero__image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    /* Условный стиль для плейсхолдера, чтобы он выглядел лучше */
    background-color: var(--color-surface); 
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* ==================== ADAPTIVE FOR HERO ==================== */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2.75rem;
    }
    .hero__container {
        flex-direction: column;
        text-align: center;
    }
    .hero__content {
        max-width: 100%;
        order: 2; /* Текст будет вторым */
    }
    .hero__visual {
        order: 1; /* Картинка будет первой */
        margin-bottom: 3rem;
        width: 100%;
        max-width: 500px;
    }
}

@media (max-width: 576px) {
    .hero {
        padding: 4rem 0;
    }
    .hero__title {
        font-size: 2.25rem;
    }
    .hero__description {
        font-size: 1rem;
    }
}

/* ==================== SECTION HEADER (Reusable) ==================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem auto;
}

.section-header__title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
}

.section-header__subtitle {
    font-size: 1.125rem;
    color: var(--color-text-secondary);
    line-height: 1.7;
}


/* ==================== CASES SECTION ==================== */
.cases-section {
    padding: 6rem 0;
    background-color: var(--color-background); /* Or var(--color-surface) for contrast */
}

.cases-section__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

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

.case-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

.case-card__image-wrapper {
    width: 100%;
    aspect-ratio: 16 / 9;
}

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

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

.case-card__tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 99px; /* Pill shape */
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 1rem;
    background-color: rgba(99, 102, 241, 0.2); /* Primary color with opacity */
    color: var(--color-primary);
    align-self: flex-start;
}

/* Modifier classes for other tags */
.case-card__tag--career {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.case-card__tag--product {
    background-color: rgba(234, 179, 8, 0.2);
    color: #EAB308;
}

.case-card__title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.case-card__excerpt {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes the link to the bottom */
}

.case-card__link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--color-primary);
    align-self: flex-start; /* Align link to the start of the flex container */
}

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

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


/* ==================== ADAPTIVE FOR CASES ==================== */
@media (max-width: 992px) {
    .cases-section__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .cases-section__grid {
        grid-template-columns: 1fr;
    }
    .section-header__title {
        font-size: 2.125rem;
    }
    .section-header__subtitle {
        font-size: 1rem;
    }
}

/* ==================== TOOLS SECTION ==================== */
.tools-section {
    padding: 6rem 0;
    background-color: var(--color-surface); /* Contrast background */
}

.tools-section__grid {
    display: grid;
    /* This creates a responsive grid that fits as many items as possible */
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.tool-card {
    background-color: var(--color-background);
    border: 1px solid #374151; /* Slightly lighter than surface */
    border-radius: 8px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.tool-card:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
}

.tool-card__icon {
    width: 40px;
    height: 40px;
    color: var(--color-text-secondary);
    transition: color 0.3s ease;
}

.tool-card:hover .tool-card__icon {
    color: var(--color-primary);
}

.tool-card__name {
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-text-primary);
}

/* ==================== ADAPTIVE FOR TOOLS ==================== */
@media (max-width: 768px) {
    .tools-section__grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 1rem;
    }
}

/* ==================== OPINIONS SECTION ==================== */
.opinions-section {
    padding: 6rem 0;
    background-color: var(--color-background);
}

.opinions-slider {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
}

.opinions-slider__wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.opinion-card {
    flex: 0 0 100%; /* Каждый слайд занимает 100% ширины */
    width: 100%;
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 0 4rem; /* Оставляем место для кнопок навигации */
}

.opinion-card__photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid var(--color-surface);
}

.opinion-card__content {
    position: relative;
}

.opinion-card__icon {
    position: absolute;
    top: -1.5rem;
    left: -2rem;
    width: 80px;
    height: 80px;
    color: var(--color-surface);
    z-index: -1;
}

.opinion-card__quote {
    font-size: 1.375rem;
    font-style: italic;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    border: none;
    padding: 0;
    color: var(--color-text-primary);
}

.opinion-card__author-name {
    font-weight: 700;
    font-family: var(--font-family-headings);
    font-size: 1.1rem;
    color: var(--color-text-primary);
}

.opinion-card__author-title {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.opinions-slider__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: var(--color-surface);
    border: 1px solid transparent;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.opinions-slider__nav:hover {
    background-color: var(--color-primary);
    color: white;
}

.opinions-slider__nav--prev {
    left: 0;
}

.opinions-slider__nav--next {
    right: 0;
}


/* ==================== ADAPTIVE FOR OPINIONS ==================== */
@media (max-width: 768px) {
    .opinion-card {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 0 1rem; /* Меньше отступы на мобильных */
    }

    .opinion-card__photo {
        width: 120px;
        height: 120px;
    }
    
    .opinion-card__icon {
        top: -1rem;
        left: 50%;
        transform: translateX(-50%);
    }

    .opinion-card__quote {
        font-size: 1.125rem;
    }

    .opinions-slider__nav {
        bottom: -4rem; /* Перемещаем кнопки под слайдер */
        top: auto;
        transform: none;
    }
    
    .opinions-slider__nav--prev {
        left: 35%;
        transform: translateX(-50%);
    }
    .opinions-slider__nav--next {
        right: 35%;
        transform: translateX(50%);
    }
    .opinions-section {
        padding-bottom: 10rem; /* Добавляем место для кнопок */
    }
}

/* ==================== CAREER SECTION ==================== */
.career-section {
    padding: 6rem 0;
    background-color: var(--color-surface);
}

.career-section__steps {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
}

/* Dashed line connector for desktop */
.career-section__steps::before {
    content: '';
    position: absolute;
    top: 40px; /* Vertically align with icons */
    left: 15%;
    right: 15%;
    height: 2px;
    background-image: linear-gradient(to right, var(--color-primary) 50%, transparent 50%);
    background-size: 16px 2px;
    background-repeat: repeat-x;
    z-index: 0;
}

.step-card {
    background-color: var(--color-background);
    padding: 2rem;
    border-radius: 12px;
    text-align: center;
    flex: 1;
    position: relative;
    z-index: 1;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
}

.step-card__header {
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.step-card__icon {
    width: 50px;
    height: 50px;
    color: var(--color-primary);
    margin-bottom: 1rem;
    background-color: var(--color-surface);
    padding: 10px;
    border-radius: 50%;
    position: relative;
    z-index: 2; /* Icon above number */
}

.step-card__number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 4rem;
    font-weight: 800;
    font-family: var(--font-family-headings);
    color: rgba(255, 255, 255, 0.05);
    z-index: 1; /* Number behind icon */
}

.step-card__title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--color-text-primary);
}

.step-card__description {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
}

/* ==================== ADAPTIVE FOR CAREER ==================== */
@media (max-width: 992px) {
    .career-section__steps {
        flex-direction: column;
        gap: 2.5rem;
    }
    /* Hide horizontal line on mobile */
    .career-section__steps::before {
        display: none;
    }
}

/* ==================== CONTACT SECTION ==================== */
.contact-section {
    padding: 6rem 0;
    background-color: var(--color-background);
}

.contact-form {
    max-width: 700px;
    margin: 0 auto;
    background-color: var(--color-surface);
    padding: 3rem;
    border-radius: 12px;
}

.contact-form__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-group__label {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}

.form-group__input {
    width: 100%;
    padding: 0.85rem 1rem;
    background-color: var(--color-background);
    border: 1px solid #374151;
    border-radius: 6px;
    color: var(--color-text-primary);
    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(99, 102, 241, 0.3);
}

/* Стилизация для поля с ошибкой (будет добавляться через JS) */
.form-group__input.is-invalid {
    border-color: #EF4444; /* red-500 */
}

.form-group--checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.form-group__checkbox {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--color-primary);
    flex-shrink: 0;
}

.form-group__checkbox-label {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.form-group__checkbox-label a {
    text-decoration: underline;
}

.form-status {
    padding: 1rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    font-weight: 500;
    text-align: center;
    display: none; /* Hidden by default */
}

.form-status--success {
    background-color: rgba(34, 197, 94, 0.2);
    color: #22C55E;
    display: block;
}

.form-status--error {
    background-color: rgba(239, 68, 68, 0.2);
    color: #EF4444;
    display: block;
}

.contact-form__submit {
    width: 100%;
    font-size: 1.1rem;
}
.contact-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==================== ADAPTIVE FOR CONTACT ==================== */
@media (max-width: 768px) {
    .contact-form__grid {
        grid-template-columns: 1fr;
    }
    .contact-form {
        padding: 2rem;
    }
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    color: var(--color-text-secondary);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    z-index: 200;
    border-top: 1px solid #374151;
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

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

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

.cookie-popup__text a {
    color: var(--color-text-primary);
    text-decoration: underline;
}

.cookie-popup__button {
    background-color: var(--color-primary);
    color: white;
    padding: 0.6rem 1.5rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap; /* Prevent button text from wrapping */
    transition: background-color 0.3s ease;
}

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

@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
}


/* ==================== GENERIC PAGES STYLING (privacy.html, etc.) ==================== */
.pages .container {
    max-width: 800px; /* Optimal width for reading */
    padding-top: 4rem;
    padding-bottom: 6rem;
}

.pages h1 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.pages h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-surface);
    padding-bottom: 0.5rem;
}

.pages p, 
.pages ul {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-secondary);
    margin-bottom: 1.5rem;
}

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

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

.pages a {
    text-decoration: underline;
}

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