/* Stili generali */
:root {
    --primary-color: #72142c;
    --primary-color-dark: #5a1023;
    --primary-color-light: rgba(114, 20, 44, 0.1);
    --text-color: #333;
    --text-light: #555;
    --background-light: #ffffff;
    --background-gray: #e0e0e0;
    --card-background: #f8f8f8;
    --shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 6px 15px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 20px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
    --padding-section: 60px 20px;
}

body {
    font-family: 'Kanit', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: var(--text-color);
    line-height: 1.6;
}

* {
    box-sizing: border-box;
}

.content-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Tipografia */
.standard-paragraph {
    font-size: 20px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
    text-align: left;
}

/* Stili sezioni */
.section-gray {
    background-color: var(--background-gray);
    padding: var(--padding-section);
}

.section-light {
    background-color: var(--background-light);
    padding: var(--padding-section);
}

.section-title {
    position: relative;
    display: inline-block;
    font-size: 32px;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-weight: 700;
    text-align: center;
}

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

.section-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 30px;
    text-align: center;
}

/* Header e navigazione */
header {
    background-color: var(--primary-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    margin-right: 15px;
}

.logo img {
    height: 70px;
    width: auto;
}

.tagline {
    color: white;
    font-style: italic;
    font-weight: 100;
    border-left: 2px solid rgba(255, 255, 255, 0.3);
    padding-left: 15px;
}

.tagline p {
    margin: 0;
    font-size: 18px;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

nav ul li {
    margin: 0 15px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 5px 10px;
    border-radius: 5px;
    transition: var(--transition);
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

nav ul li a.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Mobile menu button */
.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    border-radius: 4px;
}

.mobile-menu-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.mobile-menu-button:active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Chi siamo */
.chisiamo_item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    margin: 20px 0;
}
  
.chisiamo_item img {
    width: 40%;
    height: auto;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
}
  
.chisiamo_testo {
    width: 55%;
}

/* Servizi */
.servizi-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto 40px;
}

.servizi-list li {
    background-color: #f4f4f4;
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.servizi-list li:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Galleria */
.gallery-container {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: var(--max-width);
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    width: 300px;
    height: 200px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

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

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(114, 20, 44, 0.8);
    overflow: hidden;
    width: 100%;
    height: 0;
    transition: height 0.5s ease;
}

.gallery-item:hover .overlay {
    height: 35%;
}

.overlay-text {
    color: white;
    font-size: 16px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    padding: 0 10px;
}

/* Contatto */
#contatto {
    padding: 80px 20px;
    background-color: var(--background-light);
}

.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 60px;
}

/* Colonne informazioni di contatto */
.contact-info-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 320px;
}

.contact-columns-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    min-width: 320px;
}

/* Card stile materiale design */
.contact-card {
    display: flex;
    align-items: center;
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.contact-icon {
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 24px;
    box-shadow: 0 4px 8px rgba(114, 20, 44, 0.3);
}

.contact-icon i {
    display: block;
    width: 32px;
    height: 32px;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
}

.contact-icon-phone {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M6.62 10.79c1.44 2.83 3.76 5.14 6.59 6.59l2.2-2.2c.27-.27.67-.36 1.02-.24 1.12.37 2.33.57 3.57.57.55 0 1 .45 1 1V20c0 .55-.45 1-1 1-9.39 0-17-7.61-17-17 0-.55.45-1 1-1h3.5c.55 0 1 .45 1 1 0 1.25.2 2.45.57 3.57.11.35.03.74-.25 1.02l-2.2 2.2z'/%3E%3C/svg%3E");
}

.contact-icon-email {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E");
}

.contact-icon-location {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
}

.contact-details {
    flex: 1;
}

.contact-details h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.contact-details p {
    margin: 8px 0;
    color: var(--text-light);
    font-size: 1.05rem;
}

.contact-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 400;
    transition: var(--transition);
    position: relative;
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.contact-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Card orari e showroom */
.office-hours-container {
    flex: 0;
    min-width: 100%;
}

.hours-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    padding: 28px;
    box-shadow: var(--shadow-md);
    height: 100%;
    transition: var(--transition);
}

.hours-card:hover {
    box-shadow: var(--shadow-lg);
}

.hours-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 10px;
}

.hours-card h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

.hours-card p {
    text-align: left;
    margin-bottom: 24px;
    color: var(--text-light);
    font-size: 1.05rem;
    line-height: 1.5;
}

.hours-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    text-align: left;
    font-size: 1rem;
}

.day {
    font-weight: 700;
    color: var(--text-color);
    padding: 6px 0;
    position: relative;
}

.time {
    color: var(--text-color);
    padding: 6px 0;
}

.day-open {
    color: var(--text-color);
}

.time-open {
    color: var(--text-color);
    font-weight: 500;
}

.showroom {
    display: flex;
    flex-direction: column;
}

