/* Page Menu Styling */
.page-menu {
    display: none;
}

.page-menu.active {
    display: block;
}

/* Page Tabs Styling */
.page-tabs {
    display: flex;
    justify-content: center;
    gap: 0;
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.tab-button {
    flex: 1;
    max-width: none;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: none;
    color: #043160;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button:not(:last-child) {
    border-right: 1px solid #dee2e6;
}

.tab-button:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    transform: translateY(-2px);
}

.tab-button.active {
    background: linear-gradient(135deg, #043160, #1e5289);
    color: white;
    box-shadow: 0 4px 12px rgba(4, 49, 96, 0.3);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: white;
}

/* Page Content */
.page-content {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.page-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography */
h3 {
    color: var(--par-title-color);
    font-weight: 600;
    font-size: 1.4rem;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

h4 {
    color: var(--par-title-color);
    font-weight: 600;
    font-size: 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0.6rem;
}

h5 {
    color: var(--par-title-color);
    font-weight: 600;
    font-size: 1.1rem;
    margin-top: 0.8rem;
    margin-bottom: 0.5rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: justify;
}

/* QUOTE CARDS */
.citation {
    border-left: 4px solid #f0ad4e;
    border-right: 4px solid #f0ad4e;
    padding: 2rem 2.5rem;
    max-width: 800px;
    background: #fff9f0;
    font-style: italic;
    color: #333;
    text-align: left;
}

.citation-author {
    display: block;
    margin-top: 1rem;
    font-style: normal;
    font-weight: 600;
    color: #043160;
}

/* FEATURE CARD */
.feature-card {
    background: linear-gradient(135deg, #1e5289, #043160);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin: 3rem 0;
}

.feature-card .image-placeholder {
    width: 100%;
    height: 400px;
    background: rgba(139, 69, 19, 0.1);
    border: none;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8B4513;
    font-style: italic;
    margin: 0;
}

.feature-card .image-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.feature-points {
    padding: 3rem 2rem;
    text-align: center;
    margin: 0;
}

.feature-item {
    padding: 0 1.5rem;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.feature-item h4 {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.feature-item p {
    color: rgba(255,255,255,0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin: 0;
    text-align: center;
}

/* Game Cards Showcase */
.game-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    padding: 2rem 0;
    max-width: 1200px;
    margin: 0 auto;
}

.game-card-stack {
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
}

.game-card-stack:hover {
    transform: translateY(-10px);
}

.card-fan {
    position: relative;
    height: 240px;
    margin-bottom: 4rem;
}

.fan-card {
    position: absolute;
    width: 100%;
    height: 280px;
    background: white;
    border: 3px solid #1e5289;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.fan-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f0f0f0, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-style: italic;
    font-size: 0.9rem;
}

.fan-card.card-1 {
    transform: rotate(-8deg) translateX(-10px);
    z-index: 1;
}

.fan-card.card-2 {
    transform: rotate(0deg);
    z-index: 2;
}

.fan-card.card-3 {
    transform: rotate(8deg) translateX(10px);
    z-index: 1;
}

.game-card-stack:hover .fan-card.card-1 {
    transform: rotate(-12deg) translateX(-15px);
}

.game-card-stack:hover .fan-card.card-3 {
    transform: rotate(12deg) translateX(15px);
}

.game-card-title {
    text-align: center;
    font-size: 1.2rem;
    font-weight: 700;
    color: #043160;
    padding: 0.5rem;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.game-card-stack:hover .game-card-title {
    background: linear-gradient(135deg, #1e5289, #043160);
    color: white;
}


/* Modal Styles for Game Cards */
.game-card-modal {
display: none;
position: fixed;
z-index: 10000;
left: 0;
top: 20px;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.8);
animation: fadeIn 0.3s ease;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}


.game-card-modal .modal-content {
background-color: white;
margin: 6% auto;
padding: 0;
width: 90%;
max-width: 1200px;
max-height: 85vh;
border-radius: 20px;
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
position: relative;
overflow: hidden;
animation: slideIn 0.3s ease;
display: flex;
flex-direction: column;
}

@keyframes slideIn {
from {
    transform: translateY(-50px);
    opacity: 0;
}
to {
    transform: translateY(0);
    opacity: 1;
}
}

.modal-layout {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0;
flex: 1;
overflow: hidden;
}

.modal-images {
background: linear-gradient(135deg, #1e5289, #043160);
padding: 2rem;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
}

.image-carousel {
width: 100%;
position: relative;
}

.carousel-container {
overflow: hidden;
border-radius: 15px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

.carousel-track {
display: flex;
transition: transform 0.4s ease-in-out;
}

.carousel-track img {
width: 100%;
flex-shrink: 0;
object-fit: contain;
background: white;
max-height: 500px;
}

.carousel-btn {
position: absolute;
top: 50%;
transform: translateY(-50%);
background: rgba(255, 255, 255, 0.9);
border: none;
font-size: 2.5rem;
padding: 0.5rem 1rem;
cursor: pointer;
border-radius: 50%;
transition: all 0.3s ease;
z-index: 10;
color: #043160;
}

.carousel-btn:hover {
background: white;
transform: translateY(-50%) scale(1.1);
}

.prev-btn {
left: 10px;
}

.next-btn {
right: 10px;
}

.carousel-dots {
display: flex;
justify-content: center;
gap: 10px;
margin-top: 1rem;
}

.dot {
width: 12px;
height: 12px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.5);
cursor: pointer;
transition: all 0.3s ease;
}

.dot.active {
background: white;
transform: scale(1.3);
}

.modal-info {
padding: 3rem;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
flex: 1;
max-height: 100%;
}

.modal-info h3 {
color: #043160;
font-size: 2rem;
margin-bottom: 2rem;
border-bottom: 3px solid #1e5289;
padding-bottom: 1rem;
}

.info-section {
margin-bottom: 2rem;
}

.info-section h4 {
color: #1e5289;
font-size: 1.3rem;
margin-bottom: 0.8rem;
font-weight: 600;
}

.info-section p, .info-section ul {
color: #333;
line-height: 1.8;
font-size: 1rem;
}

.info-section ul {
padding-left: 1.5rem;
}

.info-section li {
margin-bottom: 0.5rem;
}

.close-modal {
position: absolute;
top: 20px;
right: 30px;
font-size: 3rem;
font-weight: bold;
color: #043160;
cursor: pointer;
z-index: 100;
transition: all 0.3s ease;
background: white;
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
}

.close-modal:hover {
color: #1e5289;
transform: rotate(90deg);
}
/* FLIP CARD MODAL - MANCANTE! */
.flip-card-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.85);
z-index: 10001;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}

.flip-card-modal .modal-content {
position: relative;
background: white;
margin: 2% auto;
width: 90%;
max-width: 600px;
border-radius: 20px;
box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
/* NON usare max-height qui per Safari */
display: block; /* NON flex per Safari */
}

.flip-modal-header {
padding: 20px 25px;
border-bottom: 2px solid #e0e0e0;
display: flex;
justify-content: space-between;
align-items: center;
background: linear-gradient(135deg, #043160, #1e5289);
border-radius: 20px 20px 0 0;
}

.flip-modal-header h3 {
color: white;
margin: 0;
font-size: 1.4rem;
font-weight: 700;
flex: 1;
}

.flip-modal-close {
background: white;
color: #043160;
border: none;
font-size: 2rem;
width: 40px;
height: 40px;
border-radius: 50%;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
transition: all 0.3s ease;
flex-shrink: 0;
margin-left: 15px;
}

.flip-modal-close:hover {
background: #f0f0f0;
transform: rotate(90deg);
}

.flip-modal-image {
padding: 25px;
text-align: center;
background: #f8f9fa;
border-bottom: 1px solid #e0e0e0;
}

.flip-modal-image img {
max-width: 100%;
height: auto;
max-height: 350px;
object-fit: contain;
border-radius: 10px;
}

.flip-modal-body {
padding: 25px;
background: white;
border-radius: 0 0 20px 20px;
/* Safari scroll fix - versione aggressiva */
height: 400px; /* Usa height fisso invece di max-height */
overflow: scroll; /* 'scroll' invece di 'auto' */
-webkit-overflow-scrolling: touch;
overscroll-behavior: contain;
}

.flip-modal-body p {
margin-bottom: 1rem;
line-height: 1.6;
color: #333;
}

.flip-modal-body h4,
.flip-modal-body h5 {
color: #043160;
margin-top: 1.5rem;
margin-bottom: 0.8rem;
}

.flip-modal-body ul,
.flip-modal-body ol {
padding-left: 1.5rem;
margin-bottom: 1rem;
}

.flip-modal-body li {
margin-bottom: 0.5rem;
}

/* RESPONSIVE MOBILE */
@media (max-width: 768px) {
.flip-card-modal {
  padding: 0;
}

.flip-card-modal .modal-content {
  width: 95%;
  margin: 5% auto;
  max-width: none;
}

.flip-modal-header {
  padding: 15px 20px;
}

.flip-modal-header h3 {
  font-size: 1.1rem;
}

.flip-modal-close {
  width: 35px;
  height: 35px;
  font-size: 1.8rem;
}

.flip-modal-image {
  padding: 20px 15px;
}

.flip-modal-image img {
  max-height: 250px;
}

.flip-modal-body {
    height: 300px; /* Altezza fissa anche su mobile */
    overflow: scroll;
  }
}

@media (max-width: 480px) {
.flip-card-modal .modal-content {
  width: 98%;
  margin: 3% auto;
}

.flip-modal-header {
  padding: 12px 15px;
}

.flip-modal-header h3 {
  font-size: 1rem;
}

.flip-modal-close {
  width: 32px;
  height: 32px;
  font-size: 1.5rem;
}

.flip-modal-image {
  padding: 15px;
}

.flip-modal-image img {
  max-height: 200px;
}

.flip-modal-body {
    height: 250px; /* Altezza fissa su mobile piccolo */
    overflow: scroll;
  }
}


/* Responsive Design per Modal */
@media (max-width: 968px) {
.modal-layout {
    grid-template-columns: 1fr;
    flex-direction: column;
}

.modal-images {
    max-height: 40vh;
    min-height: 200px;
}

.modal-info {
    padding: 2rem;
    max-height: none;
}

.carousel-btn {
    font-size: 2rem;
    padding: 0.3rem 0.7rem;
}
}

/* Mobile specifico */
@media (max-width: 768px) {
.game-card-modal {
    padding: 0;
    top: 10px;

}

.game-card-modal .modal-content {
    width: 95%;
    height: 90vh;
    max-height: 90vh;
    margin: 5vh auto;
    border-radius: 15px;
}

.modal-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-images {
    height: 40%;
    padding: 1.5rem;
    overflow: hidden;
}

.modal-info {
    height: 60%;
    padding: 1.5rem;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-info h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.8rem;
    padding-right: 40px;
}

.info-section h4 {
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.info-section p,
.info-section ul {
    font-size: 0.95rem;
    line-height: 1.6;
}

.carousel-btn {
    font-size: 1.8rem;
    padding: 0.4rem 0.8rem;
}

.close-modal {
    top: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
    font-size: 2.5rem;
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}
}

/* Responsive Design */
@media (max-width: 968px) {
    .game-cards-container {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1.5rem;
    }

    .modal-layout {
        grid-template-columns: 1fr;
    }

    .modal-images {
        max-height: 50vh;
    }

    .modal-info {
        padding: 2rem;
    }

    .carousel-btn {
        font-size: 2rem;
        padding: 0.3rem 0.7rem;
    }
}

@media (max-width: 576px) {
    .game-cards-container {
        grid-template-columns: 1fr;
    }

    .card-fan {
        height: 250px;
    }

    .fan-card {
        height: 220px;
    }
}

/* Interactive Game Statistics Container */
.game-stats-container {
border: 4px dashed #063971;
padding: 40px 30px;
background: rgba(206, 225, 247, 0.5);
border-radius: 8px;
margin: 40px auto; 
width: 90%; 
max-width: 1400px; 
}

/* Rows layout */
.game-shapes-row {
display: flex;
gap: 20px;
margin-bottom: 30px;
align-items: flex-start; /* Cambiato per allineare meglio con le caption */
flex-wrap: wrap; /* Permette di andare a capo su schermi piccoli */
}

.game-shapes-row:last-child {
margin-bottom: 0;
}

/* Top row layout */
.top-shapes-row {
justify-content: flex-start;
}

.game-shape-spacer {
flex-grow: 1;
}

/* Shape wrapper con caption */
.game-shape {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}

.game-shape-image {
background-color: #022141;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
border-radius: 8px;
}

.game-shape-image img {
width: 100%;
height: 100%;
object-fit: cover;
}

.game-shape-caption {
font-size: 0.75rem;
color: #333;
text-align: center;
font-style: italic;
max-width: 100%;
line-height: 1.2;
}

/* Dimensioni aumentate */
.shape-large-rect .game-shape-image {
width: 80px;  /* era 50px */
height: 120px; /* era 80px */
}

.shape-small-rect .game-shape-image {
width: 80px;  /* era 50px */
height: 60px;  /* era 40px */
}

/*È la classe in più per dice che se no sballa*/
.shape-dice-rect .game-shape-image {
width: 100px; 
height: 100px; 
}

.shape-circle .game-shape-image {
width: 160px;  /* era 120px */
height: 160px; /* era 120px */
border-radius: 50%;
}

.shape-medium-square .game-shape-image {
width: 160px;  /* era 120px */
height: 160px; /* era 120px */
}

/* Bottom row - clickable cards (molto più grandi) */
.bottom-shapes-row {
gap: 20px;
justify-content: flex-start;
}

.game-info-card {
width: 150px;  /* era 100px */
height: 200px; /* era 100px, ora formato carta */
position: relative;
cursor: pointer;
perspective: 1000px;
flex-shrink: 0;
}

/* Effetto flip quando ha la classe 'flipped' */
.game-info-card.flipped .info-card-front {
transform: rotateY(180deg);
}

.game-info-card.flipped .info-card-back {
transform: rotateY(0deg);
}

.info-card-front,
.info-card-back {
width: 100%;
height: 100%;
position: absolute;
top: 0;
left: 0;
backface-visibility: hidden;
transition: transform 0.6s ease;
border-radius: 8px;
box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.info-card-front {
background-color: #022141;
z-index: 2;
display: flex;
align-items: center;
justify-content: center;
transform: rotateY(0deg);
overflow: hidden;
}

.info-card-front img {
width: 100%;
height: 100%;
object-fit: cover;
}

.info-card-back {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
transform: rotateY(180deg);
display: flex;
align-items: flex-start;
justify-content: flex-start;
padding: 15px;
color: white;
font-size: 0.75rem;
text-align: left;
font-weight: 500;
overflow-y: auto;
}

.info-card-back p {
margin: 0;
line-height: 1.3;
}

/* Caption sotto le card */
.game-info-card-wrapper {
display: flex;
flex-direction: column;
align-items: center;
gap: 8px;
}

.card-caption {
font-size: 0.75rem;
color: #333;
text-align: center;
font-style: italic;
max-width: 150px;
line-height: 1.2;
}

/* Quando info-card-back contiene solo un'immagine */
.info-card-back.image-back {
padding: 0;
align-items: center;
justify-content: center;
background: #022141; /* sfondo scuro come le altre card */
}

.info-card-back.image-back img {
width: 100%;
height: 100%;
object-fit: cover;
}

/* Responsive */
@media (max-width: 1200px) {
.game-stats-container {
    width: 95%;
}

.game-info-card {
    width: 130px;
    height: 170px;
}
}

@media (max-width: 768px) {
.game-shapes-row {
    justify-content: center;
}

.game-stats-container {
    width: 95%;
    padding: 30px 20px;
}

.shape-circle .game-shape-image,
.shape-medium-square .game-shape-image {
    width: 120px;
    height: 120px;
}

.game-info-card {
    width: 110px;
    height: 150px;
}
}

@media (max-width: 480px) {
.game-info-card {
    width: 100px;
    height: 140px;
}

.info-card-back {
    font-size: 0.85rem;
    padding: 10px;
}
}

/* DOWNLOAD CARDS */
.download-card {
    border: 2px solid #d6edf9;
    border-radius: 12px;
    padding: 2rem;
    height: 100%;
    background: white;
    transition: all 0.3s ease;
}

.download-card:hover {
    border-color: #1e5289;
    box-shadow: 0 8px 20px rgba(30, 82, 137, 0.15);
    transform: translateY(-5px);
}

.download-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e5289, #043160);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.download-icon span {
    color: white;
    font-size: 1.8rem;
    font-weight: bold;
}

.download-card h5 {
    color: #043160;
    font-weight: 700;
    margin-bottom: 1rem;
}

.download-card p {
    color: #666;
    margin-bottom: 1.5rem;
}

/* BUTTONS */
.btn-download {
    background: linear-gradient(135deg, #1e5289, #043160);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    display: inline-block;
    text-decoration: none;
}

.btn-download:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(30, 82, 137, 0.3);
    color: white;
}

/* DROPDOWN BUTTONS */
.download-dropdown {
    position: relative;
    display: inline-block;
    margin-bottom: 0.5rem;
    margin-right: 0.5rem;
}

.dropdown-btn-small {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.6rem 1.2rem;
    background: #043160;
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dropdown-btn-small:hover {
    background: #1e5289;
    transform: translateY(-2px);
}

.dropdown-btn-small svg {
    transition: transform 0.3s ease;
}

.download-dropdown.open .dropdown-btn-small svg {
    transform: rotate(180deg);
}

.dropdown-content-small {
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    min-width: 280px;
    background: white;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    margin-bottom: 8px;
    z-index: 1000;
    border: 2px solid #d6edf9;
}

.download-dropdown.open .dropdown-content-small {
    display: block;
    animation: fadeInDropdown 0.2s ease;
}

@keyframes fadeInDropdown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-content-small a {
    display: block;
    padding: 0.75rem 1rem;
    color: #043160;
    text-decoration: none;
    transition: background 0.2s;
    font-size: 0.9rem;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content-small a:last-child {
    border-bottom: none;
}

.dropdown-content-small a:hover {
    background: #e3f2fd;
    color: #043160;
}

.dropdown-content-small a:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-content-small a:last-child {
    border-radius: 0 0 6px 6px;
}

/* INFO BOXES */
.info-box {
    background: #f8f9fa;
    padding: 1.5rem;
    border-left: 4px solid #5bc0de;
    border-radius: 8px;
    margin: 1.5rem 0;
}

.info-box p {
    margin: 0;
    font-style: italic;
    color: #555;
}

/* ACCORDION */
.accordion-item {
    border: 2px solid #d6edf9 !important;
    border-radius: 10px !important;
    margin-bottom: 1rem;
    overflow: hidden;
}

.accordion-button {
    font-weight: 600 !important;
    color: #043160 !important;
    background: #f8f9fa !important;
}

.accordion-button:not(.collapsed) {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb) !important;
    color: #043160 !important;
    box-shadow: none !important;
}

.accordion-button:focus {
    box-shadow: none !important;
    border-color: #d6edf9 !important;
}

.accordion-body {
    background: white !important;
    padding: 1.5rem !important;
}

/* Social Media Cards */
.social-post-card {
    background: white;
    border: 2px solid #e3f2fd;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.social-post-card:hover {
    border-color: #1e5289;
    box-shadow: 0 4px 12px rgba(30, 82, 137, 0.1);
    transform: translateY(-2px);
}

.social-post-card h6 {
    color: #043160;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.collaboration-tag {
    color: #5bc0de;
    font-weight: 600;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Social Stats */
.social-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.stat-badge {
    background: #e3f2fd;
    color: #043160;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-badge.growth {
    background: #c8e6c9;
    color: #2e7d32;
}

/* Public Reactions */
.public-reactions {
    margin-top: 1rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.public-reactions p {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.reaction {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.reaction.positive {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.reaction.negative {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
}

/* Abstract Box */
.abstract-box {
    background: linear-gradient(135deg, #f5f5e8, #e6dbc8);
    padding: 2rem;
    border-radius: 12px;
    border: 4px solid #dda715;
    margin: 2rem 0;
}

.abstract-box h6 {
    color: #423600;
    font-weight: 700;
    margin-bottom: 1rem;
}

.abstract-box p {
    font-style: italic;
    margin-bottom: 1rem;
    text-align: center;
}

.abstract-box p:last-child {
    margin-bottom: 0;
}

.lead-text {
    font-size: 1.1rem;
    font-weight: 500;
    color: #043160;
    margin-bottom: 1.5rem;
}

/* SOCIAL IMAGES - FIX */
.social-images-row {
display: flex;
flex-wrap: wrap;
gap: 30px;
justify-content: center;
margin: 40px 0;
padding: 0 20px;
}

.social-image-item {
flex: 1 1 calc(25% - 30px); 
min-width: 250px; 
max-width: 350px; 
display: flex;
flex-direction: column;
}

.social-image-placeholder {
width: 100%;
aspect-ratio: 3/4; /* Proporzione fissa */
background: rgba(139, 69, 19, 0.1);
border: 2px dashed #d4a574;
border-radius: 10px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: #8B4513;
font-style: italic;
margin: 0 auto 10px auto;
overflow: hidden; /* IMPORTANTE: nasconde overflow */
padding: 10px;
position: relative;
}

.social-image-placeholder img {
width: 100%;
height: 100%;
object-fit: cover; /* Cambiato da contain a cover */
border-radius: 8px;
display: block;
position: absolute;
top: 0;
left: 0;
}

/* Se vuoi mantenere le proporzioni originali senza tagliare */
.social-image-placeholder.contain-mode img {
object-fit: contain;
position: static;
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}

.figure-caption {
font-size: 0.9rem;
color: #333;
text-align: center;
font-style: italic;
line-height: 1.4;
padding: 10px;
margin: 0;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
.social-image-item {
    flex: 1 1 calc(33.333% - 30px);
}
}

@media (max-width: 768px) {
.social-image-item {
    flex: 1 1 calc(50% - 20px);
    max-width: 100%;
}

.social-images-row {
    gap: 20px;
}

.social-image-placeholder {
    aspect-ratio: 3/4; /* Proporzione leggermente diversa su tablet */
}
}

@media (max-width: 480px) {
.social-image-item {
    flex: 1 1 100%;
    max-width: 100%;
}

.social-images-row {
    gap: 15px;
    padding: 0 10px;
}

.social-image-placeholder {
    aspect-ratio: 3/4; /* Quadrate su mobile piccolo */
    max-height: 350px;
}
}

/* Impact Section */
.impact-card-static {
border-top: 8px solid #ff6b6b;
}

/* Impact Statistics */
.impact-stats {
display: flex;
gap: 20px;
margin: 30px 0;
flex-wrap: wrap;
justify-content: center;
}

.stat-card {
background: linear-gradient(135deg, #1a319b 0%, #010041 100%);
color: white;
padding: 15px 20px;
border-radius: 15px;
text-align: center;
min-width: 150px;
flex: 1 1 150px;
max-width: 200px;
box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
transform: translateY(-5px);
box-shadow: 0 12px 30px rgba(102, 126, 234, 0.4);
}

.stat-number {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 8px;
line-height: 1;
}

.stat-label {
font-size: 0.95rem;
font-weight: 500;
opacity: 0.95;
line-height: 1.3;
}

/* Survey Buttons */
.survey-buttons {
display: flex;
gap: 20px;
margin: 30px 0;
flex-wrap: wrap;
justify-content: center;
}

.survey-button {
display: flex;
align-items: center;
gap: 12px;
padding: 16px 28px;
border-radius: 12px;
text-decoration: none;
color: white;
font-weight: 600;
font-size: 1.05rem;
transition: transform 0.3s ease, box-shadow 0.3s ease;
box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
flex: 1 1 250px;
max-width: 350px;
justify-content: center;
}

.survey-button:hover {
transform: translateY(-4px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
color: white;
}

.teacher-button {
background: linear-gradient(135deg, #1a319b 0%, #010041 100%);

}

.student-button {
background: linear-gradient(135deg, #1a319b 0%, #010041 100%);

}

.button-icon {
font-size: 1.5rem;
}

.button-text {
flex: 1;
text-align: center;
}

/* Privacy Buttons */
.privacy-buttons {
display: flex;
gap: 20px;
margin: 25px 0;
flex-wrap: wrap;
justify-content: center;
}

.privacy-button {
display: flex;
align-items: center;
gap: 12px;
padding: 14px 24px;
border-radius: 10px;
text-decoration: none;
color: white;
font-weight: 600;
font-size: 1rem;
transition: transform 0.3s ease, box-shadow 0.3s ease;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
flex: 1 1 220px;
max-width: 320px;
justify-content: center;
}

.privacy-button:hover {
transform: translateY(-3px);
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
color: white;
}

.ita-button {
background: linear-gradient(135deg, #1a319b 0%, #010041 100%);

}

.eng-button {
background: linear-gradient(135deg, #1a319b 0%, #010041 100%);

}

/* Responsive */
@media (max-width: 768px) {
.impact-stats {
    flex-direction: column;
    align-items: center;
}

.stat-card {
    max-width: 100%;
    width: 100%;
}

.survey-buttons,
.privacy-buttons {
    flex-direction: column;
    align-items: stretch;
}

.survey-button,
.privacy-button {
    max-width: 100%;
}
}
/* RESPONSIVE */
@media (max-width: 768px) {
    .page-tabs {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tab-button {
        flex: 1 1 50%;
        max-width: 50%;
    }

    .tab-button:nth-child(2) {
        border-right: none;
    }

    .tab-button:nth-child(3) {
        border-top: 1px solid #dee2e6;
    }

    .citation {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .feature-card .image-placeholder {
        height: 250px;
    }

    .feature-points {
        padding: 2rem 1rem;
    }

    .feature-item {
        padding: 1rem 0.5rem;
        margin-bottom: 2rem;
    }

    .dropdown-content-small {
        min-width: 250px;
        left: 0;
        right: auto;
    }
    .social-stats {
    flex-direction: column;
    }
    
    .stat-badge {
        display: block;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .tab-button {
        flex: 1 1 100%;
        max-width: 100%;
        border-right: none !important;
    }

    .tab-button:not(:last-child) {
        border-bottom: 1px solid #dee2e6;
    }

    .feature-card .image-placeholder {
        height: 200px;
    }

    .feature-item h4 {
        font-size: 1.2rem;
    }
}

/* ============================================
MOBILE RESPONSIVE IMPROVEMENTS
============================================ */

/* Tablets e schermi medi (max 992px) */
@media (max-width: 992px) {
/* Typography */
h2 {
    font-size: 1.8rem;
}

h3 {
    font-size: 1.3rem;
}

h4 {
    font-size: 1.15rem;
}

/* Page tabs */
.page-tabs {
    flex-wrap: wrap;
    gap: 0;
}

.tab-button {
    font-size: 1rem;
    padding: 0.9rem 1.5rem;
}

/* Citations */
.citation {
    padding: 1.5rem;
    font-size: 0.95rem;
}

/* Feature cards */
.feature-card .image-placeholder {
    height: 300px;
}

.feature-points {
    padding: 2rem 1.5rem;
}

/* Game stats container */
.game-stats-container {
    padding: 30px 20px;
}

.game-shapes-row {
    gap: 15px;
}

/* Download cards */
.download-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
}

/* Social post cards */
.social-post-card {
    padding: 1.25rem;
}
}

/* Tablets piccoli e mobile landscape (max 768px) */
@media (max-width: 768px) {
/* Typography */
h2 {
    font-size: 1.6rem;
}

h3 {
    font-size: 1.25rem;
}

/* Page tabs - 2 colonne */
.tab-button {
    flex: 1 1 50%;
    max-width: 50%;
    font-size: 0.95rem;
    padding: 0.8rem 1rem;
}

.tab-button:nth-child(even) {
    border-right: none !important;
}

.tab-button:nth-child(n+3) {
    border-top: 1px solid #dee2e6;
}

/* Citations side by side */
.row.my-5 .col-md-6 {
    margin-bottom: 1rem;
}

.citation {
    padding: 1.25rem 1.5rem;
    font-size: 0.9rem;
}

/* Feature cards */
.feature-card .image-placeholder {
    height: 250px;
}

.feature-points {
    padding: 1.5rem 1rem;
}

.feature-item {
    padding: 1rem 0.5rem;
    margin-bottom: 1.5rem;
}

.feature-icon {
    font-size: 2.5rem;
}

/* ===================================
   GAME CARDS - Dimensioni corrette mobile
   =================================== */
   .game-cards-container {
    grid-template-columns: 1fr; /* Una colonna */
    gap: 3rem;
    max-width: 400px; /* Limita larghezza */
    margin: 0 auto;
}

/* CARTE - Mantieni dimensioni simili a desktop */
.card-fan {
    width: 100%;
    max-width: 280px;
    height: 200px;
    margin: 0 auto 3rem;
    position: relative;
}

.fan-card {
    width: 100%;
    height: 240px;
}

.game-card-title {
    font-size: 1.1rem;
    padding: 0.7rem;
}

/* MODAL */
.game-card-modal{
    top: 10px;
}
    
.game-card-modal .modal-content {
    width: 95%;
    height: 90vh;
    margin: 5% auto;
}

.modal-layout {
    flex-direction: column;
}

.modal-images {
    height: 50%;
}

.modal-info {
    padding: 20px;
    height: 50%;
    overflow-y: auto;
}

.modal-info h3 {
    font-size: 1.5em;
}

.carousel-btn {
    font-size: 18px;
    padding: 8px 12px;
}

/* FIX X CHIUSURA */
.close-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 45px;
    height: 45px;
    font-size: 2.5rem;
    z-index: 100;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #043160;
}
/* ===================================
   FINE GAME CARDS       
   =================================== */

/* Game stats - riorganizzazione */
.top-shapes-row {
    flex-wrap: wrap;
    justify-content: center;
}

.shape-large-rect .game-shape-image {
    width: 70px;
    height: 100px;
}

.shape-small-rect .game-shape-image {
    width: 70px;
    height: 50px;
}

.shape-dice-rect .game-shape-image {
    width: 80px;
    height: 80px;
}

.shape-circle .game-shape-image {
    width: 140px;
    height: 140px;
}

.middle-shapes-row {
    flex-direction: column;
    align-items: center;
}

.bottom-shapes-row {
    justify-content: center;
}

.game-info-card {
    width: 130px;
    height: 170px;
}

.card-caption,
.game-shape-caption {
    font-size: 0.7rem;
}

/* Buttons */
.btn-download {
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    width: 100%;
    text-align: center;
}

.download-dropdown {
    width: 100%;
    display: block;
}

.dropdown-btn-small {
    width: 100%;
    justify-content: center;
}

.dropdown-content-small {
    width: 100%;
    min-width: auto;
    left: 0;
    right: 0;
}

/* Accordion */
.accordion-button {
    font-size: 0.95rem;
    padding: 1rem;
}

.accordion-body {
    padding: 1.25rem !important;
}

/* Social images */
.social-image-item {
    flex: 1 1 calc(50% - 20px);
}

/* Impact stats */
.impact-stats {
    gap: 15px;
}

.stat-card {
    min-width: 130px;
    padding: 12px 16px;
}

.stat-number {
    font-size: 2rem;
}

.stat-label {
    font-size: 0.85rem;
}
}

/* Mobile (max 576px) */
@media (max-width: 576px) {
/* Typography */
h2 {
    font-size: 1.4rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.15rem;
}

h4 {
    font-size: 1.05rem;
}

h5 {
    font-size: 1rem;
}

p {
    font-size: 0.95rem;
}

/* Page tabs - colonna singola per schermi molto piccoli */
.page-tabs {
    flex-direction: column;
}

.tab-button {
    flex: 1 1 100%;
    max-width: 100%;
    padding: 0.9rem;
    font-size: 0.9rem;
    border-right: none !important;
}

.tab-button:not(:last-child) {
    border-bottom: 1px solid #dee2e6;
}

/* Citations */
.citation {
    padding: 1rem 1.25rem;
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.citation-author {
    font-size: 0.9rem;
}

/* Feature cards */
.feature-card .image-placeholder {
    height: 200px;
}

.feature-points {
    padding: 1.25rem 0.75rem;
}

.feature-item {
    padding: 0.75rem 0.5rem;
    margin-bottom: 1.25rem;
}

.feature-item h4 {
    font-size: 1.1rem;
}

.feature-item p {
    font-size: 0.9rem;
}

.feature-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
}

/* Game cards - 1 colonna */
.game-cards-container {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 1rem 0;
}

/* Game stats - layout verticale */
.game-stats-container {
    padding: 20px 15px;
}

.game-shapes-row {
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.top-shapes-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.game-shape-spacer {
    display: none;
}

.shape-large-rect .game-shape-image {
    width: 60px;
    height: 90px;
}

.shape-small-rect .game-shape-image {
    width: 60px;
    height: 45px;
}

.shape-dice-rect .game-shape-image {
    width: 70px;
    height: 70px;
}

.shape-circle .game-shape-image,
.shape-medium-square .game-shape-image {
    width: 120px;
    height: 120px;
}

.middle-shapes-row {
    width: 100%;
}

.game-info-card-wrapper {
    width: 100%;
    max-width: 150px;
}

.bottom-shapes-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    width: 100%;
}

.game-info-card {
    width: 100%;
    max-width: 150px;
    height: 200px;
    margin: 0 auto;
}

.info-card-back {
    font-size: 0.7rem;
    padding: 10px;
}

.card-caption {
    font-size: 0.65rem;
}

/* Download cards */
.download-card {
    padding: 1.25rem;
}

.download-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 1rem;
}

.download-icon span {
    font-size: 1.5rem;
}

.download-card h5 {
    font-size: 1.05rem;
}

.download-card p {
    font-size: 0.9rem;
}

/* Dropdowns */
.dropdown-content-small {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    margin: 0;
    border-radius: 20px 20px 0 0;
    max-height: 50vh;
    overflow-y: auto;
}

.dropdown-content-small a {
    padding: 1rem;
    font-size: 1rem;
}

/* Info boxes */
.info-box {
    padding: 1.25rem;
    font-size: 0.9rem;
}

/* Social post cards */
.social-post-card {
    padding: 1rem;
}

.social-post-card h6 {
    font-size: 1rem;
}

.social-post-card p {
    font-size: 0.9rem;
}

.social-stats {
    gap: 0.4rem;
}

.stat-badge {
    padding: 0.35rem 0.7rem;
    font-size: 0.8rem;
}

.reaction {
    padding: 0.6rem;
    font-size: 0.85rem;
}

/* Social images - 1 colonna */
.social-image-item {
    flex: 1 1 100%;
    max-width: 100%;
}

.social-image-placeholder {
    max-height: 350px;
}

/* Abstract box */
.abstract-box {
    padding: 1.5rem;
}

.abstract-box h6 {
    font-size: 1rem;
}

.abstract-box p {
    font-size: 0.9rem;
}

/* Impact stats */
.impact-stats {
    flex-direction: column;
    gap: 12px;
}

.stat-card {
    width: 100%;
    max-width: 100%;
    min-width: auto;
    padding: 15px;
}

.stat-number {
    font-size: 2.5rem;
}

.stat-label {
    font-size: 0.9rem;
}

/* Survey and privacy buttons */
.survey-buttons,
.privacy-buttons {
    flex-direction: column;
    gap: 12px;
}

.survey-button,
.privacy-button {
    width: 100%;
    max-width: 100%;
    padding: 14px 20px;
    font-size: 0.95rem;
}

.button-icon {
    font-size: 1.3rem;
}

/* Accordion */
.accordion-button {
    font-size: 0.9rem;
    padding: 0.85rem;
}

.accordion-body {
    padding: 1rem !important;
    font-size: 0.9rem;
}

/* Lists */
ul, ol {
    padding-left: 1.25rem;
}

li {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
}

/* Mobile piccolo - Game Cards (max 480px) */
@media (max-width: 480px) {
/* GAME CARDS specifico per mobile piccolo */
.game-cards-container {
    grid-template-columns: 1fr;
    max-width: 320px;
}

.card-fan {
    width: 100%;
    max-width: 240px;
    height: 180px;
    margin: 0 auto 2.5rem;
}

.fan-card {
    width: 100%;
    height: 200px;
}

.game-card-title {
    font-size: 1rem;
    padding: 0.6rem;
}

/* Modal quasi full screen */
.game-card-modal{
    top: 10px;
}
.game-card-modal .modal-content {
    width: 98%;
    height: 95vh;
    margin: 2.5% auto;
}

.modal-info {
    padding: 15px;
}

.carousel-btn {
    font-size: 16px;
    padding: 6px 10px;
}

/* X ancora più grande su mobile piccolo */
.close-modal {
    width: 50px;
    height: 50px;
    font-size: 2.8rem;
    top: 8px;
    right: 8px;
}
}

/* Mobile molto piccoli (max 400px) */
@media (max-width: 400px) {
h2 {
    font-size: 1.3rem;
}

.tab-button {
    padding: 0.8rem;
    font-size: 0.85rem;
}

.game-info-card {
    width: 110px;
    height: 160px;
}

.info-card-back {
    font-size: 0.65rem;
    padding: 8px;
}

.bottom-shapes-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.stat-number {
    font-size: 2rem;
}
}

/* Mobile molto piccolo (max 380px) */
@media (max-width: 380px) {
.card-fan {
    max-width: 220px;
    height: 160px;
}

.fan-card {
    height: 180px;
}

.game-card-title {
    font-size: 0.95rem;
}
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
/* Aumenta le aree touch */
.tab-button {
    min-height: 48px;
}

.btn-download,
.dropdown-btn-small,
.survey-button,
.privacy-button {
    min-height: 48px;
}

.game-card-stack,
.game-info-card {
    touch-action: manipulation;
}

/* Rimuovi hover effects su touch */
.game-card-stack:hover,
.tab-button:hover,
.btn-download:hover {
    transform: none;
}

/* Feedback visivo al tap */
.game-card-stack:active {
    opacity: 0.8;
}

.tab-button:active,
.btn-download:active {
    transform: scale(0.98);
}
}

/* Landscape orientation su mobile */
@media (max-width: 896px) and (orientation: landscape) {
.feature-card .image-placeholder {
    height: 250px;
}
}

/* Print styles */
@media print {
.page-tabs,
.close-modal,
.carousel-btn,
.carousel-dots {
    display: none !important;
}

.page-content {
    display: block !important;
}

.game-card-modal {
    position: relative !important;
    display: none !important;
}
}