/* ==================== VARIABLES & THEME ==================== */
:root {
    /* Colors */
    --hue: 220;
    /* Navy blue base */
    --sat: 50%;

    /* Palette */
    --first-color: hsl(var(--hue), var(--sat), 18%);
    /* Deep navy blue */
    --first-color-alt: hsl(var(--hue), var(--sat), 14%);
    --first-color-light: hsl(var(--hue), 25%, 96%);

    --title-color: hsl(var(--hue), 30%, 12%);
    --text-color: hsl(var(--hue), 10%, 35%);
    --text-color-light: hsl(var(--hue), 6%, 55%);

    --body-color: #ffffff;
    --container-color: #ffffff;

    --accent-color: #008080;
    /* Teal green accent */

    /* Typography */
    --body-font: 'Inter', sans-serif;
    --title-font: 'Playfair Display', serif;

    --big-font-size: 3rem;
    --h1-font-size: 2.5rem;
    --h2-font-size: 1.75rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;

    /* Spacing */
    --mb-0-5: 0.5rem;
    --mb-1: 1rem;
    --mb-1-5: 1.5rem;
    --mb-2: 2rem;
    --mb-3: 3rem;

    /* Layout */
    --header-height: 5.5rem;
}

/* Responsive Typography */
@media screen and (min-width: 968px) {
    :root {
        --big-font-size: 4.5rem;
        --h1-font-size: 2.75rem;
        --h2-font-size: 2.25rem;
        --h3-font-size: 1.5rem;
        --normal-font-size: 1.125rem;
        --small-font-size: 1rem;
    }
}

/* ==================== BASE ==================== */
* {
    box-sizing: border-box;
    padding: 0;
    margin: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    font-size: var(--normal-font-size);
    background-color: var(--body-color);
    color: var(--text-color);
    line-height: 1.6;
    padding-top: var(--header-height);
}

h1,
h2,
h3,
h4 {
    color: var(--title-color);
    font-family: var(--title-font);
    font-weight: 600;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

/* ==================== REUSABLE CSS CLASSES ==================== */
.section {
    padding: 6rem 0 2rem;
}

.section__title {
    font-size: var(--h2-font-size);
    margin-bottom: var(--mb-3);
    position: relative;
    padding-bottom: 0.5rem;
}

.section__title--center {
    text-align: center;
}

.section__title--light {
    color: #fff;
}

.section__subtitle {
    display: block;
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--mb-1);
}

.section__subtitle--center {
    text-align: center;
}

.container {
    max-width: 1024px;
    margin-left: var(--mb-1-5);
    margin-right: var(--mb-1-5);
}

.container::after {
    content: "";
    display: table;
    clear: both;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.button {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 0;
    /* Sharp edges for professionalism */
    font-size: var(--normal-font-size);
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.button--primary {
    background-color: #0c1824 !important;
    /* Force dark navy */
    color: #ffffff !important;
    /* Force white text */
}

.button--primary:hover {
    background-color: var(--first-color-alt);
    transform: translateY(-2px);
}

.button--secondary {
    background-color: transparent;
    border-color: var(--title-color);
    color: var(--title-color);
}

.button--secondary:hover {
    background-color: var(--title-color);
    color: #fff;
}

.button--form {
    width: 100%;
    margin-top: var(--mb-1);
}

/* ==================== HEADER ==================== */
.header {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    backdrop-filter: blur(10px);
    padding: 0.5rem 0;
}

.header__container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    /* Base for toggle/logo alignment */
    padding: 0 1rem;
}

.logo {
    display: flex;
    flex-direction: column;
    font-family: var(--title-font);
    font-weight: 700;
    color: var(--title-color);
    line-height: 1.2;
    z-index: 20000;
    /* Ensure logo is always on top */
}

.logo__img {
    max-height: 60px;
    /* Slightly smaller for mobile */
    width: auto;
    object-fit: contain;
}

.logo__subtitle {
    font-size: 0.75rem;
    /* Smaller for mobile */
    font-weight: 700;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

@media screen and (max-width: 500px) {
    .logo__subtitle {
        font-size: 0.7rem;
    }
}

/* ==================== NAV ==================== */
.nav {
    display: none;
    /* Hidden by default on all screens */
}

.nav__list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
}

.nav__link {
    color: #0c1824;
    /* Explicit dark color */
    font-weight: 600;
    font-size: 1.2rem;
    transition: 0.3s;
}

.nav__link:hover {
    color: var(--accent-color);
}

.nav__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--title-color);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1002;
}

