/* Gallery CSS Styles */

/* Body Background for Gallery Page */
body.gallery-page {
    background: white;
    position: relative;
}

/* Footer Style for Gallery Page */
body.gallery-page footer {
    background-color: rgba(26, 83, 92, 0.9);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Gallery Header */
.gallery-header {
    padding: 150px 0 100px;
    background-color: #B8D4F0;
    color: white;
    position: relative;
    overflow: hidden;
}

.gallery-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/wallpaper/pattern-dots.svg');
    opacity: 0.1;
    z-index: 1;
}

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

.gallery-header h1 {
    color: white;
    font-size: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInDown 1s;
}

.gallery-header p {
    color: white;
    font-size: 1.25rem;
    animation: fadeInUp 1s;
}

/* Aggiustamento per mobile - evita sovrapposizione con navbar */
@media (max-width: 768px) {
    .gallery-header h1,
    .gallery-header .display-4,
    .gallery-header .lead,
    .gallery-header p {
        margin-top: 40px;
    }
    
    .gallery-header .container {
        padding-top: 20px;
    }
}

/* Services Navigation */
.services-nav {
    background-color: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 70px;
    z-index: 100;
}

.services-tabs {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.service-tab {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.service-tab:hover {
    background-color: var(--primary-light);
    color: white;
}

.service-tab.active {
    background-color: var(--primary);
    color: white;
}

/* Gallery Section */
.gallery-section {
    padding: 80px 0;
    background: transparent;
}

/* Gallery Filter */
.gallery-filter {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.filter-btn {
    padding: 8px 20px;
    background-color: var(--white);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    color: var(--primary-color);
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    background-color: var(--primary-color-light);
    color: var(--text-color-dark);
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Gallery Grid */
.gallery-grid {
    margin-bottom: 50px;
}

.gallery-item {
    margin-bottom: 30px;
    transition: all 0.5s ease;
}

.gallery-card {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--border-radius);
    overflow: visible;
    box-shadow: var(--box-shadow);
    transition: all 0.3s ease;
    height: 100%;
    backdrop-filter: blur(5px);
}

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

.gallery-img {
    position: relative;
    overflow: visible;
    padding-top: 75%; /* 4:3 Aspect Ratio */
}

.gallery-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, border-radius 0.3s ease;
    border-radius: 10px;
}

.gallery-card:hover .gallery-img img {
    transform: scale(1.05);
    border-radius: 20%;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(var(--primary-color-rgb), 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-overlay a {
    width: 50px;
    height: 50px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.25rem;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-overlay a {
    transform: scale(1);
}

.gallery-info {
    padding: 20px;
}

.gallery-info h4 {
    margin-bottom: 10px;
    color: var(--text-color-dark);
    font-weight: 600;
}

.gallery-info p {
    color: var(--text-color-muted);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Video Section */
.video-section {
    padding: 80px 0;
    background-color: var(--white);
}

.video-card {
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: visible;
    box-shadow: var(--box-shadow);
    height: 100%;
}

.video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    overflow: visible;
}

.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.5s ease, border-radius 0.3s ease;
}

.video-card:hover .video-wrapper video {
    transform: scale(1.05);
    border-radius: 20px;
}

.video-info {
    padding: 20px;
}

.video-info h4 {
    margin-bottom: 10px;
    color: var(--text-color-dark);
    font-weight: 600;
}

.video-info p {
    color: var(--text-color-muted);
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* CTA Section */
.cta-section {
    background-color: var(--accent);
    color: var(--dark);
    padding: 60px 0;
    margin-bottom: 0;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.cta-buttons {
    margin-top: 30px;
}

.cta-buttons .btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.cta-buttons .btn-outline-primary {
    color: var(--primary);
    border-color: var(--primary);
}

.cta-buttons .btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

/* Magnific Popup Customization */
.mfp-bg {
    background-color: rgba(0, 0, 0, 0.9);
}

.mfp-figure:after {
    box-shadow: none;
    background: transparent;
}

.mfp-title {
    color: var(--white);
    font-size: 1rem;
    font-weight: 600;
    padding-right: 30px;
}

.mfp-counter {
    color: var(--white);
    opacity: 0.7;
}

/* Animation for gallery items */
.gallery-item, .video-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.gallery-item.fadeIn, .video-card.fadeIn {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive styles are centralized in responsive.css */