/* ===== SCUOLA SALDATURA STYLES ===== */

/* Hero Section */
.hero-section {
    padding: 100px 0 100px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.2;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(1deg); }
}

.hero-background {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}
.hero-section img {
    width: 100%;
    height: 1000px;
    position: absolute;
    top: 20;
    left: 0;
    z-index: -1;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1.2s ease-out;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color:whitesmoke;
    text-shadow: black 0px 0px 10px, black 0px 0px 10px, black 0px 0px 10px;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    color:#c73140;
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: slideInFromLeft 1.5s ease-out 0.3s both;
    text-align: center;
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInFromRight 1.5s ease-out 0.6s both;
    text-align: center;
    max-width: 600px;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    animation: fadeInUp 1.5s ease-out 0.9s both;
}

/* Stats Section */
.stats-section {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    text-align: center;
}

.stats-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    justify-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.stat-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.8s ease;
}

.stat-item:hover::before {
    left: 100%;
}

.stat-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.stat-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.stat-item:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 0.5rem;
    transition: color 0.4s ease;
    text-align: center;
}

.stat-item:hover h3 {
    color: var(--primary);
}

.stat-item p {
    color: var(--text-light);
    font-weight: 500;
    transition: color 0.4s ease;
    text-align: center;
}

.stat-item:hover p {
    color: var(--text);
}

/* Courses Section */
.courses-section {
    background: white;
    text-align: center;
}

.courses-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
    justify-content: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.course-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.course-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.course-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.course-card:hover::before {
    transform: scaleX(1);
}

.course-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.course-card:hover .course-icon {
    transform: scale(1.15) rotate(10deg);
}

.course-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.4s ease;
}

.course-card:hover h3 {
    color: var(--primary);
}

.course-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    transition: color 0.4s ease;
    text-align: center;
}

.course-card:hover p {
    color: var(--text);
}

.course-features {
    list-style: none;
    margin-bottom: 1.5rem;
    text-align: left;
    width: 100%;
}

.course-features li {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    transition: all 0.4s ease;
    padding: 0.3rem 0;
    justify-content: flex-start;
}

.course-features li:hover {
    color: var(--text);
    transform: translateX(5px);
}

.course-features i {
    color: var(--primary);
    margin-right: 0.5rem;
    font-size: 0.9rem;
    transition: transform 0.4s ease;
}

.course-features li:hover i {
    transform: scale(1.2);
}

.course-duration {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--primary);
    font-weight: 600;
    transition: all 0.4s ease;
}

.course-card:hover .course-duration {
    transform: scale(1.05);
}

.course-duration i {
    margin-right: 0.5rem;
    transition: transform 0.4s ease;
}

.course-card:hover .course-duration i {
    transform: rotate(360deg);
}

.course-details-btn {
    width: 100%;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.course-details-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.course-details-btn:hover::before {
    left: 100%;
}

/* Instructors Section */
.instructors-section {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    text-align: center;
}

.instructors-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.instructors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.instructor-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    width: 100%;
    max-width: 350px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.instructor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.instructor-card:hover::before {
    transform: translateX(100%);
}

.instructor-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.instructor-photo {
    height: 250px;
    overflow: hidden;
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.instructor-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.instructor-card:hover .instructor-photo img {
    transform: scale(1.1);
}

.instructor-info {
    padding: 2rem;
    transition: background-color 0.4s ease;
    text-align: center;
    width: 100%;
}

.instructor-card:hover .instructor-info {
    background: linear-gradient(135deg, var(--bg) 0%, white 100%);
}

.instructor-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    transition: color 0.4s ease;
    text-align: center;
}

.instructor-card:hover .instructor-info h3 {
    color: var(--primary);
}

.instructor-title {
    color: #3498db;
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    text-align: center;
}

.instructor-description {
    color: #7f8c8d;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    text-align: center;
}

.instructor-certifications {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.cert-badge {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: transform 0.4s ease;
    text-align: center;
}

.cert-badge:hover {
    transform: scale(1.05);
}

/* Equipment Section */
.equipment-section {
    background: white;
    text-align: center;
}

.equipment-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
    justify-items: center;
    justify-content: center;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

.equipment-item {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid var(--primary);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.equipment-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.8s ease;
}

.equipment-item:hover::before {
    transform: translateX(100%);
}

.equipment-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.equipment-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.equipment-item:hover .equipment-icon {
    transform: scale(1.1) rotate(5deg);
}

.equipment-item h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
    text-align: center;
    transition: color 0.4s ease;
}

.equipment-item:hover h3 {
    color: var(--primary);
}

.equipment-item p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    text-align: center;
    transition: color 0.4s ease;
}

