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

/* ==================== CSS VARIABLES ==================== */
:root {
    /* Colors */
    --background-color: #F8F7F4;
    --text-color: #2D2D2D;
    --primary-color: #4A5D54; /* Deep Green */
    --accent-color: #B98B73; /* Warm Caramel */
    --light-bg-color: #FFFFFF;

    /* Fonts */
    --body-font: 'Manrope', sans-serif;
    --title-font: 'Playfair Display', serif;
    --normal-font-size: 1rem; /* 16px */
    
    /* Other */
    --header-height: 4.5rem;
    --border-radius: 0.5rem;
    --transition: all 0.3s ease-in-out;
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: var(--text-color);
}

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

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

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

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

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

.header__list {
    display: flex;
    gap: 2rem;
}

.header__link {
    position: relative;
    transition: var(--transition);
}

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

.header__link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

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

.header__toggle {
    display: none; /* Hidden on desktop */
    font-size: 1.5rem;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--primary-color);
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--primary-color);
    color: var(--background-color);
    padding-top: 4rem;
}

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

.footer__logo {
    font-family: var(--title-font);
    font-size: 1.75rem;
    color: var(--background-color);
    display: inline-block;
    margin-bottom: 1rem;
}

.footer__description {
    font-size: 0.9rem;
    opacity: 0.8;
}

.footer__title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--background-color);
}

.footer__link {
    color: var(--background-color);
    opacity: 0.8;
    transition: var(--transition);
    display: inline-block;
    padding: 0.25rem 0;
}

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

.footer__list--contact li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer__list--contact .lucide {
    flex-shrink: 0;
    color: var(--accent-color);
}

.footer__bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
}

.footer__copy {
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* ==================== RESPONSIVENESS ==================== */
@media (max-width: 768px) {
    .header__nav {
        display: none; /* Will be handled by JS later for mobile menu */
    }
    .header__toggle {
        display: block;
    }
}

/* ==================== BUTTONS ==================== */
.button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    font-family: var(--body-font);
    transition: var(--transition);
    border: 2px solid transparent;
}

.button--primary {
    background-color: var(--accent-color);
    color: var(--light-bg-color);
}

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

.button__icon {
    transition: transform 0.3s ease;
}

.button:hover .button__icon {
    transform: translateX(5px);
}

/* ==================== HERO ==================== */
.hero {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 4rem;
}

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

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

.hero__title--animated {
    color: var(--accent-color);
}

/* Blinking cursor for typing effect */
.hero__title--animated::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--accent-color);
}

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

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

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

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

/* ==================== RESPONSIVENESS (HERO) ==================== */
@media (max-width: 992px) {
    .hero__title {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    .hero {
        padding-top: calc(var(--header-height) + 2rem);
        padding-bottom: 2rem;
    }
    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero__content {
        order: 2; /* Text comes after image on mobile */
    }
    .hero__image-wrapper {
        order: 1;
        margin-bottom: 2rem;
    }
    .hero__subtitle {
        margin-left: auto;
        margin-right: auto;
    }
}
/* ==================== GENERIC SECTION STYLES ==================== */
.section {
    padding-top: 5rem;
    padding-bottom: 5rem;
}

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

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

.section__title {
    font-size: 2.5rem;
}

/* ==================== SERVICES ==================== */
.services__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.service-card {
    background-color: var(--light-bg-color);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    text-align: center;
    transition: var(--transition);
}

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

.service-card__icon {
    display: inline-flex;
    padding: 1rem;
    background-color: var(--background-color);
    border-radius: 50%;
    margin-bottom: 1.5rem;
}

.service-card__icon .lucide {
    width: 32px;
    height: 32px;
    color: var(--accent-color);
}

.service-card__title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.service-card__description {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-color);
}

/* ==================== RESPONSIVENESS (SERVICES) ==================== */
@media (max-width: 992px) {
    .services__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }
    .section__title {
        font-size: 2rem;
    }
    .services__container {
        grid-template-columns: 1fr;
    }
}

/* ==================== CASES ==================== */
.cases__container {
    display: grid;
    gap: 5rem;
}

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

/* Modifier to reverse the order */
.case-item--reversed {
    grid-template-columns: 1fr 1fr; /* Explicitly define for specificity */
}

.case-item--reversed .case-item__image-wrapper {
    order: 2;
}

.case-item--reversed .case-item__content {
    order: 1;
}

.case-item__image {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    width: 100%;
}

