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

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    color: #333;
}

nav#mainNav {
    opacity: 1 !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('files/img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
}

.hero-section .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
}

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

/* Logo */
.logo-container {
    margin-bottom: 2rem;
}

.logo {
    max-width: 150px;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-placeholder {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

/* Spazio per la navbar fissa */
.hero-section {
    padding-top: 70px; 
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s backwards;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s backwards;
}

.animate-bounce {
    animation: bounce 2s ease-in-out infinite;
}

/* CTA Buttons */
.cta-buttons .btn {
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-indicator a {
    text-decoration: none;
}

/* Projects Section */
#progetti {
    background: #f8f9fa;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    margin-top: 1rem;
    border-radius: 2px;
}

/* Project Rows */
.project-row {
    padding: 2rem 0;
}

.project-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.project-image-container img {
    width: 100%;
    transition: transform 0.5s ease;
}

.project-image-container:hover img {
    transform: scale(1.05);
}

.project-year {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 1.5rem;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Project Content */
.project-content {
    padding: 0 2rem;
}

.project-content .badge {
    font-size: 0.9rem;
    padding: 8px 16px;
    font-weight: 600;
}

.project-content h3 {
    color: #333;
    font-weight: 700;
}

/* Project Stats */
.project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.stat-item i {
    font-size: 1.5rem;
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-10px);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Footer */
footer {
    background: #1a1a2e !important;
}

footer h5 {
    color: #fff;
    font-size: 1.2rem;
}

.social-links a {
    transition: all 0.3s ease;
    display: inline-block;
}

.social-links a:hover {
    transform: translateY(-5px);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .project-content {
        padding: 0;
        margin-top: 2rem;
    }
    
    .project-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .cta-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem !important;
    }
    
    .logo {
        max-width: 100px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    animation: shimmer 2s infinite;
    background: linear-gradient(to right, #f0f0f0 0%, #e0e0e0 50%, #f0f0f0 100%);
    background-size: 1000px 100%;
}

/* ==================== TEAM PAGE STYLES ==================== */

/* Navigation Bar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease, opacity 0.3s ease;
    opacity: 0;
}

.navbar-brand {
    font-size: 1.3rem;
    transition: transform 0.3s ease;
}

.navbar-brand:hover {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #667eea;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link.active {
    color: #667eea !important;
}

/* Page Header for Team */
.page-header-team {
    position: relative;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-image: url('files/img/team-header-bg.jpg');
    background-size: cover;
    background-position: center;
    padding-top: 80px;
}

.page-header-team .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
}

.page-header-team .container {
    position: relative;
    z-index: 2;
}

/* Team Cards */
.team-card {
    transition: all 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.team-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2) !important;
}

.team-img-wrapper {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 50%;
}

.team-img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.team-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
}

.team-card:hover .team-overlay {
    opacity: 1;
}

.team-card:hover .team-img {
    transform: scale(1.1);
}

.team-social {
    display: flex;
    gap: 1rem;
}

.team-social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transition: all 0.3s ease;
    text-decoration: none;
}

.team-social a:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.team-social i {
    font-size: 1.2rem;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section .btn {
    transition: all 0.3s ease;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-section .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.bg-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Responsive adjustments for Team page */
@media (max-width: 768px) {
    .page-header-team h1 {
        font-size: 2rem;
    }
    
    .team-img-wrapper,
    .team-img {
        width: 120px;
        height: 120px;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
}

/* Spazio per la navbar fissa sulla pagina Chi Siamo */
.page-header-team {
    padding-top: 70px; 
}

/* Correzione overlay "viola" per la pagina Chi Siamo */
.page-header-team .overlay {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.6) 100%) !important;
}