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

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* ==================== INTERNAL PAGE HEADER ==================== */
.internal-header {
    background-color: #8B0000;
    padding: 20px 5% 10px 5%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.internal-header a {
    display: flex;
    align-items: center;
}

.internal-header-logo {
    height: 160px;
    width: auto;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.internal-header-logo:hover {
    transform: scale(1.05);
    opacity: 0.9;
}

/* Responsive: tablet */
@media (max-width: 1024px) {
    .internal-header-logo {
        height: 120px;
    }
}

/* Responsive: mobile */
@media (max-width: 768px) {
    .internal-header-logo {
        height: 100px;
    }
}

/* Responsive: mobile piccolo */
@media (max-width: 480px) {
    .internal-header-logo {
        height: 80px;
    }
}

/* ==================== HEADER NAV ==================== */
.header-nav {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    padding: 20px 5%;
    display: flex;
    justify-content: flex-end;
    z-index: 100;
}

.header-nav a {
    color: #FFD700;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    padding: 10px 25px;
    border: 2px solid #FFD700;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.header-nav a:hover {
    background-color: #FFD700;
    color: #8B0000;
}

/* ==================== HERO SECTION ==================== */
.hero {
    height: 100vh;
    min-height: 600px;
    background: linear-gradient(rgba(139, 0, 0, 0.75), rgba(139, 0, 0, 0.75)),
                url('../immagini/TorneoEureka-21.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
}

.hero-logo {
    width: 450px;
    height: auto;
    margin-bottom: 30px;
}

.hero-title {
    font-size: 4rem;
    font-weight: 900;
    font-style: italic;
    color: #FFD700;
    text-transform: uppercase;
    letter-spacing: 4px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 2rem;
    color: #fff;
    margin-top: 20px;
    font-weight: 600;
    letter-spacing: 3px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
}

/* ==================== ABOUT SECTION ==================== */
.about {
    padding: 100px 5%;
    background-color: #fff;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.about-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.about-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 30px;
    line-height: 1.2;
}

.about-title span {
    color: #333;
    display: block;
}

.about-text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
}

.about-text strong {
    color: #DAA520;
    font-weight: 700;
}

.about-highlight {
    border-left: 4px solid #FFD700;
    padding-left: 20px;
    margin: 30px 0;
}

.about-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.about-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ==================== TORNEO SECTION ==================== */
.torneo-section {
    padding: 100px 5%;
    background-color: #f5f5f5;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 60px;
}

.torneo-image {
    flex: 1;
    min-width: 300px;
    max-width: 500px;
}

.torneo-image img {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.torneo-content {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
}

.torneo-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 25px;
    line-height: 1.2;
}

.torneo-text {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

.torneo-categories {
    background-color: #fff;
    border-left: 4px solid #FFD700;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 10px 10px 0;
}

.torneo-categories strong {
    color: #8B0000;
    font-weight: 700;
}

@media (max-width: 768px) {
    .torneo-section {
        padding: 60px 5%;
    }

    .torneo-title {
        font-size: 2rem;
    }
}

/* ==================== NEWS SECTION ==================== */
.news-section {
    padding: 80px 5%;
    background-color: #fff;
}

.news-section-header {
    text-align: center;
    margin-bottom: 50px;
}

.news-section-header h2 {
    font-size: 2.5rem;
    font-weight: 900;
    color: #8B0000;
    margin-bottom: 10px;
}

.news-section-header p {
    font-size: 1.1rem;
    color: #555;
}

.news-grid-home {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.news-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.news-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-card-content {
    padding: 25px;
}

.news-card-date {
    display: inline-block;
    background-color: #FFD700;
    color: #8B0000;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 12px;
    line-height: 1.4;
}

.news-card-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-section-footer {
    text-align: center;
    margin-top: 40px;
}

.btn-all-news {
    display: inline-block;
    padding: 15px 40px;
    background-color: #8B0000;
    color: #FFD700;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-all-news:hover {
    background-color: #5a0000;
}

.news-card-footer {
    padding: 0 25px 25px;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #8B0000;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-read-more:hover {
    color: #FFD700;
}

.btn-read-more svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s ease;
}

.btn-read-more:hover svg {
    transform: translateX(3px);
}

/* ==================== NEWS MODAL ==================== */
.news-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    overflow-y: auto;
    padding: 40px 20px;
}

.news-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.news-modal-content {
    background: #fff;
    border-radius: 15px;
    max-width: 700px;
    width: 100%;
    margin: auto;
    overflow: hidden;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background-color: #8B0000;
    color: #FFD700;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.news-modal-close:hover {
    background-color: #FFD700;
    color: #8B0000;
}

.news-modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.news-modal-body {
    padding: 30px;
}

.news-modal-date {
    display: inline-block;
    background-color: #FFD700;
    color: #8B0000;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.news-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 20px;
    line-height: 1.3;
}

.news-modal-text {
    font-size: 1rem;
    color: #555;
    line-height: 1.8;
}

.news-modal-text p {
    margin-bottom: 15px;
}

.news-modal-hashtags {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    font-size: 0.85rem;
    color: #8B0000;
    font-weight: 600;
}

@media (max-width: 768px) {
    .news-modal {
        padding: 20px 10px;
    }

    .news-modal-image {
        height: 200px;
    }

    .news-modal-body {
        padding: 20px;
    }

    .news-modal-title {
        font-size: 1.2rem;
    }
}

/* ==================== FOOTER SECTION ==================== */
.footer {
    background-color: #FFD700;
    padding: 60px 5% 30px;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
}

.footer-logo {
    width: 160px;
}

.footer-brand {
    font-size: 1.8rem;
    font-weight: 900;
    color: #8B0000;
    text-transform: uppercase;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(139, 0, 0, 0.2);
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #8B0000;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.footer-section p,
.footer-section li {
    font-size: 0.9rem;
    color: #333;
    margin-bottom: 8px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #8B0000;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 0.7;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.social-links a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-fir {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-fir img {
    height: 60px;
}

.footer-fir span {
    font-size: 0.8rem;
    color: #555;
    text-transform: uppercase;
}

.footer-copyright {
    font-size: 0.8rem;
    color: #555;
}

/* ==================== COOKIE BANNER ==================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #8B0000 0%, #5a0000 100%);
    color: #fff;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    z-index: 9999;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(0);
    transition: transform 0.5s ease;
}

.cookie-banner.hidden {
    transform: translateY(100%);
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #FFD700;
}

.cookie-text p {
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-text a {
    color: #FFD700;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cookie-btn.accept {
    background-color: #FFD700;
    color: #8B0000;
}

.cookie-btn.accept:hover {
    background-color: #fff;
}

.cookie-btn.reject {
    background-color: transparent;
    color: #fff;
    border: 2px solid #fff;
}

.cookie-btn.reject:hover {
    background-color: #fff;
    color: #8B0000;
}

.cookie-btn.settings {
    background-color: transparent;
    color: #FFD700;
    border: 2px solid #FFD700;
}

.cookie-btn.settings:hover {
    background-color: #FFD700;
    color: #8B0000;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .hero-logo {
        width: 250px;
    }

    .hero-title {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    .hero-subtitle {
        font-size: 1.3rem;
    }

    .about {
        padding: 60px 5%;
    }

    .about-title {
        font-size: 2rem;
    }

    .footer-top {
        flex-direction: column;
        gap: 20px;
    }

    .cookie-banner {
        flex-direction: column;
        text-align: center;
    }

    .cookie-buttons {
        justify-content: center;
    }

    .news-grid-home {
        grid-template-columns: 1fr;
    }

    .news-section-header h2 {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .news-grid-home {
        grid-template-columns: repeat(2, 1fr);
    }
}
