:root {
    --color-white: #FFFFFF;
    --color-dark-blue: #221685;
    --color-light-blue: #008DE1;
    --color-dark: #121212;
    --color-gray: #f4f5f7;
    --color-text: #333333;
    --font-main: 'Outfit', sans-serif;
    --transition: all 0.3s ease;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(34, 22, 133, 0.15);
}

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

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-gray);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header & Nav */
.header {
    background-color: var(--color-dark-blue);
    color: var(--color-white);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
}

.header.scrolled {
    padding: 0.7rem 0;
    background-color: rgba(34, 22, 133, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--color-white);
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-year {
    font-size: 0.8rem;
    font-weight: 300;
    color: var(--color-light-blue);
    letter-spacing: 2px;
}

.logo-img {
    height: 45px;
    width: auto;
}

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

.main-nav a {
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: var(--color-light-blue);
    transition: var(--transition);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--color-light-blue);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-white);
    margin: 5px 0;
    transition: var(--transition);
}

/* Main Content area */
.main-content {
    flex: 1;
}

/* Hero Section */
.hero {
    color: var(--color-white);
    padding: 8rem 0 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-bg-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(18, 22, 50, 0.6);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -50px;
    left: -10%;
    width: 120%;
    height: 100px;
    background-color: var(--color-gray);
    transform: rotate(-3deg);
    z-index: 3;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.hero h1 span {
    color: var(--color-light-blue);
}

.hero p {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 2rem;
    font-weight: 300;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--color-light-blue);
    color: var(--color-white);
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 2px solid transparent;
}

.btn:hover {
    background-color: transparent;
    border-color: var(--color-light-blue);
    color: var(--color-light-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 141, 225, 0.3);
}

/* Page Headers */
.page-header {
    background-color: var(--color-dark-blue);
    color: var(--color-white);
    padding: 4rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 3rem;
    text-transform: uppercase;
    font-weight: 800;
}

/* Page Content */
.page-content {
    background-color: var(--color-white);
    padding: 3rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-top: -2rem;
    margin-bottom: 4rem;
    position: relative;
    z-index: 10;
}

.page-content h2 {
    color: var(--color-dark-blue);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 2rem;
}

.page-content p {
    margin-bottom: 1rem;
}

/* Grid System for components */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* Fix Markdown wrapping grid items in <p> */
.grid > p {
    display: contents;
}

/* Cards (News, Matches) */
.card {
    background-color: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border-top: 4px solid var(--color-light-blue);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    color: var(--color-dark-blue);
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.card-date {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: block;
}

.card a.read-more {
    color: var(--color-light-blue);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.card a.read-more:hover {
    color: var(--color-dark-blue);
}

/* Player Grid */
.player-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
    margin-bottom: 3rem;
    background-color: var(--color-white);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

/* Nasconde eventuali <p> generati dal markdown che potrebbero sfasare la griglia */
.player-grid>p {
    display: none !important;
    margin: 0;
    padding: 0;
}

.player-card {
    text-align: center;
    background-color: transparent;
    padding: 0.5rem;
    flex: 0 0 calc(25% - 1.5rem);
    max-width: calc(25% - 1.5rem);
    box-sizing: border-box;
}

.player-card img {
    width: 100%;
    height: auto;
    border: 3px solid var(--color-dark-blue);
    /* Bordo blu del sito */
    border-radius: 4px;
    margin-bottom: 0.8rem;
    object-fit: cover;
    aspect-ratio: 3/4;
    background-color: #fff;
}

.player-name {
    font-weight: 800;
    color: var(--color-dark-blue);
    font-size: 1.1rem;
    margin-bottom: 0.2rem;
    line-height: 1.2;
}

.player-dob {
    font-size: 0.9rem;
    color: #111;
    font-weight: 600;
}

.player-role {
    color: var(--color-light-blue);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.2rem;
}

/* Footer */
@media (max-width: 992px) {
    .player-card {
        flex: 0 0 calc(33.333% - 1.33rem);
        max-width: calc(33.333% - 1.33rem);
    }
}

@media (max-width: 768px) {
    .player-card {
        flex: 0 0 calc(50% - 1rem);
        max-width: calc(50% - 1rem);
    }
}

@media (max-width: 480px) {
    .player-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Footer */
/* --- SPONSOR CAROUSEL --- */
.sponsor-carousel {
    background-color: var(--color-light);
    padding: 3rem 0;
    overflow: hidden;
    position: relative;
    border-top: 1px solid #eaeaea;
}

.sponsor-track {
    display: flex;
    width: max-content;
    animation: scroll-left 30s linear infinite;
}

.sponsor-track:hover {
    animation-play-state: paused;
}

.sponsor-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 3rem;
    height: 80px;
    text-decoration: none;
}

.sponsor-logo img {
    max-height: 100%;
    max-width: 200px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.7);
    transition: all 0.3s ease;
}

.sponsor-logo:hover img {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.05);
}

@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 4rem 0 0;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h3 {
    color: var(--color-light-blue);
    margin-bottom: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.footer ul {
    list-style: none;
}

.footer ul li {
    margin-bottom: 0.8rem;
}

.footer ul a {
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.footer ul a:hover {
    color: var(--color-white);
    padding-left: 5px;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #bbb;
    text-decoration: none;
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--color-white);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #0a0a0a;
    text-align: center;
    padding: 1.5rem;
    font-size: 0.9rem;
    color: #888;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-dark-blue);
        padding: 1rem 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
        animation: slideDown 0.3s ease;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

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

    .page-content {
        padding: 1.5rem;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Forms */
.open-day-panel {
    background-color: #e8f4fc;
    border-left: 5px solid var(--color-light-blue);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: var(--shadow-sm);
}

.open-day-panel h3 {
    color: var(--color-dark-blue);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.open-day-panel ul {
    list-style-type: none;
    padding-left: 0;
}

.open-day-panel li {
    margin-bottom: 0.5rem;
}

.contact-form {
    background: var(--color-white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    margin-top: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--color-dark-blue);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    color: var(--color-text);
    transition: var(--transition);
    background-color: #fafafa;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-light-blue);
    box-shadow: 0 0 0 3px rgba(0, 141, 225, 0.2);
    background-color: var(--color-white);
}

.checkbox-group {
    margin-bottom: 1.5rem;
}

.checkbox-options {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400 !important;
    color: var(--color-text) !important;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 1.2rem;
    height: 1.2rem;
    accent-color: var(--color-light-blue);
    cursor: pointer;
}

.btn-submit {
    width: 100%;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 1rem;
    border: none;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
}

.page-info {
    font-weight: 600;
    color: var(--color-dark-blue);
    font-size: 1.1rem;
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--color-light-blue);
    color: var(--color-light-blue);
}

.btn-outline:hover {
    background-color: var(--color-light-blue);
    color: var(--color-white);
}

.btn.disabled,
.btn-outline.disabled {
    border-color: #ccc;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
    transform: none;
    box-shadow: none;
}

/* Share Button */
.btn-share {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-gray);
    color: var(--color-dark-blue);
    border: 1px solid #ddd;
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font-main);
    font-size: 0.95rem;
}

.btn-share:hover {
    background-color: var(--color-light-blue);
    color: var(--color-white);
    border-color: var(--color-light-blue);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-share svg {
    width: 18px;
    height: 18px;
}

/* Scroll Reveal Animations */
.reveal {
    opacity: 0;
    visibility: hidden;
}

.reveal.active {
    animation: fadeUpReveal 0.8s ease-out forwards;
    visibility: visible;
}

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