:root {
    /* Palette aligned with the TA logo (blue + orange) */
    --primary-color: #1E88D8;
    --primary-dark: #0B5E9A;
    --secondary-color: #6FC3F2;
    --accent-color: #F28C28;

    --text-color: #1f2937;
    --muted-text: #5b6473;

    --bg-light: #f3f7fb;
    --bg-warm: #fcfcfc;
    --white: #ffffff;
    --border-color: rgba(31, 41, 55, 0.12);

    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-soft: 0 6px 18px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    --top-bar-height: 32px;
    --nav-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Manrope', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
    padding-top: calc(var(--top-bar-height) + var(--nav-height));
}

h1, h2, h3, h4 {
    font-family: 'Fraunces', serif;
    font-weight: 700;
    color: var(--primary-dark);
}

p {
    color: var(--muted-text);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Top bar */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--top-bar-height);
    background: #1c7bbf;
    color: var(--white);
    z-index: 1100;
    display: flex;
    align-items: center;
}

.top-bar__content {
    display: flex;
    justify-content: flex-end;
    gap: 14px;
    font-size: 0.72rem;
    font-weight: 600;
    width: 100%;
    padding-right: 0;
}

/* Utils */
.section {
    padding: 100px 0;
    position: relative;
}

.bg-light {
    background-color: var(--bg-light);
}

.hidden-element {
    opacity: 0;
    transform: translateY(22px);
    filter: blur(6px);
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
    transition-delay: var(--reveal-delay, 0ms);
    will-change: transform, opacity, filter;
}

.show-element {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
}

/* Parallax section layer (driven by JS via --parallax-y) */
.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-section::after {
    content: '';
    position: absolute;
    inset: -30% 0;
    background:
        radial-gradient(700px 260px at 20% 20%, rgba(111,195,242,0.16), transparent 60%),
        radial-gradient(700px 260px at 80% 70%, rgba(242,140,40,0.10), transparent 60%);
    transform: translate3d(0, var(--parallax-y, 0px), 0);
    will-change: transform;
    pointer-events: none;
    z-index: 0;
}

.parallax-section > .container {
    position: relative;
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
    box-shadow: 0 10px 18px rgba(30, 136, 216, 0.25);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.9);
}

.btn-secondary:hover {
    background-color: var(--white);
    color: var(--primary-dark);
    transform: translateY(-2px);
}

.btn-white {
    background-color: var(--white);
    color: var(--primary-dark);
    border-color: var(--white);
    box-shadow: var(--shadow-soft);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Navbar */
.navbar {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(31, 41, 55, 0.08);
    padding: 20px 0;
    transition: var(--transition);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.site-logo {
    height: 62px;
    width: auto;
    max-width: 84px;
    flex: 0 0 auto;
}

.site-logo-home {
    height: 86px;
    max-width: none;
}

.brand-text {
    letter-spacing: -0.5px;
    line-height: 1;
}

.brand-text span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 22px;
}

.nav-links li a {
    font-weight: 700;
    color: var(--text-color);
    position: relative;
    padding: 8px 0;
}

.nav-links li a:not(.btn-contact)::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    transition: width 0.25s ease;
}

.nav-links li a:hover::after {
    width: 100%;
}
/* Ensure hover doesn't trigger for btn-contact either via specificity */
.nav-links li a.btn-contact:hover::after {
    width: 0;
    display: none;
}

.btn-contact {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white) !important;
    padding: 10px 18px;
    border-radius: 999px;
    box-shadow: 0 10px 18px rgba(30, 136, 216, 0.22);
}

.btn-contact:hover {
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 10px;
}

