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

/* ======== CSS VARIABLES ======== */
:root {
    --background-color: #1A1A2E;
    --primary-text-color: #FFFFFF;
    --secondary-text-color: #A8B2CD;
    --accent-color-1: #E94560;
    --accent-color-2: #00F5D4;
    
    --header-height: 5rem;

    --font-headings: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

/* ======== BASE STYLES ======== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

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

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: 1200px;
    margin-left: 1.5rem;
    margin-right: 1.5rem;
}

/* ======== HEADER ======== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 46, 0.85);
    backdrop-filter: blur(10px);
    z-index: 100;
    border-bottom: 1px solid rgba(168, 178, 205, 0.1);
}

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

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

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

.nav__link {
    font-weight: 500;
    color: var(--secondary-text-color);
    padding: 0.5rem 0;
    position: relative;
}

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

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

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

.nav__link--cta {
    background-color: var(--accent-color-1);
    color: var(--primary-text-color);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    transition: background-color 0.3s, transform 0.3s;
}

.nav__link--cta:hover {
    background-color: #d43d51; /* Darker shade of accent 1 */
    color: var(--primary-text-color);
    transform: translateY(-2px);
}
.nav__link--cta:hover::after {
    width: 0; /* No underline for button */
}

/* ======== MAIN CONTENT PLACEHOLDER ======== */
.main {
    padding-top: var(--header-height);
}

/* ======== FOOTER ======== */
.footer {
    padding: 4rem 0;
    background-color: #161625; /* Slightly darker than main bg */
    border-top: 1px solid rgba(168, 178, 205, 0.1);
}

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

.footer__logo {
    font-family: var(--font-headings);
    font-weight: 700;
    font-size: 1.75rem;
    display: inline-block;
    margin-bottom: 1rem;
}

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

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

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

.footer__link {
    color: var(--secondary-text-color);
    font-size: 0.95rem;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

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

.footer__list--contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--secondary-text-color);
}

.footer__list--contact i {
    color: var(--accent-color-2);
    width: 20px;
    height: 20px;
}

/* Responsive adjustments */
@media screen and (min-width: 768px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 767px) {
    .nav {
        /* Mobile menu will be implemented later */
        display: none; 
    }
    
    .header__container {
        justify-content: center;
    }
}

/* ======== BUTTONS ======== */
.button {
    display: inline-block;
    padding: 0.9rem 2.2rem;
    border-radius: 5px;
    font-family: var(--font-headings);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
}

.button--primary {
    background-color: var(--accent-color-1);
    color: var(--primary-text-color);
}

.button--primary:hover {
    background-color: #d43d51; /* Darker accent-1 */
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(233, 69, 96, 0.2);
}

/* ======== HERO SECTION ======== */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; /* Important for canvas */
    text-align: center;
}

.hero__canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Behind content */
}