.equipment-item:hover p {
    color: var(--text);
}

.equipment-item ul {
    list-style: none;
    padding: 0;
    text-align: left;
    width: 100%;
}

.equipment-item li {
    padding: 0.5rem 0;
    color: var(--text-light);
    border-bottom: 1px solid var(--bg-dark);
    position: relative;
    padding-left: 1.5rem;
    transition: all 0.4s ease;
    text-align: left;
}

.equipment-item li:hover {
    color: var(--text);
    transform: translateX(5px);
}

.equipment-item li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    transition: transform 0.4s ease;
}

.equipment-item li:hover::before {
    transform: scale(1.2);
}

/* Gallery Section */
.gallery-section {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    text-align: center;
}

.gallery-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

/* Carousel for gallery */
.gallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.gallery-track {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 8px;
}

.gallery-carousel {
    scroll-behavior: auto; /* manual animation */
}

.gallery-carousel::-webkit-scrollbar {
    display: none;
}

.gallery-slide {
    flex: 0 0 auto;
    width: 280px;
    height: 180px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: #111;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.filter-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.filter-btn:hover::before {
    left: 100%;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    justify-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    width: 100%;
    max-width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    padding: 1.5rem;
    transform: translateY(100%);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.gallery-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
    text-align: center;
}

/* FAQ Section */
.faq-section {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.faq-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.faq-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="faq-pattern" width="50" height="50" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23d32f2f" opacity="0.03"/></pattern></defs><rect width="100" height="100" fill="url(%23faq-pattern)"/></svg>');
    opacity: 0.2;
    animation: float 25s ease-in-out infinite reverse;
}

.faq-section .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.faq-list {
    max-width: 900px;
    margin: 0 auto;
    margin-top: 3rem;
    margin-bottom: 2rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.faq-item {
    background: white;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.faq-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-color: var(--primary);
}

.faq-item:hover::before {
    transform: scaleY(1);
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: barSlideIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(211, 47, 47, 0.12);
    animation: faqPulse 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-item.active::before {
    animation: barSlideIn 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.faq-item.active::before {
    transform: scaleY(1);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes faqPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes barSlideIn {
    0% {
        transform: scaleY(0);
    }
    50% {
        transform: scaleY(1.1);
    }
    100% {
        transform: scaleY(1);
    }
}

@keyframes barSlideOut {
    0% {
        transform: scaleY(1);
    }
    100% {
        transform: scaleY(0);
    }
}

.faq-question {
    width: 100%;
    background: white;
    border: none;
    padding: 2rem;
    text-align: left;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    outline: none;
}

.faq-question:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
}

.faq-question:hover {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    color: var(--primary);
}

.faq-question::before {
    content: '💡';
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--primary);
    opacity: 0.8;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.faq-item:hover .faq-question::before {
    opacity: 1;
    transform: scale(1.1) rotate(10deg);
}

.faq-question::after {
    content: '+';
    font-size: 2rem;
    color: var(--primary);
    font-weight: 300;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg);
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
    background: var(--primary);
    color: white;
}

.faq-answer {
    padding: 0 2rem;
    max-height: 0;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, var(--bg) 0%, white 100%);
    text-align: left;
    width: 100%;
}

.faq-item.active .faq-answer {
    padding: 2rem 2rem 3rem 2rem;
    max-height: 600px;
}

.faq-answer p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.05rem;
    text-align: left;
}

