/* =========================================
   PAGE HEADER (Coerente)
   ========================================= */
.page-header {
    position: relative;
    height: 50vh;
    /* Metà schermo */
    min-height: 400px;
    background: url('../immagini/sfondi/1.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    /* Parallax */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 0;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    /* Molto scuro per far risaltare il titolo */
    z-index: 1;
}

.header-content {
    position: relative;
    z-index: 2;
    color: var(--main-white);
    padding: 0 20px;
}

.header-content h1 {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.breadcrumb {
    font-family: var(--font-body);
    font-size: 1rem;
    letter-spacing: 1px;
    color: #ccc;
    text-transform: uppercase;
}

/* =========================================
   CERTIFICATI GRID
   ========================================= */
.cert-section {
    /* Sfondo tecnico scuro */
    background-color: #111;
    padding: 80px 20px 120px 20px;
    min-height: 100vh;
}

.cert-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    /* Griglia responsive: minimo 250px, altrimenti va a capo */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

/* CARD STILE */
.cert-card {
    background: #1a1a1a;
    /* Grigio molto scuro */
    border: 1px solid #333;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}

.cert-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

/* Contenitore Logo */
.cert-icon-box {
    background: #ffffff;
    /* Sfondo bianco per far vedere i loghi colorati/jpg */
    padding: 30px;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border-bottom: 3px solid var(--main-red);
    /* Linea rossa tecnica */
}

.cert-icon-box img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: filter 0.3s, transform 0.3s;
}

/* Informazioni Testo */
.cert-info {
    padding: 25px;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cert-info h3 {
    font-family: var(--font-heading);
    color: var(--main-white);
    font-size: 1.2rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.view-btn {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
    transition: color 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* --- HOVER EFFECTS --- */
.cert-card:hover {
    transform: translateY(-5px);
    /* Si alza leggermente */
    border-color: var(--main-red);
    /* Bordo diventa rosso */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.cert-card:hover .cert-icon-box img {
    transform: scale(1.05);
    /* Zoom leggero */
}

.cert-card:hover .view-btn {
    color: var(--main-red);
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.5rem;
    }

    .cert-grid {
        gap: 20px;
    }
}