/* 🔹 HERO SECTION */
.sec1 {
    background-image: linear-gradient(to bottom, rgba(212, 212, 212, 0.8), rgba(230, 229, 229, 0.8)), url("../img/workspace.webp");
    min-height: 100vh; /* Garantim que ocupi tota la pantalla */
    background-attachment: fixed;
    background-position: center; /* Centrem millor la imatge */
    background-repeat: no-repeat;
    background-size: cover;
    padding: 10% 5%; /* Percentatges per adaptar-se millor a diferents pantalles */
    display: flex; /* Flexbox per centrar contingut */
    align-items: center; /* Centrem el contingut verticalment */
    justify-content: center; /* Centrem el contingut horitzontalment */
    box-sizing: border-box; /* Assegura't que el padding no augmenti l'amplada */
    color: #333; /* Text fosc per contrastar */
}

/* Logo Styling */
.logo-hero {
    max-width: 200px;
    height: auto;
    transition: transform 0.3s ease;
}

.logo-hero:hover {
    transform: scale(1.1); /* Efecte al passar per sobre */
}

/* 🔹 Efecte de selecció a tota la targeta */
.services .card {
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* 🔹 Efecte de zoom a la imatge dins de la targeta */
.services .card .image-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px; /* Ajust per a cantonades arrodonides */
}

/* 🔹 Ajust de mida inicial */
.services .card .image-container img {
    width: 100%;
    transition: transform 0.5s ease;
}

/* 🔹 Al fer hover, la imatge s'amplia */
.services .card:hover .image-container img {
    transform: scale(1.1);
}

/* 🔹 Efecte de ressaltat en passar el cursor per sobre la targeta */
.services .card:hover {
    border: 2px solid #ecc600;
    box-shadow: 0px 8px 20px rgba(255, 204, 0, 0.5);
    transform: scale(1.02);
}

/* 🔹 SECCIÓ ESTADÍSTIQUES (Mobile First) */
.stats-section {
    background-color: #1a1a1a;
    padding: 40px 0;
}

.stats-item {
    padding: 20px 10px;
}

.stats-icon {
    font-size: 1.8rem;
    color: #ecc600;
    display: block;
    margin-bottom: 8px;
}