.faq-answer ul {
    color: var(--text-light);
    padding-left: 2rem;
    margin-bottom: 2rem;
    text-align: left;
    width: 100%;
}

.faq-answer li {
    margin-bottom: 1.2rem;
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.6;
    transition: color 0.4s ease;
    text-align: left;
}

.faq-answer li:hover {
    color: var(--text);
}

.faq-answer li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
    transition: transform 0.4s ease;
}

.faq-answer li:hover::before {
    transform: scale(1.2);
}

/* Animazione per l'apertura delle FAQ */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item.active .faq-answer {
    animation: slideDown 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contact Section */
.contact-section {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-dark) 100%);
    text-align: center;
}

.contact-section h2 {
    text-align: center;
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
    justify-items: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.contact-info {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.contact-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    transition: transform 0.4s ease;
    text-align: center;
    width: 100%;
}

.contact-item:hover {
    transform: translateX(5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary);
    margin-right: 1rem;
    margin-top: 0.2rem;
    transition: transform 0.4s ease;
}

.contact-item:hover i {
    transform: scale(1.2);
}

.contact-item h4 {
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.contact-item p {
    color: var(--text-light);
    line-height: 1.6;
    text-align: center;
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-form:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
    text-align: center;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--bg-dark);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    text-align: left;
}

/* Modal Styles - Optimized for Performance */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    max-width: 500px;
    width: 90vw;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: #666;
    background: none;
    border: none;
    z-index: 10;
    transition: color 0.2s ease;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}
.close-button:hover {
    color: var(--primary);
}

.course-modal-content h2 {
    font-size: 2.1rem;
    font-weight: 800;
    margin-bottom: 1.2rem;
    color: var(--primary);
    letter-spacing: -1px;
}

.course-modal-content .course-description {
    color: var(--text-light);
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.course-details-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 1.5rem 0 1.5rem 0;
}

.detail-item {
    background: var(--bg);
    border-radius: 12px;
    padding: 1rem 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 1.05rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border-left: 3px solid var(--primary);
}

.detail-item i {
    color: var(--primary);
    font-size: 1.2rem;
}

