/* =========================================
   Antonio/css/works.css - UX/UI OTTIMIZZATA
   ========================================= */

body { 
    background: #f8f9fa; /* Grigio chiarissimo, molto moderno */
    color: #4a5568;      /* Grigio scuro per il testo, affatica meno la vista del nero puro */
    font-family: 'Poppins', Arial, sans-serif;
}

/* NAVBAR */
.navbar-custom {
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    border: none;
    border-radius: 0;
    margin-bottom: 60px;
}

.navbar-custom .navbar-brand {
    color: #111;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: opacity 0.3s;
}

.navbar-custom .navbar-brand:hover {
    opacity: 0.6;
}

/* CONTENITORE PRINCIPALE */
.works-container {
    max-width: 850px; /* Più stretto per una lettura ottimale (max 70-80 caratteri per riga) */
    margin-bottom: 100px;
}

.page-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 40px;
    font-weight: 800;
    color: #111;
    margin-bottom: 15px;
    text-align: center;
    letter-spacing: -0.5px;
}

.page-subtitle {
    text-align: center;
    margin-bottom: 60px;
    font-size: 16px;
    color: #718096;
}

/* =========================================
   STILE DELLE CARD (I PROGETTI)
   ========================================= */
.work-card {
    background: #fff;
    padding: 50px 60px; /* Whitespace lussuoso */
    margin-bottom: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02), 0 10px 15px rgba(0,0,0,0.03);
    border: 1px solid #edf2f7;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.work-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.04), 0 20px 25px rgba(0,0,0,0.04);
}

/* HEADER DELLA CARD (Titolo e Categoria) */
.work-header {
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 25px;
    margin-bottom: 30px;
}

.work-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 26px;
    font-weight: 800;
    color: #111;
    margin-top: 0;
    margin-bottom: 10px;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

.work-meta {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: #a0aec0;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    display: block;
}

/* CONTENUTO TESTUALE */
.work-content p {
    margin-bottom: 20px;
    font-size: 15.5px;
    line-height: 1.8;
}

.work-content ul {
    padding-left: 20px;
    margin-bottom: 25px;
}

.work-content li {
    margin-bottom: 10px;
    font-size: 15px;
    line-height: 1.7;
}

/* SEZIONI INTERNE */
.work-section {
    margin-top: 35px;
}

.work-section-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

/* Pallino decorativo prima del titolo della sezione */
.work-section-title::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #111;
    border-radius: 50%;
    margin-right: 12px;
}

/* BOX HIGHLIGHT (Risultati, Pubblicazioni, ecc.) */
.highlight-box {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #111;
    padding: 25px 30px;
    border-radius: 0 8px 8px 0;
    margin-top: 40px;
}

.highlight-box .work-section-title::before {
    display: none; /* Tolgo il pallino dentro il box */
}

.highlight-box ul {
    margin-bottom: 0;
}

/* TECH STACK TAGS (Pills) */
.tech-container {
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px dashed #edf2f7;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.tech-label {
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #111;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-right: 15px;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tech-badge {
    background-color: #edf2f7;
    color: #2d3748;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    transition: background-color 0.2s ease;
}

.tech-badge:hover {
    background-color: #e2e8f0;
    color: #1a202c;
}

/* RESPONSIVE: Riduco i margini sui telefoni */
@media (max-width: 768px) {
    .work-card {
        padding: 30px 20px;
    }
    .highlight-box {
        padding: 20px;
    }
    .tech-container {
        flex-direction: column;
        align-items: flex-start;
    }
    .tech-label {
        margin-bottom: 10px;
    }
}

/* =========================================
   EFFETTO "READ MORE" (ESPANDI/RIDUCI)
   ========================================= */

.expandable-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1), opacity 0.4s ease-out;
}

/* Quando la card ha la classe 'expanded', mostriamo il contenuto */
.work-card.expanded .expandable-content {
    max-height: 2000px; /* Un valore alto per farci stare tutto il testo */
    opacity: 1;
    transition: max-height 0.8s ease-in-out, opacity 0.6s ease-in;
}

/* Stile del bottone */
.read-more-btn {
    display: inline-block;
    margin-top: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #111; /* Nero elegante */
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 2px solid transparent;
}

.read-more-btn:hover {
    color: #007bff; /* Diventa blu al passaggio del mouse */
    text-decoration: none;
}