.stats-number {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stats-plus {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: #ecc600;
}

.stats-label {
    color: #aaa;
    font-size: 0.85rem;
    margin-top: 6px;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sec2 {
    background-color: #f9f9f9; /* Fons suau per contrastar */
    padding: 5% 0; /* Separació vertical */
}

.sec2 img{
    border-radius: 10% 0 10% 0;
    border: 1px solid #ecc600;
}


.sec2 ul {
    padding-left: 0; /* Elimina indentació */
}

.sec2 ul li {
    margin-bottom: 10px; /* Espai entre elements de la llista */
    font-size: 1rem;
}

.sec2 ul li i {
    font-size: 1.2rem; /* Augmenta la mida de l'icona */
}

/* 🔹 SECCIÓ COM TREBALLEM (Mobile First) */
.process-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.process-section__title {
    color: #fff;
}

.process-section__subtitle {
    color: #aaa;
    font-size: 1rem;
}

.process-step {
    text-align: center;
    padding: 24px 16px;
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(236, 198, 0, 0.1);
    border-radius: 16px;
    transition: all 0.4s ease;
    margin-bottom: 16px;
}

.process-step:hover {
    background: rgba(236, 198, 0, 0.06);
    border-color: rgba(236, 198, 0, 0.35);
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(236, 198, 0, 0.1);
}

.process-step__number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ecc600 0%, #d4af37 100%);
    color: #1a1a1a;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(236, 198, 0, 0.3);
    transition: all 0.4s ease;
}

.process-step:hover .process-step__number {
    box-shadow: 0 6px 24px rgba(236, 198, 0, 0.5);
    transform: scale(1.08);
}

.process-step__icon {
    font-size: 2rem;
    color: #ecc600;
    display: block;
    margin-bottom: 12px;
    transition: transform 0.4s ease;
}

.process-step:hover .process-step__icon {
    transform: scale(1.15);
}

.process-step__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.process-step__text {
    font-size: 0.85rem;
    color: #aaa;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Desktop */
@media (min-width: 769px) {
    .process-section {
        padding: 90px 0;
    }

    /* Horizontal timeline line behind step numbers */
    .process-row {
        position: relative;
    }

    .process-row::before {
        content: '';
        position: absolute;
        top: 66px;
        left: 12.5%;
        right: 12.5%;
        height: 2px;
        background: linear-gradient(90deg, transparent 0%, rgba(236, 198, 0, 0.4) 10%, #ecc600 50%, rgba(236, 198, 0, 0.4) 90%, transparent 100%);
        z-index: 1;
    }

    .process-step {
        padding: 32px 20px;
        margin-bottom: 0;
        z-index: 2;
        position: relative;
    }

    .process-step__number {
        width: 68px;
        height: 68px;
        font-size: 1.7rem;
        position: relative;
        z-index: 3;
    }

    .process-step__icon {
        font-size: 2.4rem;
    }

    .process-step__title {
        font-size: 1.2rem;
    }

    .process-step__text {
        font-size: 0.9rem;
    }

}

/* 🔹 SECCIÓ PORTAFOLI */
.portafoli {
    background-color: #fff;
}

/* 🔹 PROJECTES */
.project-card {
    display: block;
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    position: relative;
}

.project-card .project-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.project-card .project-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-card .project-info {
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 15px;
    border-radius: 10px;
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.project-card:hover .project-info {
    opacity: 1;
}

/* 🔹 SECCIÓ TESTIMONIS */
.testimonials-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.testimonials-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.testimonial {
    flex: 0 0 33.33%; /* Mostra tres testimonis alhora en pantalles grans */
    text-align: center;
    padding: 1rem;
    box-sizing: border-box;
}

.testimonial h5 {
    font-size: 1.25rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.testimonial small {
    color: #666;
}

.testimonial-text {
    position: relative;
    padding: 20px;
    text-align: center;
}

.opening-quote,
.closing-quote {
    position: absolute;
    font-size: 3rem;
    color: #ecc600;
    opacity: 0.5;
}

.opening-quote {
    top: -10px;
    left: 10px;
}

.closing-quote {
    bottom: -10px;
    right: 10px;
}


/* 🔹 SECCIÓ CALL TO ACTION */
.calltoaction {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url("../../static/img/workspace2.webp");
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    min-height: 60vh; /* Ajusta l'alçada segons les necessitats */
    padding: 4rem 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.calltoaction h2 {
    font-size: 2.5rem;
    line-height: 1.2;
}


/* 🔹 SECCIÓ FAQ */
.faq {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.9));
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq .button {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    border-radius: 36px;
    font-weight: 700;
    height: 54px;
    font-size: 16px;
    padding-inline: 20px;
    background-color: transparent;
    color: #333;
    text-transform: uppercase;
    overflow: hidden;
    text-align: center;
    transition: all .25s ease-in-out;
    z-index: 1;
    border: none;
  }
  
  .faq .button:is(:hover, :focus)::before {
    transform: translateX(0%);
  }
  
  .faq .text {
    white-space: nowrap;
    line-height: 1.2;
    padding-inline-end: 44px;
    z-index: 2;
  }
  
  /* change the width and height to 100% when you use it in your layout */
  .faq .button::after {
    content: '';
    position: absolute;
    height: calc(100% - 2px);
    width: calc(100% - 2px);
    border: 1px solid #ecc600;
    border-radius: 36px;
    z-index: 2;
  }
  
  .faq .button::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: #ecc600;
    z-index: 1;
    left: -2px;
    transform: translateX(90%);
    transition: all .3s ease-out;
  }
  
  .faq .icon {
    display: inherit;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 0;
    width: 54px;
    height: 54px;
    justify-content: center;
    align-items: center;
    border-radius: 100%;
    background-color: #ecc600;
    z-index: 2;
  }
  
  
/* 🔹 Estil Base per al Textarea */
#userMessage {
    width: 100%;
    padding: 12px 15px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    border: 2px solid #ecc600; /* Borde groc */
    border-radius: 20px; /* Borde arrodonit */
    outline: none;
    transition: all 0.3s ease-in-out;
    resize: none; /* Desactiva el redimensionament manual */
    min-height: 100px; /* Alçada mínima */
    max-height: 200px; /* Alçada màxima */
}

/* 🔹 Efecte al fer Focus */
#userMessage:focus {
    border-color: #d4af37; /* Groc més fosc */
    box-shadow: 0 0 8px rgba(236, 198, 0, 0.7);
}

/* 🔹 Contenidor Input */
.inputContainer {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
    margin: auto;
}


/* 🔹 Input estilitzat */
#userMessage {
    width: 100%;
    padding: 5px 5px;
    font-size: 16px;
    color: #333;
    background-color: transparent;
    border: 2px solid #ecc600;
    border-radius: 20px;
    outline: none;
    transition: all 0.3s ease-in-out;
    font-family: 'Arial', sans-serif;
    resize: none;
    min-height: 100px;
    max-height: 200px;
}

.floatingLabel {
    position: absolute;
    top: 12px;
    left: 16px;
    color: #666;
    font-size: 14px;
    font-weight: 400;
    transition: 0.2s ease-in-out;
}



/* 🔹 Icona */
.messageIcon {
    position: absolute;
    color: #ecc600;
    width: 16px;
    top: -23px;
    left: -15px;
    opacity: 0;
    transition: 0.2s linear;
}

/* 🔹 Etiqueta flotant */
.floatingLabel {
    position: absolute;
    top: -25px;
    left: 12px;
    color: #333;
    font-size: 14px;
    font-weight: 400;
    transition: 0.2s linear;
    opacity: 0;
}

/* 🔹 Efectes al fer focus o si té text */
#userMessage:focus ~ .floatingLabel,
#userMessage:valid ~ .floatingLabel {
    transform: translateX(20px);
    opacity: 1;
}

