:root {
    --primary: #0052cc;
    --primary-light: #007bff;
    --accent: #00b8a9;
    --text-main: #3490AE;
    --text-muted: #6B7C93;
    --bg-light: #ffffff;
    --bg-soft: #f5f7fa;
    --white: #ffffff;
    --content-heading: #0a1a2f;
    --content-copy: #52677f;
    --content-accent: #207e98;
    --content-border: #dce3eb;
}

/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
}

/* HEADER */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 26, 47, 0.9);
    backdrop-filter: blur(10px);
    padding: 1rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center; /* arreglat */
    color: white;
    box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}

.main-nav a {
    color: white;
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 1rem;
    font-weight: 500;
}

    .main-nav a:hover {
        opacity: 0.8;
    }

/* GLOBAL SECTIONS */
.section {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 5rem 3rem;
}

/* CONTENT LANGUAGE: section icons and three-part summaries. */
.section-mark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--content-accent);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.section-mark svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    stroke-width: 1.5;
}

.section-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    margin-top: 1.25rem;
    padding: 0;
    list-style: none;
    color: var(--content-heading);
    font-size: 0.875rem;
    font-weight: 600;
}

.section-summary li + li::before {
    content: "\2022";
    margin-right: 0.75rem;
    color: var(--content-accent);
}

.about .section-mark,
.about .section-summary,
.results-section .section-mark,
.results-section .section-summary {
    justify-content: center;
}

/* HERO */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    background-image: url('/img/hero.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

.hero-overlay {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 6rem;
    padding-right: 6rem;
    color: white !important;
}

.hero-content {
    max-width: 600px;
    text-align: left;
    color: white !important;
}

    .hero-content h1 {
        font-size: 3.4rem;
        font-weight: 600;
        margin-bottom: 1.5rem;
    }

    .hero-content p {
        font-size: 1.4rem;
        margin-bottom: 2rem;
        font-weight: 400;
    }

.hero-actions .btn {
    margin-right: 1rem;
}

/* BUTTONS */
.btn {
    display: inline-block;
    padding: 0.9rem 1.6rem;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

    .btn.primary {
        background: var(--primary);
        color: #ffffff;
    }

    .btn.secondary {
        background: var(--primary-light);
        color: #ffffff;
    }

    .btn:hover {
        transform: translateY(-2px);
        opacity: 0.9;
    }

/* ABOUT */
.section.about { margin-inline: auto; scroll-margin-top: 6rem; }
.about .section-header { text-align: center; }
.about .section-header p { max-width: 1000px; margin-inline: auto; }
.about-grid { display: grid; gap: 1rem; }
.about-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.about-image { display: block; width: 100%; height: 100%; min-height: 320px; object-fit: cover; border-radius: 8px; }
.about-copy { padding: 3rem; display: flex; flex-direction: column; justify-content: center; background: var(--bg-soft); border-radius: 8px; }
.about-copy h3 { color: var(--content-heading); font-size: 1.6rem; line-height: 1.3; font-weight: 600; margin-bottom: 1rem; }
.about-copy p { color: var(--content-copy); margin-bottom: 1.5rem; }
.about-copy .link { color: var(--content-accent); font-weight: 600; text-decoration: none; }
.about-copy .link:hover { text-decoration: underline; }
.about-row-reverse .about-image { grid-column: 2; grid-row: 1; }
.about-row-reverse .about-copy { grid-column: 1; grid-row: 1; }
@media (max-width: 700px) {
    .about-row { grid-template-columns: minmax(0, 1fr); }
    .about-row-reverse .about-image, .about-row-reverse .about-copy { grid-column: auto; grid-row: auto; }
    .about-image { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
    .about-copy { padding: 1.5rem; }
}

/* RESULTS */
.section.results-section { margin-inline: auto; }
.results-section .section-header { text-align: center; }
.results-section .section-header p { max-width: 1000px; margin-inline: auto; }
.results-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 5 / 2;
    object-fit: cover;
    object-position: center;
    border-radius: 8px;
}
@media (max-width: 600px) {
    .results-image { aspect-ratio: 3 / 2; }
}

/* SOLUTIONS */
#approach,
#contact,
.section.solutions {
    scroll-margin-top: 6rem;
}

@media (max-width: 900px) {
    #approach,
    #contact,
    .section.solutions {
        scroll-margin-top: 12rem;
    }
}

.section.solutions {
    padding: 5rem 3rem;
    max-width: 1600px;
    margin: 0 auto;
}

.section-header {
    text-align: left;
    margin-bottom: 3rem;
}

    .section-header h2 {
        font-size: 2rem;
        font-weight: 700;
        line-height: 1.25;
        margin-bottom: 1rem;
        color: var(--content-heading);
    }

    .section-header p {
        font-size: 1.125rem;
        color: var(--content-copy);
        max-width: 1000px;
    }

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1.5rem;
}

/* TARGETA */
.solution-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: #ffffff;
    border: 1px solid var(--content-border);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(10,26,47,0.035);
    padding: 0;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.card-image {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 180px;
    object-fit: cover;
    object-position: center;
}

.content-page { min-height: calc(100vh - 12rem); }
.content-page h1 { font-size: 2.4rem; line-height: 1.25; margin-bottom: 1.5rem; }
.content-page p { color: var(--text-muted); margin-bottom: 2rem; }

.solution-card h3 {
    font-size: 1.25rem;
    line-height: 1.35;
    font-weight: 600;
    min-height: 2.7em;
    margin: 1.25rem 1.25rem 0.5rem;
    color: var(--content-heading);
}

.solution-card p {
    font-size: 1rem;
    line-height: 1.55;
    margin: 0 1.25rem 1.5rem;
    color: var(--content-copy);
}

.solution-card .link {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.5rem;
    margin: auto 1.25rem 1.25rem;
    color: var(--content-accent);
    font-weight: 600;
    text-decoration: none;
}

    .solution-card .link:hover {
        text-decoration: underline;
    }

.solution-card .link svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.solution-card .link:focus-visible {
    outline: 2px solid var(--content-accent);
    outline-offset: 4px;
    border-radius: 2px;
}

.solution-card:hover {
    border-color: #9fb9c6;
    box-shadow: 0 4px 12px rgba(10,26,47,0.065);
}

/* RESPONSIVE SOLUTIONS */
@media (min-width: 1400px) {
    .solution-card h3 {
        min-height: 1.35em;
    }
}

@media (max-width: 1100px) {
    .solutions-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .solution-card h3 {
        min-height: 1.35em;
    }
}

@media (max-width: 700px) {
    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .solutions .solution-card h3 {
        min-height: 0;
    }
}

/* SERVICE DETAIL PAGES */
.service-page {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.5rem 3rem 3.5rem;
    color: var(--content-heading);
}

.service-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    color: var(--content-accent);
    font-size: 0.875rem;
    text-decoration: none;
}

