@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Open+Sans:wght@400;600&display=swap');

:root {
    /* Color Palette */
    --primary-color: #A76742; /* Warm earthy tone, reminiscent of hair products */
    --secondary-color: #6C7A89; /* Muted grey-blue for sophistication */
    --accent-color: #E2B04E; /* Golden yellow for vibrancy */
    --text-dark: #2C3E50; /* Dark charcoal for body text */
    --text-light: #ECF0F1; /* Light grey for contrasting text */
    --background-light: #F4F7F6; /* Soft off-white for main backgrounds */
    --background-dark: #34495E; /* Dark blue-grey for footer/contrast sections */
    --border-color: rgba(0, 0, 0, 0.1);
    --hover-effect-duration: 0.3s;

    /* Typography */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Open Sans', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--background-light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color var(--hover-effect-duration) ease;
}

a:hover {
    color: var(--accent-color);
}

h1, h2, h3 {
    font-family: var(--heading-font);
    color: var(--text-dark);
    margin-bottom: 0.5em;
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1em;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1em;
}

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

/* Utility Classes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.button {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    text-align: center;
    transition: all var(--hover-effect-duration) ease;
    border: 2px solid transparent;
    font-family: var(--body-font);
    font-size: 1rem;
}

.primary-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.primary-button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.secondary-button {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.secondary-button:hover {
    background-color: var(--primary-color);
    color: var(--text-light);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

/* Reveal Elements (for scroll-based animations) */
.reveal {
    opacity: 1; /* Start visible */
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
#main-header {
    background-color: var(--background-light);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0); /* Initial subtle shadow */
    transition: box-shadow 0.3s ease-in-out, background-color 0.3s ease-in-out;
}

#main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.logo a {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-right: 1.5rem;
    white-space: nowrap;
}

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

#main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

#main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

#main-nav ul li {
    margin: 0 1rem;
}

#main-nav ul li a {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding-bottom: 5px;
}

#main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease-out;
}

#main-nav ul li a:hover::after {
    width: 100%;
}

#main-nav ul li a.cta-button {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    margin-left: 1.5rem;
    border: 2px solid var(--primary-color);
}

#main-nav ul li a.cta-button:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--text-dark);
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Hamburger Menu (Hidden by default) */
.menu-toggle {
    display: none;
}

.hamburger {
    display: none;
    font-size: 1.8rem;
    color: var(--text-dark);
    cursor: pointer;
}

/* Hero Section */
#hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    text-align: center;
    min-height: 80vh;
    padding-top: 100px; /* Adjust for fixed header */
    overflow: hidden;
}

#hero img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -2;
    filter: brightness(0.6);
}

#hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.8));
    z-index: -1;
}

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

.hero-content h1 {
    font-size: 4.5rem;
    color: var(--text-light);
    margin-bottom: 0.3em;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.4);
}

/* Services Section */
#servizi {
    padding: 5rem 0;
    background-color: var(--background-light);
}

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

.service-card {
    background-color: #fff;
    padding: 2.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform var(--hover-effect-duration) ease, box-shadow var(--hover-effect-duration) ease;
    border-top: 5px solid var(--primary-color);
}

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

.service-card i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    display: block;
    transition: color var(--hover-effect-duration) ease;
}

.service-card:hover i {
    color: var(--accent-color);
}

.service-card h3 {
    color: var(--text-dark);
    font-size: 1.8rem;
    margin-bottom: 0.6rem;
}

.service-card p {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 0;
}

/* Gallery Section */
#galleria {
    padding: 5rem 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

#galleria h2 {
    color: var(--text-light);
}

#galleria .section-description {
    color: var(--text-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    background-color: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    position: relative;
    transition: transform var(--hover-effect-duration) ease, box-shadow var(--hover-effect-duration) ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

#galleria .button {
    margin-top: 2rem;
    display: block;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

/* About Us Section */
#chi-siamo {
    padding: 5rem 0;
    background-color: var(--background-light);
}

.chi-siamo-content {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.chi-siamo-content img {
    flex: 1;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    height: 400px;
    object-fit: cover;
}

.chi-siamo-content > div {
    flex: 1;
}

.chi-siamo-content h2 {
    text-align: left;
    font-size: 2.8rem;
}

.chi-siamo-content p {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

/* Process Section */
#processo {
    padding: 5rem 0;
    background-color: #fff;
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    text-align: center;
}

.process-steps .step {
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    background-color: var(--background-light);
    transition: transform var(--hover-effect-duration) ease, box-shadow var(--hover-effect-duration) ease;
    border-bottom: 4px solid var(--accent-color);
}

.process-steps .step:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.process-steps .step img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.process-steps .step i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    display: block;
}

.process-steps .step h3 {
    font-size: 1.6rem;
    color: var(--text-dark);
    margin-bottom: 0.8rem;
}