.hero__container {
    position: relative;
    z-index: 2; /* In front of canvas */
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero__title {
    font-family: var(--font-headings);
    font-size: clamp(2.5rem, 5vw, 4rem); /* Responsive font size */
    font-weight: 700;
    color: var(--primary-text-color);
    line-height: 1.2;
    max-width: 800px;
    margin-bottom: 1rem;
}

/* Gradient text effect */
.hero__title {
    background: linear-gradient(90deg, var(--accent-color-2), var(--primary-text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}


.hero__subtitle {
    font-size: 1.125rem;
    color: var(--secondary-text-color);
    max-width: 650px;
    margin-bottom: 2.5rem;
}

/* ======== GENERIC SECTION STYLES ======== */
.section {
    padding: 6rem 0;
}

.section__title {
    font-family: var(--font-headings);
    font-size: clamp(2rem, 4vw, 2.5rem);
    text-align: center;
    margin-bottom: 1rem;
    color: var(--primary-text-color);
}

.section__subtitle {
    text-align: center;
    color: var(--secondary-text-color);
    max-width: 600px;
    margin: 0 auto 4rem auto;
    font-size: 1.1rem;
}

/* ======== HOW IT WORKS SECTION ======== */
.how-it-works__steps {
    display: grid;
    gap: 2rem;
}

.how-it-works__step {
    background-color: #161625; /* Same as footer bg for contrast */
    padding: 2.5rem 2rem;
    border-radius: 8px;
    text-align: center;
    border: 1px solid rgba(168, 178, 205, 0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.how-it-works__step:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.how-it-works__number {
    position: absolute;
    top: -0.5rem;
    left: 1rem;
    font-size: 4rem;
    font-weight: 700;
    font-family: var(--font-headings);
    color: rgba(168, 178, 205, 0.05);
    z-index: 1;
}

.how-it-works__icon-wrapper {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background-color: rgba(0, 245, 212, 0.1); /* Accent-2 with transparency */
    border-radius: 50%;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.how-it-works__icon-wrapper i {
    width: 32px;
    height: 32px;
    color: var(--accent-color-2);
}

.how-it-works__step-title {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    color: var(--primary-text-color);
    margin-bottom: 0.75rem;
    position: relative;
    z-index: 2;
}

.how-it-works__step-description {
    color: var(--secondary-text-color);
    font-size: 0.95rem;
    line-height: 1.7;
    position: relative;
    z-index: 2;
}


/* Desktop layout */
@media (min-width: 768px) {
    .how-it-works__steps {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }

    .how-it-works__step {
        text-align: left;
    }
    
    .how-it-works__step-title,
    .how-it-works__step-description {
        text-align: left;
    }
    
    .how-it-works__icon-wrapper {
        margin-left: 0;
    }

    /* Decorative connecting line */
    .how-it-works__step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 3.8rem; /* Aligns with the center of the icon */
        right: -1.5rem; /* Half of the gap */
        width: 3rem; /* Same as the gap */
        height: 2px;
        background: repeating-linear-gradient(
            90deg,
            var(--secondary-text-color),
            var(--secondary-text-color) 4px,
            transparent 4px,
            transparent 8px
        );
        opacity: 0.3;
    }
}

@media (min-width: 1024px) {
    .how-it-works__step:not(:last-child)::after {
        right: -2.5rem;
        width: 5rem;
    }
    .how-it-works__steps {
        gap: 5rem;
    }
}
/* ======== DIRECTIONS SECTION ======== */
.directions__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.directions__card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: flex-end;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(168, 178, 205, 0.1);
}

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

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

.directions__card:hover .directions__card-image img {
    transform: scale(1.1);
}

.directions__card-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(to top, 
        rgba(22, 22, 37, 0.9) 0%, 
        rgba(22, 22, 37, 0.7) 50%, 
        rgba(22, 22, 37, 0) 100%
    );
    transition: background 0.3s ease;
}

.directions__card:hover .directions__card-content {
    background: linear-gradient(to top, 
        rgba(22, 22, 37, 1) 0%, 
        rgba(22, 22, 37, 0.7) 60%, 
        rgba(22, 22, 37, 0) 100%
    );
}


.directions__card-title {
    font-family: var(--font-headings);
    font-size: 1.75rem;
    color: var(--primary-text-color);
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.directions__card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-color-2);
    font-weight: 500;
    text-decoration: none;
}

.directions__card-link span {
    transition: transform 0.3s ease;
}

.directions__card-link i {
    transition: transform 0.3s ease;
    width: 20px;
}

.directions__card:hover .directions__card-link span {
    transform: translateX(-3px);
}

.directions__card:hover .directions__card-link i {
    transform: translateX(3px);
}

/* ======== FORMATS SECTION ======== */
.formats__list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

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

.formats__item-icon {
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: var(--accent-color-1);
    border-radius: 8px;
    color: var(--primary-text-color);
}

.formats__item-icon i {
    width: 28px;
    height: 28px;
}

.formats__item-title {
    font-family: var(--font-headings);
    font-size: 1.5rem;
    color: var(--primary-text-color);
    margin-bottom: 0.5rem;
}

.formats__item-description {
    color: var(--secondary-text-color);
    line-height: 1.7;
}

@media (min-width: 576px) {
    .formats__item {
        gap: 2rem;
    }

    .formats__item-icon {
        width: 60px;
        height: 60px;
    }
}
/* ======== CASES SECTION ======== */
.cases__slider-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.cases__slider {
    overflow: hidden;
    border-radius: 8px;
}

.cases__slider-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.cases__slide {
    min-width: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    padding: 2rem 3rem; /* Змінено вертикальний падінг */
    background-color: #161625;
    border: 1px solid rgba(168, 178, 205, 0.1);

    /* --- НОВІ СТИЛІ ДЛЯ ВИРІВНЮВАННЯ --- */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 320px; /* Мінімальна висота слайда */
}

.cases__quote {
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    color: var(--primary-text-color);
    margin-bottom: 2rem;
    text-align: center;
    max-width: 650px; /* Обмеження ширини для читабельності */
    
    /* --- ДОДАТКОВІ СТИЛІ --- */
    flex-grow: 1; /* Дозволяє блоку з цитатою займати вільний простір */
    display: flex;
    align-items: center; /* Центрує текст цитати по вертикалі всередині блоку */
}

.cases__author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.cases__author-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-color-2);
}

