﻿body {
    margin: 0;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    background: #e9eef3;
    color: #243447;
}

a {
    color: #1f5f8b;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

.wrapper {
    width: 96%;
    max-width: 1400px;
    margin: 20px auto;
    box-sizing: border-box;
}

.site-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.sidebar {
    width: 280px;
    flex: 0 0 280px;
}

.main-content {
    flex: 1;
    min-width: 0;
    width: calc(100% - 304px);
    box-sizing: border-box;
}

/* Pannelli generici */

.panel {
    background: #ffffff;
    border: 1px solid #d5dee8;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(36, 52, 71, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

/* Brand / intestazione sidebar */

.site-brand {
    background: linear-gradient(180deg, #1f5f8b 0%, #17496b 100%);
    color: #ffffff;
    padding: 20px 18px;
}

.site-brand-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.site-brand-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    line-height: 1;
}

.site-brand-text {
    min-width: 0;
    flex: 1;
}

.site-brand-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.02;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.site-brand-title a {
    color: #ffffff;
    text-decoration: none;
}

.site-brand-title a:hover {
    text-decoration: none;
}

.site-brand .brand-line {
    display: block;
    white-space: normal;
}

.site-brand .brand-line-small {
    display: block;
    font-size: 22px;
    line-height: 1.05;
}

.site-brand-tagline,
.site-brand p {
    margin: 10px 0 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #dbeaf5;
}

/* Box laterali */

.side-box {
    padding: 18px;
}

.side-box h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 18px;
    color: #17496b;
    border-bottom: 2px solid #dbe5ee;
    padding-bottom: 8px;
}

/* Menu verticale */

.vertical-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vertical-menu li {
    margin-bottom: 8px;
}

.vertical-menu a {
    display: block;
    padding: 11px 14px;
    background: #f4f7fa;
    border: 1px solid #d7e1ea;
    border-radius: 10px;
    color: #243447;
    font-weight: 600;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.vertical-menu a:hover {
    background: #e8f1f8;
    text-decoration: none;
}

.vertical-menu a.active {
    background: #1f5f8b;
    color: #ffffff;
    border-color: #1f5f8b;
}

/* Contenitori contenuto */

.content-box {
    background: #ffffff;
    border: 1px solid #d5dee8;
    border-radius: 14px;
    box-shadow: 0 6px 18px rgba(36, 52, 71, 0.08);
    padding: 22px;
    margin-bottom: 20px;
    box-sizing: border-box;
    max-width: 100%;
}

.content-box h1 {
    margin-top: 0;
    margin-bottom: 14px;
    color: #17496b;
    font-size: 32px;
    line-height: 1.15;
}

.content-box h2 {
    margin-top: 0;
    color: #17496b;
    font-size: 28px;
    line-height: 1.2;
}

.content-box h3 {
    color: #243447;
}

.content-box p {
    line-height: 1.7;
}

/* Nota pagina / breadcrumb semplice */

.page-note {
    background: #f5f8fb;
    border: 1px solid #d7e3ed;
    border-left: 6px solid #1f5f8b;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
    color: #425466;
    line-height: 1.7;
}

.page-note a {
    font-weight: 600;
}

/* Blocchi categorie */

.categoria-box {
    margin-bottom: 34px;
    padding-bottom: 24px;
    border-bottom: 1px solid #dde6ee;
}

.categoria-box:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.categoria-box h2 {
    font-size: 24px;
    margin-bottom: 16px;
}

.categoria-box h2 a {
    color: #17496b;
}

.categoria-box h2 a:hover {
    text-decoration: underline;
}

/* Lista giochi */

.lista-giochi {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.gioco-card {
    background: #fbfcfe;
    border: 1px solid #d9e2eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(36, 52, 71, 0.05);
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.gioco-card:hover {
    background: #ffffff;
    border-color: #7ea6c4;
    box-shadow: 0 16px 30px rgba(31, 95, 139, 0.22);
}

.gioco-card .card-image {
    width: 100%;
    height: auto;
    overflow: hidden;
    background: #edf2f7;
}

.gioco-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease, filter 0.35s ease;
    filter: saturate(0.95);
}

.gioco-card:hover img {
    transform: scale(0.9);
    filter: brightness(1.05) saturate(1.10);
}

.card-body {
    padding: 14px;
}

.gioco-card h2,
.gioco-card h3,
.game-title {
    margin: 0 0 8px 0;
    font-size: 17px;
    line-height: 1.35;
    color: #243447;
}

.gioco-card h2 a,
.gioco-card h3 a,
.game-title a {
    color: #243447;
}

.gioco-card p {
    margin: 0 0 10px 0;
    font-size: 14px;
    line-height: 1.5;
    color: #5b6b7d;
}

.gioco-card p:last-child {
    margin-bottom: 0;
}

.gioco-card .game-link a {
    font-weight: 600;
}

/* Pulsanti / link azione */

.link-categoria,
.btn {
    display: inline-block;
    margin-top: 16px;
    padding: 10px 14px;
    background: #1f5f8b;
    color: #ffffff;
    border-radius: 10px;
    font-weight: 600;
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.link-categoria:hover,
.btn:hover {
    background: #17496b;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(31, 95, 139, 0.18);
}

/* Paginazione */

.paginazione {
    margin-top: 24px;
}

.paginazione a,
.paginazione strong {
    display: inline-block;
    padding: 9px 12px;
    margin-right: 6px;
    margin-bottom: 6px;
    border: 1px solid #d0dae4;
    border-radius: 10px;
    background: #ffffff;
    color: #243447;
    font-weight: 600;
}

.paginazione a:hover {
    text-decoration: none;
    background: #eef4f9;
}

.paginazione strong {
    background: #1f5f8b;
    color: #ffffff;
    border-color: #1f5f8b;
}

/* Pagina gioco */

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 18px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.game-header h1,
.game-header h2 {
    margin: 0;
    flex: 1;
}

.game-description-text {
    background: #f5f8fb;
    border: 1px solid #d7e3ed;
    border-left: 6px solid #1f5f8b;
    border-radius: 12px;
    padding: 16px;
    margin-top: 24px;
    margin-bottom: 18px;
    color: #425466;
    line-height: 1.7;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.game-description-text h2 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 22px;
    color: #17496b;
}

.game-description-text p:last-child {
    margin-bottom: 0;
}


.game-frame-wrap {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
}

.game-frame-wrap iframe {
    width: 100%;
    height: 820px;
    border: 1px solid #d4dde7;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
    display: block;
    max-width: 100%;
    box-sizing: border-box;
}

/* Footer */

.footer {
    margin-top: 24px;
    background: #243447;
    color: #dce6ef;
    border-radius: 14px;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
}

.footer-col {
    padding: 20px;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col:last-child {
    border-right: 0;
}

.footer-col h4 {
    margin-top: 0;
    color: #ffffff;
}

.footer-col p,
.footer-col a {
    color: #dce6ef;
    line-height: 1.6;
}

/* Utility semplici */

.text-center {
    text-align: center;
}

.mt-0 {
    margin-top: 0;
}

.mb-0 {
    margin-bottom: 0;
}

/* Responsive */

@media screen and (max-width: 1200px) {
    .lista-giochi {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media screen and (max-width: 980px) {
    .site-layout,
    .footer-grid,
    .game-header {
        display: block;
    }

    .sidebar,
    .main-content {
        width: auto;
        flex: none;
    }

    .game-header .btn {
        margin-top: 12px;
    }

    .game-frame-wrap iframe {
        height: 620px;
    }

    .footer-col {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .footer-col:last-child {
        border-bottom: 0;
    }
}

@media screen and (max-width: 700px) {
    .wrapper {
        width: 94%;
        margin: 14px auto;
    }

    .site-brand {
        padding: 18px 16px;
    }

    .site-brand-inner {
        gap: 10px;
    }

    .site-brand-icon {
        width: 46px;
        height: 46px;
        flex: 0 0 46px;
        font-size: 24px;
        border-radius: 12px;
    }

    .site-brand-title {
        font-size: 22px;
    }

    .site-brand .brand-line-small {
        font-size: 20px;
    }

    .site-brand-tagline,
    .site-brand p {
        font-size: 12px;
        line-height: 1.4;
    }

    .content-box {
        padding: 18px;
    }

    .content-box h1 {
        font-size: 28px;
    }

    .content-box h2 {
        font-size: 24px;
    }

    .lista-giochi {
        grid-template-columns: 1fr;
    }

    .gioco-card .card-image,
    .gioco-card img {
        height: 190px;
    }

    .paginazione a,
    .paginazione strong {
        padding: 8px 10px;
    }
}

.game-description-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.game-description-image {
    width: 280px;
    flex: 0 0 280px;
}

.game-description-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid #d7e3ed;
    box-shadow: 0 6px 16px rgba(36, 52, 71, 0.08);
}

.game-description-content {
    flex: 1;
    min-width: 0;
}

.game-description-text {
    margin-top: 24px;
}

.game-description-text h2 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 22px;
    color: #17496b;
}

.game-description-content p:first-child {
    margin-top: 0;
}

.game-description-content p:last-child {
    margin-bottom: 0;
}

@media screen and (max-width: 700px) {
    .game-description-layout {
        display: block;
    }

    .game-description-image {
        width: 100%;
        max-width: 320px;
        margin: 0 auto 16px auto;
    }
}