.service-back svg {
    width: 16px;
    height: 16px;
}

.service-eyebrow {
    margin-bottom: 0.5rem;
    color: var(--content-accent);
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
}

.service-heading h1 {
    margin: 0 0 0.75rem;
    font-size: 2.25rem;
    line-height: 1.2;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.service-tagline {
    margin-bottom: 1rem;
    color: var(--content-accent);
    font-size: 1.25rem;
    line-height: 1.45;
}

.service-intro {
    max-width: 85ch;
    color: var(--content-copy);
    font-size: 1rem;
    line-height: 1.7;
}

.service-image {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 1;
    object-fit: cover;
    object-position: center;
    margin: 2rem 0 2.5rem;
    border-radius: 8px;
}

.service-sections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}

.service-section {
    min-width: 0;
    padding-top: 1.25rem;
    border-top: 2px solid var(--content-accent);
}

.service-section h2 {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    color: var(--content-heading);
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
}

.service-section h2 svg {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    color: var(--content-accent);
    stroke-width: 1.5;
}

.service-section p,
.service-section li {
    color: var(--content-copy);
    font-size: 0.9375rem;
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.service-section ul {
    margin: 1rem 0 0;
    padding-left: 1.125rem;
}

.service-section li + li {
    margin-top: 0.5rem;
}

.service-section li::marker {
    color: var(--content-accent);
}

.service-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 3rem;
    padding: 1.75rem 0 0;
    border-top: 1px solid var(--content-border);
}

.service-contact svg {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
}

.service-contact {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
}

.service-back:hover {
    text-decoration: underline;
}

.service-contact:hover {
    background: #0044aa;
}

.service-page a:focus-visible {
    outline: 2px solid var(--content-accent);
    outline-offset: 4px;
}