.process-steps .step p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* Testimonials Section */
#testimonianze {
    padding: 5rem 0;
    background-color: var(--background-dark);
    color: var(--text-light);
}

#testimonianze h2 {
    color: var(--text-light);
}

.testimonial-slider {
    display: flex;
    overflow-x: auto; /* For potential future JS slider, or simple scroll */
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding-bottom: 1rem; /* Space for scrollbar */
}

.testimonial-card {
    flex: 0 0 auto; /* Prevent cards from shrinking */
    width: 100%; /* Default to full width for mobile */
    max-width: 400px; /* Max width for larger screens */
    background-color: var(--background-light);
    color: var(--text-dark);
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    scroll-snap-align: start;
    position: relative;
    text-align: center;
    transition: transform var(--hover-effect-duration) ease;
}

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

.testimonial-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
    margin-bottom: 1rem;
    display: block;
    position: absolute;
    top: 1.5rem;
    left: 1.5rem;
}

.testimonial-card p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    padding-top: 1rem; /* Adjust for quote icon */
}

.testimonial-card span {
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-top: 1rem;
}

/* Contact Section */
#contatti {
    padding: 5rem 0;
    background-color: var(--background-light);
}

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

.contact-info {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-left: 5px solid var(--accent-color);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    color: var(--text-dark);
}

.contact-info p i {
    margin-right: 0.8rem;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.social-links {
    margin-top: 1.5rem;
}

.social-links a {
    display: inline-block;
    width: 45px;
    height: 45px;
    line-height: 45px;
    text-align: center;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: var(--text-light);
    font-size: 1.3rem;
    margin-right: 0.8rem;
    transition: background-color var(--hover-effect-duration) ease, transform var(--hover-effect-duration) ease;
}

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

.contact-form {
    background-color: #fff;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-right: 5px solid var(--primary-color);
}

.contact-form h3 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

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

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

.form-group input[type="text"],
.form-group input[type="email"],
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-family: var(--body-font);
    font-size: 1rem;
    color: var(--text-dark);
    transition: border-color var(--hover-effect-duration) ease, box-shadow var(--hover-effect-duration) ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(var(--primary-color), 0.2);
    outline: none;
}

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

.contact-form button[type="submit"] {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--background-dark);
    color: var(--text-light);
    padding: 3rem 0;
    text-align: center;
    font-size: 0.9rem;
}

footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

footer p {
    margin-bottom: 0;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    color: var(--text-light);
    transition: color var(--hover-effect-duration) ease;
}

.footer-links a:hover {
    color: var(--accent-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    #main-nav ul li {
        margin: 0 0.8rem;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Header */
    #main-header .container {
        flex-wrap: nowrap; /* Prevent logo and hamburger from wrapping */
    }

    .logo {
        flex-grow: 1; /* Allow logo to take space */
    }

    .hamburger {
        display: block;
        order: 2; /* Move hamburger to the right */
    }

    #main-nav {
        display: none; /* Hide nav by default */
        flex-direction: column;
        width: 100%;
        text-align: center;
        background-color: var(--background-light);
        position: absolute;
        top: 100%; /* Position below header */
        left: 0;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        padding: 1rem 0;
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }

    #main-header.scrolled #main-nav {
        background-color: rgba(255, 255, 255, 0.98);
    }

    .menu-toggle:checked ~ .hamburger i::before {
        content: "\f00d"; /* Change to 'x' icon */
    }

    .menu-toggle:checked ~ #main-nav {
        display: flex;
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    #main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    #main-nav ul li {
        margin: 0.8rem 0;
    }

    #main-nav ul li a.cta-button {
        margin-left: 0;
        margin-top: 1rem;
        width: fit-content;
        margin-left: auto;
        margin-right: auto;
    }

    /* Hero Section */
    #hero {
        min-height: 70vh;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    /* Sections */
    #servizi .grid-layout,
    .gallery-grid,
    .process-steps,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .chi-siamo-content {
        flex-direction: column;
        text-align: center;
    }

    .chi-siamo-content img {
        width: 100%;
        height: 300px;
    }

    .chi-siamo-content h2 {
        text-align: center;
        font-size: 2.2rem;
    }

    .testimonial-card {
        max-width: 100%;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .testimonial-slider {
        padding: 0 1rem; /* Add padding for mobile view of slider */
    }

    .contact-info, .contact-form {
        padding: 2rem;
    }

    .contact-info h3, .contact-form h3 {
        font-size: 1.8rem;
    }

    footer .container {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .service-card, .process-steps .step, .contact-info, .contact-form, .testimonial-card {
        padding: 1.5rem;
    }

    .service-card i {
        font-size: 3rem;
    }

    .service-card h3 {
        font-size: 1.5rem;
    }

    .contact-info p {
        font-size: 1rem;
    }

    .social-links a {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1.2rem;
    }
}
