/* ============================================
   INCREMENTA - Web Corporativa
   Colors: #c62828 (vermell), #282828 (negre)
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --red: #c62828;
    --red-dark: #a51d1d;
    --red-light: #e53935;
    --dark: #282828;
    --gray-900: #333333;
    --gray-700: #555555;
    --gray-500: #888888;
    --gray-300: #cccccc;
    --gray-100: #f5f5f5;
    --white: #ffffff;
    --font-main: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    --max-width: 1140px;
    --header-height: 80px;
    --transition: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-main);
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--red); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red-dark); }
ul { list-style: none; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Utilitats --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* --- Tipografia --- */
h1, h2, h3, h4 { line-height: 1.3; color: var(--dark); }
h1 { font-size: 2.5rem; font-weight: 700; }
h2 { font-size: 1.8rem; font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin-bottom: 1rem; }

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.8rem;
    color: var(--dark);
}

.section-title--red {
    color: var(--red);
}

.section-subtitle {
    text-align: center;
    color: #666;
    max-width: 700px;
    margin: -20px auto 50px;
    font-size: 1.02rem;
    line-height: 1.7;
}

/* --- Botons --- */
.btn {
    display: inline-block;
    padding: 12px 32px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.btn--red {
    background: var(--red);
    color: var(--white);
}
.btn--red:hover {
    background: var(--red-dark);
    color: var(--white);
}

.btn--white {
    background: var(--white);
    color: var(--red);
}
.btn--white:hover {
    background: var(--gray-100);
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--red);
    color: var(--red);
}
.btn--outline:hover {
    background: var(--red);
    color: var(--white);
}

/* ============================================
   HEADER & NAVEGACIÓ
   ============================================ */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 0 0;
}

.logo img {
    height: 90px;
    width: auto;
    min-width: 280px;
    object-fit: contain;
}

/* Nav desktop — fila separada */
.main-nav {
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: 12px;
}

.main-nav ul {
    display: flex;
    gap: 0;
    justify-content: center;
    flex-wrap: nowrap;
    width: 100%;
}

.main-nav a {
    display: block;
    padding: 10px 12px;
    color: var(--dark);
    font-size: 0.88rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--red);
    background: rgba(198, 40, 40, 0.06);
}

/* Hamburger */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--dark);
    margin: 5px 0;
    border-radius: 2px;
    transition: all var(--transition);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    position: relative;
    color: var(--white);
    padding: 120px 0;
    text-align: center;
    background-color: var(--red);
    background-image: url('../img/empresa/empresa.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to right,
        rgba(180, 20, 20, 0.88) 0%,
        rgba(180, 20, 20, 0.60) 50%,
        rgba(180, 20, 20, 0.35) 100%
    );
    z-index: 0;
}
.hero .container {
    position: relative;
    z-index: 1;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 1rem;
    font-size: 2.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   SECCIONS
   ============================================ */
.section {
    padding: 60px 0;
}

.section--gray {
    background: var(--gray-100);
}

.section--dark {
    background: var(--dark);
    color: var(--white);
}

/* --- Estadístiques --- */
.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
    padding: 40px 0;
}

.stats > div {
    background: #fff;
    border-radius: 12px;
    padding: 36px 24px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    border-bottom: 3px solid var(--red);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stats > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.13);
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--red);
    line-height: 1;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray-700);
    margin-top: 8px;
}

/* --- Missió / Visió / Valors --- */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.value-card {
    text-align: center;
    padding: 40px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.value-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 36px rgba(0,0,0,0.13);
}

.value-card img {
    width: 78px;
    height: 78px;
    margin: 0 auto 16px;
}

.value-card h3 {
    color: var(--red);
    margin-bottom: 12px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.value-card p {
    font-size: 0.95rem;
    color: var(--gray-700);
    line-height: 1.7;
}

/* --- Sobre nosaltres (2 columnes text) --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.about-grid > div {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.about-grid p {
    text-align: justify;
    color: var(--gray-700);
}

/* --- Equip --- */
.founders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px;
    max-width: 700px;
    margin: 0 auto 40px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.team-member {
    text-align: left;
    background: #fff;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.09);
    transition: transform 0.2s, box-shadow 0.2s;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(0,0,0,0.14);
}

.team-member.founder {
    text-align: left;
}

.team-photo {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: top center;
    display: block;
    border-radius: 0;
    margin-bottom: 0;
}

.team-photo--placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--gray-300) 0%, #ddd 100%);
    border-radius: 0;
    aspect-ratio: 3 / 4;
    margin-bottom: 0;
}

