/* ========================================
   BAR CENTRALE CRESPINO - MAIN CSS
   Design italiano contemporaneo, mobile-first
======================================== */

/* ========================================
   CSS VARIABLES & RESET
======================================== */

:root {
    /* Palette Colori Italiana */
    --cream: #FAF7F0;
    --charcoal: #111111;
    --gold: #C9A646;
    --wine: #B52C2C;
    --smoke: #6B6B6B;
    
    /* Colori funzionali */
    --white: #FFFFFF;
    --black: #000000;
    --success: #2E7D32;
    --error: #C62828;
    --warning: #F57C00;
    --info: #1976D2;
    
    /* Tipografia */
    --font-serif: 'Cormorant Garamond', serif;
    --font-sans: 'Inter', sans-serif;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing & Layout */
    --max-width: 1280px;
    --gutter-mobile: 20px;
    --gutter-tablet: 32px;
    --gutter-desktop: 40px;
    --section-padding: 80px;
    --section-padding-mobile: 60px;
    
    /* Border radius */
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 20px;
    --radius-round: 50%;
    
    /* Shadows */
    --shadow-small: 0 2px 8px rgba(17, 17, 17, 0.1);
    --shadow-medium: 0 8px 24px rgba(17, 17, 17, 0.12);
    --shadow-large: 0 16px 40px rgba(17, 17, 17, 0.15);
    --shadow-hover: 0 12px 32px rgba(17, 17, 17, 0.18);
    
    /* Transitions */
    --transition-fast: 200ms cubic-bezier(0.22, 1, 0.36, 1);
    --transition-medium: 300ms cubic-bezier(0.22, 1, 0.36, 1);
    --transition-slow: 400ms cubic-bezier(0.22, 1, 0.36, 1);
    
    /* Z-index scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal: 1040;
    --z-popover: 1050;
    --z-tooltip: 1060;
}

/* Reset completo */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--charcoal);
    background-color: var(--cream);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Elementi multimediali */
img,
video,
iframe {
    max-width: 100%;
    height: auto;
    display: block;
}

svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Link */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-medium);
}

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

/* Liste */
ul,
ol {
    list-style: none;
}

/* Form elements */
button,
input,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
}

/* ========================================
   LAYOUT UTILITIES
======================================== */

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter-mobile);
}

@media (min-width: 768px) {
    .container {
        padding: 0 var(--gutter-tablet);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--gutter-desktop);
    }
}

/* ========================================
   TIPOGRAFIA
======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    color: var(--charcoal);
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h4 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

h5 {
    font-size: clamp(1.125rem, 2.5vw, 1.5rem);
}

h6 {
    font-size: clamp(1rem, 2vw, 1.25rem);
}

p {
    margin-bottom: 1rem;
    font-size: clamp(1rem, 2.5vw, 1.125rem);
    line-height: 1.7;
}

.text-large {
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    line-height: 1.6;
}

.text-small {
    font-size: clamp(0.875rem, 2vw, 0.9375rem);
    line-height: 1.5;
}

.text-center {
    text-align: center;
}

.text-gold {
    color: var(--gold);
}

.text-wine {
    color: var(--wine);
}

.text-smoke {
    color: var(--smoke);
}

/* ========================================
   BUTTONS
======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: 2px solid transparent;
    border-radius: var(--radius-small);
    font-family: var(--font-sans);
    font-weight: var(--font-weight-semibold);
    font-size: 1rem;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-medium);
    position: relative;
    overflow: hidden;
    min-height: 48px; /* Accessibilità touch */
}

.btn:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Button variants */
.btn-primary {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--charcoal);
}

.btn-primary:hover {
    background-color: var(--charcoal);
    border-color: var(--charcoal);
    color: var(--cream);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: var(--cream);
    border-color: var(--charcoal);
    color: var(--charcoal);
}

.btn-secondary:hover {
    background-color: var(--charcoal);
    border-color: var(--charcoal);
    color: var(--cream);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    border-color: var(--gold);
    color: var(--gold);
}

.btn-outline:hover {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--charcoal);
    transform: translateY(-2px);
}

.btn-social {
    background-color: transparent;
    border-color: currentColor;
    color: var(--charcoal);
    padding: 12px 20px;
}

.btn-social.instagram {
    color: #E4405F;
    border-color: #E4405F;
}

.btn-social.instagram:hover {
    background-color: #E4405F;
    color: white;
}

.btn-social.facebook {
    color: #1877F2;
    border-color: #1877F2;
}

.btn-social.facebook:hover {
    background-color: #1877F2;
    color: white;
}

/* Button icons */
.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Button sizes */
.btn-small {
    padding: 10px 20px;
    font-size: 0.875rem;
    min-height: 40px;
}

.btn-large {
    padding: 18px 36px;
    font-size: 1.125rem;
    min-height: 56px;
}

