/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: rgba(100,100,100,1);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 600;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    background-color: rgba(219, 188, 144, 1);
    color: #fff;
    border-color: rgba(219, 188, 144, 1);
}

.btn-primary:hover {
    background-color: rgba(199, 168, 124, 1);
    border-color: rgba(199, 168, 124, 1);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: rgba(219, 188, 144, 1);
    border-color: rgba(219, 188, 144, 1);
}

.btn-secondary:hover {
    background-color: rgba(219, 188, 144, 1);
    color: #fff;
    transform: translateY(-2px);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: relative;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

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

.nav-list {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    color: #2c3e50;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #3498db;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3498db;
    transition: width 0.3s ease;
}

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

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

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: rgba(100,100,100,1);
    margin: 3px 0;
    transition: 0.3s;
}

.social-icons {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.social-link {
    color: #2c3e50;
    transition: color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(52, 152, 219, 0.1);
}

.social-link:hover {
    color: #3498db;
    transform: translateY(-2px);
    background: rgba(52, 152, 219, 0.2);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('immagini/homepage.jpeg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding: 120px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 70vh;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.hero-subtitle {
    font-size: 1.5rem;
    color: rgba(219, 188, 144, 1);
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-description {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 2.5rem;
    line-height: 1.8;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Products Section */
.products {
    padding: 80px 0;
    background-color: #fff;
}

.section-title {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: rgba(219, 188, 144, 1);
}

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

.product-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    height: 300px;
    display: flex;
    align-items: flex-end;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
}

.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.2) 0%, rgba(0, 0, 0, 0.7) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
}

.product-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.product-badge {
    position: absolute;
    top: 0;
    left: 0;
    background-color: rgba(212, 175, 55, 0.9);
    color: #fff;
    padding: 8px 15px;
    border-radius: 0 0 20px 0;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.product-content {
    color: #fff;
    text-align: left;
}

.product-title {
    color: #fff;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.product-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
}

.product-link {
    color: rgba(219, 188, 144, 1);
    font-weight: 600;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 8px 16px;
    border-radius: 25px;
    display: inline-block;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(219, 188, 144, 0.3);
}

.product-link:hover {
    background-color: rgba(219, 188, 144, 1);
    color: #fff;
    transform: translateY(-2px);
}

/* Services Section */
.services {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-item {
    text-align: center;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.service-icon {
    margin-bottom: 1.5rem;
}

.service-icon img {
    width: 60px;
    height: 60px;
    margin: 0 auto;
    border-radius: 50%;
}

.service-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.service-item p {
    color: #666;
    margin-bottom: 0;
}

/* Footer */
.footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 50px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    color: rgba(219, 188, 144, 1);
    margin-bottom: 1rem;
}

.footer-section p {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #fff;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: rgba(219, 188, 144, 1);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* WhatsApp Button */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
    color: #fff;
}

.whatsapp-btn:active {
    transform: scale(0.95);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        display: grid;
        grid-template-columns: auto 1fr auto;
        align-items: center;
        gap: 1rem;
    }

    .menu-toggle {
        display: flex;
        order: 1;
    }

    .logo {
        order: 2;
        justify-self: center;
    }

    .social-icons {
        order: 3;
        justify-self: end;
    }

    .social-icons .social-link {
        width: 35px;
        height: 35px;
    }

    .nav {
        display: none;
        order: 4;
        grid-column: 1 / -1;
    }

    .nav.nav-open {
        display: block;
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    .nav.nav-open .nav-list {
        flex-direction: column;
        padding: 1rem 0;
    }

    .nav.nav-open .nav-link {
        padding: 1rem 2rem;
        border-bottom: 1px solid #f0f0f0;
        display: block;
    }

    .nav.nav-open .nav-link:last-child {
        border-bottom: none;
    }

    .hero {
        padding: 80px 0;
        min-height: 60vh;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 250px;
    }

    .products,
    .services {
        padding: 60px 0;
    }

    .products-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .whatsapp-btn {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

/* Stili per titolo promozionale responsive */
.promo-title .promo-mobile {
    display: none;
}

.promo-title .promo-desktop {
    display: inline;
}

@media (max-width: 768px) {
    .promo-title .promo-desktop {
        display: none;
    }
    
    .promo-title .promo-mobile {
        display: inline;
        text-align: center;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 60px 0;
        min-height: 50vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 2rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .product-card {
        height: 250px;
        margin: 0 10px;
    }

    .product-overlay {
        padding: 1rem;
    }

    .product-title {
        font-size: 1.2rem;
    }

    .product-description {
        font-size: 0.8rem;
        margin-bottom: 0.8rem;
    }

    .product-link {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .service-item {
        margin: 0 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus {
    outline: 2px solid #d4af37;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .hero {
        background: #fff;
    }
    
    .product-card,
    .service-item {
        border: 2px solid rgba(100,100,100,1);
    }
}

/* Print styles */
@media print {
    .header,
    .whatsapp-btn {
        display: none;
    }
    
    .hero {
        background: #fff;
        color: #000;
    }
    
    .footer {
        background: #fff;
        color: #000;
    }
}

/* Banner Fisso "Richiedi un preventivo" */
.quote-banner {
    position: fixed;
    left: 30px;
    bottom: 30px;
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 15px 20px;
    border-radius: 25px;
    box-shadow: 0 4px 20px rgba(220, 53, 69, 0.3);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
}

.quote-banner:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(220, 53, 69, 0.4);
}

.quote-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quote-icon {
    flex-shrink: 0;
}

.quote-text {
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

/* Modal Preventivo - Allineato al design del form contatti */
.quote-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
}

.quote-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.quote-modal-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    animation: slideIn 0.3s ease;
    margin: 20px;
}

.quote-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.quote-modal-close:hover {
    color: #000;
}

.quote-modal h2 {
    color: #333;
    margin-bottom: 1.5rem;
    text-align: left;
    font-size: 1.8rem;
    font-weight: 600;
}

.quote-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.quote-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.quote-form .form-group {
    margin-bottom: 0;
}

.quote-form .form-group.full-width {
    grid-column: 1 / -1;
}

.quote-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 1rem;
}

.quote-form input,
.quote-form select,
.quote-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.quote-form input:focus,
.quote-form select:focus,
.quote-form textarea:focus {
    outline: none;
    border-color: rgba(219, 188, 144, 1);
}

.quote-form textarea {
    resize: vertical;
    min-height: 120px;
    font-family: inherit;
}

.quote-form .checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0;
}

.quote-form .checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.quote-form .checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
    font-size: 0.9rem;
    line-height: 1.5;
    cursor: pointer;
    flex: 1;
}

.quote-form .submit-btn {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
    align-self: flex-start;
}

.quote-form .submit-btn:hover {
    background-color: #1e3d6f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.3);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsive Design per Banner */
@media (max-width: 768px) {
    .quote-banner {
        left: 20px;
        bottom: 20px;
        transform: none;
        min-width: 200px;
        padding: 12px 20px;
    }
    
    .quote-banner-content {
        gap: 8px;
    }
    
    .quote-text {
        font-size: 13px;
    }
    
    .quote-modal-content {
        width: 95%;
        max-width: none;
        padding: 25px;
        margin: 15px;
    }
    
    .quote-form .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .quote-modal h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
    
    .quote-form {
        gap: 15px;
    }
    
    .quote-form input,
    .quote-form select,
    .quote-form textarea {
        padding: 12px;
        font-size: 16px; /* Previene zoom su iOS */
    }
}

@media (max-width: 480px) {
    .quote-banner {
        min-width: 180px;
        padding: 10px 16px;
        left: 15px;
    }
    
    .quote-text {
        font-size: 12px;
    }
    
    .quote-modal-content {
        padding: 20px;
        border-radius: 10px;
        margin: 10px;
        width: calc(100% - 20px);
    }
    
    .quote-modal h2 {
        font-size: 18px;
    }
    
    .quote-form input,
    .quote-form select,
    .quote-form textarea {
        padding: 12px;
        font-size: 16px; /* Previene zoom su iOS */
    }
    
    .quote-form .submit-btn {
        padding: 15px 30px;
    }
}