.hamburger .line {
    width: 26px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    border-radius: 10px;
    transition: var(--transition);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Hero with Zoom layers */
.scroll-container {
    position: relative;
}

.hero-zoom {
    position: relative;
    min-height: calc(100vh - 80px);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.zoom-layer-bg {
    position: absolute;
    inset: 0;
    background: url('../images/Foto_baner_principal.jpg') no-repeat center center;
    background-size: cover;
    transform: scale(1);
    will-change: transform;
}

.zoom-layer-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: none;
}

.zoom-layer-text {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 20px;
    max-width: 980px;
}

.zoom-layer-text h1 {
    font-size: clamp(2.2rem, 4.6vw, 3.8rem);
    line-height: 1.05;
    color: var(--white);
    letter-spacing: -0.02em;
    text-shadow: 0 12px 30px rgba(0,0,0,0.35);
    animation: heroIn 0.9s ease forwards;
}

.zoom-layer-text h1 span {
    color: rgba(255,255,255,0.9);
}

.zoom-layer-text p {
    margin: 18px auto 28px;
    max-width: 820px;
    font-size: 1.15rem;
    color: rgba(255,255,255,0.9);
    animation: heroIn 1.1s ease forwards;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    animation: heroIn 1.25s ease forwards;
}

@keyframes heroIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Section title */
.section-title {
    text-align: center;
    margin: 0 auto 46px;
    max-width: 880px;
}

.section-title h2 {
    font-size: 2.3rem;
    margin-bottom: 10px;
}

.section-title p {
    margin: 0 auto;
}

.section-title p + p {
    margin-top: 8px;
}

.underline {
    width: 72px;
    height: 4px;
    margin: 14px auto 24px;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
}

/* About */
.first-content-section {
    padding-top: 90px;
}

.about-center {
    max-width: 860px;
    margin: 0 auto;
    text-align: center;
}

.about-center p {
    margin-bottom: 12px;
}

.about-actions {
    margin-top: 18px;
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
}

.about-media {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow);
    min-height: 320px;
}

.about-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-content p {
    margin-bottom: 12px;
}

/* Accordion (Services) */
.accordion-container {
    max-width: 920px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow);
    border: 1px solid rgba(31, 41, 55, 0.08);
}

.accordion-item + .accordion-item {
    border-top: 1px solid rgba(31, 41, 55, 0.08);
}

.accordion-header {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 20px 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.accordion-header span {
    text-shadow: 0 3px 10px rgba(11, 94, 154, 0.24);
}

.accordion-header:hover {
    background-color: rgba(30, 136, 216, 0.03);
}

.accordion-header.active {
    background: var(--primary-color);
    color: var(--white);
}

.accordion-header span {
    display: flex;
    align-items: center;
    gap: 10px;
}

.accordion-header span i {
    color: var(--primary-color);
    transition: color 0.3s ease;
}

.accordion-header.active span i {
    color: var(--white);
}

.accordion-header .arrow {
    color: var(--muted-text);
    transition: transform 0.25s ease, color 0.3s ease;
}

.accordion-header.active .arrow {
    transform: rotate(180deg);
    color: var(--white);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, background-color 0.3s ease;
    padding: 0 22px;
}

.accordion-header.active + .accordion-content {
    background-color: rgba(30, 136, 216, 0.04);
}

.accordion-content ul {
    padding: 6px 0 22px;
}

.accordion-content li {
    padding: 8px 0;
    color: var(--muted-text);
    position: relative;
    padding-left: 18px;
}

.accordion-content li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
}

/* Services section background + icons */
.services-section {
    position: relative;
    background: var(--white);
}

.service-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    object-fit: cover;
    border: 2px solid rgba(31, 41, 55, 0.12);
}

.services-grid {
    margin-top: 20px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.service-card {
    background: var(--white);
    border-radius: 20px;
    border: 1px solid rgba(31, 41, 55, 0.08);
    box-shadow: var(--shadow-soft);
    padding: 22px 20px 24px;
    text-align: center;
}

.service-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--white);
    box-shadow: 0 10px 18px rgba(31, 41, 55, 0.18);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin-bottom: 12px;
    letter-spacing: 0.02em;
}

.service-list {
    text-align: left;
    background: var(--bg-light);
    border-radius: 16px;
    padding: 14px 18px;
}

.service-list li {
    padding: 8px 0;
    color: var(--muted-text);
    position: relative;
    padding-left: 18px;
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary-color);
}

/* Projects section (index has only CTA link) */
#projects p {
    color: #000000;
}

#projects .section-title p {
    color: rgba(255,255,255,0.95);
}