.nav__close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    font-size: 2rem;
    color: var(--title-color);
    cursor: pointer;
    display: none;
}

/* Mobile Nav Structure */
@media screen and (max-width: 767px) {
    .nav {
        display: none;
        /* Forced hide by default */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff !important;
        /* Solid background */
        padding: 5rem 1.5rem;
        z-index: 10000;
        /* Extremely high */
    }

    .nav.show-menu {
        display: block !important;
    }

    .nav__close {
        display: block !important;
    }
}

/* Desktop Nav Structure */
@media screen and (min-width: 768px) {
    .nav {
        display: block;
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        box-shadow: none;
        visibility: visible;
    }

    .nav__list {
        flex-direction: row;
        gap: 1.5rem;
        align-items: center;
    }

    .nav__link {
        font-size: 1rem;
    }

    .nav__toggle,
    .nav__close {
        display: none;
    }
}

/* ==================== HERO ==================== */
.hero {
    position: relative;
    min-height: 100vh;
    margin-top: calc(-1 * var(--header-height));
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    background-color: var(--first-color);
    background-image: linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
}

.hero__container-inner {
    position: relative;
    z-index: 2;
    padding-top: 1.5rem;
    /* Reduced for desktop by default if needed */
    padding-bottom: 2rem;
}

.hero__bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Gradient overlay for depth */
    background: radial-gradient(circle at 70% 30%, rgba(20, 40, 80, 0.4), var(--first-color) 70%);
    z-index: 1;
}

.hero__container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 2rem;
    text-align: center;
}

.hero__content {
    max-width: 100%;
}

.hero__subtitle {
    display: block;
    font-size: 0.85rem;
    /* Slightly smaller */
    color: #4db8b8;
    letter-spacing: 2px;
    margin-bottom: var(--mb-1);
    text-transform: uppercase;
    font-weight: 600;
    text-align: center;
}

.hero__title {
    font-size: 2rem;
    /* Smaller for mobile */
    line-height: 1.2;
    margin-bottom: var(--mb-1);
    color: #fff;
    text-align: center;
}

.hero__title-sub {
    font-size: 1.25rem;
    /* Smaller for mobile */
    color: var(--first-color-light);
    font-family: var(--body-font);
    font-weight: 400;
    line-height: 1.4;
    text-align: center;
    margin-bottom: var(--mb-2);
}

.hero__header {
    margin-bottom: 2rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media screen and (max-width: 767px) {
    .header {
        min-height: 5rem;
        background-color: #fff;
        backdrop-filter: none;
        /* Removes containment block for fixed menu */
        /* Solid on mobile for clarity */
    }

    .hero__header {
        padding-top: 4rem;
    }

    .hero__container-inner {
        padding-top: 1.5rem;
    }
}

.hero__description {
    font-size: 1.25rem;
    margin-bottom: var(--mb-2);
    font-style: italic;
    color: var(--first-color-light);
    border-left: none;
    padding-left: 0;
    line-height: 1.6;
}

@media screen and (min-width: 768px) {
    .hero__description {
        font-size: 1.5rem;
    }
}

.hero__buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.hero__btn-secondary {
    border-color: #fff;
    color: #fff;
}

.hero__btn-secondary:hover {
    background-color: #fff;
    color: var(--first-color);
}

/* Hero Image */
.hero__img-wrapper {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
}

.hero__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    border-radius: 4px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.hero__img-accent {
    position: absolute;
    bottom: -10px;
    right: -10px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent-color);
    border-radius: 4px;
    z-index: -1;
}

