/* Stile generale */
:root {
    --primary-color: #39b4ac;
    --secondary-color: #2c3e50;
    --accent-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --background-color: #fff;
    --section-padding: 60px 0;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

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

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

p {
    margin-bottom: 15px;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* Header e navigazione */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
}

.logo a {
    color: var(--primary-color);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    color: var(--secondary-color);
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

nav ul li a:hover, nav ul li a.active {
    color: var(--primary-color);
    background-color: rgba(57, 180, 172, 0.1);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 3px 0;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hero section */
.hero {
    position: relative;
    height: 100vh;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    padding: 0 20px;
    margin-top: 70px;
}

.hero-overlay {
    background-color: rgba(0, 0, 0, 0.4); /* leggera oscurazione per leggibilità */
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-content {
    max-width: 800px;
    position: relative; /* Assicura che il contenuto sia sopra l'overlay */
    z-index: 1; /* Assicura che il contenuto sia sopra l'overlay */
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-content h2 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 30px;
    color: #ffffff;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Page header */
.page-header {
    background-color: #f8f9fa;
    text-align: center;
    padding: 100px 20px 50px;
    margin-bottom: 50px;
}

.page-header h1 {
    color: var(--primary-color);
    font-size: 36px;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    color: var(--secondary-color);
    max-width: 700px;
    margin: 0 auto;
}

/* About section */
.about-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 0 5%;
    margin-bottom: 50px;
}

.about-image {
    flex: 1;
    min-width: 300px;
    margin-right: 50px;
}

.about-text {
    flex: 2;
    min-width: 300px;
}

.about-text h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.about-text h3 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.about-text ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.about-text ul li {
    margin-bottom: 10px;
}

/* Services section */
.services-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 5%;
    margin-bottom: 50px;
}

.service-card {
    flex: 1;
    min-width: 300px;
    margin: 15px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-image {
    margin-bottom: 20px;
    border-radius: 5px;
    overflow: hidden;
}

.service-info h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Sport and Work section */
.sport-work-content {
    padding: 0 5%;
    margin-bottom: 50px;
}

.sport-work-text {
    margin-bottom: 30px;
}

.sport-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    height: 250px; /* Altezza fissa per tutti i contenitori */
}

.gallery-item img {
    width: 100%;
    height: 100%; /* Occupa tutta l'altezza del contenitore */
    object-fit: cover; /* Mantiene le proporzioni ritagliando se necessario */
    object-position: center; /* Centra l'immagine */
    transition: transform 0.3s ease; /* Aggiunge una transizione fluida per l'effetto hover */
}

.gallery-item img:hover {
    transform: scale(1.05); /* Leggero effetto zoom al passaggio del mouse */
}

.sport-results {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 10px;
}

.sport-results h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.sport-results ul {
    list-style: disc;
    margin-left: 20px;
}

.sport-results ul li {
    margin-bottom: 10px;
}

/* Testimonials section */
.testimonials-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 5%;
    margin-bottom: 50px;
}

.testimonial-card {
    flex: 1;
    min-width: 300px;
    margin: 15px;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    background-color: white;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    position: relative;
}

.testimonial-text::before {
    content: '"';
    font-size: 60px;
    color: rgba(57, 180, 172, 0.2);
    position: absolute;
    top: -20px;
    left: -15px;
}

.testimonial-author h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* Nutrition Tips section */
.nutrition-tips-content {
    padding: 0 5%;
    margin-bottom: 50px;
}

.tip-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 40px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.tip-image {
    flex: 1;
    min-width: 250px;
    margin-right: 30px;
    border-radius: 10px;
    overflow: hidden;
}

.tip-info {
    flex: 2;
    min-width: 300px;
}

.tip-info h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

/* Contact section */
.contact-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    padding: 0 5%;
    margin-bottom: 50px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
    padding: 30px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 10px;
    margin-right: 30px;
}

.contact-info h2 {
    color: white;
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-item i {
    font-size: 20px;
    margin-right: 15px;
}

.social-links {
    display: flex;
    margin-top: 30px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin-right: 15px;
    color: white;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: white;
    color: var(--primary-color);
}

.contact-form {
    flex: 2;
    min-width: 300px;
}

.contact-form h2 {
    color: var(--primary-color);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 16px;
}

.form-group textarea {
    resize: vertical;
}

.submit-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Page navigation */
.page-navigation {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    margin-top: 50px;
    border-top: 1px solid #eee;
}

.breadcrumb {
    color: var(--secondary-color);
}

.breadcrumb a {
    color: var(--primary-color);
}

.breadcrumb span {
    color: var(--secondary-color);
}

.page-buttons {
    display: flex;
    flex-wrap: wrap;
}

.prev-page, .next-page {
    display: inline-block;
    padding: 10px 20px;
    margin: 5px;
    background-color: #f8f9fa;
    border-radius: 5px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.prev-page:hover, .next-page:hover {
    background-color: var(--primary-color);
    color: white;
}

.prev-page i, .next-page i {
    margin: 0 5px;
}

/* Footer */
footer {
    background-color: var(--secondary-color);
    color: white;
    text-align: center;
    padding: 20px 0;
}

/* Menu mobile */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--secondary-color);
    z-index: 999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow-y: auto;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.mobile-nav ul li {
    margin: 10px 0;
    width: 80%;
    text-align: center;
}

.mobile-nav ul li a {
    color: white;
    font-size: 20px;
    padding: 12px 20px;
    display: block;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.mobile-nav ul li a:hover, .mobile-nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--primary-color);
}

/* Animazione hamburger */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Stili per la home page a scroll */
.section {
    padding: 80px 0;
    scroll-margin-top: 80px; /* Per la navigazione con ancore */
}

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

.section-title h2 {
    color: var(--primary-color);
    font-size: 36px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
}

.section-title p {
    color: var(--secondary-color);
    font-size: 18px;
    max-width: 700px;
    margin: 15px auto 0;
}

/* Media queries per responsive design */
@media screen and (max-width: 1024px) {
    .hero-content h1 {
        font-size: 40px;
    }
    
    .hero-content h2 {
        font-size: 28px;
    }
    
    .about-image {
        margin-right: 30px;
    }
    
    .service-card, .testimonial-card {
        min-width: 280px;
    }
}

@media screen and (max-width: 768px) {
    /* Header e navigazione */
    header {
        padding: 12px 5%;
    }
    
    .logo a {
        font-size: 20px;
    }
    
    nav ul {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
        z-index: 1001;
    }
    
    /* Hero section */
    .hero {
        height: 80vh;
        margin-top: 60px;
        background-position: center center !important;
        background-size: cover !important;
        background-repeat: no-repeat !important;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .hero-content h2 {
        font-size: 24px;
    }
    
    .hero-content p {
        font-size: 16px;
    }
    
    /* Page header */
    .page-header {
        padding: 80px 15px 40px;
        margin-bottom: 30px;
    }
    
    .page-header h1 {
        font-size: 30px;
    }
    
    /* About section */
    .about-content {
        flex-direction: column;
        padding: 0 3%;
    }
    
    .about-image {
        margin-right: 0;
        margin-bottom: 30px;
        width: 100%;
    }
    
    /* Services section */
    .services-content {
        padding: 0 3%;
    }
    
    .service-card {
        flex: 100%;
        margin: 15px 0;
    }
    
    /* Testimonials section */
    .testimonials-content {
        padding: 0 3%;
    }
    
    .testimonial-card {
        flex: 100%;
        margin: 15px 0;
    }
    
    /* Contact section */
    .contact-content {
        flex-direction: column;
        padding: 0 3%;
    }
    
    .contact-info {
        margin-right: 0;
        margin-bottom: 30px;
        width: 100%;
    }
    
    /* Page navigation */
    .page-navigation {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .breadcrumb {
        margin-bottom: 15px;
    }
    
    .page-buttons {
        width: 100%;
        justify-content: space-between;
    }
    
    .prev-page, .next-page {
        font-size: 14px;
        padding: 8px 15px;
    }
}

@media screen and (max-width: 480px) {
    /* Header */
    header {
        padding: 10px 4%;
    }
    
    /* Hero section */
    .hero {
        height: 70vh;
    }
    
    .hero-content h1 {
        font-size: 28px;
    }
    
    .hero-content h2 {
        font-size: 20px;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Page header */
    .page-header h1 {
        font-size: 26px;
    }
    
    .page-header p {
        font-size: 16px;
    }
    
    /* Sport gallery */
    .sport-gallery {
        grid-template-columns: 1fr;
    }
    
    /* Page navigation */
    .page-buttons {
        flex-direction: column;
    }
    
    .prev-page, .next-page {
        width: 100%;
        margin: 5px 0;
        text-align: center;
    }
}


/* Miglioramenti Mobile Avanzati */
@media screen and (max-width: 768px) {
    .hero-content {
        padding: 0 10px;
    }

    .about-text, .service-info, .testimonial-text, .contact-form {
        text-align: center;
    }

    .about-text ul {
        padding-left: 20px;
    }

    .gallery-item {
        height: auto;
    }

    .gallery-item img {
        height: auto;
        object-fit: contain;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content h2 {
        font-size: 20px;
    }
}