@media (max-width: 900px) {
    .service-page {
        padding: 2rem 1.5rem 3rem;
    }

    .service-sections {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .service-image {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 480px) {
    .service-page {
        padding-inline: 1.25rem;
    }

    .service-heading h1 {
        font-size: 1.875rem;
    }

    .service-image {
        aspect-ratio: 3 / 2;
    }

    .service-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

/* HIGHLIGHT */
.highlight {
    background: #0a1a2f;
    color: white;
    border-radius: 8px;
    padding: 2rem 3rem;
    min-height: 280px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: stretch;
    gap: 3rem;
}

.highlight-block {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.highlight-block + .highlight-block {
    padding-left: 3rem;
    border-left: 1px solid #34495d;
}

.highlight-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: #42b1c1;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.highlight-label svg {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    stroke-width: 1.5;
}

.highlight-block h3 {
    margin: 0 0 0.75rem;
    font-size: 1.625rem;
    line-height: 1.2;
    font-weight: 600;
    color: white;
}

.highlight-block h3 span {
    display: block;
}

.highlight-block p {
    flex: 1;
    margin: 0;
    max-width: 62ch;
    color: #c3d1df;
    font-size: 0.9375rem;
    line-height: 1.55;
}

.highlight-points {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0.75rem;
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: #eef4f8;
}

.highlight-points li + li::before {
    content: "\2022";
    color: #42b1c1;
    margin-right: 0.75rem;
}

/* INTRO */
.intro-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* IMATGE A L'ESQUERRA */
.intro-image {
    height: 420px;
    background-image: url('/img/intro-image.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
}

/* TEXT A LA DRETA */
.intro-text h2 {
    font-size: 2rem;
    line-height: 1.25;
    color: var(--content-heading);
    margin-bottom: 1.5rem;
}

.intro-text p {
    font-size: 1.125rem;
    color: var(--content-copy);
    line-height: 1.7;
    margin-bottom: 2rem;
}

/* RESPONSIVE INTRO */
@media (max-width: 900px) {
    .intro-section {
        grid-template-columns: 1fr;
    }

    .intro-image {
        height: 280px;
    }
}

/* BLOG */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.blog-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

/* CONTACT */
.contact {
    color: var(--content-copy);
}

.contact-info h3 {
    color: var(--content-heading);
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.contact a {
    color: var(--content-accent);
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    grid-template-areas: "info form";
    gap: 3rem;
}

.contact-form {
    grid-area: form;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    gap: 1.25rem;
    padding-left: 2rem;
    border-left: 1px solid var(--content-border);
}

.contact-input-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.contact .form-row {
    min-width: 0;
}

.contact .form-row label {
    display: block;
    color: var(--content-heading);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.contact-optional {
    color: var(--content-copy);
    font-weight: 400;
}

.contact input,
.contact textarea {
    display: block;
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #bac8d7;
    border-radius: 6px;
    background: var(--white);
    color: var(--content-heading);
    font: inherit;
    font-size: 1rem;
}

.contact textarea {
    min-height: 9rem;
    resize: vertical;
}

.contact input::placeholder,
.contact textarea::placeholder {
    color: var(--content-copy);
    opacity: 1;
}

.contact input:focus-visible,
.contact textarea:focus-visible,
.contact-submit:focus-visible {
    outline: 2px solid var(--content-accent);
    outline-offset: 3px;
}

.contact-privacy {
    font-size: 0.8125rem;
    line-height: 1.6;
}

.contact-privacy a {
    text-decoration: underline;
}

.contact-submit {
    display: inline-flex;
    align-self: flex-start;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.75rem 1.25rem;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: var(--white);
    font: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
}

.contact-submit:hover {
    background: #0044aa;
}

.contact-submit svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

.contact-submit-spinner {
    display: none;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: white;
    border-radius: 50%;
}

.contact-form[aria-busy="true"] .contact-submit svg { display: none; }
.contact-form[aria-busy="true"] .contact-submit-spinner { display: block; }

@media (prefers-reduced-motion: no-preference) {
    .contact-form[aria-busy="true"] .contact-submit-spinner { animation: contact-sending 800ms linear infinite; }
}

@keyframes contact-sending { to { transform: rotate(360deg); } }

.contact-info {
    grid-area: info;
    min-width: 0;
}

.contact-prompts {
    display: grid;
    gap: 1.5rem;
    list-style: none;
    margin: 1.75rem 0 2rem;
    padding: 0;
}

.contact-prompts li,
.contact-direct {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.contact-prompts svg,
.contact-direct svg {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    color: var(--content-accent);
    stroke-width: 1.5;
}

.contact-prompts strong {
    display: block;
    color: var(--content-heading);
    font-weight: 600;
}

.contact-prompts span,
.contact-direct span {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
}

.contact-direct {
    padding-top: 1.5rem;
    border-top: 1px solid var(--content-border);
}

.contact-direct a {
    display: inline-block;
    margin-top: 0.5rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-feedback {
    padding: 0.875rem 1rem;
    border-left: 3px solid var(--content-accent);
    background: var(--bg-soft);
    font-size: 0.875rem;
}

.contact-feedback-error {
    border-left-color: #a93232;
}

@media (max-width: 600px) {
    .contact-input-pair {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }
}

/* FOOTER */
.main-footer {
    text-align: center;
    padding: 2rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* RESPONSIVE FIX */
@media (max-width: 900px) {

    .section,
    .hero {
        padding: 3rem 1.5rem;
        margin: 2rem 1rem;
        max-width: 100%;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        border-radius: 30px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .highlight {
        grid-template-columns: 1fr;
        width: calc(100% - 2rem);
        padding: 1.75rem 1.5rem;
        min-height: 0;
        gap: 1.5rem;
        border-radius: 8px;
    }

    .highlight-block + .highlight-block {
        padding: 1.5rem 0 0;
        border-left: 0;
        border-top: 1px solid #34495d;
    }

    .highlight-block h3 {
        font-size: 1.5rem;
    }

    .highlight-points {
        font-size: 0.8125rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact {
        width: calc(100% - 2rem);
    }

    .contact-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "form" "info";
        gap: 2rem;
    }

    .contact-form {
        padding-left: 0;
        border-left: 0;
    }

    .contact-info {
        padding-top: 2rem;
        border-top: 1px solid var(--content-border);
    }

    .main-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .main-nav a {
        margin-left: 0;
        margin-right: 1rem;
    }
}
