:root {
    --primary: #864ddf;    /* Lila principal */
    --secondary: #40E0D0;  /* Turquesa */
    --accent: #FF7F50;     /* Taronja */
    --dark: #333333;       /* Gris fosc */
    --light: #f8f9fa;      /* Gris clar */
    --white: #ffffff;
    --azure: #0ea5e9;      /* Blau per a eix Vital */
}

/* Custom styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--dark);
    background-color: var(--white);
}

main {
    flex: 1;
    overflow-x: hidden; /* Per evitar scroll horitzontal del banner */
}

/* Navbar styling */
.navbar {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar-brand {
    color: var(--primary) !important;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.navbar-brand .brand-text {
    font-size: 1.8rem;
    margin-left: 15px;
    color: var(--primary);
    letter-spacing: 0.5px;
}

.nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--primary) !important;
    background-color: rgba(134, 77, 223, 0.1);
}

/* Footer styling */
.footer {
    background-color: #f8f9fa;
    margin-top: 4rem;
}

.footer-main {
    padding: 4rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.footer-brand .brand-text {
    font-size: 1.5rem;
    margin-left: 10px;
    color: var(--dark);
    font-weight: bold;
}

.footer-tagline {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.footer h5 {
    color: var(--dark);
    font-weight: 600;
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.8rem;
    color: #666;
    font-size: 0.95rem;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.footer-client {
    display: flex;
    align-items: center;
}

.footer-client img {
    margin-right: 10px;
}

.footer-client span {
    color: #666;
}

.footer-credits {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 1.5rem;
}

.footer-credits span {
    color: #666;
}

.footer-credits a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-credits a:hover {
    color: var(--secondary);
}

/* Progress bar accent + centered wrapper */
.progress-wrapper {
    width: 70%;
    margin: 0 auto;
}

.progress-accent .progress-bar {
    background-color: var(--accent);
}

/* Title underline with gradient */
.title-underline {
    position: relative;
    display: inline-block;
    padding-bottom: 6px;
}
.title-underline::after {
    content: "";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 140px;
    height: 4px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

/* Profession badge */
.profession-badge {
    display: inline-block;
    border: 1px solid rgba(255, 127, 80, 0.35); /* accent */
    color: #555;
    background: rgba(255, 127, 80, 0.08);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    font-size: 0.9rem;
}

/* Sticky actions bar on mobile */
@media (max-width: 576px) {
  .sticky-actions {
    position: sticky;
    bottom: 0;
    background: #ffffff;
    padding: 0.75rem 1rem;
    box-shadow: 0 -6px 16px rgba(0,0,0,0.08);
    z-index: 1020;
    margin-left: -1rem;
    margin-right: -1rem;
  }
}

/* Cards and components */
.card {
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Només apliquem l'efecte hover a les cards que no són del dashboard */
.hero-section .card:hover,
.benefit-card:hover {
    transform: translateY(-5px);
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    border-radius: 0.5rem;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #6f3bd6; /* més fosc que --primary per contrast */
    border-color: #6f3bd6;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-primary:active,
.btn-primary.active,
.show > .btn-primary.dropdown-toggle {
    background-color: #5f33ba;
    border-color: #5f33ba;
    color: #ffffff;
}

.btn-primary.disabled, .btn-primary:disabled {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #ffffff;
    opacity: 0.7;
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    border-radius: 0.5rem;
}

.alert {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
    border: none;
}

/* Jumbotron styling */
.jumbotron {
    padding: 3rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 1rem;
    color: var(--white);
}

/* Hero section */
.hero-section {
    padding: 5rem 0;
    margin-top: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--white);
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    margin-bottom: 4rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: bold;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-text {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

.hero-buttons .btn-outline-primary {
    color: var(--white);
    border-color: var(--white);
}

.hero-buttons .btn-outline-primary:hover {
    background-color: var(--white);
    color: var(--primary);
}

.hero-image {
    width: 100%;
    height: auto;
    border-radius: 1rem;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

/* How it works section */
.how-it-works {
    padding: 5rem 0;
    background-color: var(--white);
}

.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-description {
    font-size: 1.2rem;
    color: var(--dark);
    opacity: 0.8;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    margin: 0 auto 1.5rem;
}

.feature-icon i {
    font-size: 2.5rem;
    color: var(--accent);
}

.feature-card h3 {
    color: #666;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.feature-card p {
    color: var(--dark);
    opacity: 0.8;
    margin-bottom: 0;
    line-height: 1.6;
}

/* Why Us section */
.why-us {
    padding: 5rem 0;
    background-color: var(--light);
}

.benefit-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.benefit-icon {
    margin: 0 auto 1.5rem;
}

.benefit-icon i {
    font-size: 2.2rem;
    color: var(--accent);
}

.benefit-card h3 {
    color: #666;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: bold;
}

.benefit-card p {
    color: var(--dark);
    opacity: 0.8;
    margin-bottom: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* CTA Banner */
.cta-banner {
    padding: 0;
    margin: 5rem 0;
}

.cta-content {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 4rem 2rem;
    border-radius: 1rem;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-content .btn-primary {
    background-color: var(--white);
    color: var(--primary);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.cta-content .btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* --------------------------------------------------
   Tag filter buttons (referents): prevent primary animations
   and keep consistent colors when toggled
-------------------------------------------------- */
.tag-btn {
    transition: none !important;
}

.tag-btn:hover,
.tag-btn:focus,
.tag-btn:active {
    transform: none !important;
}

/* Outline-to-solid transitions for tag buttons should not animate position */
.tag-btn.btn-outline-success.active,
.tag-btn.btn-outline-warning.active,
.tag-btn.btn-outline-danger.active,
.tag-btn.btn-outline-info.active {
    transform: none !important;
}

/* Partners section */
.partners {
    padding: 4rem 0;
    background-color: var(--light);
}

.partners-grid {
    margin-top: 2rem;
}

.partner-logo, .partner-logo-placeholder {
    background: var(--white);
    border-radius: 0.5rem;
    padding: 1.5rem;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* Ajustos específics per cada partner */
.partner-creativacio {
    padding: 2rem;
}

.partner-generalitat {
    padding: 1rem 3rem;
}

.partner-flacaixa {
    padding: 1rem 1.5rem;
}

.partner-ajuntament {
    padding: 1.5rem 4rem;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.logo-container img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 1rem;
}

.partner-name {
    margin: 0;
    color: var(--dark);
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
}

.partner-logo-placeholder {
    background: rgba(255, 255, 255, 0.5);
}

@media (max-width: 768px) {
    .partner-logo, .partner-logo-placeholder {
        height: 130px;
        padding: 1rem;
    }

    /* Ajustos específics per mòbil */
    .partner-creativacio {
        padding: 1.5rem;
    }

    .partner-generalitat {
        padding: 0.8rem 2rem;
    }

    .partner-ajuntament {
        padding: 0.8rem 2rem;
    }

    .logo-container img {
        max-height: 60px;
    }

    .partner-name {
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .footer-main {
        padding: 2rem 0;
    }

    .footer-bottom {
        text-align: center;
        padding: 1rem 0;
    }

    .footer-client, .footer-credits {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .footer-credits {
        flex-direction: column;
        gap: 0.5rem;
    }

    .col-md-3:not(:last-child) {
        margin-bottom: 2rem;
    }
}

@media (max-width: 992px) {
    .hero-section {
        padding: 3rem 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-image {
        margin-top: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .partner-logo-placeholder {
        height: 80px;
    }

    .container {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .hero-section {
        padding: 4rem 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .feature-card, .benefit-card {
        padding: 1.5rem;
    }
}