.appointment-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 500;
    font-size: 1rem;
    margin-top: auto;
    transition: var(--transition);
    align-self: flex-start;
    box-shadow: 0 4px 8px rgba(114, 20, 44, 0.3);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.appointment-btn:hover {
    background-color: var(--primary-color-dark);
    box-shadow: 0 6px 12px rgba(114, 20, 44, 0.4);
    transform: translateY(-2px);
}

.appointment-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(114, 20, 44, 0.4);
}

/* Mappa Google */
.map-container {
    max-width: var(--max-width);
    margin: 0 auto;
    text-align: left;
}

.map-container h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    position: relative;
    padding-bottom: 10px;
}

.map-container h3::after {
    content: '';
    position: absolute;
    width: 40px;
    height: 3px;
    background-color: var(--primary-color);
    bottom: 0;
    left: 0;
}

#map-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

#map-wrapper:hover {
    box-shadow: var(--shadow-lg);
}

#map-container {
    width: 100%;
    height: 100%;
}

.map-overlay {
    position: absolute;
    top: 24px;
    left: 24px;
    z-index: 5;
    pointer-events: none;
}

.map-card {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    min-width: 260px;
    pointer-events: auto;
}

.map-card h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.map-card p {
    margin: 10px 0 15px;
    color: var(--text-light);
    font-size: 1rem;
}

.directions-btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 6px rgba(114, 20, 44, 0.3);
}

.directions-btn:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(114, 20, 44, 0.4);
}

/* Stili footer */
footer {
    background-color: var(--primary-color);
    color: white;
    text-align: center;
    padding: 20px;
    font-weight: 100;
}

footer p {
    margin: 0;
    font-size: 0.9rem;
}

/* Slider di marchi */
/*
.slider {
    width: 100%;
    height: 100px;
    position: relative;
    overflow: hidden;
    margin: 40px 0 20px;
}

.slide-track {
    display: flex;
    animation: scroll 300s linear infinite;
}

.slide {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.slide img {
    opacity: 0.7;
    transition: var(--transition);
}

.slide img:hover {
    opacity: 1;
    transform: scale(1.1);
}

@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-200px * 5));
    }
}
*/
/* Animazioni */
.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media queries */
@media (max-width: 992px) {
    .section-title {
        font-size: 28px;
    }
    
    .contact-wrapper {
        flex-direction: column;
    }
    
    .contact-columns-wrapper {
        order: -1;
    }
    
    .appointment-btn {
        align-self: center;
        width: 100%;
        text-align: center;
    }
    
    .map-card {
        min-width: 220px;
    }
}

@media (max-width: 768px) {
    header {
        padding: 10px 0;
        position: relative;
    }
    
    .logo img {
        height: 60px;
    }
    
    .tagline p {
        font-size: 16px;
    }
    
    nav ul {
        display: none;
    }
    
    /* Mobile menu styles */
    nav ul.mobile-menu-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        box-shadow: var(--shadow-md);
        padding: 20px 0;
        z-index: 1001;
    }
    
    nav ul.mobile-menu-open li {
        margin: 0;
        padding: 0;
    }
    
    nav ul.mobile-menu-open li a {
        display: block;
        padding: 15px 20px;
        color: white;
        text-decoration: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        transition: var(--transition);
    }
    
    nav ul.mobile-menu-open li a:hover,
    nav ul.mobile-menu-open li a.active {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    nav ul.mobile-menu-open li:last-child a {
        border-bottom: none;
    }
    
    .mobile-menu-button {
        display: flex;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .section-subtitle {
        font-size: 18px;
    }
    
    .chisiamo_item {
        flex-direction: column;
        gap: 30px;
    }
    
    .chisiamo_item img {
        width: 100%;
        order: -1;
    }
    
    .chisiamo_testo {
        width: 100%;
    }
    
    .gallery-item {
        width: 100%;
        max-width: 350px;
    }
    
    .contact-card {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .hours-card h3, .map-container h3 {
        text-align: center;
    }
    
    .hours-card h3::after, .map-container h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .hours-grid {
        grid-template-columns: 1fr;
    }
    
    .map-overlay {
        position: relative;
        top: 0;
        left: 0;
        margin-bottom: 20px;
    }
    
    .map-card {
        width: 100%;
        text-align: center;
    }
    
    #map-wrapper {
        height: 300px;
    }
}

@media (max-width: 480px) {
    .logo-container {
        flex-direction: column;
        align-items: center;
    }
    
    /* Ensure mobile menu button is properly sized for small screens */
    .mobile-menu-button {
        min-width: 48px;
        min-height: 48px;
        font-size: 28px;
    }
    
    /* Adjust mobile menu for very small screens */
    nav ul.mobile-menu-open {
        padding: 15px 0;
    }
    
    nav ul.mobile-menu-open li a {
        padding: 18px 20px;
        font-size: 18px;
    }
    
    .tagline {
        border-left: none;
        border-top: 2px solid rgba(255, 255, 255, 0.3);
        padding-left: 0;
        padding-top: 10px;
        margin-top: 10px;
        text-align: center;
    }
    
    .section-title {
        font-size: 22px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .servizi-list li {
        width: 100%;
        text-align: center;
    }
    
    .hours-grid {
        font-size: 0.9rem;
    }
}

/* Menu mobile */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    z-index: 1001;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 50px 20px;
}

.mobile-nav.active {
    transform: translateX(0);
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
}

.mobile-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    width: 100%;
    text-align: center;
}