#userMessage:focus ~ .messageIcon,
#userMessage:valid ~ .messageIcon {
    transform: translateX(20px);
    opacity: 1;
}


  


.chat-messages {
    max-height: 300px;
    overflow-y: auto;
    padding: 15px;
    margin-bottom: 10px;
}

.message {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    border-radius: 10px;
    margin-bottom: 10px;
    box-shadow: 0px 3px 5px rgba(0, 0, 0, 0.1);
}

.user-message {
    background-color: #333;
    color: #fff;
    justify-content: flex-start;
    border-radius: 0 0 50px 0;

}

/* 🔹 Animació de punts en moviment */
.typing-animation .message-text {
    font-style: italic;
    font-weight: bold;
    color: #555;
}

.typing-animation .dot-one, 
.typing-animation .dot-two, 
.typing-animation .dot-three {
    animation: typingDots 1.5s infinite;
    font-size: 1.2em;
}

.typing-animation .dot-one { animation-delay: 0s; }
.typing-animation .dot-two { animation-delay: 0.3s; }
.typing-animation .dot-three { animation-delay: 0.6s; }

@keyframes typingDots {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}


.yara-response {
    background-color: #ecc600;
    color: #333;
    justify-content: flex-end;
    border-radius: 0 0 0 50px;
}

.avatar img {
    width: 70px;
    height: 70px;
    min-width: 70px;
    min-height: 70px;
}

.message-text {
    flex-grow: 1;
    padding: 10px;
    border-radius: 10px;
}


/* 🔹 BLOG SECCIÓ */
.blog-section {
    background-color: #f8f9fa;
}

.blog-card {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.blog-card:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.12);
}

.blog-card__image {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.blog-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card__image img {
    transform: scale(1.08);
}

.blog-card__category {
    position: absolute;
    top: 14px;
    left: 14px;
    background: rgba(26, 26, 26, 0.85);
    color: #ecc600;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.blog-card__body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    font-size: 0.8rem;
    color: #888;
}

.blog-card__meta i {
    color: #ecc600;
    margin-right: 4px;
}

.blog-card__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__subtitle {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card__link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ecc600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: gap 0.3s ease;
}

.blog-card:hover .blog-card__link {
    gap: 14px;
}

.blog-card__link i {
    transition: transform 0.3s ease;
}

.blog-card:hover .blog-card__link i {
    transform: translateX(4px);
}




/* 🔹 Stats - Desktop */
@media (min-width: 769px) {
    .stats-section {
        padding: 50px 0;
    }

    .stats-icon {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .stats-number {
        font-size: 3rem;
    }

    .stats-plus {
        font-size: 2rem;
    }

    .stats-label {
        font-size: 0.9rem;
        letter-spacing: 1.5px;
    }
}

/* 🔹 Estils per a dispositius Tablets */
@media (max-width: 1200px) {

}

/* 🔹 Estils per a dispositius mòbils */
@media (max-width: 768px) {
    .sec1 {
        background-attachment: scroll; /* Evitem problemes amb dispositius mòbils */
        padding: 20% 10%; /* Augmentem el padding per a més espai */
        text-align: center; /* Centrem el text */
    }
    .logo-hero {
        width: 150px;
        height: 150px;
        transition: transform 0.3s ease;
    }
    
    .logo-hero:hover {
        transform: none; /* Efecte al passar per sobre */
    }
    .services .card:hover {
        transform: none;
    }

    .avatar img {
        width: 50px;
        height: 50px;
        min-width: 50px;
        min-height: 50px;
    }
    .testimonial {
        flex: 0 0 100%; /* Mostra dos testimonis alhora en tauletes */
    }
    .chat-messages .message {
        flex-direction: column;
        align-items: flex-start;
    }

    .chat-messages .yara-response {
        margin-left: 0;
    }
    #userMessage {
        font-size: 16px;
        padding: 10px 12px;
        min-height: 80px;
    }
    .calltoaction {
        background-attachment: scroll;
    }

    .calltoaction h2 {
        font-size: 2rem;
    }

    .calltoaction p {
        font-size: 1.125rem;
    }

    .calltoaction a {
        padding: 10px 30px;
        font-size: 1rem;
    }
    .blog-card {
        margin-bottom: 1rem;
    }
    .blog-card:hover {
        transform: none;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    }
    .blog-card:hover .blog-card__image img {
        transform: none;
    }
    .blog-card__image {
        height: 200px;
    }
    .blog-card__body {
        padding: 20px;
    }
    .blog-card__meta {
        gap: 12px;
        flex-wrap: wrap;
    }
    /* Opcional: evita el zoom amb escala del viewport */
    html {
        touch-action: manipulation;
    }
}