.projects-showcase {
    background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06) 55%, rgba(255,255,255,0.03)), url('../images/Foto_projectes.jpg');
    background-size: cover;
    background-position: center;
}

.projects-showcase .section-title h2 {
    color: var(--primary-dark);
}

.projects-orbs {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin: 20px 0 16px;
}

.projects-orb {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 6px solid var(--white);
    box-shadow: 0 10px 18px rgba(31, 41, 55, 0.16);
}

.projects-orb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.projects-cta {
    text-align: center;
    margin-top: 10px;
}

.featured-projects {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.featured-card {
    background: var(--white);
    border-radius: 20px;
    border: 1px solid rgba(31, 41, 55, 0.08);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.featured-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.featured-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-content {
    padding: 16px 18px 20px;
}

.featured-content h3 {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 10px;
}

.featured-content a {
    font-weight: 800;
    color: var(--primary-dark);
}

.featured-content a:hover {
    text-decoration: underline;
}

/* CTA (index uses .cta) */
.cta {
    position: relative;
    padding: 90px 0;
    color: var(--white);
    /* Fons amb capa fosca neutra per llegibilitat */
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/_DSC2552.JPG');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}

.cta::before {
    display: none;
}

.cta.parallax-section::after {
    opacity: 0.9;
}

.cta .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.cta h2 {
    color: var(--white);
    font-size: 2.4rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.cta p {
    color: rgba(255,255,255,0.95);
    margin: 12px auto 24px;
    max-width: 820px;
    font-size: 1.1rem;
    text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

.cta-band {
    position: relative;
    background: linear-gradient(135deg, #0b5e9a, #0a4f83);
    padding: 70px 0;
    color: var(--white);
    overflow: hidden;
}

.cta-band::after {
    content: none;
    position: absolute;
    right: -10px;
    bottom: -28px;
    font-size: clamp(5rem, 16vw, 11rem);
    font-weight: 800;
    color: rgba(255,255,255,0.08);
    letter-spacing: 0.04em;
    pointer-events: none;
}

.cta-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 28px;
    align-items: center;
    z-index: 1;
}

.cta-media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.12);
}

.cta-media img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 999px;
    box-shadow: 0 12px 22px rgba(0, 0, 0, 0.25);
}

.cta-copy h2 {
    color: var(--white);
    font-size: 1.9rem;
    margin-bottom: 10px;
}

.cta-copy p {
    color: rgba(255,255,255,0.95);
    margin-bottom: 18px;
    font-size: 1.05rem;
}

/* Contact */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 34px;
    align-items: start;
}

.contact-info,
.contact-form {
    background: var(--white);
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
    padding: 26px;
}

.info-item + .info-item {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(31, 41, 55, 0.08);
}

.info-item i {
    color: var(--primary-color);
    background: rgba(30, 136, 216, 0.12);
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.info-item h4 {
    color: var(--text-color);
    margin-bottom: 6px;
}

.info-item p {
    color: #667085;
}

.contact-form form {
    display: grid;
    gap: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid rgba(31, 41, 55, 0.14);
    border-radius: 12px;
    outline: none;
    font-family: inherit;
    font-size: 1rem;
    background: rgba(243, 247, 251, 0.7);
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: rgba(30, 136, 216, 0.55);
    box-shadow: 0 0 0 5px rgba(30, 136, 216, 0.15);
    background: var(--white);
}

.form-group textarea {
    resize: vertical;
}

/* Footer */
footer {
    background: #0f172a;
    color: rgba(255,255,255,0.82);
    padding: 46px 0 18px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255,255,255,0.82);
}

.footer-links a:hover {
    color: var(--white);
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 14px;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.72);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 1200;
}

.cookie-banner__inner {
    max-width: 1100px;
    margin: 0 auto;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(31, 41, 55, 0.10);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 16px 18px;
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    animation: cookieIn 0.35s ease;
}

.cookie-banner__inner p {
    color: #485163;
    font-size: 0.98rem;
}

.cookie-banner__inner a {
    color: var(--primary-dark);
    font-weight: 800;
}

.cookie-banner__actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.cookie-btn {
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 800;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
}

