/*
 * ScorpionGames Website Stylesheet
 */

/* Root variables */
:root {
    --primary-color: #0b3d91;
    --secondary-color: #1e90ff;
    --accent-color: #66d9e8;
    --text-color: #333333;
    --light-bg: #f8f9fa;
    --nav-height: 70px;
    --max-width: 1200px;
    --border-radius: 8px;
}

/* Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

    a:hover {
        color: var(--secondary-color);
    }

/* Header / Nav */
header {
    background-color: var(--primary-color);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 100;
}

    header nav {
        width: 100%;
        max-width: var(--max-width);
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 1rem;
    }

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-size: 1.6rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

    .logo img {
        width: 36px;
        height: 36px;
    }

nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

    nav ul li a {
        color: #fff;
        font-weight: 500;
        transition: opacity .2s ease;
    }

        nav ul li a:hover {
            opacity: .75;
        }

/* Hero */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    height: calc(100vh - var(--nav-height));
    padding: 0 1rem;
    background-image: url('hero.png');
    background-size: cover;
    background-position: center;
    position: relative;
}

    .hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(0,0,0,.55);
    }

    .hero h1 {
        font-size: 3rem;
        font-weight: 700;
        margin-bottom: .5rem;
        z-index: 1;
    }

    .hero p {
        font-size: 1.25rem;
        margin-bottom: 1.5rem;
        z-index: 1;
    }

    .hero .cta-button {
        background: var(--secondary-color);
        color: #fff;
        padding: .75rem 1.5rem;
        border: none;
        border-radius: var(--border-radius);
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        z-index: 1;
        transition: background-color .2s ease, transform .1s ease;
    }

        .hero .cta-button:hover {
            background: #1879d4;
            transform: scale(1.04);
        }

/* Container & sections */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

/* Cards grid (giochi) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transition: transform .2s ease, box-shadow .2s ease;
    display: flex;
    flex-direction: column;
}

    .card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 15px rgba(0,0,0,.15);
    }

    .card img {
        width: 100%;
        height: auto;
        max-height: 220px;
        object-fit: contain;
        display: block;
    }

.card-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

    .card-body h3 {
        font-size: 1.3rem;
        font-weight: 600;
        margin-bottom: .5rem;
        color: var(--primary-color);
    }

    .card-body p {
        flex: 1;
        margin-bottom: 1rem;
        overflow-wrap: anywhere;
    }

    .card-body .price {
        font-weight: 700;
        color: var(--secondary-color);
        margin-bottom: .5rem;
    }

    .card-body .btn {
        align-self: flex-start;
        background: var(--primary-color);
        color: #fff;
        padding: .5rem 1rem;
        border-radius: var(--border-radius);
        font-weight: 500;
        transition: background-color .2s ease;
    }

        .card-body .btn:hover {
            background: #093075;
        }

/* About */
.about-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

    .about-section p {
        font-size: 1.1rem;
    }

.about-highlight {
    font-weight: 600;
    color: var(--primary-color);
}

/* Blog cards (se usi blog.html) */
.blog-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.blog-card {
    background: #fff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,.1);
    transition: transform .2s ease;
}

    .blog-card:hover {
        transform: translateY(-5px);
    }

    .blog-card img {
        width: 100%;
        height: 160px;
        object-fit: cover;
    }

.blog-card-body {
    padding: 1rem;
}

    .blog-card-body h3 {
        font-size: 1.3rem;
        margin-bottom: .5rem;
        color: var(--primary-color);
    }

    .blog-card-body .meta {
        font-size: .85rem;
        color: #666;
        margin-bottom: .75rem;
    }

/* Footer */
footer {
    background: var(--primary-color);
    color: #fff;
    padding: 1.5rem 0;
    text-align: center;
    margin-top: 2rem;
}

    footer p {
        font-size: .85rem;
    }

/* Social */
.social-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

.social-link {
    display: flex;
    align-items: center;
    gap: .5rem;
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    transition: color .2s ease;
}

    .social-link:hover {
        color: var(--secondary-color);
        text-decoration: none;
    }

    .social-link .social-icon {
        width: 32px;
        height: 32px;
        fill: var(--secondary-color);
    }

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.4rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    nav ul {
        gap: 1rem;
    }
}

/* Mobile nav fix (<=600px): logo visibile + menu su una riga con wrap */
@media (max-width: 600px) {
    header {
        padding: 0.5rem;
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

        header .logo {
            font-size: 1rem;
            margin: 0;
            display: flex;
            align-items: center;
            gap: .5rem;
        }

        header nav {
            display: flex;
            flex-direction: row;
            flex-wrap: wrap;
            gap: .5rem;
            justify-content: space-between;
            align-items: center;
        }

            header nav ul {
                display: flex;
                flex-direction: row;
                flex-wrap: wrap;
                margin: 0;
                padding: 0;
                gap: .5rem;
                list-style: none;
            }

                header nav ul li a {
                    font-size: .9rem;
                    padding: .3rem;
                    white-space: nowrap;
                    display: inline-block;
                }

    .hero {
        height: auto;
        padding: 4rem .5rem;
    }

        .hero h1 {
            font-size: 2rem;
        }

        .hero p {
            font-size: 1rem;
        }

        .hero .cta-button {
            font-size: .9rem;
            padding: .5rem 1rem;
        }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .card {
        margin: 0 auto;
    }
}

/* === Notizie (hub & changelog) === */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.news-game-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

    .news-game-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  background-color: #fff;
}

.news-game-body {
    padding: 1rem;
    flex: 1;
}

.btn {
    display: inline-block;
    padding: .6rem 1rem;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: background-color .2s ease, transform .05s ease;
}

    .btn:hover {
        background: #1879d4;
        transform: translateY(-1px);
    }

/* Changelog cards */
.version-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    margin: 1rem 0;
}

    .version-card h3 {
        color: var(--primary-color);
        margin-bottom: .25rem;
    }

.badge {
    display: inline-block;
    font-size: .75rem;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: var(--accent-color);
    color: #003a46;
    vertical-align: middle;
    margin-left: .35rem;
}

.version-meta {
    font-size: .85rem;
    color: #666;
    margin-bottom: .75rem;
}

.tag {
    display: inline-block;
    font-size: .7rem;
    padding: .1rem .45rem;
    border-radius: 6px;
    background: #eef5ff;
    color: #0b3d91;
    margin-right: .35rem;
}
