@media screen and (min-width: 768px) and (max-width: 1024px) {

/* Tema chiaro di default */
:root {
  color-scheme: light;
}

/* Stile generale */
body {
    font-family: Arial, sans-serif;
    background-color: #f0f8ff; /* Azzurro chiaro */
    text-align: center;
    padding: 0;
    margin: 0;

}

/* Barra superiore */
.top_bar {
    width:100%;
    background-color: #2F4F4F; /* Grigio scuro tendente al verde */
    padding: 0px;
    margin-right:0;
    display: flex;
    position:relative;
    align-items: center;
    height:10vh;
    height:10dvh;
     
}

.logo_aracne{
    position:absolute;
    left:30px;
    display:flex;
    object-fit:cover;
    width:auto;
    height:100%;
}
.icona_login{
    display:block;
    object-fit:cover;
    justify-items:center;
    align-items:center;
    width:40px;
    height:40px;
    
}
.svg_login{
    width:100%;
    height:100%;
}

.titolo_obladart{
    position:absolute;
    right:45%;
}
.titolo_obladart h3{
    color:white;
}

/* Box per login/logout */
.box_auth {
    position:absolute;
    display: flex;
    gap:10px;
    right:3%;
}

/* Contenitore centrale */
.container {
    background-color: cadetblue;
    padding: 10px;
    border-radius: 15px;
    height:auto;
    margin: 0;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.3);
}

/* Titolo */
h1 {
    color: white;
    font-size: 1.8em;
    line-height:0.8;
}

/* Paragrafo descrittivo */
p {
    color: white;
    font-size: 1.2em;
    margin-bottom: 5px;
}

/* Pulsante Esplora */
.button_explore {
    padding: 8px 14px;
    font-size: 1.1em;
    font-weight: bold;
    background-color: #ffc107; /* Giallo ocra */
    color: black;
    border: 2px solid #d39e00;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

.button_explore:hover {
    background-color: #d39e00;
    transform: scale(1.05);
}

/* Stile base per i pulsanti di autenticazione */
.button_auth {
    padding: 5px 8px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

/* Stile per il pulsante di Logout */
.button_auth.logout {
    background-color: #d9534f;
    color: white;
    border: 2px solid #b52b27;
}

.button_auth.logout:hover {
    background-color: #b52b27;
    transform: scale(1.05);
}

/* Stile per il pulsante di Login */
.button_auth.login {
    background:none;
    color: white;
    border: 2px solid #3e5c5d;
}

.button_auth.login:hover {
    background-color: #4a6d6e;
    transform: scale(1.05);
}

/* Stile per il pulsante di Registrazione */
.button_auth.register {
    background-color: #ffc107;
    color: black;
    border: 2px solid #d39e00;
}

.button_auth.register:hover {
    background-color: #d39e00;
    transform: scale(1.05);
}

/*Icona caricamento */
#loading {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    top: 0;
    left: 0;
    z-index: 9999;
}

.spinner-container {
    position: relative;
    width: 500px; /* stessa larghezza delle immagini */
    height: 500px; /* stessa altezza delle immagini */
}

.spinner-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
}

/* Solo l'immagine rotante gira */
.rotating {
    transform-origin: 44.7% 24.6%;
    animation: spin 10s linear infinite;
}


@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* Struttura generale */
.media-section {
    display: flex;
    width: 100%;
    height:90vh;
    height:90dvh;
    padding: 0px ;
    margin:0px;
    background: linear-gradient(135deg, #94dee0, #203a43, white); /* sfondo sfumato moderno */
    flex-direction:column;
    align-items: center;
}
.row1{
    display: flex;
    width: 90%;
    height:45vh;
    height:45dvh;
    gap:40px;
    padding: 0px;
    margin:10px;
    justify-content: center;
    align-items: center;
    flex-direction:row;
    object-fit:contain;
    
    
     
}
.row2{
    display: flex;
    width: 100%;
    height:45vh;
    height:45dvh;
    padding: 0px ;
    
    justify-content: center;
    align-items: center;
    flex-direction:column; 
    
    
}

#column1_mobile{
    display:flex;

    
}
#column2_mobile{
    display:flex;
    
    
}
#column3_mobile{
    
    
    height:100%;
    width:70%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0px;
    margin:0px;
    gap:20px;
    
    flex-direction:column;
    
}

.hover-box {
    display:flex;
    width: 100%;
    max-width: 450px;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    background-color: white !important;
    transition: transform 0.4s ease, box-shadow 0.4s ease;

}

.hover-box:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}


.hover-box img,
.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Hover text comune */
.hover-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px;
    border-radius: 12px;

    font-family: 'Segoe UI', sans-serif;
    letter-spacing: 0.5px;
    line-height: 1.4;

    font-size: 14px;
    font-weight: 600;
    text-align: center;
    max-width: 80%;
    width: 250px;
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.hover-box:hover .hover-text {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.02);
}



/* Griglia 2x2 */
.image-grid-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-grid {
    display: grid;
    width: 100%;
    height: 100%;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    z-index: 1;
}

.grid-item {
    position: relative;
}

/* Croce divisoria */
.cross-line {
    position: absolute;
    background-color: #888;
    z-index: 2;
}

.cross-line.vertical {
    width: 1px;
    height: 100%;
    left: 50%;
    top: 0;
    transform: translateX(-0.5px);
}

.cross-line.horizontal {
    height: 1px;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-0.5px);
}




.video-box {
    aspect-ratio: 16 / 9;
}

.video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    background:black;
    border:1px solid black;
}



}