.case-item__tag {
    display: inline-block;
    background-color: var(--background-color);
    border: 1px solid rgba(0,0,0,0.1);
    color: var(--accent-color);
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.case-item__title {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.case-item__description {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

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

.case-item__results li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.case-item__results .lucide {
    color: var(--primary-color);
    flex-shrink: 0;
}

/* ==================== RESPONSIVENESS (CASES) ==================== */
@media (max-width: 768px) {
    .cases__container {
        gap: 4rem;
    }
    .case-item,
    .case-item--reversed {
        grid-template-columns: 1fr;
    }
    .case-item--reversed .case-item__image-wrapper,
    .case-item--reversed .case-item__content {
        order: 0; /* Reset order for stacking */
    }
    .case-item__title {
        font-size: 1.75rem;
    }
}

/* ==================== ABOUT US ==================== */
.about {
    background-color: var(--light-bg-color); /* To alternate section backgrounds */
}

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

.about__description {
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.about__principles li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.about__principles .lucide {
    color: var(--accent-color);
    flex-shrink: 0;
}

.about__images {
    position: relative;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about__image {
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    position: absolute;
    border: 5px solid var(--light-bg-color);
}

.about__image--1 {
    width: 60%;
    top: 0;
    left: 0;
    z-index: 1;
}

.about__image--2 {
    width: 70%;
    bottom: 0;
    right: 0;
}

/* ==================== RESPONSIVENESS (ABOUT US) ==================== */
@media (max-width: 992px) {
    .about__images {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .about__container {
        grid-template-columns: 1fr;
    }
    .about__content {
        order: 2;
    }
    .about__images {
        order: 1;
        margin-bottom: 2rem;
        height: 350px; /* Adjust height for mobile layout */
    }
    .section__header {
        text-align: center !important; /* Override inline style for mobile */
    }
    .about__content {
        text-align: center;
    }
    .about__principles {
        align-items: center;
    }
}

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

.blog-card {
    display: block;
    background-color: var(--light-bg-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    color: var(--text-color);
}

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

.blog-card__image-wrapper {
    overflow: hidden;
}

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

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

.blog-card__content {
    padding: 1.5rem;
}

.blog-card__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
}

.blog-card__category {
    font-weight: 700;
    color: var(--accent-color);
}

.blog-card__title {
    font-family: var(--title-font);
    font-size: 1.25rem;
    line-height: 1.4;
    color: var(--primary-color);
    margin-bottom: 1rem;
    /* Prevent title from breaking link layout */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 5.25rem; /* 1.25rem * 1.4 line-height * 3 lines */
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 700;
    color: var(--accent-color);
    transition: var(--transition);
}

.blog-card__link .lucide {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__link {
    gap: 0.5rem;
}
.blog-card:hover .blog-card__link .lucide {
    transform: translateX(4px);
}

/* ==================== RESPONSIVENESS (BLOG) ==================== */
@media (max-width: 992px) {
    .blog__container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .blog__container {
        grid-template-columns: 1fr;
    }
}

/* ==================== CONTACT ==================== */
.contact {
    background-color: var(--light-bg-color);
}

.contact__container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: flex-start;
}

.contact__description {
    line-height: 1.7;
    margin-bottom: 2rem;
}

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

.contact__detail-item {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    transition: var(--transition);
}

.contact__detail-item:hover {
    color: var(--accent-color);
}

.contact__detail-item .lucide {
    color: var(--accent-color);
}

.contact__form-wrapper {
    background-color: var(--light-bg-color);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.form__group {
    margin-bottom: 1.5rem;
}

.form__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 700;
    font-size: 0.9rem;
}

.form__input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
    border: 1px solid #ccc;
    background-color: var(--background-color);
    transition: var(--transition);
    font-family: var(--body-font);
    font-size: 1rem;
}

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

/* Captcha styling */
#captcha {
    max-width: 150px;
}

/* Custom Checkbox */
.form__group--checkbox {
    position: relative;
    display: flex;
    align-items: center;
}
.form__checkbox-input {
    opacity: 0;
    position: absolute;
    width: 1px;
    height: 1px;
}
.form__checkbox-label {
    font-weight: 400;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    cursor: pointer;
}
.form__custom-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    margin-right: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}
.form__checkbox-input:checked + .form__checkbox-label .form__custom-checkbox {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.form__custom-checkbox::after {
    content: '✔';
    color: white;
    font-size: 12px;
    opacity: 0;
    transition: opacity 0.2s ease;
}
.form__checkbox-input:checked + .form__checkbox-label .form__custom-checkbox::after {
    opacity: 1;
}

.form__checkbox-label a {
    color: var(--accent-color);
    text-decoration: underline;
}

.button--full {
    width: 100%;
    justify-content: center;
}

.form__message {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    display: none; /* Hidden by default */
}
.form__message--error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.form__success-message {
    text-align: center;
    padding: 3rem 1rem;
}
.form__success-message .lucide {
    width: 60px;
    height: 60px;
    color: var(--primary-color);
    margin-bottom: 1rem;
}
.form__success-message h3 {
    font-size: 2rem;
}

/* ==================== RESPONSIVENESS (CONTACT) ==================== */
@media (max-width: 992px) {
    .contact__container {
        grid-template-columns: 1fr;
    }
}

/* ==================== COOKIE POPUP ==================== */
.cookie-popup {
    position: fixed;
    bottom: -100%; /* Initially hidden below the screen */
    left: 0;
    width: 100%;
    background-color: var(--light-bg-color);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.1);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    z-index: 200;
    transition: bottom 0.5s ease-in-out;
}

.cookie-popup.show {
    bottom: 0; /* Animate in */
}

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

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

/* On mobile, stack them */
@media (max-width: 768px) {
    .cookie-popup {
        flex-direction: column;
        gap: 1rem;
        padding: 1.5rem;
    }
}


/* ==================== POLICY PAGES STYLES ==================== */
.pages {
    padding-top: calc(var(--header-height) + 4rem);
    padding-bottom: 5rem;
}

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

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

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

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

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

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

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

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

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

.pages strong {
    color: var(--primary-color);
}