/* CSS Custom Properties */
:root {
    /* Colors - Italian Elegance Palette */
    --primary: 28 73% 30%; /* Deep Olive Green */
    --primary-light: 28 73% 40%;
    --primary-dark: 28 73% 20%;
    --secondary: 20 69% 50%; /* Warm Terracotta */
    --secondary-light: 20 69% 60%;
    --accent: 45 93% 58%; /* Golden Yellow */
    --background: 30 20% 98%; /* Warm White */
    --surface: 0 0% 100%; /* Pure White */
    --text-primary: 30 25% 15%; /* Dark Brown */
    --text-secondary: 30 15% 40%; /* Medium Brown */
    --text-muted: 30 10% 60%; /* Light Brown */
    --border: 30 15% 90%; /* Light Border */
    --shadow: 30 25% 15%; /* Shadow Color */
    
    /* Typography */
    --font-primary: 'Georgia', 'Times New Roman', serif;
    --font-secondary: 'Arial', 'Helvetica', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    
    /* Transitions */
    --transition: all 0.3s ease;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px hsla(var(--shadow), 0.1);
    --shadow-md: 0 4px 6px hsla(var(--shadow), 0.1);
    --shadow-lg: 0 10px 15px hsla(var(--shadow), 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-secondary);
    font-size: 16px;
    line-height: 1.6;
    color: hsl(var(--text-primary));
    background-color: hsl(var(--background));
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 700;
    line-height: 1.2;
    color: hsl(var(--text-primary));
    margin-bottom: var(--space-sm);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: var(--space-sm);
    color: hsl(var(--text-secondary));
}

a {
    color: hsl(var(--primary));
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: hsl(var(--primary-light));
}

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.btn {
    display: inline-block;
    padding: var(--space-sm) var(--space-lg);
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-size: 1rem;
}

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

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

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

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

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

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

.section-header {
    text-align: center;
    margin-bottom: var(--space-2xl);
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
}

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

/* Image Placeholders */
.image-placeholder, .icon-placeholder, .avatar-placeholder, .map-placeholder {
    background-color: hsl(var(--border));
    border: 2px dashed hsl(var(--text-muted));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-style: italic;
    color: hsl(var(--text-muted));
    padding: var(--space-md);
    text-align: center;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: hsl(var(--surface));
    border-top: 1px solid hsl(var(--border));
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: var(--space-lg);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

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

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.cookie-content h3 {
    margin-bottom: var(--space-sm);
}

.cookie-buttons {
    margin-top: var(--space-md);
    display: flex;
    gap: var(--space-sm);
    justify-content: center;
    flex-wrap: wrap;
}

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

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

.modal-content {
    background-color: hsl(var(--surface));
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: var(--space-lg);
    border-bottom: 1px solid hsl(var(--border));
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: hsl(var(--text-muted));
}

.modal-body {
    padding: var(--space-lg);
}

.cookie-category {
    margin-bottom: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-md);
}

.cookie-category div {
    flex: 1;
}

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

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

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

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

.modal-footer {
    padding: var(--space-lg);
    border-top: 1px solid hsl(var(--border));
    text-align: center;
}

/* Header */
.header {
    background-color: hsl(var(--surface));
    box-shadow: var(--shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) 0;
}

.nav-brand a {
    color: hsl(var(--text-primary));
}

.nav-brand h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    color: hsl(var(--primary));
}

.nav-brand span {
    font-size: 0.9rem;
    color: hsl(var(--text-muted));
    font-style: italic;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: var(--space-lg);
    margin: 0;
}

.nav-link {
    font-weight: 500;
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    background-color: hsl(var(--primary) / 0.1);
}

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

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: hsl(var(--text-primary));
    transition: var(--transition);
}

/* Hero Section */
.hero {
    padding: calc(var(--space-2xl) + 80px) 0 var(--space-2xl);
    background: linear-gradient(135deg, hsl(var(--background)), hsl(var(--surface)));
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    color: hsl(var(--primary));
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 600;
    color: hsl(var(--secondary));
    margin-bottom: var(--space-md);
}

.hero-description {
    font-size: 1.1rem;
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
}

.hero-image .image-placeholder {
    height: 400px;
    font-size: 1.1rem;
}