/* Desktop: 2 columns */
@media screen and (min-width: 768px) {
    .hero__container {
        grid-template-columns: 5fr 6fr;
        gap: 3rem;
        text-align: left;
    }

    .hero__content {
        position: relative;
        z-index: 10;
        align-self: center;
        /* keep text aligned cleanly with image */
    }

    .hero__buttons {
        grid-column: 1 / -1;
        justify-content: center;
        margin-top: 0;
        transform: translateY(-1rem);
        /* Pulls buttons up slightly from the bottom edge */
    }

    .hero__img-wrapper {
        max-width: 90%;
        /* Making the image a little smaller */
        margin: 0 auto;
        /* Centering it horizontally */
        margin-top: 2rem;
    }

    .hero__title {
        font-size: 3.5rem;
    }

    .logo__img {
        max-height: 70px;
    }

    .logo__subtitle {
        font-size: 0.9rem;
    }
}

/* ==================== ABOUT ==================== */
.about__container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}

/* Photo Column */
.about__img-wrapper {
    position: relative;
    max-width: 420px;
    margin: 0 auto;
}

.about__img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    filter: grayscale(15%);
    transition: filter 0.4s ease;
}

.about__img:hover {
    filter: grayscale(0%);
}

/* Decorative accent behind/beside the photo */
.about__img-accent {
    position: absolute;
    bottom: -12px;
    right: -12px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--accent-color);
    z-index: -1;
}

/* Text Column */
.about__data {
    text-align: left;
}

.about__text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: var(--text-color);
    line-height: 1.8;
}

.about__highlight {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--first-color);
    margin-bottom: 2rem;
    font-style: italic;
    border-left: 3px solid var(--accent-color);
    padding-left: 1rem;
}

.about__subtitle {
    font-size: 1.5rem;
    margin: 2.5rem 0 1rem;
    color: var(--first-color);
    font-family: var(--title-font);
}

.about__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.about__card {
    background-color: #fff;
    padding: 1.5rem;
    border: 1px solid #eee;
    transition: 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.about__card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.about__card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    color: var(--first-color);
}

.about__card p {
    font-size: 0.9rem;
    color: var(--text-color);
}

/* Desktop: 2 columns */
@media screen and (min-width: 768px) {
    .about__container {
        display: block;
        /* Change from grid to block for wrapping */
    }

    .about__img-wrapper {
        float: left;
        width: 45%;
        max-width: 450px;
        margin-right: 3rem;
        margin-bottom: 1.5rem;
    }

    .about__data {
        display: block;
    }
}

/* Mobile: stack and center */
@media screen and (max-width: 767px) {
    .about__grid {
        grid-template-columns: 1fr;
    }

    .about__img-wrapper {
        max-width: 320px;
    }
}

/* ==================== VALUE PROPOSITION ==================== */
.value-prop {
    background-color: var(--first-color-light);
}

.value-prop__list {
    display: grid;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.value-prop__item {
    display: flex;
    align-items: center;
    /* Centrar verticalmente para que queden en la misma línea */
    gap: 1rem;
}

.value-prop__item p {
    margin: 0;
    /* Eliminar márgenes que puedan desplazar el texto */
}

.check-icon {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
    /* Evitar que el icono se encoja */
}

/* ==================== METHOD ==================== */
.method {
    background-color: #fff;
}

.method__img-container {
    max-width: 600px;
    margin: 0 auto 3.5rem;
    text-align: center;
}

.method__img {
    width: 100%;
    height: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.method__highlight-text {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--first-color);
    font-weight: 500;
    line-height: 1.6;
    padding: 0 1rem;
}

.method__map-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
}

.method__map-intro {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 2rem;
}

.method__pillars {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 4rem;
}

.method__pillar-card {
    background-color: var(--first-color-light);
    padding: 2rem;
    border-radius: 4px;
    border-left: 3px solid var(--accent-color);
    transition: 0.3s;
}

.method__pillar-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.method__pillar-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--first-color);
}

.method__work-title {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--first-color);
}

.method__timeline {
    position: relative;
    max-width: 800px;
    margin: 3rem auto 0;
    display: grid;
    gap: 2rem;
}