.team-photo--placeholder svg {
    width: 40%;
    height: 40%;
    opacity: 0.4;
}

.team-member-info {
    padding: 16px 18px 20px;
    text-align: center;
}

.team-name {
    font-weight: 700;
    color: var(--red);
    font-size: 0.95rem;
    margin-bottom: 2px;
}

.team-role {
    font-size: 0.85rem;
    color: var(--gray-700);
}

/* --- Serveis (pàgines interiors) --- */
.service-hero {
    background: linear-gradient(135deg, var(--red) 0%, #8b0000 100%);
    color: var(--white);
    padding: 70px 0;
    text-align: center;
    position: relative;
}
.service-hero.has-bg {
    padding: 100px 0;
    background: none;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}
.service-hero.has-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(140, 20, 20, 0.65);
    z-index: 1;
}
.service-hero.has-bg .container {
    position: relative;
    z-index: 2;
}

.service-hero h1 {
    color: var(--white);
    font-size: 2.4rem;
}

.service-hero-sub {
    color: rgba(255,255,255,0.85);
    font-size: 1.1rem;
    margin-top: 12px;
}

.service-content {
    padding: 50px 0;
}

.service-content h2 {
    color: var(--red);
    margin-bottom: 1rem;
}

.service-content p {
    color: var(--gray-700);
    text-align: justify;
    margin-bottom: 1rem;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    padding: 10px 0 10px 28px;
    position: relative;
    color: var(--gray-700);
}

.service-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 18px;
    width: 10px;
    height: 10px;
    background: var(--red);
    border-radius: 50%;
}

/* ============================================
   NOTÍCIES
   ============================================ */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.news-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    transition: transform var(--transition), box-shadow var(--transition);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.news-card__img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--gray-300);
}

.news-card__body {
    padding: 20px;
}

.news-card__date {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.news-card__title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.news-card__excerpt {
    font-size: 0.9rem;
    color: var(--gray-700);
    line-height: 1.6;
}

.news-card__link {
    display: inline-block;
    margin-top: 12px;
    color: var(--red);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ============================================
   FORMULARI DE CONTACTE
   ============================================ */
/* --- Formulari home --- */
.section-contact {
    background: linear-gradient(135deg, var(--red) 0%, #8b0000 100%);
    padding: 80px 0;
}

.contact-home-wrap {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: 60px;
    align-items: start;
}

.contact-home-info {
    color: #fff;
}

.contact-home-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0.75;
    margin-bottom: 12px;
}

.contact-home-info h2 {
    color: #fff;
    font-size: 2.8rem;
    margin-bottom: 16px;
    line-height: 1.1;
}

.contact-home-sub {
    font-size: 1.05rem;
    opacity: 0.88;
    margin-bottom: 36px;
    line-height: 1.7;
}

.contact-home-details {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-home-details li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.97rem;
    color: rgba(255,255,255,0.9);
}

.contact-home-details svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    opacity: 0.85;
}

.contact-home-details a {
    color: #fff;
    text-decoration: none;
}
.contact-home-details a:hover { text-decoration: underline; }

.contact-home-form {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.contact-home-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 6px;
}

.contact-home-form input,
.contact-home-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.contact-home-form input:focus,
.contact-home-form textarea:focus {
    outline: none;
    border-color: var(--red);
}

.contact-home-form textarea {
    min-height: 110px;
    resize: vertical;
}

.contact-home-form .form-group {
    margin-bottom: 16px;
}

.contact-home-form .form-check {
    margin-bottom: 10px;
    font-size: 0.83rem;
    color: #666;
}

.contact-home-form .form-check a {
    color: var(--red);
}

.form-check--center {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: left;
    margin-bottom: 14px;
}

.form-check--center input[type=checkbox] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--red);
}

.form-check--center label {
    font-size: 0.83rem;
    color: #666;
    cursor: pointer;
    margin: 0;
    font-weight: 400;
    line-height: 1.4;
}

.btn--full {
    width: 100%;
    text-align: center;
    padding: 16px;
    font-size: 1rem;
    letter-spacing: 0.04em;
    border-radius: 50px;
    box-shadow: 0 6px 20px rgba(198, 40, 40, 0.45);
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn--full:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(198, 40, 40, 0.55);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    color: var(--red);
    margin-bottom: 12px;
}

