/* styles.css - La Divina */

:root {
    --primary: #8B7355;
    --primary-dark: #6B5745;
    --gold: #D4AF37;
    --cream: #FFF8F0;
    --dark: #2C2416;
    --white: #FFFFFF;
    --shadow: 0 10px 40px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.15);
    /* Font Stack */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-serif: 'Playfair Display', serif; /* Font raffinato per titoli */
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-base);
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
    background: var(--white);
}

/* Loader */
.loader {
    position: fixed;
    inset: 0;
    background: var(--cream);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-inner {
    width: 60px;
    height: 60px;
    border: 3px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Navigation */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    padding: 1.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

header.scrolled {
    padding: 1rem 0;
    box-shadow: 0 5px 30px rgba(0,0,0,0.08);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
    transition: transform 0.3s ease;
}

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

.nav-links {
    display: flex;
    gap: 3rem;
    align-items: center;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary);
}

.cta-button {
    background: linear-gradient(135deg, var(--gold), #B8941F);
    color: var(--white) !important;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(212, 175, 55, 0.4);
}
.cta-button::after { display: none; }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--dark);
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px; /* Offset for fixed header */
}

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.carousel-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 248, 240, 0.85) 0%,
        rgba(255, 245, 230, 0.75) 100%
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-bg {
    position: absolute;
    inset: 0;
    opacity: 0.20;
    background-image: url('./images/background_2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    pointer-events: none;
}

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

.hero-logo {
    width: 280px;
    margin-bottom: 2rem;
    filter: drop-shadow(0 10px 30px rgba(0,0,0,0.1));
    animation: float 2s ease-in-out;
}

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

.hero h1 {
    font-family: var(--font-serif); /* Mantiene il font elegante */
    font-style: italic;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -0.02em;
    
    /* Effetto Sfumato Originale Ripristinato */
    background: linear-gradient(135deg, var(--primary), var(--gold));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 1px;
    /*text-transform: uppercase;*/
}

.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(139, 115, 85, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(139, 115, 85, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    padding: 1rem 2.5rem;
    border: 2px solid var(--primary);
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* Sections */
section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header h2 {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}

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

.section-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 1.5rem auto 0;
}

/* Storia Section */
.timeline {
    position: relative;
    padding: 3rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg, var(--gold), var(--primary));
}

.timeline-item {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease;
}

.timeline-item:nth-child(even) {
    transform: translateX(50px);
}

.timeline-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.timeline-content {
    background: var(--white);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 500px;
    position: relative;
    transition: all 0.3s ease;
}

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

.timeline-content h3 {
    font-family: var(--font-serif);
    color: var(--primary-dark);
}

.timeline-year {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--gold);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
}

.timeline-item:nth-child(odd) .timeline-year {
    right: -80px;
}

.timeline-item:nth-child(even) .timeline-year {
    left: -80px;
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: zoom-in;
    opacity: 0;
    transform: translateY(30px);
}

.product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image {
    transform: scale(1.1);
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.product-description {
    color: #666;
    font-size: 0.95rem;
}

/* Certifications */
.certifications {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    margin-top: 3rem;
}

.cert-item {
    text-align: center;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.5s ease;
}

.cert-item.visible {
    opacity: 1;
    transform: scale(1);
}

.cert-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--gold), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3);
    transition: transform 0.6s ease;
}

.cert-icon:hover {
    transform: rotate(360deg) scale(1.1);
}

/* Download Area */
.download-area {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 1px solid rgba(139, 69, 19, 0.1);
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px auto 0 auto; 
    justify-content: center; 
    max-width: 1200px; 
}

.download-item {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.download-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
}

.download-item h4 {
    color: #2c1810;
    font-size: 1.1em;
    margin-bottom: 15px;
    font-weight: 600;
}

.download-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: 2px solid;
    font-weight: 500;
}

.download-btn.tech {
    background: rgba(139, 69, 19, 0.05);
    color: #8B4513;
    border-color: #8B4513;
}

