/* ======================================================================
   stile-mappe-svg.css
   Versione: 1.30 | Claudio Agostini © 08.02.2026
   Specifico per la pagina mappe.php (mappe interattive SVG/PNG)
   Importa stile-base.css e aggiunge regole per la griglia continenti
   Centratura dell'ultima card (Oceania) in layout a 3 colonne
====================================================================== */



/* ======================================================================
   REGOLE SPECIFICHE PER LA PAGINA MAPPE INTERATTIVE
   ====================================================================== */

article {
    width: 90%;
    text-align: center;
    line-height: 2.5rem;
    font-weight: 700;
    margin-left: 10rem; /* Spazio per il menu fisso */
    padding-top: 2rem;
    box-sizing: border-box;
}

article h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    padding: 1rem 1rem 0.4rem;
    text-align: center;
    color: #1a3f3f;
    font-weight: 700;
    border-bottom: 3px solid #99cccc;
    margin: 0 auto 0.5rem;
    max-width: 800px;
}

.page-description {
    font-size: 1rem;
    padding: 0.5rem 1rem 1.5rem;
    color: #2d5f5f;
    max-width: 800px;
    margin: 0 auto 1.5rem;
    line-height: 1.5;
    font-weight: 600;
}

/* ======================================================================
   GRIGLIA CONTINENTI (7 ELEMENTI) - LAYOUT RESPONSIVO
   ====================================================================== */

.continents-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1200px;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Centratura dell'ultima card (Oceania) in layout a 3 colonne */
.continents-grid .continent-item:nth-child(7) {
    grid-column: 2;
}

.continent-item {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 10px;
    padding: 1.2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10), 0 1px 3px rgba(0,0,0,0.07);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.6);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

.continent-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.16);
    border-color: rgba(113,21,21,0.3);
}

/* Thumbnail con immagini PNG */
.continent-thumbnail {
    width: 100%;
    height: 180px;
    background-color: #c1c2f0;
    border-radius: 8px;
    margin-bottom: 0.8rem;
    overflow: hidden;
    border: 1.5px solid rgba(0,0,0,0.15);
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stile per le immagini PNG */
.continent-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 5px; /* Un po' di spazio intorno all'immagine */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.continent-item:hover .continent-thumbnail img {
    transform: scale(1.05);
}

.continent-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    height: 100%;
    justify-content: space-between;
}

.continent-link h2 {
    color: #1a3f3f;
    font-size: 1.35rem;
    margin: 0.5rem 0 0;
    font-weight: 700;
    line-height: 1.2;
    flex-grow: 0;
    border-top: 2px solid #99cccc;
    padding-top: 0.6rem;
}

.continent-desc {
    color: #666;
    font-size: 1rem;
    line-height: 1.4;
    margin-top: 0.5rem;
    flex-grow: 1;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 0.5rem;
}

/* ======================================================================
   RESPONSIVE DESIGN - GRIGLIA
   ====================================================================== */

/* Tablet: 2 colonne (768px - 1199px) */
@media (max-width: 1199px) {
    .continents-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        max-width: 800px;
    }
    
    .continents-grid .continent-item:nth-child(7) {
        grid-column: auto;
    }
    
    .continent-thumbnail {
        height: 160px;
    }
    
    .continent-item {
        min-height: 320px;
    }
}

/* Mobile Large: 1 colonna (480px - 767px) */
@media (max-width: 767px) {
    article {
        margin-left: 0;
        width: 100%;
        padding: 1rem;
    }
    
    article h1 {
        font-size: 2.5rem;
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .continents-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 0 0.5rem;
        max-width: 500px;
    }
    
    .continent-item {
        padding: 1.2rem;
        min-height: 300px;
    }
    
    .continent-thumbnail {
        height: 150px;
    }
    
    .continent-link h2 {
        font-size: 1.6rem;
    }
    
    .page-description {
        font-size: 1.1rem;
        padding: 1rem;
    }
}

/* Mobile Small: 1 colonna (fino a 479px) */
@media (max-width: 479px) {
    article h1 {
        font-size: 2rem;
        padding: 0.5rem;
    }
    
    .continents-grid {
        gap: 1rem;
    }
    
    .continent-item {
        padding: 1rem;
        min-height: 280px;
    }
    
    .continent-thumbnail {
        height: 140px;
    }
    
    .continent-link h2 {
        font-size: 1.4rem;
    }
    
    .continent-desc {
        font-size: 0.9rem;
    }
}

/* Desktop Large: 3 colonne con centratura ultima card (1200px+) */
@media (min-width: 1200px) {
    .continents-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .continents-grid .continent-item:nth-child(7) {
        grid-column: 2;
    }
}

/* ======================================================================
   ANIMAZIONI E EFFETTI SPECIALI
   ====================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.continent-item {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.continent-item:nth-child(1) { animation-delay: 0.1s; }
.continent-item:nth-child(2) { animation-delay: 0.2s; }
.continent-item:nth-child(3) { animation-delay: 0.3s; }
.continent-item:nth-child(4) { animation-delay: 0.4s; }
.continent-item:nth-child(5) { animation-delay: 0.5s; }
.continent-item:nth-child(6) { animation-delay: 0.6s; }
.continent-item:nth-child(7) { animation-delay: 0.7s; }

/* Effetto hover per i link interni */
.continent-link:hover h2 {
    color: #711515;
    text-decoration: none;
}

/* Sfondo mare per le thumbnail */
.continent-thumbnail {
    background: linear-gradient(135deg, #c1c2f0 0%, #a0a1e0 100%);
}

/* Fallback per immagini mancanti */
.continent-thumbnail:not(:has(img[src]))::before {
    content: attr(data-continent);
    color: #333;
    font-size: 1.2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/*
======================================================================
- stile-mappe-svg.css
- ver. 1.40 - Claudio Agostini © 23.02.2026
- Specifico per la pagina mappe.php (7 continenti)
- Supporto per immagini PNG e SVG
======================================================================
*/