/* --- RESET E VARIABILI --- */
:root {
    --primary-color: #9a827d;
    --dark-color: #212121;
    --light-bg: #f9f9f9;
    --white: #ffffff;
    
    /* Font Atelier Interni */
    --font-main: 'Cinzel', serif;
    --font-heading: 'Cinzel', serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--dark-color);
    line-height: 1.6;
    background-color: #fff;
    padding-top: 89px; 
}

/* --- TITOLI IN STILE ATELIER INTERNI --- */
h1, h2, h3, h4, h5, h6, 
.section-title, 
.caption {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 1px;
}

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

ul {
    list-style: none;
}

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

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

/* --- HEADER & NAVIGATION (Logo a Sinistra 50px, Menu a Destra 50px) --- */
.site-header {
    background-color: #000000;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between; /* Spinge il logo a sinistra e il menu a destra */
    width: 100%;
    max-width: 100%;
    padding: 22px 50px; /* 50px di margine sinistro e destro */
    transition: all 0.3s ease-in-out;
}

/* Logo a sinistra */
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 45px;
    width: auto;
    display: block;
    transition: all 0.3s ease-in-out;
}

/* Navigazione principale a destra */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    gap: 32px;
    align-items: center;
    margin: 0;
    padding: 0;
}

.nav-menu a {
    color: #ffffff;
    font-family: 'Cinzel', 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 16px;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.nav-menu a:hover,
.nav-menu li.active > a {
    color: var(--primary-color);
}

/* Dropdown */
.has-dropdown {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: #111111;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    display: none;
    min-width: 200px;
    padding: 10px 0;
    border-top: 2px solid var(--primary-color);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    text-transform: none;
    font-size: 16px;
    color: #cccccc;
}

.dropdown li a:hover {
    color: #ffffff;
    background: #1a1a1a;
}

.has-dropdown:hover .dropdown {
    display: block;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: #ffffff;
}

/* Effetto riduzione allo scroll */
.site-header.scrolled {
    background-color: rgba(0, 0, 0, 0.95);
}

.site-header.scrolled .header-container {
    padding: 12px 50px;
}

.site-header.scrolled .logo img {
    height: 34px;
}

/* --- PAGE HEADER (Pagine interne) --- */
.page-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.45)), url('../images/port-title-bg.jpg');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    overflow: hidden;
    height: 65vh;
    min-height: 450px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
}

.page-header h1 {
    font-size: 3rem;
    font-weight: 300;
    margin-bottom: 12px;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
}

.page-header .caption {
    font-size: 1.2rem;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 500;
    position: relative;
    z-index: 2;
}

/* --- HERO SLIDER SECTION (Home Page) --- */
.hero-slider-section {
    position: relative;
    width: 100%;
    height: 75vh;
    min-height: 450px;
    overflow: hidden;
    background-color: #111111;
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero-content h1, 
.hero-content h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    font-weight: 300;
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 25px;
    color: #ffffff;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn-primary {
    display: inline-block;
    padding: 12px 30px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: 2px;
}

.btn-primary:hover {
    background: #826b66;
}

/* Freccette Slider (Nascoste per richiesta precedente) */
.slider-btn {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border: none;
    font-size: 24px;
    padding: 15px 12px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
    border-radius: 4px;
}

.slider-btn:hover,
.slider-btn:focus {
    background: var(--primary-color);
    outline: 2px solid #ffffff;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

/* Dots Slider */
.slider-dots {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active, 
.dot:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

.dot:focus {
    outline: 2px solid #ffffff;
}

/* --- SERVIZI (GRID LAYOUT) --- */
.services-section {
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 50px;
}

.grid {
    display: grid;
    gap: 30px;
}

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

.card {
    background: var(--white);
    text-align: center;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card img {
    margin-bottom: 20px;
}

.card h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.card p {
    color: #666;
    margin-bottom: 20px;
    font-size: 0.95rem;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.link-more {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: auto;
    display: inline-block;
}

/* --- ACCORDION COMPONENT --- */
.accordion-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.accordion-img {
    flex: 0 0 450px;
    height: 500px;
    align-self: flex-start;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: sticky;
    top: 120px;
}

.accordion-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.accordion-content {
    flex: 1;
    min-width: 300px;
}

.accordion-item {
    background: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    margin-bottom: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

.accordion-header {
    width: 100%;
    padding: 20px 25px;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: var(--primary-color);
}

.accordion-header::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
}

.accordion-item.active .accordion-header::after {
    content: '-';
}

.accordion-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s cubic-bezier(0.25, 1, 0.5, 1), padding 0.3s ease;
    padding: 0 25px;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.7;
}

.accordion-body-inner {
    overflow: hidden;
}

.accordion-item.active .accordion-body {
    grid-template-rows: 1fr;
    padding: 0 25px 20px 25px;
}

/* --- CHI SIAMO / SEZIONE --- */
.about-section {
    background: url('../images/showroom-atelier-interni-assisi.webp') center/cover no-repeat;
    padding: 80px 40px;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.about-box {
    background: rgba(255, 255, 255, 0.90);
    padding: 60px 50px;
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.about-box h2 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.about-box .subtitle {
    display: block;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 500;
}

.about-box p {
    margin-bottom: 15px;
    color: #444;
    text-align: justify;
    hyphens: auto;
    -webkit-hyphens: auto;
}

.btn-secondary {
    display: inline-block;
    margin-top: 10px;
    color: var(--primary-color);
    font-weight: 700;
    border-bottom: 2px solid var(--primary-color);
}

/* --- FOOTER --- */
.site-footer {
    background: #1a1a1a;
    color: #aaa;
    padding-top: 60px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a:hover {
    color: var(--white);
}

.footer-bottom {
    background: #111;
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    border-top: 1px solid #222;
}
/* Icone Social nel Footer */
.footer-social-links {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
}

.footer-social-links .social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background-color: #262626;
    color: #cccccc;
    transition: all 0.3s ease;
    border: 1px solid #383838;
}

.footer-social-links .social-icon:hover {
    background-color: var(--primary-color, #9a827d);
    color: #ffffff;
    border-color: var(--primary-color, #9a827d);
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

.footer-social-links .social-icon svg {
    display: block;
}

/* --- COOKIE BANNER POPUP IN BASSO --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 1160px;
    margin: 0 auto;
    background-color: #1a1a1a;
    color: #ffffff;
    padding: 20px 25px;
    border-radius: 6px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    z-index: 99999;
    border-top: 2px solid var(--primary-color, #9a827d);
}

.cookie-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-text p {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #cccccc;
    margin: 0;
}

.cookie-text a {
    color: var(--primary-color, #9a827d);
    text-decoration: underline;
}

.cookie-text a:hover {
    color: #ffffff;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 10px 22px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-accept {
    background-color: var(--primary-color, #9a827d);
    color: #ffffff;
}

.btn-accept:hover {
    background-color: #826b66;
}

.btn-reject {
    background-color: transparent;
    color: #ffffff;
    border: 1px solid #555555;
}

.btn-reject:hover {
    background-color: #333333;
    border-color: #777777;
}

/* --- SEZIONE CONTATTARCI & ORARI (HOME PAGE) --- */
.contact-section {
    background: url('../images/contact-lamp.jpg') center/cover no-repeat;
    padding: 100px 0 80px 0;
    color: var(--dark-color);
}

.contact-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.contact-col-left {
    flex: 1;
}

.contact-col-right {
    flex: 1;
    max-width: 550px;
}

.contact-col-right h2 {
    font-size: 1.8rem;
    margin-bottom: 25px;
    letter-spacing: 0px;
}

.contact-block {
    margin-bottom: 25px;
}

.contact-block h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.contact-block p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #444;
}

/* Social Network Icons */
.social-networks {
    display: flex;
    gap: 20px;
    margin-bottom: 35px;
}

.social-networks a {
    color: #af938f;
    font-size: 1.2rem;
    transition: color 0.3s ease;
}

.social-networks a:hover {
    color: var(--dark-color);
}

/* Location Details Grid */
.location-details {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.location-col {
    flex: 1;
}

.location-col h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.location-col p {
    font-size: 1.05rem;
    color: #444;
    margin-bottom: 10px;
}

.location-col p i {
    color: #af938f;
    margin-right: 8px;
}

/* --- BOX DI CONFERMA O ERRORE INVIO MESSAGGIO --- */
.form-alert,
.form-status-alert {
    padding: 16px 20px;
    margin-bottom: 25px;
    border-radius: 4px;
    font-size: 1.05rem;
    line-height: 1.5;
    display: none;
    animation: fadeIn 0.4s ease;
}

.form-alert.success,
.form-status-alert.success {
    display: block;
    background-color: #f0f7f2;
    border: 1px solid #48bb78;
    color: #22543d;
}

.form-alert.error,
.form-status-alert.error {
    display: block;
    background-color: #fff5f5;
    border: 1px solid #f56565;
    color: #742a2a;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.btn-primary:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* ==========================================================================
   --- MODULO CONTATTI AGGIORNATO (PAGINA CONTATTI & FORM) ---
   ========================================================================== */

/* Focus dei campi input e textarea con colore Atelier D'Interni */
.custom-contact-form input[type="text"]:focus,
.custom-contact-form input[type="email"]:focus,
.custom-contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-color, #9a827d);
    box-shadow: 0 0 0 3px rgba(154, 130, 125, 0.15);
}

/* Checkbox Privacy con colore brand */
.privacy-consent-group input[type="checkbox"] {
    accent-color: var(--primary-color, #9a827d);
}

/* Barra e Pulsante di Invio con Icona (fa-paper-plane) */
.custom-contact-form button[type="submit"] {
    width: 100%;
    background-color: var(--primary-color, #9a827d);
    color: #ffffff;
    border: none;
    padding: 16px 24px;
    font-size: 0.85rem;
    font-family: var(--font-heading, 'Cinzel', serif);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(154, 130, 125, 0.35);
    transition: all 0.3s ease;
}

/* Effetto al passaggio del mouse (Hover) */
.custom-contact-form button[type="submit"]:hover:not(:disabled) {
    background-color: #826b66;
    box-shadow: 0 6px 20px rgba(154, 130, 125, 0.5);
    transform: translateY(-1px);
}

/* Stato disabilitato durante l'invio */
.custom-contact-form button[type="submit"]:disabled {
    background-color: #a89895;
    cursor: not-allowed;
    opacity: 0.75;
    transform: none;
    box-shadow: none;
}

/* Icona invio e micro-animazione allo scorrimento */
.custom-contact-form button[type="submit"] i {
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.custom-contact-form button[type="submit"]:hover:not(:disabled) i {
    transform: translateX(3px);
}

/* ==========================================================================
   --- RESPONSIVE MOBILE & TABLET (max-width: 991px) --- 
   ========================================================================== */
@media (max-width: 991px) {
    body {
        padding-top: 68px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    /* Padding ridotto a 20px su mobile/tablet */
    .header-container {
        padding: 15px 20px;
        justify-content: space-between;
    }

    .site-header.scrolled .header-container {
        padding: 10px 20px;
    }

    .logo {
        flex: none;
    }

    .logo img {
        height: 38px;
    }

    .menu-toggle {
        display: flex;
    }

    /* Menu mobile a tendina a tutta larghezza */
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #000000;
        flex-direction: column;
        gap: 0;
        display: none;
        border-top: 1px solid #222;
        flex: none;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu li {
        width: 100%;
        border-bottom: 1px solid #111;
        text-align: left;
    }

    .nav-menu a {
        padding: 15px 20px;
        display: block;
        white-space: normal;
    }

    .dropdown {
        position: static;
        box-shadow: none;
        background: #0a0a0a;
        padding: 0;
        border-top: none;
    }

    .accordion-img {
        flex: 1 1 100%;
        height: 350px;
        position: static;
    }

    .about-section {
        padding: 40px 20px;
    }

    .about-box {
        max-width: 100%;
        padding: 30px;
    }

    /* Responsive Sezione Contatti */
    .contact-container {
        flex-direction: column;
    }
    
    .contact-col-left {
        display: none;
    }

    .contact-col-right {
        max-width: 100%;
    }

    .location-details {
        flex-direction: column;
        gap: 15px;
    }
}

/* ==========================================================================
   --- RESPONSIVE SMARTPHONE (max-width: 768px) --- 
   ========================================================================== */
@media (max-width: 768px) {
    .hero-slider-section,
    .page-header {
        height: 60vh;
        min-height: 380px;
    }

    .hero-content h1, 
    .hero-content h2 {
        font-size: 1.8rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        margin-bottom: 15px;
    }

    .slider-btn {
        padding: 10px 8px;
        font-size: 18px;
    }
    
    .prev-btn { left: 5px; }
    .next-btn { right: 5px; }

    .cookie-banner {
        bottom: 10px;
        left: 10px;
        right: 10px;
        padding: 15px 20px;
    }

    .cookie-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cookie-buttons {
        width: 100%;
        justify-content: flex-end;
    }

    .cookie-btn {
        flex: 1;
        text-align: center;
    }
}