.cookie-btn--ghost {
    background: transparent;
    color: var(--text-color);
    border-color: rgba(31, 41, 55, 0.16);
}

.cookie-btn--ghost:hover {
    background: rgba(31, 41, 55, 0.06);
}

.cookie-btn--primary {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.cookie-btn--primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
}

@keyframes cookieIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to Top */
.back-to-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    cursor: pointer;
    box-shadow: var(--shadow-soft);
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
    transition: var(--transition);
    z-index: 1100;
}

.back-to-top.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

/* Sub-pages header (used on equip.html, avis-legal, etc.) */
.page-header {
    margin-top: 0;
    padding: 90px 0;
    position: relative;
    color: var(--white);
    background: var(--page-header-bg, url('../images/Foto_projectes.jpg')) no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.24);
}

.page-header.parallax-section::after {
    background:
        radial-gradient(720px 260px at 30% 10%, rgba(111,195,242,0.18), transparent 55%),
        radial-gradient(720px 260px at 70% 90%, rgba(242,140,40,0.12), transparent 55%);
}

.team-page-header {
    --page-header-bg: url('../images/equip_original.jpg');
    background-position: top center;
    background-attachment: scroll;
}

/* Mobile for team */
@media (max-width: 768px) {
    .team-card {
        grid-template-columns: 1fr;
    }
}

.project-meta {
    /* Darker color for visibility */
    color: #4b5565; 
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.team-page-header::before {
    background: rgba(0, 0, 0, 0.08);
}

.team-page-header.parallax-section::after {
    display: none;
}

.projects-page-header {
    --page-header-bg: url('../images/fons_projectes.jpg');
    background-position: center center;
}

/* Legal pages */
.legal-content {
    display: grid;
    gap: 18px;
}

.legal-card {
    background: var(--white);
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 18px;
    padding: 22px;
    box-shadow: var(--shadow-soft);
}

.legal-card h2 {
    margin-bottom: 10px;
}

.legal-card p,
.legal-card li {
    color: #667085;
}

.legal-card ul {
    margin-top: 10px;
}

.legal-card li {
    padding: 8px 0;
    padding-left: 18px;
    position: relative;
}

.legal-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 16px;
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--secondary-color);
}

/* Team page */
.team-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

.team-groups {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

.team-groups span {
    border: 1px solid rgba(31, 41, 55, 0.12);
    background: rgba(255,255,255,0.85);
    color: var(--text-color);
    border-radius: 999px;
    padding: 8px 16px;
    font-weight: 800;
}

.team-intro {
    text-align: center;
    margin-bottom: 16px;
}

.team-intro h2 {
    color: var(--primary-dark);
    margin-bottom: 6px;
}

.team-intro p {
    color: #667085;
}

.team-card {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 18px;
    background: var(--white);
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 22px;
    padding: 18px;
    box-shadow: var(--shadow-soft);
}

.team-img-placeholder {
    width: 140px;
    height: 140px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(30,136,216,0.14), rgba(242,140,40,0.10));
    display: grid;
    place-items: center;
    color: var(--primary-dark);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.team-img-placeholder span {
    display: inline-block;
}

.team-info h3 {
    color: var(--text-color);
    margin-bottom: 4px;
}

.team-info h4 {
    color: #667085;
    font-weight: 700;
    margin-bottom: 12px;
}

.team-info p {
    color: #667085;
    margin-bottom: 10px;
}

/* Projects page */
.project-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: center;
}

.project-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-chip {
    border: 1px solid rgba(31, 41, 55, 0.14);
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--text-color);
    padding: 10px 14px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 800;
    transition: var(--transition);
}

.filter-chip:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-soft);
}

.filter-chip.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    border-color: transparent;
}

.project-search {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(31, 41, 55, 0.12);
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: var(--shadow-soft);
}

.project-search i {
    color: #667085;
}

.project-search input {
    border: none;
    outline: none;
    background: transparent;
    width: min(520px, 62vw);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-color);
}

.project-count {
    color: #667085;
    font-weight: 800;
    justify-self: end;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.project-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(31, 41, 55, 0.08);
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.project-media {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.project-content {
    padding: 14px;
}

.project-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.project-top h3 {
    font-size: 0.92rem;
    color: var(--text-color);
    line-height: 1.25;
}

.project-tag {
    flex: 0 0 auto;
    background: rgba(30, 136, 216, 0.10);
    color: var(--primary-dark);
    border: 1px solid rgba(30, 136, 216, 0.18);
    padding: 6px 10px;
    border-radius: 999px;
    font-weight: 900;
    font-size: 0.78rem;
}

.project-meta {
    color: #667085;
    font-size: 0.84rem;
    margin-bottom: 10px;
}

.project-toggle {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 1px solid rgba(31, 41, 55, 0.12);
    border-radius: 14px;
    padding: 8px 10px;
    cursor: pointer;
    font-weight: 900;
    color: var(--text-color);
    transition: var(--transition);
}

.projects-list-only {
    padding-top: 46px;
}

.project-toggle:hover {
    background: rgba(30, 136, 216, 0.07);
    border-color: rgba(30, 136, 216, 0.20);
}

.project-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.project-details.open {
    margin-top: 10px;
}

.project-content .project-media {
    margin-bottom: 12px;
    border-radius: 16px;
}

.project-desc {
    color: #667085;
    padding-top: 10px;
}

.project-highlight-banner {
    padding-top: 40px;
    padding-bottom: 90px;
    background: var(--white);
}

.project-highlight-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    background: var(--bg-light);
    border-radius: 24px;
    border: 1px solid rgba(31, 41, 55, 0.08);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
}

.project-highlight-image {
    height: 100%;
}

.project-highlight-image img {
    width: 100%;
    height: 100%;
    min-height: 320px;
    object-fit: cover;
}

.project-highlight-copy {
    padding: 20px 30px 20px 8px;
}

.project-highlight-copy h2 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    margin-bottom: 10px;
    text-shadow: 0 3px 10px rgba(11, 94, 154, 0.22);
}

.project-highlight-copy p {
    font-size: 1.08rem;
    margin-bottom: 20px;
    color: #4b5565;
}

.logo-strip {
    background: #0f172a;
    padding: 34px 0 20px;
    text-align: center;
}

.logo-strip-image {
    width: min(340px, 82vw);
    height: auto;
}

/* Home page (match reference captures) */
.home-about {
    padding-top: 70px;
    padding-bottom: 70px;
}

.home-about .about-center {
    max-width: 720px;
}

.home-about .about-center p {
    color: #556070;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.home-about .about-actions {
    margin-top: 22px;
}

.home-about .btn {
    font-size: 0.75rem;
    padding: 10px 24px;
}

.services-classic {
    background: var(--white);
    padding-top: 76px;
    padding-bottom: 76px;
}

.services-classic-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: start;
}

.service-classic-card {
    text-align: center;
}

.service-classic-toggle {
    width: 100%;
    border: 0;
    background: transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0;
}

.service-classic-media {
    width: 98px;
    height: 98px;
    border-radius: 999px;
    margin: 0 auto 16px;
    overflow: hidden;
    box-shadow: 0 10px 18px rgba(31, 41, 55, 0.18);
}

.service-classic-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-classic-title {
    color: var(--primary-color);
    font-size: 1.12rem;
    line-height: 1.15;
    text-shadow: 0 5px 14px rgba(11, 94, 154, 0.2);
    margin-bottom: 6px;
    font-family: 'Fraunces', serif;
    font-weight: 700;
}

.service-classic-arrow {
    display: inline-block;
    color: #8d9aac;
    font-size: 0.72rem;
    margin-bottom: 10px;
    transition: transform 0.25s ease;
}

.service-classic-card ul {
    text-align: left;
    background: #f2f6fb;
    border-radius: 0;
    padding: 0 14px;
    min-height: 0;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
}

.service-classic-card.is-open ul {
    padding: 10px 14px;
    max-height: 360px;
    opacity: 1;
}

.service-classic-card.is-open .service-classic-arrow {
    transform: rotate(180deg);
}

.service-classic-card li {
    position: relative;
    padding: 6px 0 6px 14px;
    font-size: 0.8rem;
    color: #607187;
}

