/* WEBSPERTILIO DESIGN SYSTEM
 * Palette: Black (#050505), White (#FAFAFA), Pink (#FF007F)
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --bg-color: #050505;
    --text-color: #FAFAFA;
    --accent-color: #FF007F;
    --gray-dark: #1a1a1a;
    --transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                  border-color 0.4s ease,
                  background-color 0.4s ease,
                  filter 0.6s ease,
                  box-shadow 0.4s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- REGOLA GLOBALE PER IMMAGINI RESPONSIVE --- */
/* Assicura che tutte le immagini si adattino alla larghezza del contenitore */
img {
    max-width: 100%;
    height: auto;
    display: block; /* Rimuove spazi indesiderati sotto le immagini */
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
}

/* Helper per la colorazione del Brand */
.text-web { color: var(--accent-color); }
.text-spertilio { color: #fff; }

a { text-decoration: none; color: inherit; transition: var(--transition); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- HERO BANNER --- */
.hero-banner {
    width: 100%;
    height: 450px;
    overflow: hidden;
    position: relative;
    border-bottom: 2px solid var(--accent-color);
}

.hero-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 15%;
    filter: brightness(0.8);
    transition: transform 10s ease;
}

.hero-banner:hover img { transform: scale(1.05); }

/* BUTTONS */
.btn-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: auto;
    padding-top: 20px;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 12px 40px;
    border: 1px solid var(--accent-color);
    color: var(--accent-color);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn:hover {
    background: var(--accent-color);
    color: var(--bg-color);
    box-shadow: 0 0 20px rgba(255, 0, 127, 0.4);
    border-color: var(--accent-color);
}

.btn-outline {
    padding: 10px 20px;
    border: 1px solid #444;
    color: #fff;
    background: transparent;
    text-transform: uppercase;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
}
.btn-outline:hover { border-color: #fff; background: #111; }

/* ZOOM & HOVER */
.zoom-effect {
    transition: var(--transition);
    border: 1px solid transparent;
}

.zoom-effect:hover {
    transform: scale(1.03);
    border-color: #ffffff !important;
    z-index: 10;
}

/* DIDASCALIA FOTO */
.photo-caption {
    text-align: center;
    margin-top: 15px;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: var(--text-color);
    letter-spacing: 1px;
}

/* BRAND IMAGE GRAYSCALE */
.brand-image-container {
    margin-bottom: 40px;
    overflow: hidden;
    border: 1px solid #333;
    border-radius: 4px;
}

.grayscale-hover {
    /* Le proprietà width e height sono gestite dalla regola globale 'img' */
    filter: grayscale(100%);
    opacity: 0.8;
    transition: filter 0.6s ease, transform 0.6s ease, opacity 0.6s ease;
}

.grayscale-hover:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.02);
}

/* HEADER */
header {
    padding: 30px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    background: rgba(5, 5, 5, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
}
.nav-flex { display: flex; justify-content: space-between; align-items: center; }

/* --- STILE LOGO HEADER MODIFICATO --- */
.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: bold;
    display: flex;       /* Attiva Flexbox per allineare img e testo */
    align-items: center; /* Allinea verticalmente al centro */
    gap: 12px;           /* Spazio tra l'icona e il testo */
}

/* Stile per l'immagine del logo nell'header */
.logo img {
    height: 40px; /* Altezza fissa per corrispondere circa alla 'W' */
    width: auto;  /* Mantiene le proporzioni */
}
/* ------------------------------------ */

nav ul { list-style: none; display: flex; gap: 30px; }
nav a { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; }
nav a:hover, nav a.active { color: var(--accent-color); }

/* CARDS */
.gothic-card {
    clip-path: polygon(0 0, 100% 0, 100% 95%, 85% 100%, 0 100%);
    background: var(--gray-dark);
    padding: 60px 40px;
    border-top: 1px solid var(--accent-color);
    border-bottom: 1px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 500px;
    position: relative;
}

.gothic-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    margin: 60px 0;
}

/* HERO */
.hero {
    min-height: 50vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center;
    padding: 60px 0;
}
.hero h1 { font-size: 3.5rem; line-height: 1.1; }
.hero p { font-size: 1.2rem; color: #ccc; max-width: 700px; margin: 20px auto 40px auto; }

/* MODALS */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.95);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden; transition: opacity 0.3s ease;
    z-index: 2000;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-content {
    background: var(--gray-dark);
    border: 1px solid var(--accent-color);
    padding: 60px;
    max-width: 600px; width: 90%;
    transform: translateY(50px); transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    text-align: center;
}
.modal-overlay.active .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 20px; right: 25px; font-size: 2rem; cursor: pointer; color: var(--accent-color); line-height: 1;}

/* FOOTER */
footer { border-top: 1px solid #222; padding: 40px 0; margin-top: 60px; font-size: 0.8rem; color: #888; text-align: center; }
.ai-notice { margin-top: 15px; font-style: italic; color: #555; font-size: 0.75rem; }

/* COOKIE BANNER */
#cookie-banner {
    position: fixed; bottom: -100%; left: 0; width: 100%;
    background-color: rgba(5, 5, 5, 0.98);
    border-top: 1px solid var(--accent-color);
    padding: 30px 20px; z-index: 9999;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    transition: bottom 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex; justify-content: center; align-items: center;
}
#cookie-banner.show { bottom: 0; }
.cookie-content { max-width: 1200px; width: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.cookie-text p { font-size: 0.9rem; color: #ccc; margin-bottom: 5px; }
.cookie-text a { color: var(--accent-color); text-decoration: underline; font-size: 0.85rem; }
.cookie-buttons { display: flex; gap: 15px; }

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-banner { height: 250px; }
    .nav-flex { flex-direction: column; gap: 20px; }
    .gothic-card { min-height: auto; clip-path: none; border: 1px solid var(--accent-color); }
    .cookie-content { flex-direction: column; text-align: center; }
    .cookie-buttons { width: 100%; justify-content: center; }
}