/* Cards e contenitori */
.card {
    background: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow-light);
    padding: 25px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 20px var(--shadow-medium);
    transform: translateY(-2px);
}

.card h2, .card h3 {
    color: var(--color-primary);
    margin-top: 0;
}

.card p:last-child {
    margin-bottom: 0;
}

.content-section {
    padding: 40px 0;
}

.content-section h1, .content-section h2 {
    color: var(--color-primary);
    margin-bottom: 20px;
}

/* Master Cards - Cards con immagine di sfondo per i maestri */
.master-card {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    transition: all 0.4s ease;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

/* Overlay scuro per contrasto con il testo */
.master-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.4s ease;
    z-index: 1;
}

/* Contenuto della card sopra l'overlay */
.master-card h4,
.master-card p {
    position: relative;
    z-index: 2;
    color: var(--color-white);
    margin: 0;
    transition: all 0.4s ease;
}

.master-card h4 {
    font-family: var(--font-heading);
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    margin-bottom: 10px;
}

.master-card h4 a {
    color: var(--color-white);
    text-decoration: none;
    transition: all 0.4s ease;
}

.master-card p {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    opacity: 0.95;
}

/* Effetti hover */
.master-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px var(--shadow-dark);
}

.master-card:hover::before {
    background: rgba(0, 0, 0, 0.35);
}

.master-card:hover h4 {
    transform: scale(1.1);
}

.master-card:hover p {
    transform: scale(1.08);
}

.master-card:hover h4 a {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Responsive: altezza maggiore e layout fisso su desktop */
@media (min-width: 769px) {
    .master-card {
        min-height: 350px;
    }

    /* Forza le colonne a rimanere in orizzontale su tablet e desktop */
    .masters-section .col-md-6,
    .masters-section .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

/* Mobile: dimensioni più piccole */
@media (max-width: 768px) {
    .master-card {
        min-height: 220px;
    }

    .master-card h4 {
        font-size: var(--font-size-xl);
    }

    .master-card p {
        font-size: var(--font-size-sm);
    }
}
