/*
 * ==========================================================================
 * SENTINELLA PILOT - FULL D'ESTILS
 * ==========================================================================
 * 
 * Autor: Hedera Solucions
 * Versió: 1.0
 * Data: Gener 2026
 * 
 * Estructura:
 * 1. Variables CSS
 * 2. Reset i base
 * 3. Tipografia
 * 4. Header
 * 5. Hero section
 * 6. Seccions generals
 * 7. Benefits grid
 * 8. Requirements list
 * 9. Timeline
 * 10. Team section
 * 11. Formulari
 * 12. FAQ
 * 13. Footer
 * 14. Responsive
 */

/* ==========================================================================
   1. VARIABLES CSS
   ========================================================================== */
:root {
    /* Colors principals */
    --primary-green: #01824a;
    --light-green: #E6F4EF;
    --accent-blue: #2D7D7D;
    --light-blue: #E3F2FD;
    --accent-yellow: #F9E79F;
    
    /* Colors de text */
    --text-dark: #2C3E50;
    --text-light: #5D6D7E;
    --white: #FFFFFF;
    
    /* Mides */
    --max-width: 1200px;
    --border-radius: 15px;
    --border-radius-small: 10px;
    
    /* Espaiat */
    --spacing-small: 10px;
    --spacing-medium: 20px;
    --spacing-large: 40px;
    --spacing-xlarge: 60px;
    
    /* Transicions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Ombres */
    --shadow-small: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-medium: 0 3px 10px rgba(0,0,0,0.1);
    --shadow-large: 0 5px 15px rgba(0,0,0,0.1);
    --shadow-hover: 0 6px 20px rgba(0,0,0,0.3);
}

/* ==========================================================================
   2. RESET I BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

/* Container general - Limita l'amplada màxima del contingut */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-medium);
}

/* ==========================================================================
   3. TIPOGRAFIA
   ========================================================================== */
h1, h2, h3 {
    line-height: 1.2;
}

h2 {
    font-size: 2.5em;
    color: var(--primary-green);
    margin-bottom: 30px;
    text-align: center;
}

h3 {
    color: var(--primary-green);
    font-size: 1.4em;
    margin-bottom: var(--spacing-small);
}

.intro-text {
    font-size: 1.2em;
    color: var(--text-light);
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

/* ==========================================================================
   4. HEADER
   ========================================================================== */
header {
    background-color: var(--white);
    color: var(--text-dark);
    padding: var(--spacing-small) 0;
    box-shadow: var(--shadow-small);
    border-bottom: 1px solid #e0e0e0;
}

/* Padding específic pel container del header */
header .container {
    padding: 0 var(--spacing-small);
}

.header-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Logo container */
.logo {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%; /* En mòbil ocupa tot l'ample */
}

/* SVG del logo */
.logo svg {
    height: auto;
    width: 95%; /* Ocupa 95% de l'ample en mòbil */
    max-width: 600px;
}

/* ==========================================================================
   5. HERO SECTION
   ========================================================================== */
.hero {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-blue) 100%);
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3em;
    margin-bottom: var(--spacing-medium);
    line-height: 1.2;
}

.hero .tagline {
    font-size: 1.5em;
    margin-bottom: 30px;
    opacity: 0.95;
    font-weight: 300;
}

/* Botó CTA (Call To Action) */
.hero .cta-button {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-green);
    padding: 15px 40px;
    font-size: 1.2em;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all var(--transition-fast);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.hero .cta-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* ==========================================================================
   6. SECCIONS GENERALS
   ========================================================================== */
section {
    padding: var(--spacing-xlarge) 0;
}

/* Seccions amb fons altern */
section:nth-child(even) {
    background-color: var(--light-green);
}

/* ==========================================================================
   7. BENEFITS GRID
   ========================================================================== */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.benefit-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    transition: transform var(--transition-fast);
}

.benefit-card:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    font-size: 3em;
    margin-bottom: 15px;
}

.benefit-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* ==========================================================================
   8. REQUIREMENTS LIST
   ========================================================================== */
.requirements-list {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    max-width: 700px;
    margin: 0 auto;
}

.requirements-list ul {
    list-style: none;
}

.requirements-list li {
    padding: 15px 0;
    border-bottom: 1px solid var(--light-green);
    font-size: 1.1em;
    color: var(--text-dark);
}

.requirements-list li:before {
    content: "✓";
    color: var(--primary-green);
    font-weight: bold;
    font-size: 1.3em;
    margin-right: 15px;
}

.requirements-list li:last-child {
    border-bottom: none;
}

/* Nota informativa */
.note {
    background-color: var(--light-blue);
    padding: var(--spacing-medium);
    border-radius: var(--border-radius-small);
    margin-top: 30px;
    font-style: italic;
    color: var(--text-dark);
}

/* ==========================================================================
   9. TIMELINE
   ========================================================================== */
.timeline {
    max-width: 800px;
    margin: 40px auto;
    position: relative;
}

/* Línia vertical central */
.timeline:before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--primary-green);
    transform: translateX(-50%);
}

.timeline-item {
    margin-bottom: 40px;
    position: relative;
}

/* Alternar posició esquerra/dreta */
.timeline-item:nth-child(odd) {
    padding-right: 50%;
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: 50%;
    text-align: left;
}

.timeline-content {
    background-color: var(--white);
    padding: var(--spacing-medium);
    border-radius: var(--border-radius-small);
    box-shadow: var(--shadow-medium);
}