.contact-info p {
    color: var(--gray-700);
    margin-bottom: 8px;
}

.contact-info a {
    color: var(--red);
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--red);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 0.85rem;
    color: var(--gray-700);
}

.form-check input[type="checkbox"] {
    margin-top: 3px;
    accent-color: var(--red);
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
    background: #1a1a1a;
    color: #aaa;
}

/* Franja top vermella */
.footer-top-bar {
    background: var(--red);
    padding: 12px 0;
}
.footer-top-bar .container {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
}
.footer-top-bar a {
    color: #fff;
    text-decoration: none;
}
.footer-top-bar a:hover { text-decoration: underline; }

/* Cos */
.footer-body {
    padding: 50px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 2fr;
    gap: 40px;
}

/* Logo col */
.footer-logo {
    height: 52px;
    width: auto;
    margin-bottom: 18px;
    /* Invertim el logo perquè sigui visible en fons fosc */
    filter: brightness(0) invert(1);
    opacity: 0.85;
}

.footer-desc {
    font-size: 0.88rem;
    line-height: 1.7;
    color: #888;
    margin-bottom: 20px;
}

.footer-contact-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
}

.footer-contact-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: var(--red);
}

.footer-col h4 {
    color: var(--red);
    font-size: 0.78rem;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
}

.footer-col p,
.footer-col a {
    color: #999;
    font-size: 0.88rem;
    line-height: 1.8;
}

.footer-col a:hover { color: #fff; }

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 6px;
    padding-left: 12px;
    position: relative;
}

.footer-col ul li::before {
    content: '›';
    position: absolute;
    left: 0;
    color: var(--red);
}

/* Mapa */
.footer-col--map h4 { margin-bottom: 12px; }

.footer-map {
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
    margin-bottom: 10px;
}

.footer-map-link {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--red) !important;
    font-weight: 600;
}

/* Copyright */
.footer-bottom {
    background: #111;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 16px 0;
}
.footer-bottom .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #555;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-bottom strong { color: #888; }

/* ============================================
   PÀGINES LEGALS
   ============================================ */
.legal-content {
    padding: 50px 0;
    max-width: 800px;
    margin: 0 auto;
}

.legal-content h1 {
    margin-bottom: 2rem;
    font-size: 2rem;
}

.legal-content h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--red);
    font-size: 1.3rem;
}

.legal-content p,
.legal-content li {
    color: var(--gray-700);
    font-size: 0.95rem;
    line-height: 1.8;
}

.legal-content ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 1rem;
}

/* ============================================
   COOKIE BANNER
   ============================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--dark);
    color: var(--white);
    padding: 20px;
    z-index: 9999;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-inner p {
    font-size: 0.9rem;
    margin: 0;
    flex: 1;
}

.cookie-inner a {
    color: var(--red-light);
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* ============================================
   ADMIN
   ============================================ */
.admin-wrap {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--gray-100);
}

.admin-header h1 {
    font-size: 1.5rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.admin-table th {
    background: var(--gray-100);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-table img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.admin-actions a {
    margin-right: 10px;
    font-size: 0.85rem;
}

.admin-actions a.delete {
    color: #d32f2f;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .main-nav { display: none; }
    .main-nav.open { display: block; position: absolute; top: var(--header-height); left: 0; right: 0; background: var(--white); box-shadow: 0 8px 20px rgba(0,0,0,0.1); padding: 20px; }
    .main-nav.open ul { flex-direction: column; gap: 0; }
    .main-nav.open a { padding: 12px 16px; font-size: 1rem; }
    .nav-toggle { display: block; }

    .hero h1 { font-size: 1.8rem; }
    .stats { grid-template-columns: repeat(3, 1fr); gap: 15px; }
    .stat-number { font-size: 2rem; }
    .values-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-grid { grid-template-columns: 1fr; }
    .team-grid { grid-template-columns: repeat(2, 1fr); }
    .founders-grid { grid-template-columns: 1fr; max-width: 350px; }
    .news-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .cookie-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 576px) {
    .hero { padding: 50px 0; }
    .hero h1 { font-size: 1.5rem; }
    .section { padding: 40px 0; }
    .stats { grid-template-columns: 1fr; gap: 20px; }
    .team-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .form-row { grid-template-columns: 1fr; }
}