.service-classic-card li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 14px;
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: #72bde7;
}

.home-projects {
    background: url('../images/fons_projectes.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: scroll;
    padding-top: 120px;
    padding-bottom: 70px;
}

.home-projects.parallax-section::after {
    opacity: 0;
}

.home-projects .section-title {
    max-width: 820px;
    background: rgba(15, 39, 71, 0.52);
    border: 1px solid rgba(255,255,255,0.22);
    border-radius: 18px;
    padding: 20px 24px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.home-projects .section-title p {
    color: rgba(255,255,255,0.95);
    font-size: 1.08rem;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.home-projects .section-title h2 {
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.home-projects .section-title .underline {
    background: linear-gradient(90deg, rgba(255,255,255,0.92), rgba(255,255,255,0.65));
}

.home-projects .projects-orbs {
    margin: 30px 0 20px;
    gap: 42px;
}

.home-projects .projects-orb {
    width: 158px;
    height: 158px;
    border: 8px solid var(--white);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.22);
}

.home-projects .projects-cta .btn {
    font-size: 0.78rem;
    padding: 10px 26px;
}

.home-cta-band {
    padding: 18px 0 22px;
    background: #076bb5;
}

.home-projects-banner {
    padding: 0 0 64px;
    background: url('../images/fons_projectes.jpg') no-repeat center bottom;
    background-size: cover;
    background-attachment: scroll;
    overflow: hidden;
}

.home-projects-banner .container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.home-cta-band::after {
    content: none;
    color: rgba(255,255,255,0.13);
    right: 18px;
    bottom: -6px;
    font-size: clamp(5.2rem, 16vw, 12rem);
}

.home-projects-banner .cta-card {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.9fr);
    gap: 0;
    align-items: center;
    background: #375e97;
    width: 100%;
    border-radius: 0;
    overflow: hidden;
}

.cta-media-single {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    grid-template-columns: none;
    gap: 0;
    background: transparent;
    padding: 0;
    border-radius: 0;
    width: 100%;
}

.cta-media-single img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 280px;
    border-radius: 0;
    object-fit: cover;
    box-shadow: none;
    margin-left: 0;
    margin-right: 0;
}

.home-projects-banner .cta-copy {
    display: block;
    max-width: 520px;
    justify-self: center;
    text-align: center;
    padding: 20px 24px;
}

.home-projects-banner .cta-copy h2 {
    font-size: 2.18rem;
    line-height: 1.14;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.home-projects-banner .cta-copy p {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 16px;
    color: var(--white);
    text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}

.home-projects-banner .btn-secondary {
    border-width: 3px;
    font-size: 0.92rem;
    padding: 12px 28px;
    background: rgba(255,255,255,0.10);
    color: var(--white);
}

.team-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

.team-cv-link {
    display: inline-block;
    font-weight: 800;
    color: var(--primary-dark);
    padding: 4px 0;
}

.team-cv-link:hover {
    text-decoration: underline;
}

.home-contact {
    padding-top: 82px;
    padding-bottom: 92px;
}

.home-contact .contact-wrapper {
    max-width: 760px;
    margin: 0 auto;
    gap: 16px;
}

.home-contact .contact-info,
.home-contact .contact-form {
    padding: 16px;
}

.home-contact .info-item i {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 0.75rem;
}

.home-contact .info-item h4 {
    font-size: 0.95rem;
}

.home-contact .info-item p,
.home-contact .form-group input,
.home-contact .form-group textarea,
.home-contact .btn-primary {
    font-size: 0.82rem;
}

.home-contact .btn-primary {
    padding: 10px 16px;
}

.home-footer {
    background: #030609;
    padding-top: 34px;
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 24px;
}

.footer-logo-white {
    width: 84px;
    height: auto;
}

.footer-col h4 {
    color: rgba(255,255,255,0.92);
    font-family: 'Manrope', sans-serif;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.footer-col p,
.footer-col a {
    color: rgba(255,255,255,0.78);
    font-size: 0.88rem;
    line-height: 1.65;
}

.footer-col a {
    display: block;
}

.home-footer .footer-content {
    border-bottom-color: rgba(255,255,255,0.2);
}

.home-footer .footer-bottom {
    margin-top: 10px;
    font-size: 0.78rem;
}

/* Accessibility / user preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    * {
        animation: none !important;
        transition: none !important;
    }

    .zoom-layer-bg,
    .zoom-layer-text {
        transform: none !important;
        opacity: 1 !important;
    }
}

.page-header .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.page-header h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 12px;
}

.page-header p {
    color: rgba(255,255,255,0.92);
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.1rem;
}

/* Responsive */
@media (max-width: 980px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .featured-projects {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cta-card {
        grid-template-columns: 1fr;
    }

    .cta-media {
        border-radius: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --top-bar-height: 28px;
        --nav-height: 72px;
    }

    .navbar {
        padding: 14px 0;
    }

    .logo a {
        font-size: 1.2rem;
        gap: 8px;
    }

    .site-logo {
        height: 40px;
        max-width: 52px;
    }

    .top-bar__content {
        justify-content: flex-end;
        padding-right: 0;
        font-size: 0.78rem;
        gap: 12px;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        right: 0;
        width: min(420px, 92vw);
        background: rgba(255,255,255,0.96);
        border: 1px solid rgba(31, 41, 55, 0.08);
        border-radius: 16px;
        box-shadow: var(--shadow);
        margin: 12px 14px 0;
        padding: 16px 14px;
        display: flex;
        flex-direction: column;
        gap: 10px;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
    }

    .nav-links.nav-active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links li a {
        padding: 10px 10px;
        border-radius: 12px;
    }

    .nav-links li a:hover {
        background: rgba(30, 136, 216, 0.08);
    }

    .nav-links li a::after {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .cookie-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cookie-banner__actions {
        justify-content: flex-end;
    }

    .team-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
        border-radius: 16px;
    }

    .team-grid {
        gap: 16px;
    }

    .team-img-placeholder {
        width: min(210px, 72vw);
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0 auto;
        border-radius: 16px;
    }

    .team-info {
        width: 100%;
        text-align: left;
    }

    .team-info h3 {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .team-info h4 {
        font-size: 0.95rem;
    }

    .team-info p {
        font-size: 0.95rem;
        line-height: 1.55;
    }

    .team-cv-link {
        font-size: 0.93rem;
    }

    .project-toolbar {
        grid-template-columns: 1fr;
    }

    .project-count {
        justify-self: start;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .featured-projects {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .services-classic-grid {
        grid-template-columns: 1fr;
    }

    .service-classic-card ul {
        min-height: auto;
    }

    .projects-orbs {
        flex-wrap: wrap;
        gap: 18px;
    }

    .home-projects .projects-orb {
        width: 118px;
        height: 118px;
        border-width: 6px;
    }

    .home-projects {
        padding-top: 92px;
        padding-bottom: 100px;
    }

    .cta-media img {
        height: 180px;
    }

    .project-highlight-card {
        grid-template-columns: 1fr;
    }

    .project-highlight-copy {
        padding: 20px;
    }

    .home-cta-band .cta-card {
        display: grid;
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-projects-banner .container {
        padding: 0;
    }

    .home-projects-banner {
        padding: 0 0 0;
    }

    .home-projects-banner .cta-card {
        grid-template-columns: 1fr;
        border-radius: 0;
    }

    .cta-media-single {
        height: 250px;
    }

    .cta-media-single::after {
        content: none;
    }

    .cta-media-single img {
        height: 100%;
        width: 100%;
        min-height: 0;
        object-fit: cover;
        clip-path: none;
    }

    .home-cta-band .cta-copy,
    .home-projects-banner .cta-copy {
        max-width: none;
        text-align: center;
        padding: 30px 20px 40px;
    }

    .home-cta-band .cta-copy h2,
    .home-projects-banner .cta-copy h2 {
        font-size: 1.65rem;
        line-height: 1.2;
    }

    .home-cta-band .cta-copy p,
    .home-projects-banner .cta-copy p {
        font-size: 1.08rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .team-card {
        padding: 14px;
    }

    .team-img-placeholder {
        width: min(180px, 70vw);
    }
}
