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

/* ==================== CSS VARIABLES ==================== */
:root {
    --header-height: 5rem;

    /* Colors */
    --background-color: #FDFDFD;
    --text-color: #1a1a1a;
    --primary-color: #0D47A1;
    --primary-color-alt: #1565C0;
    --accent-color: #F9A825;
    --muted-color: #E0E0E0;
    --text-color-light: #6c757d;

    /* Font and typography */
    --body-font: 'Manrope', sans-serif;
    --h1-font-size: 2.5rem;
    --h2-font-size: 2rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Font weight */
    --font-regular: 400;
    --font-medium: 500;
    --font-bold: 700;
}

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

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 {
    font-weight: var(--font-bold);
}

ul {
    list-style: none;
}

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

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

/* ==================== REUSABLE CSS CLASSES ==================== */
.container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.5rem;
}

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

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

.header__logo {
    font-size: 1.5rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
}

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

.header__nav-link {
    font-weight: var(--font-medium);
    transition: color 0.3s ease;
}

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

.header__cta-button {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: var(--font-medium);
    transition: background-color 0.3s ease;
}

.header__cta-button:hover {
    background-color: var(--primary-color-alt);
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: #f1f3f5;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--muted-color);
}

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

.footer__logo {
    display: inline-block;
    font-size: 1.75rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.footer__copyright {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

.footer__title {
    font-size: var(--h3-font-size);
    margin-bottom: 1.5rem;
    font-weight: var(--font-medium);
}

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

.footer__link {
    color: var(--text-color-light);
    transition: color 0.3s ease, padding-left 0.3s ease;
    position: relative;
}

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

.footer__list--contacts .footer__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer__icon {
    width: 20px;
    height: 20px;
    color: var(--primary-color);
}

.footer__text {
    color: var(--text-color-light);
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (max-width: 768px) {
    .header__nav {
        display: none; /* Mobile menu will be implemented later */
    }
}

@media screen and (min-width: 768px) {
    .footer__container {
        grid-template-columns: 2fr repeat(3, 1fr);
        gap: 2rem;
    }
}

@media screen and (min-width: 1024px) {
    :root {
        --h1-font-size: 3rem;
        --h2-font-size: 2.25rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
    }
}

/* ==================== HERO SECTION ==================== */
.hero {
    padding-top: var(--header-height);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden; /* To hide elements before animation */
}

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

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

.hero__description {
    font-size: var(--normal-font-size);
    color: var(--text-color-light);
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero__cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--background-color);
    padding: 1rem 2.5rem;
    border-radius: 5px;
    font-weight: var(--font-medium);
    font-size: var(--normal-font-size);
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 71, 161, 0.2);
}

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

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

.hero__image {
    width: 100%;
    max-width: 500px;
    border-radius: 10px;
}

/* Animation styles */
[data-animate="hero-element"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animate="hero-element"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Delay for staggered effect */
.hero__description { transition-delay: 0.2s; }
.hero__cta-button { transition-delay: 0.4s; }
.hero__image-wrapper { transition-delay: 0.3s; }

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

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

.section__header {
    text-align: center;
    margin-bottom: 4rem;
}

.section__subtitle {
    display: block;
    font-size: var(--small-font-size);
    color: var(--primary-color);
    font-weight: var(--font-bold);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.section__title {
    font-size: var(--h2-font-size);
    margin-bottom: 1rem;
}

.section__description {
    max-width: 600px;
    margin: 0 auto;
    color: var(--text-color-light);
}


/* ==================== DIRECTIONS SECTION ==================== */
.directions {
    background-color: #f8f9fa; /* A slightly different background for contrast */
}

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

.directions__card {
    background-color: var(--background-color);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    border: 1px solid var(--muted-color);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.directions__card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.directions__card-icon {
    margin-bottom: 1.5rem;
}

.directions__card-icon i {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
}

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

.directions__card-description {
    color: var(--text-color-light);
    font-size: var(--normal-font-size);
    line-height: 1.7;
}

/* Animation for cards */
[data-animate="card"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate="card"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media screen and (min-width: 576px) {
    .directions__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 992px) {
    .directions__grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==================== PROCESS SECTION ==================== */
.process__timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

/* The vertical line */
.process__timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 19px; /* Centered on the number */
    height: 100%;
    width: 2px;
    background-color: var(--muted-color);
}

.process__item {
    position: relative;
    margin-bottom: 3rem;
    padding-left: 50px; /* Space for number and line */
}

.process__item:last-child {
    margin-bottom: 0;
}

.process__item-number {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--background-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    border: 3px solid var(--background-color);
    outline: 2px solid var(--primary-color);
}

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

.process__item-description {
    color: var(--text-color-light);
}

/* Animation for timeline items */
[data-animate="timeline-item"] {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-animate="timeline-item"].is-visible {
    opacity: 1;
    transform: translateX(0);
}


/* Desktop layout for timeline */
@media screen and (min-width: 768px) {
    .process__timeline::before {
        left: 50%;
        margin-left: -1px;
    }

    .process__item {
        padding-left: 0;
        width: 50%;
    }

    /* Odd items on the left */
    .process__item:nth-child(odd) {
        padding-right: 40px;
        text-align: right;
    }

    /* Even items on the right */
    .process__item:nth-child(even) {
        margin-left: 50%;
        padding-left: 40px;
    }

    /* Position numbers on the center line */
    .process__item-number {
        left: 50%;
        margin-left: -20px;
    }

    /* Animation directions */
    [data-animate="timeline-item"]:nth-child(odd) {
        transform: translateX(-30px);
    }
    [data-animate="timeline-item"]:nth-child(even) {
        transform: translateX(30px);
    }
    [data-animate="timeline-item"].is-visible {
        transform: translateX(0);
    }
}

/* ==================== RESULTS SECTION ==================== */
.results {
    background-color: #f8f9fa;
}

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

.results__item {
    background-color: var(--background-color);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--muted-color);
    text-align: center;
}

.results__item-icon {
    width: 44px;
    height: 44px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.results__item-number {
    font-size: var(--h1-font-size);
    font-weight: var(--font-bold);
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.results__item-title {
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}


/* Animation for stats */
[data-animate="stat"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
[data-animate="stat"].is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media screen and (min-width: 768px) {
    .results__grid {
        grid-template-columns: repeat(4, 1fr);
    }
    .results__item-title {
        font-size: var(--normal-font-size);
    }
}

/* ==================== ANALYTICS (BLOG) SECTION ==================== */
.analytics__grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(1, 1fr);
}

.analytics__card {
    background-color: var(--background-color);
    border: 1px solid var(--muted-color);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.analytics__card-image-wrapper {
    overflow: hidden;
}

.analytics__card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.analytics__card:hover .analytics__card-image {
    transform: scale(1.05);
}

.analytics__card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Makes sure the content area fills the space */
}

.analytics__card-category {
    display: inline-block;
    font-size: var(--small-font-size);
    color: var(--primary-color);
    font-weight: var(--font-bold);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
}

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

.analytics__card-title a {
    transition: color 0.3s ease;
}

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

.analytics__card-excerpt {
    color: var(--text-color-light);
    margin-bottom: 1.5rem;
    flex-grow: 1; /* Pushes the 'read more' link to the bottom */
}

.analytics__card-readmore {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: var(--font-bold);
    color: var(--primary-color);
    transition: gap 0.3s ease;
}

.analytics__card-readmore:hover {
    gap: 0.75rem;
}

.analytics__card-readmore-icon {
    width: 18px;
    height: 18px;
}

/* Animation for blog cards */
[data-animate="blog-card"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

[data-animate="blog-card"].is-visible {
    opacity: 1;
    transform: translateY(0);
}


@media screen and (min-width: 768px) {
    .analytics__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (min-width: 1024px) {
    .analytics__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== CONTACT SECTION ==================== */
.contact {
    background-color: #f8f9fa;
}
.contact__container {
    display: grid;
    gap: 4rem;
}

.contact__content .section__header {
    text-align: left;
    margin-bottom: 0;
}

.contact__content .section__description {
    margin: 0;
    max-width: none;
}

.contact__form-group {
    margin-bottom: 1.5rem;
}

.contact__form-label {
    display: block;
    font-weight: var(--font-medium);
    margin-bottom: 0.5rem;
}

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

.contact__form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(13, 71, 161, 0.15);
}

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

.contact__form-checkbox {
    margin-top: 5px;
    width: 18px;
    height: 18px;
}

.contact__form-checkbox-label {
    font-size: var(--small-font-size);
    color: var(--text-color-light);
}

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

.contact__form-button {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: var(--background-color);
    border: none;
    border-radius: 5px;
    font-size: var(--normal-font-size);
    font-weight: var(--font-bold);
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact__form-button:hover {
    background-color: var(--primary-color-alt);
}

.contact__form-message {
    display: none; /* Hidden by default */
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 5px;
    background-color: #eaf7ed;
    color: #155724;
    border: 1px solid #c3e6cb;
    text-align: center;
}

.contact__form-message.is-visible {
    display: block;
}


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

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden */
    left: 0;
    width: 100%;
    background-color: rgba(26, 26, 26, 0.9);
    backdrop-filter: blur(5px);
    color: var(--background-color);
    padding: 1.5rem 0;
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.is-visible {
    bottom: 0;
}

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

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

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

.cookie-popup__button {
    background-color: var(--accent-color);
    color: var(--text-color);
    border: none;
    padding: 0.6rem 2rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: var(--font-bold);
    transition: background-color 0.3s;
}

.cookie-popup__button:hover {
    background-color: #ffc107;
}

@media screen and (min-width: 768px) {
    .cookie-popup__content {
        flex-direction: row;
    }
    .cookie-popup__text {
        font-size: var(--normal-font-size);
    }
}

/* ==================== GENERIC PAGES (TERMS, PRIVACY, ETC.) ==================== */
.pages .container {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 6rem;
    max-width: 800px;
}

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

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

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

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

.pages li {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--text-color-light);
}

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

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

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