.mobile-nav ul li {
    margin: 15px 0;
}

.mobile-nav ul li a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    display: block;
    padding: 10px;
    transition: var(--transition);
}

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

.mobile-logo {
    margin-bottom: 30px;
}

.mobile-logo img {
    height: 80px;
    width: auto;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    min-height: 600px;
    position: relative;
}

.gallery-item {
    position: relative;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    transform: translateY(20px);
}

.gallery-item.animate-in {
    animation: fadeInUp 0.6s ease forwards;
}

.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }
.gallery-item:nth-child(7) { animation-delay: 0.7s; }
.gallery-item:nth-child(8) { animation-delay: 0.8s; }
.gallery-item:nth-child(9) { animation-delay: 0.9s; }
.gallery-item:nth-child(10) { animation-delay: 1.0s; }
.gallery-item:nth-child(11) { animation-delay: 1.1s; }
.gallery-item:nth-child(12) { animation-delay: 1.2s; }

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    z-index: 10;
}

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

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

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(114, 20, 44, 0.9));
    padding: 20px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.gallery-overlay h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 5px;
    font-weight: 600;
}

.gallery-overlay p {
    color: rgba(255,255,255,0.9);
    font-size: 0.9rem;
}

/* Zoom Indicator - stile migliorato */
.zoom-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(114, 20, 44, 0.9);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gallery-item:hover .zoom-indicator {
    opacity: 1;
    transform: scale(1.1);
}

/* Progress Bar - versione più stabile */
/*
.progress-bar {
    width: 200px;
    height: 6px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    margin: 0 20px;
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #72142c 0%, #8b1538 50%, #72142c 100%);
    width: 0%;
    border-radius: 3px;
    transition: none;
}
*/

/* Pagination Controls */
.pagination-controls {
    max-width: 1000px;
    margin: 0 auto 30px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 20px;
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-wrap: nowrap;
    box-sizing: border-box;
    min-width: 0;
    overflow-x: auto;
}

.pagination-main {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.pagination-btn {
    background: white;
    border: 2px solid #72142c;
    color: #72142c;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    background: #72142c;
    color: white;
    transform: translateY(-2px);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

.page-numbers {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.page-number {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: white;
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
}

.page-number:hover {
    border-color: #72142c;
    color: #72142c;
    transform: translateY(-2px);
}

.page-number.active {
    background: #72142c;
    color: white;
    border-color: #72142c;
    transform: scale(1.1);
}

/* Lightbox migliorato */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    transition: transform 0.3s ease;
}

.lightbox-info {
    background: rgba(255,255,255,0.95);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    max-width: 500px;
    backdrop-filter: blur(10px);
}

.lightbox-info h3 {
    color: #72142c;
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.lightbox-info p {
    color: #666;
    line-height: 1.5;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -50px;
    background: rgba(114, 20, 44, 0.9);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-close:hover {
    background: #72142c;
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(114, 20, 44, 0.8);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.lightbox-nav:hover {
    background: #72142c;
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

/* Animazioni Gallery */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .pagination-controls {
        flex-direction: column;
        gap: 20px;
    }
    
    .progress-bar {
        width: 250px;
        order: -1;
    }
    
    .pagination-main {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .pagination-btn {
        padding: 10px 15px;
        font-size: 0.9rem;
    }
    
    .lightbox-nav {
        width: 50px;
        height: 50px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 10px;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        min-height: 400px;
    }
    
    .pagination-main {
        flex-direction: column;
        gap: 15px;
    }
    
    .page-numbers {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-number {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .progress-bar {
        width: 200px;
    }
}

/* Robust centering for pagination bar */
.pagination-controls {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: white;
    padding: 20px 0 10px 0;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    box-sizing: border-box;
    gap: 10px;
}

.pagination-main {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    width: 100%;
    max-width: 700px;
    box-sizing: border-box;
}

.progress-bar {
    margin: 0 auto;
}

@media (max-width: 1200px) {
  .pagination-controls {
    max-width: 100%;
    padding: 10px 0 5px 0;
  }
  .pagination-main {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .pagination-main {
    flex-direction: column;
    gap: 8px;
  }
}