/* About Section */
.about {
    padding: var(--space-2xl) 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.about-text h2 {
    color: hsl(var(--primary));
    margin-bottom: var(--space-lg);
}

.about-text p {
    font-size: 1.1rem;
    margin-bottom: var(--space-md);
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    margin-top: var(--space-xl);
}

.stat {
    text-align: center;
    padding: var(--space-lg);
    background-color: hsl(var(--surface));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat h3 {
    font-size: 2rem;
    color: hsl(var(--secondary));
    margin-bottom: var(--space-xs);
}

.stat p {
    color: hsl(var(--text-muted));
    margin: 0;
    font-weight: 600;
}

.about-image .image-placeholder {
    height: 400px;
}

/* Services Section */
.services {
    padding: var(--space-2xl) 0;
    background-color: hsl(var(--surface));
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-xl);
}

.service-card {
    text-align: center;
    padding: var(--space-xl);
    background-color: hsl(var(--background));
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

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

.service-icon {
    margin-bottom: var(--space-lg);
}

.service-icon .icon-placeholder {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    border-radius: 50%;
    background-color: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary));
}

.service-card h3 {
    color: hsl(var(--primary));
    margin-bottom: var(--space-md);
}

/* Products Section */
.products {
    padding: var(--space-2xl) 0;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.product-category {
    background-color: hsl(var(--surface));
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.category-image .image-placeholder {
    height: 200px;
    border-radius: 0;
    border: none;
}

.category-content {
    padding: var(--space-lg);
}

.category-content h3 {
    color: hsl(var(--primary));
    margin-bottom: var(--space-md);
}

.category-content p {
    margin-bottom: var(--space-lg);
}

/* Testimonials Section */
.testimonials {
    padding: var(--space-2xl) 0;
    background-color: hsl(var(--surface));
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-xl);
}

.testimonial-card {
    background-color: hsl(var(--background));
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    position: relative;
}

.testimonial-content {
    margin-bottom: var(--space-lg);
}

.testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.7;
    color: hsl(var(--text-primary));
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.author-avatar .avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin: 0;
}

.author-info h4 {
    margin-bottom: var(--space-xs);
    color: hsl(var(--primary));
}

.author-info span {
    color: hsl(var(--text-muted));
    font-size: 0.9rem;
}

/* Newsletter Section */
.newsletter {
    padding: var(--space-2xl) 0;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--secondary)));
    color: white;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.newsletter p {
    color: white;
    margin-bottom: var(--space-xl);
    font-size: 1.1rem;
}

.newsletter-form {
    margin-top: var(--space-xl);
}

.form-group {
    display: flex;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
}

.form-group input {
    flex: 1;
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
}

.form-group input:focus {
    outline: 2px solid hsl(var(--accent));
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    text-align: left;
    font-size: 0.9rem;
}

.form-checkbox input {
    margin-top: 3px;
}

.form-checkbox a {
    color: white;
    text-decoration: underline;
}

/* Contact Section */
.contact {
    padding: var(--space-2xl) 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact-item {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.contact-icon .icon-placeholder {
    width: 50px;
    height: 50px;
    margin: 0;
    border-radius: 50%;
    background-color: hsl(var(--primary) / 0.1);
    border-color: hsl(var(--primary));
}

.contact-details h4 {
    color: hsl(var(--primary));
    margin-bottom: var(--space-xs);
}

.contact-details p {
    margin: 0;
    color: hsl(var(--text-secondary));
}

.contact-map .map-placeholder {
    height: 400px;
}

/* Footer */
.footer {
    background-color: hsl(var(--primary));
    color: white;
    padding: var(--space-2xl) 0 var(--space-lg);
}

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

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: var(--space-md);
}

.footer-section p,
.footer-section li,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
}

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

.footer-section li {
    margin-bottom: var(--space-xs);
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: var(--space-md);
    margin-top: var(--space-md);
}

.social-icon {
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-bottom p {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-sm);
    }
    
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        right: 0;
        background-color: hsl(var(--surface));
        box-shadow: var(--shadow-lg);
        padding: var(--space-lg);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-list {
        flex-direction: column;
        gap: var(--space-md);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-category {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        padding: var(--space-md) var(--space-xl);
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.6rem; }
    
    .hero {
        padding: calc(var(--space-xl) + 80px) 0 var(--space-xl);
    }
    
    .services-grid,
    .products-grid,
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .cookie-content {
        padding: var(--space-md);
    }
    
    .modal-content {
        width: 95%;
    }
}

/* Print Styles */
@media print {
    .header,
    .cookie-banner,
    .cookie-modal,
    .newsletter {
        display: none;
    }
    
    .hero {
        padding-top: var(--space-lg);
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .section-header,
    .service-card,
    .product-category,
    .testimonial-card {
        page-break-inside: avoid;
    }
}

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

/* Focus Styles */
:focus {
    outline: 2px solid hsl(var(--accent));
    outline-offset: 2px;
}

.btn:focus,
input:focus,
button:focus {
    outline: 2px solid hsl(var(--accent));
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --text-primary: 0 0% 0%;
        --text-secondary: 0 0% 20%;
        --border: 0 0% 50%;
    }
}