.download-btn.tech:hover {
    background: #8B4513;
    color: white;
}

/* Contact Section */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-form {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary);
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #eee;
    border-radius: 10px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.contact-info {
    padding: 2.5rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 15px;
    transition: all 0.3s ease;
}

.info-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
	flex-shrink: 0;
}

/* Map */
.map-container {
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    margin-top: 3rem;
    box-shadow: var(--shadow);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--dark), #1a1a1a);
    color: var(--white);
    padding: 4rem 2rem 2rem;
    margin-top: 5rem;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--gold);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #fff;
}

.social-links a:hover {
    background: var(--gold);
    transform: translateY(-3px);
}
.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #888;
}

/* WhatsApp Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 2rem;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

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

.whatsapp-float:hover {
    transform: scale(1.15);
    box-shadow: 0 15px 40px rgba(37, 211, 102, 0.4);
}

/* Scroll to Top */
.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(139, 115, 85, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.4);
}

/* === LIGHTBOX STYLES === */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox.open {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    animation: lightboxZoom 0.3s ease;
}

.lightbox-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-width: 1200px;
    max-height: 80vh;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: -10px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lightbox-close:hover {
    background: white;
    transform: scale(1.1);
}

.lightbox-info {
    position: absolute;
    bottom: -60px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.lightbox-info h3 {
    margin: 0 0 5px 0;
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    font-family: var(--font-serif);
}

.lightbox-info p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

@keyframes lightboxZoom {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

/* Language Selector */
.language-selector {
    position: relative;
}

.lang-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark);
    transition: all 0.3s ease;
}

.lang-dropdown-btn:hover {
    border-color: var(--gold);
    background: rgba(212, 175, 55, 0.05);
}

.arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-dropdown-btn.active .arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.lang-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 12px 16px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: background 0.2s ease;
}

.lang-option:first-child { border-radius: 12px 12px 0 0; }
.lang-option:last-child { border-radius: 0 0 12px 12px; }

.lang-option:hover { background: rgba(212, 175, 55, 0.1); }
.lang-option.active { background: rgba(212, 175, 55, 0.2); color: var(--gold); font-weight: 600; }

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transition: right 0.3s ease;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    }

    .nav-links.active {
        right: 0;
    }

    .menu-toggle {
        display: block;
        z-index: 1001;
    }

    .menu-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    .hero { min-height: 80vh; }
    .hero-buttons { flex-direction: column; align-items: center; }

    .timeline::before { left: 30px; }
    .timeline-item { justify-content: flex-start; padding-left: 60px; }
    .timeline-year { left: 0 !important; right: auto !important; }

    .contact-container { grid-template-columns: 1fr; }
    .products-grid { grid-template-columns: 1fr; }
    .downloads-grid { grid-template-columns: 1fr; gap: 20px; }
    
    .download-item { padding: 20px; }
    
    .scroll-to-top { bottom: 110px; right: 20px; width: 45px; height: 45px; font-size: 20px; }

    .language-selector { margin-top: 1rem; }
    .lang-dropdown { left: 50%; right: auto; transform: translateX(-50%) translateY(-10px); }
    .lang-dropdown.show { transform: translateX(-50%) translateY(0); }

    .lightbox-close { top: -35px; right: 0; width: 38px; height: 38px; font-size: 20px; }
    .lightbox-info { bottom: -80px; padding: 12px; }
    .lightbox-info h3 { font-size: 16px; }
    .lightbox-info p { font-size: 13px; }
}

.footer-bottom a {
    color: inherit;       /* Prende lo stesso colore grigio del testo padre */
    text-decoration: none; /* Rimuove la sottolineatura (opzionale) */
    font-weight: 500;      /* Un po' più marcato per farlo notare */
    transition: color 0.3s ease;
}

.footer-bottom a:hover {
    color: var(--gold);    /* Diventa dorato quando ci passi sopra col mouse */
}