/* ========================================
   NAVIGATION
======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: rgba(250, 247, 240, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 166, 70, 0.1);
    z-index: var(--z-fixed);
    transition: all var(--transition-medium);
}

.navbar.scrolled {
    height: 64px;
    box-shadow: var(--shadow-medium);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--gutter-mobile);
}

@media (min-width: 768px) {
    .nav-container {
        padding: 0 var(--gutter-tablet);
    }
}

@media (min-width: 1024px) {
    .nav-container {
        padding: 0 var(--gutter-desktop);
    }
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-serif);
    font-weight: var(--font-weight-bold);
    font-size: 1.5rem;
    color: var(--charcoal);
}

.logo-img {
    width: 40px;
    height: 40px;
}

.logo-text {
    display: none;
}

@media (min-width: 480px) {
    .logo-text {
        display: block;
    }
}

/* Navigation menu */
.nav-menu {
    display: none;
    align-items: center;
    gap: 2rem;
}

@media (min-width: 768px) {
    .nav-menu {
        display: flex;
    }
}

.nav-link {
    position: relative;
    font-weight: var(--font-weight-semibold);
    color: var(--charcoal);
    transition: color var(--transition-medium);
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: width var(--transition-medium);
}

.nav-link:hover,
.nav-link.active {
    color: var(--gold);
}

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

/* Social links in nav */
.nav-social {
    display: none;
    align-items: center;
    gap: 16px;
}

@media (min-width: 1024px) {
    .nav-social {
        display: flex;
    }
}

.social-link {
    width: 24px;
    height: 24px;
    color: var(--smoke);
    transition: all var(--transition-medium);
}

.social-link:hover {
    color: var(--gold);
    transform: translateY(-2px);
}

.social-link.instagram:hover {
    color: #E4405F;
}

.social-link.facebook:hover {
    color: #1877F2;
}

/* Hamburger menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: var(--z-modal);
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--charcoal);
    transition: all var(--transition-medium);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(17, 17, 17, 0.8);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-medium);
    z-index: var(--z-modal);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background: var(--cream);
    padding: 100px 2rem 2rem;
    transition: right var(--transition-medium);
    z-index: var(--z-modal);
    overflow-y: auto;
}

.mobile-menu.active {
    right: 0;
}

.mobile-menu .nav-link {
    display: block;
    padding: 1rem 0;
    font-size: 1.125rem;
    border-bottom: 1px solid rgba(107, 107, 107, 0.1);
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

.mobile-menu .social-links {
    display: flex;
    gap: 20px;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(107, 107, 107, 0.1);
}

.mobile-menu .social-link {
    width: 32px;
    height: 32px;
}

/* ========================================
   SECTIONS
======================================== */

section {
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gold);
    border-radius: 2px;
}

.section-description {
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    color: var(--smoke);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   CARDS
======================================== */

.card {
    background: var(--cream);
    border-radius: var(--radius-medium);
    overflow: hidden;
    transition: all var(--transition-medium);
    border: 1px solid rgba(201, 166, 70, 0.1);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
    border-color: var(--gold);
}

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 1.5rem;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--charcoal);
}

.card-description {
    color: var(--smoke);
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* ========================================
   ANIMATIONS
======================================== */

/* Fade in animations */
.fade-in {
    opacity: 0;
    transition: opacity var(--transition-slow);
}

.fade-in.in-view {
    opacity: 1;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all var(--transition-slow);
}

.fade-in-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-20px);
    transition: all var(--transition-slow);
}

.fade-in-left.in-view {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(20px);
    transition: all var(--transition-slow);
}

.fade-in-right.in-view {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all var(--transition-slow);
}

.scale-in.in-view {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays */
.stagger-delay-1 { transition-delay: 100ms; }
.stagger-delay-2 { transition-delay: 200ms; }
.stagger-delay-3 { transition-delay: 300ms; }
.stagger-delay-4 { transition-delay: 400ms; }
.stagger-delay-5 { transition-delay: 500ms; }

/* ========================================
   ACCESSIBILITY
======================================== */

/* Focus styles */
*:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --cream: #FFFFFF;
        --charcoal: #000000;
        --smoke: #333333;
    }
}

/* ========================================
   RESPONSIVE UTILITIES
======================================== */

/* Display utilities */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

@media (min-width: 768px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
    .d-md-flex { display: flex; }
    .d-md-grid { display: grid; }
}

@media (min-width: 1024px) {
    .d-lg-none { display: none; }
    .d-lg-block { display: block; }
    .d-lg-flex { display: flex; }
    .d-lg-grid { display: grid; }
}

/* Spacing utilities */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    * {
        background: transparent !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .mobile-menu,
    .mobile-menu-overlay,
    .btn,
    .hero-scroll {
        display: none !important;
    }
    
    a,
    a:visited {
        text-decoration: underline;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    p, img {
        page-break-inside: avoid;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}