/* Número del pas */
.timeline-number {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-green);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
}

/* ==========================================================================
   10. TEAM SECTION
   ========================================================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

/* Títols de subsecció dins de l'equip */
.team-section-title {
    color: var(--accent-blue);
    font-size: 1.8em;
    margin-top: 50px;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid var(--light-green);
    padding-bottom: 10px;
}

/* Primer títol sense marge superior */
.team-section-title:first-of-type {
    margin-top: 20px;
}

/* Grid amb un sol element (centrat) */
.team-grid-single {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.team-member {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    text-align: center;
    transition: transform var(--transition-fast);
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-photo {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid var(--primary-green);
}

.team-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Foto rectangular per logos d'empresa */
.team-photo-rectangle {
    width: 200px;
    height: 120px;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid var(--primary-green);
    border-radius: var(--border-radius-small);
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.team-photo-rectangle img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Logo d'empresa en lloc de foto */
.team-logo {
    background-color: var(--light-green);
    display: flex;
    align-items: center;
    justify-content: center;
}

.company-logo {
    font-size: 4em;
}

.team-member h3 {
    color: var(--primary-green);
    font-size: 1.4em;
    margin-bottom: var(--spacing-small);
}

/* Enllaços dels membres de l'equip */
.team-member h3 a {
    color: var(--primary-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.team-member h3 a:hover {
    color: var(--accent-blue);
    text-decoration: underline;
}

.team-role {
    color: var(--accent-blue);
    font-weight: 600;
    font-size: 1.1em;
    margin-bottom: var(--spacing-small);
}

.team-bio {
    color: var(--text-light);
    line-height: 1.6;
    text-align: left;
}

/* ==========================================================================
   11. FORMULARI
   ========================================================================== */
.form-container {
    background-color: var(--white);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-large);
    max-width: 600px;
    margin: 0 auto;
}

.step-indicator {
    text-align: center;
    margin-bottom: 30px;
    color: var(--text-light);
    font-size: 0.9em;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

.form-step h3 {
    margin-bottom: var(--spacing-medium);
}

.form-group {
    margin-bottom: var(--spacing-medium);
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--light-green);
    border-radius: 8px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color var(--transition-fast);
}

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

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

.form-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

/* Botons del formulari */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 50px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #006644;
}

.btn-secondary {
    background-color: var(--light-green);
    color: var(--primary-green);
}

.btn-secondary:hover {
    background-color: #cce5dd;
}

/* Missatge d'èxit */
.success-message {
    text-align: center;
    padding: 40px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background-color: var(--primary-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    margin: 0 auto 20px;
}

.success-message h3 {
    color: var(--primary-green);
    margin-bottom: 15px;
}

.success-message p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: var(--spacing-small);
}

/* ==========================================================================
   12. FAQ
   ========================================================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background-color: var(--white);
    margin-bottom: 15px;
    border-radius: var(--border-radius-small);
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.faq-question {
    padding: var(--spacing-medium);
    cursor: pointer;
    background-color: var(--light-green);
    font-weight: bold;
    color: var(--primary-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-fast);
}

.faq-question:hover {
    background-color: #cce5dd;
}

.faq-question:after {
    content: "+";
    font-size: 1.5em;
    font-weight: bold;
}

.faq-question.active:after {
    content: "−";
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-fast);
    padding: 0 var(--spacing-medium);
}

.faq-answer.active {
    max-height: 1000px;
    padding: var(--spacing-medium);
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
}

/* ==========================================================================
   13. FOOTER
   ========================================================================== */
footer {
    background-color: var(--primary-green);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.footer-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-logos a {
    display: inline-block;
    transition: transform var(--transition-fast);
}

.footer-logos a:hover {
    transform: scale(1.05);
}

.footer-logos img {
    height: 50px;
    max-width: 180px;
    object-fit: contain;
    filter: brightness(0) invert(1); /* Converteix a blanc */
}

.footer-logos .logo-text {
    color: var(--white);
    font-size: 1.1em;
    font-weight: 500;
}

.footer-logos .separator {
    color: var(--white);
    opacity: 0.5;
    font-size: 1.5em;
}

.footer-content p {
    opacity: 0.9;
    margin-bottom: var(--spacing-small);
}

.footer-contact {
    margin-top: var(--spacing-medium);
}

.footer-contact a {
    color: var(--white);
    text-decoration: none;
    margin: 0 var(--spacing-small);
}

/* ==========================================================================
   14. RESPONSIVE
   ========================================================================== */

/* TABLETS (768px i més) */
@media (min-width: 768px) {
    header {
        padding: 15px 0;
    }
    
    header .container {
        padding: 0 var(--spacing-medium);
    }
    
    .logo {
        width: auto;
    }
    
    .logo svg {
        width: 450px;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        text-align: left;
    }
    
    .timeline-number {
        left: 20px;
        transform: translateX(-50%);
    }
}

/* ORDINADORS (1024px i més) */
@media (min-width: 1024px) {
    .logo svg {
        width: 500px;
    }
}

/* MÒBILS (menys de 768px) */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2em;
    }

    .hero .tagline {
        font-size: 1.2em;
    }

    h2 {
        font-size: 2em;
    }

    .timeline:before {
        left: 20px;
    }

    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        padding-left: 60px;
        padding-right: 0;
        text-align: left;
    }

    .timeline-number {
        left: 20px;
        transform: translateX(-50%);
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }
}