.method__timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    /* Adjust based on circle size */
    top: 0;
    height: 100%;
    width: 2px;
    background-color: #eee;
}

.method__phase {
    display: flex;
    gap: 1.5rem;
    position: relative;
}

.method__phase-number {
    width: 40px;
    height: 40px;
    background-color: var(--first-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
    z-index: 2;
    box-shadow: 0 0 0 5px #fff;
}

.method__phase-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.method__phase-content p {
    font-size: 0.95rem;
}

/* ==================== SERVICES ==================== */
.services__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service__card {
    background: #fff;
    border: 1px solid #e0e0e0;
    padding: 2rem;
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    border-top: 3px solid var(--accent-color);
}

.service__img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.service__header {
    text-align: center;
}

.service__header h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service__body p {
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.service__list {
    margin-top: auto;
}

.service__list li {
    padding-left: 1.2rem;
    position: relative;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-color-light);
}

.service__list li::before {
    content: "•";
    color: var(--accent-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* ==================== SERVICE TABLE ==================== */
.service-table {
    background-color: var(--first-color-light);
    padding: 6rem 0;
}

.table__wrapper {
    max-width: 900px;
    margin: 0 auto;
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    overflow: hidden;
}

.comparison-table th {
    background-color: var(--first-color);
    color: #fff;
    padding: 1.5rem;
    text-align: center;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.comparison-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    color: var(--text-color);
    font-size: 0.95rem;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background-color: rgba(0, 128, 128, 0.03);
}

@media screen and (max-width: 767px) {
    .comparison-table {
        min-width: 600px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 1rem;
    }
}

.contact {
    background-color: var(--first-color);
    color: #fff;
}

.contact__description {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    max-width: 600px;
    margin: 0 auto 2rem;
}

.contact__form {
    max-width: 700px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
}

.contact__inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact__input {
    width: 100%;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-family: var(--body-font);
    outline: none;
    transition: 0.3s;
}

.contact__input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.contact__input:focus {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #fff;
}

.contact__area {
    resize: none;
}

.button--form {
    background-color: #fff;
    color: var(--first-color);
    border: none;
}

.button--form:hover {
    background-color: var(--accent-color);
    color: #fff;
}

/* ==================== CASES ==================== */
.cases {
    background-color: #fff;
}

.cases__intro {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.cases__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 5rem;
}

.case__card {
    background-color: var(--first-color-light);
    padding: 2.5rem;
    border-radius: 8px;
    border-top: 4px solid var(--accent-color);
    transition: 0.3s;
}

.case__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.05);
}

.case__card h3 {
    color: var(--first-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    font-family: var(--title-font);
}

.case__card strong {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.cases__summary {
    background-color: var(--first-color);
    color: #fff;
    padding: 4rem 2rem;
    border-radius: 12px;
    max-width: 1000px;
    margin: 0 auto;
}

.cases__summary-title {
    text-align: center;
    color: #fff;
    margin-bottom: 3rem;
    font-size: 2rem;
}

.cases__benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.cases__benefit-item h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.cases__benefit-item p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ==================== FOOTER ==================== */
.footer {
    background-color: var(--footer-bg-color, #1a1a1a);
    /* Dark footer */
    color: #fff;
    padding: 3rem 0;
}

.footer__container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}

.footer__logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.footer__img {
    height: 80px;
    width: auto;
    object-fit: contain;
}

.footer__social-link {
    margin: 0 1rem;
    color: rgba(255, 255, 255, 0.7);
    transition: 0.3s;
}

.footer__social-link:hover {
    color: #fff;
}

.footer__copy {
    font-size: var(--small-font-size);
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1rem;
}

/* ==================== MEDIA QUERIES ==================== */
@media screen and (min-width: 768px) {
    .container {
        margin-left: auto;
        margin-right: auto;
    }
}

@media screen and (max-width: 767px) {
    .contact__inputs {
        grid-template-columns: 1fr;
    }

    .method__timeline::before {
        left: 20px;
    }
}