.course-cta {
    display: flex;
    gap: 1.2rem;
    margin-top: 2.2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.course-cta .btn {
    font-size: 1.1rem;
    padding: 1.1rem 2.2rem;
    border-radius: 30px;
    font-weight: 700;
    box-shadow: 0 2px 12px rgba(30,30,60,0.07);
    transition: background 0.3s, color 0.3s, box-shadow 0.3s, transform 0.2s;
    position: relative;
    overflow: hidden;
}
.course-cta .btn-primary:hover {
    background: linear-gradient(90deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 18px rgba(211,47,47,0.13);
    transform: translateY(-2px) scale(1.04);
}
.course-cta .btn-outline {
    background: #fff;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.course-cta .btn-outline:hover {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 18px rgba(211,47,47,0.13);
    transform: translateY(-2px) scale(1.04);
}

/* Migliora la scrollbar del modale */
.modal-content::-webkit-scrollbar {
    width: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
    background: #ececec;
    border-radius: 8px;
}

@media (max-width: 600px) {
    .modal-content {
        padding: 1.2rem 0.5rem 1.2rem 0.5rem;
        max-width: 98vw;
    }
    .course-modal-content h2 {
        font-size: 1.3rem;
    }
    .course-cta .btn {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .courses-grid,
    .equipment-grid {
        grid-template-columns: 1fr;
    }
    
    .instructors-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-filters {
        flex-direction: column;
        align-items: center;
    }
    
    /* FAQ Responsive */
    .faq-question {
        padding: 1.5rem;
        font-size: 1.1rem;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
    }
    
    .faq-question::before {
        font-size: 1.3rem;
        margin-right: 1rem;
    }
    
    .faq-question::after {
        align-self: center;
        width: 25px;
        height: 25px;
        font-size: 1.5rem;
        flex-shrink: 0;
    }
    
    .faq-answer {
        padding: 0 1.5rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .course-card,
    .equipment-item {
        padding: 1.5rem;
    }
    
    .instructor-info,
    .contact-info,
    .contact-form {
        padding: 1.5rem;
    }
    
    .faq-question {
        padding: 1rem;
        font-size: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .faq-question::before {
        font-size: 1.2rem;
        margin-right: 0;
    }
    
    .faq-answer {
        padding: 0 1rem;
    }
    
    .faq-item.active .faq-answer {
        padding: 1rem;
    }
    
    .faq-answer ul {
        padding-left: 1.5rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3498db;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1.2s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Animazioni aggiuntive per migliorare l'estetica */
@keyframes shimmer {
    0% {
        background-position: -200px 0;
    }
    100% {
        background-position: calc(200px + 100%) 0;
    }
}

.shimmer-effect {
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    background-size: 200px 100%;
    animation: shimmer 2s infinite;
}

/* Effetto hover migliorato per i bottoni */
.btn {
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.6s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Animazione per le icone al hover */
.course-icon:hover {
    animation: iconBounce 0.6s ease-in-out;
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

/* Effetto parallax sottile per le sezioni */
.parallax-bg {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* Animazione per i numeri delle statistiche */
.stat-number {
    display: inline-block;
    /* Rimossa l'animazione con ombra rossa */
}

/* Effetto hover per le card con gradiente */
.card-gradient-hover {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-gradient-hover:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    transform: translateY(-5px);
}

/* Testimonials Section Styles */
.testimonials-section {
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow: hidden;
}

.testimonials-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="testimonials-pattern" width="40" height="40" patternUnits="userSpaceOnUse"><circle cx="20" cy="20" r="1" fill="%23d32f2f" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23testimonials-pattern)"/></svg>');
    opacity: 0.3;
    animation: float 30s ease-in-out infinite;
}

.testimonials-container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    width: 100%;
    margin: 3rem 0;
}

.testimonial-card {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: 1rem;
    left: 1rem;
    font-size: 4rem;
    color: var(--primary);
    opacity: 0.1;
    font-family: serif;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
    border-color: var(--primary);
}

.testimonial-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    width: 100%;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    margin-right: 1rem;
    flex-shrink: 0;
}

.testimonial-info {
    flex: 1;
    text-align: left;
}

.testimonial-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.testimonial-date {
    font-size: 0.9rem;
    color: #666;
}

.testimonial-rating {
    display: flex;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.testimonial-rating i {
    color: #ffc107;
    font-size: 0.9rem;
}

.testimonial-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 1rem;
    flex: 1;
}

.testimonial-source {
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: auto;
}

.testimonial-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem;
    min-height: 200px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #dc3545;
}

.error-message i {
    font-size: 2rem;
}

.success-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: #28a745;
}

.success-message i {
    font-size: 2rem;
}

.testimonials-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.testimonials-info {
    font-weight: 600;
    color: var(--text);
    min-width: 80px;
    text-align: center;
}

.testimonial-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.local-guide-badge {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.testimonial-photos {
    margin-top: 1rem;
    width: 100%;
}

.testimonial-photos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.5rem;
    max-width: 300px;
    margin: 0 auto;
}

.testimonial-photo {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.testimonial-photo:hover {
    transform: scale(1.05);
}

.testimonial-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.more-photos {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2rem;
}

.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

/* Responsive adjustments for testimonials */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-header {
        flex-direction: column;
        text-align: center;
    }
    
    .testimonial-avatar {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .testimonial-info {
        text-align: center;
    }
    
    .testimonials-controls {
        gap: 1rem;
    }
    
    .testimonial-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .testimonial-photos-grid {
        grid-template-columns: repeat(3, 1fr);
        max-width: 250px;
    }
}

@media (max-width: 480px) {
    .testimonial-card {
        padding: 1rem;
    }
    
    .testimonial-avatar {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .testimonial-name {
        font-size: 1rem;
    }
    
    .testimonial-content {
        font-size: 0.9rem;
    }
    
    .testimonials-controls {
        flex-direction: column;
        gap: 1rem;
    }
    
    .testimonial-photos-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 200px;
    }
}