.cases__author-name {
    display: block;
    font-family: var(--font-headings);
    font-weight: 600;
    color: var(--primary-text-color);
}

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

.cases__slider-nav {
    display: flex;
    justify-content: space-between;
    position: absolute;
    top: 50%;
    left: -25px;
    right: -25px;
    transform: translateY(-50%);
    pointer-events: none; /* Allows clicks to go through to the buttons */
}

.cases__nav-btn {
    pointer-events: all; /* Make buttons clickable */
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-text-color);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s, transform 0.3s;
}

.cases__nav-btn:hover {
    background-color: var(--accent-color-1);
    transform: scale(1.1);
}

.cases__nav-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: scale(1);
}

@media (max-width: 900px) {
    .cases__slider-nav {
        left: 0;
        right: 0;
    }
}

@media (max-width: 500px) {
    .cases__slide {
        padding: 2rem 1.5rem;
    }
    .cases__quote {
        font-size: 1.1rem;
    }
    .cases__slider-nav {
        top: auto;
        bottom: -60px; /* Position nav below slider */
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
    }
}

/* ======== CONTACT SECTION ======== */
.contact__container {
    display: grid;
    gap: 4rem;
}

@media (min-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr 1.2fr;
        align-items: flex-start;
    }
}

.contact__title, .contact__subtitle {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

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

.contact__details li {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    color: var(--secondary-text-color);
}

.contact__details i {
    color: var(--accent-color-2);
    width: 24px;
}

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

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

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

.form__label {
    margin-bottom: 0.5rem;
    color: var(--secondary-text-color);
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 5px;
    border: 1px solid rgba(168, 178, 205, 0.2);
    background-color: #161625;
    color: var(--primary-text-color);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.form__input::placeholder {
    color: var(--secondary-text-color);
    opacity: 0.6;
}

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

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

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

.form__group--checkbox input[type="checkbox"] {
    width: 1.25em;
    height: 1.25em;
    accent-color: var(--accent-color-1);
    flex-shrink: 0;
}

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

.contact__form-btn {
    width: 100%;
    margin-top: 1rem;
}

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

.form__message.success {
    background-color: rgba(0, 245, 212, 0.1);
    color: var(--accent-color-2);
    display: block;
}

.form__message.error {
    background-color: rgba(233, 69, 96, 0.1);
    color: var(--accent-color-1);
    display: block;
}

/* ======== COOKIE POPUP ======== */
.cookie-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #161625;
    padding: 1.5rem 2rem;
    z-index: 200;
    border-top: 1px solid rgba(168, 178, 205, 0.1);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    
    transform: translateY(100%);
    transition: transform 0.5s ease-in-out;
}

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

.cookie-popup__content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

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

.cookie-popup__btn {
    flex-shrink: 0;
    padding: 0.7rem 1.5rem;
}

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

/* ======== POLICY PAGES (privacy.html, terms.html, etc.) ======== */
.pages {
    padding-top: var(--header-height); /* To prevent content from hiding behind fixed header */
}

.pages .container {
    max-width: 800px; /* Limit text width for readability */
    padding-top: 4rem;
    padding-bottom: 6rem;
}

.pages h1,
.pages h2 {
    font-family: var(--font-headings);
    color: var(--primary-text-color);
    line-height: 1.3;
}

.pages h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    background: linear-gradient(90deg, var(--accent-color-2), var(--primary-text-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.pages h2 {
    font-size: clamp(1.5rem, 4vw, 1.8rem);
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent-color-1);
    padding-left: 1rem;
}

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

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

.pages li {
    color: var(--secondary-text-color);
    line-height: 1.8;
    margin-bottom: 0.75rem;
    padding-left: 0.5rem;
}

.pages li::marker {
    color: var(--accent-color-2);
}

.pages a {
    color: var(--accent-color-2);
    text-decoration: underline;
    font-weight: 500;
}

.pages a:hover {
    text-decoration: none;
}

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