/* File: style.css
   Descrizione: Foglio di stile statico completo. 
   Contiene reset, utility classes e componenti personalizzati.
*/

/* --- RESET & BASE --- */
*, ::before, ::after {
    box-sizing: border-box;
    border-width: 0;
    border-style: solid;
    border-color: #e5e7eb;
}

html {
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
    -moz-tab-size: 4;
    tab-size: 4;
    font-family: 'Lato', sans-serif;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    line-height: inherit;
    color: #333;
    background-color: #f9f9f9;
	font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

a {
    color: inherit;
    text-decoration: inherit;
}

main p > a {
	color:#296E8A;
	font-weight: 600;
	}
	
main p > a:hover {
	color:#2c3e50;
	transition: color 0.3s ease;
	}


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

button, input, select, textarea {
    font-family: inherit;
    font-size: 100%;
    margin: 0;
    padding: 0;
}

.list-none { list-style-type: none !important; }

#aree-chevron {margin-left: 7px;}

.quote {
   background-image: linear-gradient(rgba(44, 62, 80, 0.8), rgba(55, 71, 79, 0.8)), url(foto-atti-antichi-per-sito3_l_1200x900.jpg);
   background-attachment: fixed;
   background-position: center;
   background-repeat: no-repeat;
   background-size: cover;
}

/* --- TIPOGRAFIA --- */
h1, h2, h3, h4, h5, h6, .serif-font {
    font-family: "Montserrat", sans-serif;
    font-optical-sizing: auto;
    font-weight: 800;
    font-style: normal;
	margin: 7px 0;
}

.container h1:not(>.subpage-hero), .container h2,
.container h3, .container h4,
.container h5, .container h6 {text-align: left;}

.text-center { text-align: center; }
.text-justify { text-align: justify; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.uppercase { text-transform: uppercase; }
.italic { font-style: italic; }
.font-bold { font-weight: 700; }
.font-light { font-weight: 300; }
.font-semibold { font-weight: 600; }

.tracking-wide { letter-spacing: 0.025em; }
.tracking-widest { letter-spacing: 0.1em; }

.leading-relaxed { line-height: 1.625; }
.leading-loose { line-height: 2; }

.text-xs { font-size: 0.75rem; }
.text-sm { font-size: 0.875rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.text-3xl { font-size: 1.875rem; }
.text-4xl { font-size: 2.25rem; }
.text-5xl { font-size: 3rem; }
.text-6xl { font-size: 3.75rem; }

.prose p { margin-top: 1.25em; margin-bottom: 1.25em; }
.prose { color: #4b5563; max-width: 65ch; }

/* --- COLORI --- */
.text-white { color: #fff; }
.text-gray-300 { color: #d1d5db; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1f2937; }
.text-gold, .gold-accent { color: #bfa15f; }
.text-yellow-accent { color: #f1c40f; }
.text-red-500 { color: #ef4444; }

.bg-white { background-color: #fff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-200 { background-color: #e5e7eb; }
.bg-gray-300 { background-color: #d1d5db; }
.bg-gray-900 { background-color: #111827; }
.bg-black { background-color: #000; }
.bg-gold-accent { background-color: #bfa15f; }
.bg-dark-slate { background-color: #37474F; }
.bg-muted-blue { background-color: #296E8A; }
.bg-navy { background-color: #2c3e50; }
.border-gold { border-color: #bfa15f; }
.bg-opacity-20 { background-color: rgba(44, 62, 80, 0.2); }
.bg-opacity-40 { background-color: rgba(44, 62, 80, 0.4); }
.bg-opacity-60 { background-color: rgba(44, 62, 80, 0.6); }

.opacity-20 { opacity: 0.2; }
.opacity-70 { opacity: 0.7; }
.opacity-80 { opacity: 0.8; }
.opacity-90 { opacity: 0.9; }

/* --- LAYOUT & POSITIONING --- */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1rem;
    padding-left: 1rem;
}

main .container:first-child {
    padding: 3rem 1rem;
}

.block { display: block; }
.inline-block { display: inline-block; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.flex-grow { flex-grow: 1; }
.shrink-0 { flex-shrink: 0; }

.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.top-0 { top: 0; }
.left-0 { left: 0; }
.right-4 { right: 1rem; }
.top-4 { top: 1rem; }
.top-8 { top: 2rem; }
.bottom-0 { bottom: 0; }

.z-50 { z-index: 50; }
.z-100 { z-index: 100; }
.z-200 { z-index: 200; }

.overflow-hidden { overflow: hidden; }
.overflow-y-auto { overflow-y: auto; }

.object-cover { object-fit: cover; }
.object-contain { object-fit: contain; }

/* --- SPAZIATURE --- */
.m-0 { margin: 0; }
.m-2 { margin: 0.5rem; }
.mx-4 { margin-left: 1rem; margin-right: 1rem; }
.mx-8 { margin-left: 2rem; margin-right: 2rem; }
.mx-auto { margin-left: auto; margin-right: auto; }
.my-4 { margin-top: 1rem; margin-bottom: 1rem; }
.my-8 { margin-top: 2rem; margin-bottom: 2rem; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-10 { margin-bottom: 2.5rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-10 { margin-top: 2.5rem; }
.mt-12 { margin-top: 3rem; }
.mt-auto { margin-top: auto; }
.mr-2 { margin-right: 0.5rem; }
.mr-3 { margin-right: 0.75rem; }
.mr-4 { margin-right: 1rem; }
.ml-1 { margin-left: 0.25rem; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }
.p-12 { padding: 3rem; }
.p-16 { padding: 4rem; }
.p-20 { padding: 5rem; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.py-16 { padding-top: 4rem; padding-bottom: 4rem; }
.py-20 { padding-top: 5rem; padding-bottom: 5rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.px-6 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-8 { padding-left: 2rem; padding-right: 2rem; }
.px-12 { padding-left: 3rem; padding-right: 3rem; }
.px-16 { padding-left: 4rem; padding-right: 4rem; }
.px-20 { padding-left: 5rem; padding-right: 5rem; }
.px-24 { padding-left: 6rem; padding-right: 6rem; }
.px-30 { padding-left: 10rem; padding-right: 10rem; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-4 { padding-top: 1rem; }
.pt-8 { padding-top: 2rem; }
.pt-12 { padding-top: 3rem; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-4 { padding-bottom: 1rem; }
.pb-6 { padding-bottom: 1.5rem; }
.pb-8 { padding-bottom: 2rem; }

.gap-0 { gap: 0; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
.gap-10 { gap: 2.5rem; }
.gap-12 { gap: 3rem; }

.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }
.space-y-6 > * + * { margin-top: 1.5rem; }
.space-y-8 > * + * { margin-top: 2rem; }
.space-y-16 > * + * { margin-top: 4rem; }
.space-x-6 > * + * { margin-left: 1.5rem; }

.w-full { width: 100%; }.h-full { height: 100%; }
.h-auto {height: 100%;}
.w-10 { width: 2.5rem; }
.w-24 { width: 6rem; }
.w-56 { width: 14rem; }
.max-w-none { max-width: none; }
.max-w-md { max-width: 28rem; }
.max-w-2xl { max-width: 42rem; }
.max-w-3xl { max-width: 48rem; }
.max-w-4xl { max-width: 56rem; }
.max-w-5xl { max-width: 64rem; }
.max-w-6xl { max-width: 72rem; }
.max-w-7xl { max-width: 80rem; }

.h-1 { height: 0.25rem; }
.h-16 { height: 4rem; }
.h-20 { height: 5rem; }
.h-24 { height: 6rem; }
.h-32 { height: 8rem; }
.h-48 { height: 12rem; }
.h-56 { height: 14rem; }
.h-96 { height: 24rem; }
.h-screen { height: 100vh; }
.h-\[60vh\] { height: 60vh; }
.max-h-\[90vh\] { max-height: 90vh; }

/* --- BORDERS & SHADOWS --- */
.border { border-width: 1px; }
.border-t { border-top-width: 1px; }
.border-b { border-bottom-width: 1px; }
.border-b-2 { border-bottom-width: 2px; }
.border-l { border-left-width: 1px; }
.border-l-4 { border-left-width: 4px; }
.border-r-4 { border-right-width: 4px; }
.border-t-4 { border-top-width: 4px; }
.border-b-4 { border-bottom-width: 4px; }

.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-300 { border-color: #d1d5db; }
.border-gray-600 { border-color: #4b5563; }
.border-gray-700 { border-color: #374151; }

.rounded { border-radius: 0.25rem; }
.rounded-md { border-radius: 0.375rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }

.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }
.shadow-2xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25); }
.drop-shadow-md { filter: drop-shadow(0 4px 3px rgba(0, 0, 0, 0.07)); }

/* --- INTERACTIVITY & ANIMATIONS --- */
.cursor-pointer { cursor: pointer; }
.hidden { display: none !important; }
.transition { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-colors { transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }

.duration-300 { transition-duration: 300ms; }
.duration-500 { transition-duration: 500ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }

.hover\:underline:hover { text-decoration: underline; }
.hover\:bg-gray-50:hover { background-color: #f9fafb; }
.hover\:bg-white:hover { background-color: #fff; }
.hover\:scale-105:hover { transform: scale(1.05); }
.hover\:scale-102:hover { transform: scale(1.02); }
.hover\:button-gold-border:hover {background: transparent; border-color: #bfa15f; color:#bfa15f; transition-property: background-color, border-color, color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.group:hover .group-hover\:rotate-180 { transform: rotate(180deg); }
.group:hover .group-hover\:text-gold { color: #bfa15f; }

.hover-gold-dark:hover { background-color: #a38645 !important; }
.hover-navy-dark:hover { background-color: #1a252f !important; }
.hover-gold:hover {
    color: #bfa15f;
    transition: color 0.3s ease;
}

.z-100 {z-index: 100;}

/* Utility Transform - Forzata per Banner */
.translate-y-full { transform: translateY(100%) !important; }
.translate-y-0 { transform: translateY(0) !important; }
.origin-top { transform-origin: top; }

.backdrop-blur-sm { backdrop-filter: blur(4px); }
.disabled\:opacity-50:disabled { opacity: 0.5; }

/* File Input */
input[type="file"]::file-selector-button {
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 0;
    font-size: 0.875rem;
    font-weight: 600;
    background-color: #bfa15f;
    color: white;
    transition: background-color 0.3s;
    cursor: pointer;
}
input[type="file"]::file-selector-button:hover {
    background-color: #a38645;
}

/* Cookie Banner - Fix Posizionamento e Forzatura */
#cookie-banner {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 200 !important;
    background-color: white;
	box-shadow: 0 -10px 25px -5px rgba(0, 0, 0, 0.1);
    transition: transform 0.5s ease-in-out !important;
}

/* Hero Section */
.hero-section {
    background-image: linear-gradient(rgba(44, 62, 80, 0.5), rgba(55, 71, 79, 0.5)), url('foto-atti-antichi-per-sito1_l_1200x900.jpg');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.subpage-hero {
    background-image: linear-gradient(rgba(44, 62, 80, 0.8), rgba(55, 71, 79, 0.8)), url('foto-atti-antichi-per-sito1_l_1200x900.jpg');
    background-position: center 30%;
    background-repeat: no-repeat;
    background-size: cover;
    height: 40vh;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

@media (min-width: 768px) {
    .subpage-hero { background-attachment: fixed; }
}

/* Navigazione */
.nav-link {
    position: relative;
    padding-bottom: 5px;
    color: #4b5563;
    transition: color 0.3s;
    text-decoration: none;
}
.nav-link:hover { color: #1f2937; }
.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #bfa15f;
    transition: width 0.3s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: #1f2937; font-weight: 700; }

.dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}
.group:hover .dropdown-menu {
    max-height: 400px;
}
.dropdown-item {
    color: #4b5563;
    padding: 10px 20px;
    display: block;
    background: white;
    font-size: 0.85rem;
}
.dropdown-item:hover { background-color: #f3f4f6; color: #bfa15f; }

/* Animazioni */
.section-fade {
    animation: fadeIn 0.8s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* RESPONSIVE */
@media (max-width: 1279px) {
    .xl\:hidden { display: block !important; transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out;}
    #main-nav { display: none !important; }
    #mobile-menu-btn { display: block !important; }
	
	/* ANIMAZIONE TENDINA PER MENU MOBILE */
    #mobile-menu, #mobile-submenu-aree {
        display: block !important; /* Sovrascrive il display: none di default */
        max-height: 1000px; /* Altezza sufficiente per contenere tutto il menu aperto */
        overflow: hidden;
        opacity: 1;
		padding:12px;
        transition: max-height 0.5s ease-in-out, opacity 0.5s ease-in-out, padding 0.5s ease;
    }

    #mobile-menu.hidden, #mobile-submenu-aree.hidden {
        max-height: 0 !important;
        opacity: 0;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-top: 0 !important;
        margin-bottom: 0 !important;
        border: none !important;
    }
	
	/* --- LOGO SHRINK ON SCROLL (Mobile/Tablet) --- */
    
    /* Regole di transizione base per nav e img */
    nav, nav img {
        transition: all 0.3s ease;
    }

    /* Stato Scrolled: Riduce padding e background */
    header.scrolled {
        padding-top: 0.2rem !important;
        padding-bottom: 0.2rem !important;
        background-color: rgba(255, 255, 255, 1);
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
	
    /* Stato Scrolled: Forza l'altezza dell'immagine a 64px (3rem) */
    header.scrolled img {
        height: 4rem !important;
        width: auto;
    }
}

@media (min-width: 1280px) {
    .xl\:hidden { display: none !important; }
    .xl\:flex { display: flex !important; }
    #mobile-menu { display: none !important; }
}

@media (min-width: 768px) {
    .md\:flex-row { flex-direction: row !important; }
    .md\:flex-row-reverse { flex-direction: row-reverse !important; }
	.md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .md\:p-16 { padding: 4rem !important; }
	.md\:px-30 { padding-right: 12rem !important; padding-left: 12rem !important;}
    .md\:h-20 { height: 5rem !important; }
    .md\:mb-0 { margin-bottom: 0 !important; }
    .md\:w-1\/3 { width: 33.333333% !important; }
    .md\:w-2\/3 { width: 66.666667% !important; }
	.md\:text-right { text-align: right !important; }
    .md\:text-left { text-align: left !important; }
}

@media (min-width: 1024px) {
    .lg\:h-32 { height: 8rem !important; }
}
/* ********************** */



h1.hero {
	font-weight: 800;
	font-size: 2.75rem;
	letter-spacing: 0.2rem;
	line-height: 150%;
}

span.nome {
	font-weight: 300;
	font-size: 3.75rem;
	letter-spacing: 0.05rem;
}

@media (min-width: 768px) {
    .subpage-hero {
        background-attachment: fixed;
    }
}

@media (max-width: 900px) {
	
	h1.hero {
	font-size: 2rem;
    }

    span.nome {
	font-size: 3rem;
    }
}

@media (max-width: 500px) {
	
	.hero-section {
    height: 80vh !important;
    }
	
	h1.hero {
	font-size: 1.8rem;
    }

    span.nome {
	font-size: 2.8rem;
    }
}

/* --- Navigazione & Dropdown --- */
.nav-link {
    position: relative;
    padding-bottom: 5px;
    color: #4b5563; /* text-gray-600 */
    text-decoration: none;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #1f2937; /* text-gray-800 */
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #bfa15f;
    transition: width 0.3s;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    color: #1f2937;
    font-weight: 700;
}

/* Stili specifici per il Dropdown */
.dropdown-menu {
    max-height: 0;
	border-width: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.group:hover .dropdown-menu {
    max-height: 200px; /* Abbastanza alto per contenere i link */
    border-width: 1px;
}

.dropdown-item {
    color: #4b5563;
    padding: 8px 16px;
    display: block;
    transition: background-color 0.3s, color 0.3s;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #bfa15f;
}

.dropdown-menu .active {
	color: #1f2937;
    font-weight: 700;
}

/* --- Form Styling --- */
input, textarea, select {
    transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: #bfa15f;
    box-shadow: 0 0 0 3px rgba(191, 161, 95, 0.2);
}

@media (max-width: 767px) {
    .md\:hidden { display: none !important; }
}
