/**
Theme Name: Computer Flash Child 2
Author: Carlo Della Noce
Author URI: https://www.computerflash.net
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 3.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: computer-flash-child-2
Template: astra
*/

/* --- VARIABILI COLORE --- */
:root {
    --primary-orange: #e67e22;
    --primary-blue: #2980b9;
    --bg-light: #ffffff;
    --bg-footer: #f9f9f9;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --border-color: #eee;
    --max-width: 1200px;
}

/* --- RESET E BASE --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-light);
}

img {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER --- */
header {
    //border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1000;
}

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

.logo img { height: 40px; }

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    transition: color 0.3s;
}

nav a:hover { color: var(--primary-orange); }

/* --- LAYOUT PRINCIPALE --- */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    margin: 40px auto;
}

.main-single {
    display: grid;
    display: grid;
    /* Forza una sola colonna che occupa tutto lo spazio disponibile */
    grid-template-columns: 100%;
    gap: 30px;
    margin: 40px auto;
}

/* --- SEZIONI TITOLI --- */
.section-title-blue, .video-section h3, .standard-news h3 { 
    border-left: 4px solid var(--primary-blue); 
    padding-left: 10px; 
    margin-bottom: 20px; 
}

.section-title-orange, .sidebar-section h3, .wordpress-widgets .widgettitle { 
    border-left: 4px solid var(--primary-orange); 
    padding-left: 10px; 
    margin-bottom: 20px; 
}

/* --- TOP NEWS GRID --- */
.top-news-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.news-card.featured {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    height: 400px;
    padding: 0;
    color: #ffffff !important;
}

/*h2 a {
    color: #ffffff !important;
}*/

.gradient-layer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 70%;
    background: linear-gradient(transparent, rgba(0,0,0,0.85));
    z-index: 2;
}

.top-news-content {
    position: absolute;
    bottom: 0;
    padding: 25px;
    z-index: 3;
    color: #fff;
}

.top-news-content a {
    position: relative;
    z-index: 5;
    cursor: pointer;
}

.news-card.featured:hover .thumb-overlay img {
    transform: scale(1.05);
    transition: transform 0.5s ease;
}

/* --- BADGES --- */
.news-badge-label, .news-badge-label-video {
    background-color: var(--primary-orange);
    color: #ffffff !important;
    padding: 6px 12px; /* Padding identico ovunque */
    border-radius: 4px;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    line-height: 1.2; /* Evita che il testo tocchi i bordi in modo irregolare */
    text-decoration: none;
    z-index: 3;
}

.news-badge-label-video {
    position: absolute;
    bottom: 10px;
    left: 10px;
    //padding: 10px 20px!important;
    margin-bottom: 0;
    z-index: 3;
}

.news-badge-label {
    margin-bottom: 10px;
}

.news-badge-label a, .news-badge-label-video a {
    color: #ffffff !important;
}

.category-link-badge {
    background: #f0f0f0;
    color: var(--primary-blue);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
}

/* --- VIDEO SECTION --- */
.video-section {
    background: var(--bg-footer);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
	align-items: stretch;
}

.video-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

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

.video-thumbnail-wrapper { position: relative; line-height: 0; overflow: hidden; }

.play-icon {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(230, 126, 34, 0.9);
    color: #fff;
    width: 50px; height: 50px;
    display: flex;
    align-items: center; justify-content: center;
    border-radius: 50%;
    z-index: 2;
    transition: all 0.3s;
}

.video-card:hover .play-icon {
    scale: 1.1;
    background: var(--primary-blue);
}

/* Contenitore della miniatura */
.video-thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 200px; /* Qui decidi l'altezza fissa per tutti i video */
    overflow: hidden;
    border-radius: 4px;
    background: #000; /* Sfondo nero se l'immagine non copre tutto */
}

/* L'immagine vera e propria */
.video-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; /* Ritaglia l'immagine per riempire il box senza schiacciarla */
    display: block;
}

/* Placeholder se manca l'immagine */
.video-placeholder {
    width: 100%;
    height: 100%;
    background: #ddd;
}

/* Titolo video per mantenere l'allineamento */
.video-title {
    margin-top: 10px;
    font-size: 1.3rem;
    /* Rimuoviamo il blocco dell'altezza */
    height: auto; 
    min-height: 3em; /* Garantisce che i box siano allineati anche con titoli corti */
    overflow: visible;
    display: block; /* Torniamo al display standard */
    line-height: 1.3;
}

/* --- NEWS LIST STANDARD --- */
.news-card-standard {
    display: flex;
    gap: 20px;
	align-items: flex-start!important;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
    cursor: pointer;
}

.news-thumb-container img { transition: opacity 0.3s; border-radius: 4px; }
.news-card-standard:hover .news-thumb-container img { opacity: 0.8; }

/* Contenitore della miniatura nelle notizie standard */
.news-thumb-container {
    width: 300px;       /* Larghezza fissa */
    height: 200px;      /* Altezza fissa */
    flex-shrink: 0;     /* Impedisce che il box si schiacci se il titolo è lungo */
    overflow: hidden;
    border-radius: 4px;
}

/* L'immagine e il placeholder */
.news-thumb, 
.news-thumb-placeholder {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;  /* Ritaglia l'immagine per riempire il box senza distorcerla */
    display: block;
}

/* Colore per il placeholder in caso di immagine mancante */
.news-thumb-placeholder {
    background-color: #eee;
}

.news-title-text {
    font-size: 1.3rem; /* Ridotto per armonizzarsi con i 100px di altezza della foto */
    line-height: 1.3;    /* Interlinea più compatta */
    margin: 5px 0;      /* Spazio sopra e sotto equilibrato */
    color: var(--text-main);
    font-weight: 600;
    /* Opzionale: limita a 3 righe se i titoli sono lunghissimi */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-corpo-text {
    font-size: 1rem; /* Ridotto per armonizzarsi con i 100px di altezza della foto */
    line-height: 1.3;    /* Interlinea più compatta */
    margin: 5px 0;      /* Spazio sopra e sotto equilibrato */
    //color: var(--text-main);
    //font-weight: 600;
    /* Opzionale: limita a 3 righe se i titoli sono lunghissimi */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Regoliamo anche il meta (data e badge) per dare respiro */
.news-meta-top {
    margin-bottom: 4px;
}

.news-meta-bottom {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Ottimizzazione per Mobile (App-Style) */
@media (max-width: 768px) {
    .news-thumb-container {
        width: 100%;    /* Larghezza piena su mobile */
        height: 200px;  /* Altezza aumentata per un look più moderno */
    }
}

/* --- SIDEBAR & WIDGETS --- */
.sidebar-section { margin-bottom: 30px; }

.category-pills, .tag-cloud-custom {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-pill {
    background: #fff;
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    transition: all 0.3s;
}

.category-pill:hover {
    background: var(--primary-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(41, 128, 185, 0.2);
}

.tag-item {
    font-size: 0.75rem;
    color: var(--primary-blue);
    text-decoration: none;
    background: #fdf7f2;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid rgba(41, 128, 185, 0.1);
    transition: all 0.2s ease;
}

.tag-item:hover { background: var(--primary-orange); color: #fff; }

.wordpress-widgets ul { list-style: none; }
.wordpress-widgets ul li { padding: 8px 0; border-bottom: 1px solid var(--border-color); }

/* --- FOOTER --- */
footer {
    background: var(--bg-footer);
    padding: 50px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
}

/* --- RESPONSIVE APP-STYLE --- */
@media (max-width: 900px) {
    main, .main-layout { grid-template-columns: 1fr; }
    .sidebar { order: 2; }
}

@media (max-width: 768px) {
    .header-content { flex-direction: column; gap: 15px; }
    .top-news-wrapper, .video-grid { grid-template-columns: 1fr !important; }
    
    .news-card.featured { height: 300px; grid-column: auto !important; }
    .news-card.featured h2 { font-size: 1.4rem !important; }

    .news-card-standard { flex-direction: column; }
    .news-thumb-container img { width: 100% !important; height: 200px !important; object-fit: cover; }
    
    .category-pill, .tag-item { padding: 10px 18px; }
}

/* --- NEWSLETTER SIDEBAR STYLE --- */
.mailchimp-container {
    background: #fdf7f2; /* Sfondo leggerissimo arancio per farlo risaltare */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(230, 126, 34, 0.1);
}

.newsletter-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.3s;
}

.newsletter-input:focus {
    border-color: var(--primary-blue);
}

.newsletter-button {
    width: 100%;
    background-color: var(--primary-blue);
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
}

.newsletter-button:hover {
    background-color: var(--primary-orange);
    transform: translateY(-2px);
}

/* Ottimizzazione per Mobile */
@media (max-width: 768px) {
    .newsletter-button {
        padding: 15px; /* Più facile da cliccare su smartphone */
    }
}

/* FONTI */
/* Contenitore principale dei bottoni */
.category-buttons-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important; /* Spazio netto tra un bottone e l'altro */
    justify-content: center;
    margin: 40px auto;
    padding: 20px;
    max-width: 1200px;
}

/* Lo stile del Bottone */
.cat-button {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background-color: #ffffff !important;
    color: #333 !important;
    padding: 15px 25px !important; /* Più grande per sembrare un vero bottone */
    text-decoration: none !important;
    font-weight: 700 !important;
    font-size: 1.1rem !important;
    border: 2px solid #e67e22 !important; /* Bordo colorato (arancio) */
    border-radius: 10px !important; /* Angoli arrotondati moderni */
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); /* Ombra per dare profondità */
    min-width: 150px;
}

/* Effetto Hover (al passaggio del mouse) */
.cat-button:hover {
    background-color: #e67e22 !important;
    color: #fff !important;
    transform: translateY(-5px); /* Si alza sensibilmente */
    box-shadow: 0 8px 15px rgba(230, 126, 34, 0.3);
}

/* Il contatore all'interno del bottone */
.cat-button .cat-count {
    margin-left: 15px;
    background-color: #fceee2; /* Sfondo leggero arancio */
    color: #e67e22;
    font-size: 0.85rem;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 800;
}

/* Cambio colore del contatore in Hover */
.cat-button:hover .cat-count {
    background-color: #fff !important;
    color: #e67e22 !important;
}

/* Forza la rimozione di eventuali stili lista del tema */
.category-buttons-grid ul, 
.category-buttons-grid li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* NEWSLETTER PAGE */
/* Contenitore generale del form nella pagina */
.newsletter-page-form {
    margin: 30px 0;
    padding: 20px 0;
    max-width: 500px; /* Larghezza contenuta per non disperdersi nella pagina */
}

.newsletter-simple-title {
    font-size: 1.4rem !important;
    margin-bottom: 10px !important;
    color: #333;
}

.newsletter-simple-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

/* Gruppo che contiene Input e Bottone */
.newsletter-input-group {
    display: flex;
    flex-direction: column; /* Disposti uno sopra l'altro di base */
    gap: 15px; /* SPAZIO TRA CASELLA DI TESTO E BOTTONE */
}

/* Casella di Testo (Input) */
.newsletter-input {
    width: 100%;
    padding: 12px 15px !important;
    border: 1px solid #ccc !important;
    border-radius: 6px !important;
    font-size: 1rem;
    background-color: #fff !important;
    box-sizing: border-box;
}

.newsletter-input:focus {
    border-color: #e67e22 !important;
    outline: none;
    box-shadow: 0 0 5px rgba(230, 126, 34, 0.2);
}

/* Bottone di invio */
.newsletter-button {
    width: 100%; /* Larghezza piena come l'input */
    background-color: #e67e22 !important;
    color: #fff !important;
    padding: 14px 20px !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-button:hover {
    background-color: #d35400 !important;
}

/* Se preferisci averli affiancati solo su schermi grandi */
@media (min-width: 600px) {
    .newsletter-input-group {
        flex-direction: row; /* Li mette sulla stessa riga */
        align-items: center;
    }
    
    .newsletter-button {
        width: auto; /* Il bottone prende solo lo spazio necessario */
        white-space: nowrap;
    }
}

/* Contenitore per la centratura */
.container-btn-center {
    display: flex;
    justify-content: center; /* Centra orizzontalmente */
    align-items: center;
    margin: 40px auto;
    width: 100%;
}

/* Stile del Bottone Tutte Le News*/
.btn-all-news {
    display: inline-block;
    background-color: #e67e22; /* Il tuo arancio */
    color: #fff !important; /* Testo bianco */
    padding: 15px 35px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none !important;
    text-transform: uppercase;
    border-radius: 8px; /* Angoli arrotondati */
    border: 2px solid #e67e22;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 15px rgba(230, 126, 34, 0.2);
    cursor: pointer;
}

/* Effetto al passaggio del mouse (Hover) */
.btn-all-news:hover {
    background-color: transparent;
    color: #e67e22 !important;
    transform: translateY(-3px); /* Si alza leggermente */
    box-shadow: 0 6px 20px rgba(230, 126, 34, 0.4);
}

/* Adattamento per Mobile */
@media (max-width: 480px) {
    .btn-all-news {
        width: 90%; /* Quasi tutta la larghezza su smartphone */
        text-align: center;
    }
}