/* --- VARIABLES I COLORS --- */
:root {
    --primary-color: #0F2C46; 
    --accent-color: #FDC14F; 
    --text-dark: #1a1a1a;
    --text-light: #666;
    --white: #ffffff;
    --bg-light: #f4f7f6;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* --- RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: var(--font-body); color: var(--text-dark); line-height: 1.6; background-color: var(--white); display: flex; flex-direction: column; min-height: 100vh; }
a { text-decoration: none; color: inherit; transition: 0.3s; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* --- UTILITATS --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section-padding { padding: 80px 0; }
.text-center { text-align: center; }
.bg-light { background-color: var(--bg-light); }

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-color);
    font-weight: 800;
}
.section-title span { color: var(--accent-color); }

/* --- NAVBAR --- */
.navbar {
    background: var(--white);
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: 80px;
    display: flex;
    align-items: center;
}
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.logo img { height: 45px; width: auto; }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover, .nav-links a.active { color: var(--accent-color); }
.btn-nav { background-color: var(--primary-color); color: var(--white) !important; padding: 10px 25px; border-radius: 5px; }
.btn-nav:hover { background-color: #091c2e; transform: translateY(-2px); }

/* --- HERO (PORTADA) --- */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(15, 44, 70, 0.9), rgba(15, 44, 70, 0.8)), url('https://images.unsplash.com/photo-1497215728101-856f4ea42174?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
}
.hero h1 { font-family: var(--font-heading); font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.text-accent { color: var(--accent-color); }
.hero p { font-size: 1.3rem; max-width: 700px; margin: 0 auto 40px; opacity: 0.9; }
.hero-btns { display: flex; gap: 15px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 15px 35px; border-radius: 5px; font-weight: 700; }
.btn-primary { background-color: var(--accent-color); color: var(--primary-color); }
.btn-primary:hover { background-color: #e0a83c; }
.btn-secondary { background-color: transparent; border: 2px solid var(--primary-color); color: var(--primary-color); }
.btn-outline-white { border: 2px solid #ffffff; color: #ffffff; padding: 15px 35px; border-radius: 5px; font-weight: 700; transition: 0.3s; }
.btn-outline-white:hover { background-color: #ffffff; color: #0F2C46; }

/* --- CLIENTS / LOGOS --- */
.clients-section { padding: 40px 0; border-bottom: 1px solid #eee; }
.clients-grid { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; opacity: 0.6; align-items: center; }
.clients-grid i { font-size: 2.5rem; color: #ccc; }
.clients-text { text-align: center; margin-bottom: 20px; font-size: 0.9rem; color: #888; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

/* --- SERVEIS GENERALS (GRID) --- */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.service-card { background: var(--white); padding: 40px; border-radius: 8px; border: 1px solid #eee; transition: 0.3s; }
.service-card:hover { transform: translateY(-5px); border-color: var(--accent-color); box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.icon-box { font-size: 2.5rem; color: var(--accent-color); margin-bottom: 20px; }
.service-card h3 { font-family: var(--font-heading); margin-bottom: 15px; color: var(--primary-color); }

/* --- PÀGINA DE SERVEIS DETALLATS (EL QUE FALLAVA A LA FOTO) --- */
.services-compact-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 40px; 
}
.service-item-compact { 
    background: #fff; 
    border: 1px solid #eee; 
    padding: 30px; 
    border-radius: 8px; 
    transition: 0.3s; 
    text-align: left; /* Important per la llista */
}
.service-item-compact:hover { 
    border-color: var(--accent-color); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
}
.service-item-compact h3 { 
    color: var(--primary-color); 
    margin-bottom: 15px; 
    font-size: 1.3rem; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}
.service-item-compact h3 i { 
    color: var(--accent-color); 
}
.service-item-compact ul { 
    list-style: none; 
    padding: 0; 
}
.service-item-compact li { 
    margin-bottom: 8px; 
    font-size: 0.95rem; 
    color: #555; 
    display: flex; /* Alineació icona-text */
    align-items: flex-start;
}
.service-item-compact li::before { 
    content: "\f00c"; /* Codi de check de FontAwesome */
    font-family: "Font Awesome 6 Free"; 
    font-weight: 900;
    color: var(--accent-color); 
    margin-right: 10px;
    font-size: 0.9rem;
    margin-top: 4px;
}

/* --- STACK TECNOLÒGIC --- */
.tech-stack { text-align: center; padding: 60px 0; background: #fafafa; border-top: 1px solid #eee; }
.tech-logos { display: flex; justify-content: center; gap: 50px; flex-wrap: wrap; margin-top: 40px; opacity: 0.8; }
.tech-logos i { font-size: 3.5rem; color: #0F2C46; transition: 0.3s; }
.tech-logos i:hover { color: #FDC14F; transform: scale(1.1); opacity: 1; }

/* --- METODOLOGIA --- */
.methodology-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; margin-top: 50px; }
.step-card { text-align: center; padding: 20px; position: relative; }
.step-number { font-size: 5rem; font-weight: 900; color: #f0f0f0; position: absolute; top: -30px; left: 50%; transform: translateX(-50%); z-index: 1; font-family: 'Montserrat', sans-serif; }
.step-content { position: relative; z-index: 2; }
.step-content h4 { color: #0F2C46; font-size: 1.4rem; margin-bottom: 15px; font-weight: 700; }
.step-content p { font-size: 0.95rem; color: #666; line-height: 1.6; }

/* --- PREUS --- */
.pricing-section { background-color: var(--bg-light); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-top: 50px; }
.pricing-card { background: var(--white); padding: 40px; border-radius: 15px; text-align: center; border: 1px solid #eee; position: relative; transition: 0.3s; }
.pricing-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); border-color: var(--accent-color); }
.pricing-card.popular { border: 2px solid var(--accent-color); transform: scale(1.05); box-shadow: 0 20px 40px rgba(0,0,0,0.1); z-index: 2; }
.badge { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); background: var(--accent-color); color: var(--primary-color); padding: 5px 20px; border-radius: 20px; font-weight: 800; font-size: 0.8rem; text-transform: uppercase; }
.price { font-size: 3rem; font-weight: 800; color: var(--primary-color); margin: 20px 0; }
.price span { font-size: 1rem; font-weight: 400; color: #888; }
.features-list { margin: 30px 0; text-align: left; }
.features-list li { margin-bottom: 10px; color: #555; }
.features-list i { color: var(--accent-color); margin-right: 10px; }
.btn-price-primary { display: inline-block; background-color: var(--accent-color); color: var(--primary-color); padding: 12px 30px; border-radius: 5px; font-weight: 700; margin-top: 20px; width: 100%; }
.btn-price-secondary { display: inline-block; background-color: transparent; color: var(--primary-color); border: 2px solid var(--primary-color); padding: 12px 30px; border-radius: 5px; font-weight: 700; margin-top: 20px; width: 100%; }
.btn-price-secondary:hover { background-color: var(--primary-color); color: #fff; }
.btn-price-primary:hover { background-color: #e0a83c; }

/* --- FAQ --- */
.faq-grid { max-width: 800px; margin: 0 auto; }
.faq-item { background: var(--white); padding: 25px; margin-bottom: 20px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); border-left: 4px solid var(--accent-color); }
.faq-item h4 { color: var(--primary-color); font-size: 1.2rem; margin-bottom: 10px; }

/* --- PROJECTES --- */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); gap: 30px; }
.project-card { background: var(--white); border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.05); transition: 0.3s; }
.project-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); }
.project-img { height: 250px; width: 100%; overflow: hidden; }
.project-img img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.project-card:hover .project-img img { transform: scale(1.05); }
.project-info { padding: 25px; }
.project-cat { color: var(--accent-color); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; }
.project-info h3 { color: var(--primary-color); font-family: var(--font-heading); font-size: 1.4rem; margin-bottom: 10px; }
.project-info p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 20px; }
.link-text { color: var(--primary-color); font-weight: 700; font-size: 0.9rem; border-bottom: 2px solid var(--accent-color); }

/* --- TESTIMONIS --- */
.reviews-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.review-card { background: var(--white); padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.03); position: relative; }
.review-stars { color: var(--accent-color); margin-bottom: 15px; }
.review-text { font-style: italic; color: var(--text-light); margin-bottom: 20px; }
.review-author h4 { color: var(--primary-color); font-weight: 700; font-family: var(--font-heading); }
.review-author span { font-size: 0.85rem; color: #999; }

/* --- CONTACTE --- */
.contact-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 20px; }
.contact-info-box { background: var(--primary-color); color: var(--white); padding: 40px; border-radius: 10px; }
.contact-item { display: flex; align-items: center; margin-bottom: 30px; }
.contact-item i { font-size: 1.5rem; color: var(--accent-color); margin-right: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; margin-bottom: 20px; border: 1px solid #ddd; border-radius: 5px; font-family: var(--font-body); }
.contact-form button { width: 100%; background-color: var(--primary-color); color: var(--white); border: none; padding: 15px; font-weight: 700; cursor: pointer; transition: 0.3s; }
.contact-form button:hover { background-color: var(--accent-color); color: var(--primary-color); }

/* --- CTA FINAL --- */
.cta-section { background-color: var(--primary-color); color: var(--white); text-align: center; }

/* --- LEGALS --- */
.legal-content {
    max-width: 800px;
    margin: 0 auto;
    padding-top: 120px; 
    padding-bottom: 60px;
    padding-left: 20px;
    padding-right: 20px;
    text-align: left;
}
.legal-content h1 { font-family: var(--font-heading); color: var(--primary-color); font-size: 2.5rem; margin-bottom: 30px; border-bottom: 3px solid var(--accent-color); display: inline-block; padding-bottom: 10px; }
.legal-content h2, .legal-content h3 { color: var(--primary-color); font-family: var(--font-heading); margin-top: 30px; margin-bottom: 15px; }
.legal-content p, .legal-content li { margin-bottom: 15px; color: var(--text-dark); font-size: 1rem; line-height: 1.8; }
.legal-content ul { list-style: disc; padding-left: 20px; margin-bottom: 20px; }

/* --- FOOTER --- */
footer { margin-top: auto; background-color: #091c2e; color: #888; text-align: center; padding: 40px 0; font-size: 0.9rem; }

/* --- MENU MÒBIL --- */
.burger { display: none; cursor: pointer; }
.burger div { width: 25px; height: 3px; background-color: var(--primary-color); margin: 5px; transition: all 0.3s ease; }

/* --- COOKIES --- */
.cookie-container { position: fixed; bottom: -100%; left: 0; right: 0; background: #2f3640; color: #f5f6fa; padding: 20px; box-shadow: 0 -2px 16px rgba(47,54,64,0.39); transition: 400ms; z-index: 9999; text-align: center; display: flex; flex-direction: column; gap: 15px; align-items: center; }
.cookie-container.active { bottom: 0; }
.cookie-container a { color: var(--accent-color); text-decoration: underline; }
.cookie-buttons { display: flex; gap: 15px; justify-content: center; }
.cookie-btn { background: var(--accent-color); border: 0; color: var(--primary-color); padding: 10px 30px; font-weight: 700; border-radius: 5px; cursor: pointer; }
.cookie-btn-refuse { background: transparent; color: #fff; border: 2px solid #fff; padding: 10px 30px; font-weight: 700; border-radius: 5px; cursor: pointer; }

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    body { overflow-x: hidden; }
    .hero h1 { font-size: 2.5rem; }
    .pricing-card.popular { transform: scale(1); }
    .contact-wrapper { grid-template-columns: 1fr; }
    .services-compact-grid { grid-template-columns: 1fr; }
    
    .nav-links { position: absolute; right: 0px; height: 92vh; top: 8vh; background-color: var(--white); display: flex; flex-direction: column; align-items: center; width: 60%; transform: translateX(100%); transition: transform 0.5s ease-in; box-shadow: -2px 0 10px rgba(0,0,0,0.1); justify-content: center; gap: 50px; }
    .nav-links li { opacity: 0; }
    .burger { display: block; }
}
.nav-active { transform: translateX(0%); }
@keyframes navLinkFade { from { opacity: 0; transform: translateX(50px); } to { opacity: 1; transform: translateX(0px); } }
.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }