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

:root {
    /* Colors using HSL format */
    --primary: 351 72% 69%; /* #FF6B6B */
    --secondary: 174 62% 59%; /* #4ECDC4 */
    --accent: 200 75% 59%; /* #45B7D1 */
    --success: 125 44% 70%; /* #96CEB4 */
    --warning: 45 100% 60%; /* #FFD93D */
    --background: 0 0% 100%; /* #FFFFFF */
    --surface: 210 11% 98%; /* #F5F7FA */
    --text-primary: 210 11% 20%; /* #333333 */
    --text-secondary: 210 11% 40%; /* #666666 */
    --border: 210 11% 90%; /* #E5E7EB */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: hsl(var(--text-primary));
    background-color: hsl(var(--background));
}

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

/* Typography */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
}

h3 {
    font-size: 1.8rem;
    font-weight: 600;
}

h4 {
    font-size: 1.3rem;
    font-weight: 500;
}

p {
    margin-bottom: 1rem;
    color: hsl(var(--text-secondary));
}

/* Buttons */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: hsl(351 72% 59%);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: hsl(var(--primary));
    border: 2px solid hsl(var(--primary));
}

.btn-secondary:hover {
    background-color: hsl(var(--primary));
    color: white;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: hsl(var(--text-primary));
    color: white;
    padding: 1rem;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.cookie-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.cookie-text p {
    margin: 0;
    color: #ccc;
    font-size: 0.9rem;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons button {
    padding: 8px 16px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Cookie Modal */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1001;
}

.cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.cookie-category {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid hsl(var(--border));
}

.cookie-category:last-of-type {
    border-bottom: none;
}

.cookie-switch {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.cookie-switch input {
    display: none;
}

.slider {
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    position: relative;
    transition: background-color 0.3s;
}

.slider::before {
    content: '';
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    position: absolute;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
}

.cookie-switch input:checked + .slider {
    background-color: hsl(var(--primary));
}

.cookie-switch input:checked + .slider::before {
    transform: translateX(26px);
}

.cookie-switch input:disabled + .slider {
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-modal-buttons {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: hsl(var(--text-primary));
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: hsl(var(--text-primary));
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: hsl(var(--text-primary));
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-content {
    max-width: 800px;
    padding: 0 20px;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: hsl(var(--text-primary));
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: hsl(var(--text-secondary));
}

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

/* Section Headers */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header svg {
    margin-bottom: 1rem;
}

.section-header h2 {
    color: hsl(var(--text-primary));
    margin-bottom: 1rem;
}

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

/* Chi Siamo Section */
.chi-siamo {
    padding: 6rem 0;
    background-color: hsl(var(--surface));
}

.chi-siamo-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.chi-siamo-text h3 {
    color: hsl(var(--text-primary));
    margin-bottom: 1rem;
}

.chi-siamo-text ul {
    list-style: none;
    margin: 2rem 0;
}

.chi-siamo-text li {
    padding: 0.5rem 0;
    color: hsl(var(--text-secondary));
}

.chi-siamo-stats {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.stat {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stat svg {
    margin-bottom: 1rem;
}

.stat h4 {
    font-size: 2rem;
    color: hsl(var(--text-primary));
    margin-bottom: 0.5rem;
}

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

/* Servizi Section */
.servizi {
    padding: 6rem 0;
}

.servizi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.servizio {
    text-align: center;
    padding: 2rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.servizio:hover {
    transform: translateY(-5px);
}

.servizio svg {
    margin-bottom: 1.5rem;
}

.servizio h3 {
    color: hsl(var(--text-primary));
    margin-bottom: 1rem;
}

/* Recensioni Section */
.recensioni {
    padding: 6rem 0;
    background-color: hsl(var(--surface));
}

.recensioni-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.recensione {
    background-color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.stelle {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.recensione p {
    font-style: italic;
    margin-bottom: 1.5rem;
    color: hsl(var(--text-secondary));
}

.cliente strong {
    color: hsl(var(--text-primary));
    display: block;
    margin-bottom: 0.25rem;
}

.cliente span {
    color: hsl(var(--text-secondary));
    font-size: 0.9rem;
}

/* Newsletter Section */
.newsletter {
    padding: 4rem 0;
    background-color: hsl(var(--primary));
    color: white;
}

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

.newsletter-text svg {
    margin-bottom: 1rem;
}

.newsletter-text h2 {
    color: white;
    margin-bottom: 1rem;
}

.newsletter-text p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin: 0;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
}

.newsletter-form input:focus {
    outline: 2px solid white;
}

/* Contatti Section */
.contatti {
    padding: 6rem 0;
}

.contatti-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contatti-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.info-item svg {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.info-item h4 {
    color: hsl(var(--text-primary));
    margin-bottom: 0.5rem;
}

.info-item p {
    margin: 0;
    line-height: 1.4;
}

/* Contact Form */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

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

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid hsl(var(--border));
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: hsl(var(--primary));
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background-color: hsl(var(--text-primary));
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #ccc;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: hsl(var(--primary));
}

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

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

.social-links a:hover {
    background-color: hsl(var(--primary));
    transform: translateY(-2px);
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .chi-siamo-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .chi-siamo-stats {
        flex-direction: row;
        overflow-x: auto;
        gap: 1rem;
    }
    
    .stat {
        min-width: 200px;
        padding: 1.5rem;
    }
    
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .contatti-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cookie-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .cookie-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .nav-menu {
        display: none;
    }
    
    .hamburger {
        display: flex;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .servizi-grid {
        grid-template-columns: 1fr;
    }
    
    .recensioni-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Animation for smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading animation for forms */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ccc;
    border-top: 2px solid hsl(var(--primary));
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
