/* Reset e stili di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

a {
    text-decoration: none;
    color: #333;
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background-color: #0bbcf7;
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: #08dcf4;
    transform: translateY(-2px);
}

.btn.disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.btn.disabled:hover {
    transform: none;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    font-style: italic;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

nav ul li a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: #333;
    bottom: 0;
    left: 0;
    transition: width 0.3s ease;
}

nav ul li a:hover:after,
nav ul li a.active:after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 80vh;
    background-image: url('sfondo.webp');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Featured Designers */
.featured-designers,
.featured-works,
.about-project {
    padding: 80px 5%;
}

.featured-designers h2,
.featured-works h2,
.about-project h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    position: relative;
}

.featured-designers h2:after,
.featured-works h2:after,
.about-project h2:after {
    content: '';
    position: absolute;
    width: 100px;
    height: 3px;
    background-color: #333;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}

.designer-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.designer-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.designer-card:hover {
    transform: translateY(-10px);
}

.designer-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.designer-card h3,
.designer-card p,
.designer-card a {
    padding: 0 20px;
}

.designer-card h3 {
    margin-top: 20px;
    font-size: 1.4rem;
}

.designer-card p {
    margin: 10px 0 20px;
    color: #666;
}

.designer-card a {
    display: inline-block;
    margin: 0 20px 20px;
}

/* Featured Works */
.work-slider {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.work-slide {
    position: relative;
}

.work-slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: 8px;
}

.work-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

.work-info h3 {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.work-info p {
    margin-bottom: 15px;
    font-style: italic;
}

.slider-controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.slider-controls button {
    background-color: #333;
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin: 0 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-controls button:hover {
    background-color: #555;
}

/* About Project */
.about-project {
    background-color: #f0f0f0;
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content p {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 50px 5% 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #ddd;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #fff;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    color: #fff;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #ddd;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
}

/* Responsive Styles */
@media (max-width: 768px) {
    header {
        padding: 15px 5%;
    }
    
    nav {
        position: fixed;
        top: 0;
        right: -300px;
        width: 250px;
        height: 100vh;
        background-color: #fff;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 101;
    }
    
    nav.active {
        right: 0;
    }
    
    nav ul {
        flex-direction: column;
        padding: 80px 0 0 0;
    }
    
    nav ul li {
        margin: 0;
    }
    
    nav ul li a {
        display: block;
        padding: 15px 30px;
    }
    
    .mobile-menu-btn {
        display: block;
        z-index: 102;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .featured-designers h2,
    .featured-works h2,
    .about-project h2 {
        font-size: 2rem;
    }
    
    .featured-designers,
    .featured-works,
    .about-project {
        padding: 50px 5%;
    }
    
    .work-slide img {
        height: 350px;
    }
}

/* Pagina dei Designer */
.designers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    padding: 50px 5%;
}

/* Pagina di un singolo Designer */
.designer-profile {
    padding: 50px 5%;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 50px;
}

.designer-image {
    border-radius: 8px;
    overflow: hidden;
}

.designer-image img {
    width: 100%;
    height: auto;
}

.designer-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.designer-info .bio {
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.designer-works {
    margin-top: 40px;
}

.designer-works h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.work-card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.work-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.work-card .work-title {
    padding: 15px;
    text-align: center;
}

@media (max-width: 768px) {
    .designer-profile {
        grid-template-columns: 1fr;
    }
}

/* Pagina Dettaglio Opera */
.work-detail {
    padding: 50px 5%;
}

.work-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 50px;
}

.work-images {
    position: relative;
}

.main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
}

.thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.thumbnail {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.thumbnail:hover {
    opacity: 0.8;
}

.work-description h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.work-description .designer {
    font-style: italic;
    margin-bottom: 20px;
}

.work-description .details {
    margin-bottom: 30px;
}

.work-description .details p {
    margin-bottom: 10px;
}

.work-3d-viewer {
    margin-top: 50px;
    padding: 30px;
    background-color: #f0f0f0;
    border-radius: 8px;
}

.work-3d-viewer h3 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
}

#canvas-container {
    width: 100%;
    height: 500px;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
}

@media (max-width: 992px) {
    .work-header {
        grid-template-columns: 1fr;
    }
}

/* Galleria Fotografica */
.gallery-container {
    padding: 50px 5%;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.filter-btn {
    background-color: transparent;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.filter-btn:hover,
.filter-btn.active {
    color: #000;
    font-weight: 600;
}

.filter-btn.active {
    border-bottom: 2px solid #333;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-item-info {
    opacity: 1;
}

.gallery-item-info h3 {
    margin-bottom: 5px;
}

.gallery-item-info p {
    font-style: italic;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80%;
}

.lightbox-image {
    max-width: 100%;
    max-height: 100%;
    border-radius: 4px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    color: #fff;
    text-align: center;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-nav button {
    background-color: transparent;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    padding: 10px;
}

/* About Page */
.about-page {
    padding: 50px 5%;
}

.about-intro {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
}

.about-intro h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.about-intro p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.team-section {
    margin-top: 50px;
}

.team-section h3 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 30px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
}

.team-member h4 {
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.team-member p {
    color: #666;
}

/* Contact Page */
.contact-page {
    padding: 50px 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.contact-info p {
    margin-bottom: 20px;
}

.designer-info {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* centra tutto il contenuto orizzontalmente */
    text-align: center;  /* centra anche i testi */
}

.designer-info h3,
.designer-period,
.designer-bio,
.iconic-work-title {
    text-align: center; /* testo centrato */
}

.designer-info .btn {
    margin-top: 1rem;
    align-self: center; /* assicura che il pulsante sia centrato */
}

.contact-info .info-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-info .info-item i {
    margin-right: 15px;
    font-size: 1.2rem;
}

.contact-form h2 {
    font-size: 2.5rem;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    height: 150px;
    resize: vertical;
}

@media (max-width: 768px) {
    .contact-page {
        grid-template-columns: 1fr;
    }
}

/* Stili aggiuntivi per la pagina della galleria */

.page-banner {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('/api/placeholder/1200/400');
    background-size: cover;
    background-position: center;
    height: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: #fff;
    padding: 0 20px;
}

.page-banner h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.page-banner p {
    font-size: 1.2rem;
}

/* Miglioramenti alla griglia della galleria */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    transition: transform 0.5s ease;
    display: block;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: #fff;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(20px);
}

.gallery-item:hover .gallery-item-info {
    opacity: 1;
    transform: translateY(0);
}

.gallery-item-info h3 {
    margin-bottom: 5px;
    font-size: 1.3rem;
}

.gallery-item-info p {
    font-style: italic;
    font-size: 0.9rem;
}

/* Miglioramenti ai filtri */
.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid transparent;
    padding: 10px 25px;
    margin: 0 5px 10px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 30px;
    position: relative;
    overflow: hidden;
}

.filter-btn:hover {
    color: #000;
    background-color: #f5f5f5;
}

.filter-btn.active {
    border-color: #333;
    font-weight: 600;
}

.filter-btn:before {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #333;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.filter-btn:hover:before {
    transform: scaleX(1);
}

/* Miglioramenti al lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
    animation: zoomIn 0.3s forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lightbox-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 4px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    transition: background-color 0.3s ease;
}

.lightbox-close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.lightbox-caption {
    position: absolute;
    bottom: -100px;
    left: 0;
    width: 100%;
    color: #fff;
    text-align: center;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 15px;
    border-radius: 4px;
}

.lightbox-caption h3 {
    margin-bottom: 5px;
    font-size: 1.5rem;
}

.lightbox-caption p {
    margin-bottom: 8px;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    padding: 0 20px;
}

.lightbox-nav button {
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease;
}

.lightbox-nav button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Responsive per la galleria */
@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .lightbox-content {
        max-width: 90%;
    }
    
    .lightbox-caption {
        bottom: -120px;
    }
}

@media (max-width: 768px) {
    .page-banner h1 {
        font-size: 2.2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .gallery-item img {
        height: 200px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .lightbox-image {
        max-height: 60vh;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .gallery-item img {
        height: 250px;
    }
    
    .lightbox-nav {
        width: 90%;
        left: 5%;
    }
    
    .lightbox-caption {
        bottom: -150px;
        padding: 10px;
    }
    
    .lightbox-caption h3 {
        font-size: 1.3rem;
    }
}