/* 
   WEB DEVELOPER ROMA - FINAL RESTORE
   Matrix Header + Reverted Stable Body
*/

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');

:root {
    --primary: #00f2ff;
    --primary-rgb: 0, 242, 255;
    --header-matrix: #4ade80;
    --bg-dark: #010409;
    --text-main: #ffffff;
    --text-dim: #cbd5e1;
    --glass: rgba(10, 15, 25, 0.9);
    --glass-border: rgba(255, 255, 255, 0.1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: 'Outfit', sans-serif; color: var(--text-main); background: var(--bg-dark); overflow-x: hidden; min-height: 100vh; line-height: 1.6; }

#sequenceCanvas { position: fixed; inset: 0; z-index: -2; background-color: #000; filter: brightness(0.75); }
.bg-glow { position: fixed; inset: 0; z-index: -1; background: radial-gradient(circle at 80% 20%, rgba(var(--primary-rgb), 0.08) 0%, transparent 40%); }

.content-wrapper { position: relative; width: min(1300px, 92%); margin: 0 auto; z-index: 1; }

/* --- HEADER MATRIX (L'unico elemento nuovo) --- */
.hero-screen { height: 100vh; display: flex; align-items: center; justify-content: center; }
header.hero-panel {
    width: min(900px, 95%);
    padding: 70px 50px;
    background: rgba(15, 23, 30, 0.5);
    border: 1px solid rgba(74, 222, 128, 0.3);
    backdrop-filter: blur(40px);
    border-radius: 70px;
    text-align: center;
    animation: panelBreathe 8s ease-in-out infinite;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    margin-top: -60px; /* Micro-regolazione elevazione */
}

header p { margin-bottom: 40px; color: var(--text-dim); max-width: 600px; }
.hero-btns { display: flex; gap: 20px; justify-content: center; }

@keyframes panelBreathe {
    0%, 100% { transform: translateY(0) scale(1); border-color: rgba(74, 222, 128, 0.2); }
    50% { transform: translateY(-10px) scale(1.005); border-color: rgba(74, 222, 128, 0.5); }
}

header h1 {
    font-size: clamp(2.8rem, 10vw, 7.5rem);
    line-height: 0.9;
    margin-bottom: 20px;
    letter-spacing: -0.05em;
    background: linear-gradient(135deg, #ffffff 20%, var(--header-matrix) 80%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 20px rgba(74, 222, 128, 0.3));
}

header .hero-btns .cta:first-child { background: var(--header-matrix); color: #000; }
header .hero-btns .cta.secondary { border-color: rgba(255,255,255,0.3); color: #fff; }

/* --- I NOSTRI SERVIZI --- */
#pacchetti { padding: 100px 0 80px; }
#pacchetti h2 { font-size: 3rem; text-align: center; margin-bottom: 80px; color: #fff; }
.pacchetti-container { display: grid; grid-template-columns: repeat(12, 1fr); gap: 30px; }

.pacchetto { 
    grid-column: span 6; 
    background: var(--glass); 
    padding: 30px; 
    border-radius: 40px; 
    border: 1px solid rgba(var(--primary-rgb), 0.15); 
    cursor: pointer; 
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    display: flex; flex-direction: column; align-items: center; text-align: center;
    gap: 25px;
}
.pacchetto[data-modal="modal3"] { grid-column: span 12; }
.pacchetto:hover { border-color: var(--primary); transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

.icon-box { 
    width: 65px; height: 65px; 
    background: rgba(var(--primary-rgb), 0.08); 
    color: var(--primary); 
    border-radius: 20px; 
    display: flex; align-items: center; justify-content: center; 
    border: 1px solid rgba(var(--primary-rgb), 0.1);
    flex-shrink: 0;
}
.icon-box svg { width: 30px; height: 30px; }

.price-tag { 
    font-size: 1.1rem; color: var(--primary); font-weight: 700; 
    padding: 10px 25px; background: rgba(var(--primary-rgb), 0.05); 
    border: 1px solid rgba(var(--primary-rgb), 0.2);
    border-radius: 100px;
}

/* --- APPUNTAMENTI --- */
.booking-section { 
    max-width: 850px; margin: 40px auto 100px; padding: 35px 45px; 
    border-radius: 40px; background: var(--glass); 
    border: 1px solid rgba(var(--primary-rgb), 0.15); 
    text-align: center;
    display: flex; flex-direction: column; gap: 30px;
}
.section-header-mini h2 { font-size: 2.2rem; margin-bottom: 5px; }
.section-header-mini p { color: var(--text-dim); font-size: 0.9rem; margin: 0; }

.booking-form-compact { display: flex; flex-direction: column; gap: 15px; }
.booking-form-compact .row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.booking-form-compact input, .select-trigger, .booking-form-compact .cta { 
    background: rgba(255, 255, 255, 0.02); 
    border: 1px solid rgba(255, 255, 255, 0.1); 
    border-radius: 12px; padding: 15px; 
    color: #fff; font-size: 0.9rem; width: 100%; height: 50px;
    display: flex; align-items: center; justify-content: center;
    transition: 0.3s; box-sizing: border-box;
}
.booking-form-compact input { justify-content: flex-start; text-align: left; }
.booking-form-compact .cta { background: var(--primary); color: #000; font-weight: 700; border: none; cursor: pointer; }
.booking-form-compact input:hover, .select-trigger:hover, .booking-form-compact .cta:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.05); }

.booking-form-compact .cta { padding: 15px 20px; font-size: 0.95rem; font-weight: 700; }

/* Modals Base */
.modal { 
    display: none; position: fixed; z-index: 4000; inset: 0; 
    background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(25px); overflow-y: auto; 
}
.modal-content { 
    background: #020610; border: 1px solid rgba(var(--primary-rgb), 0.2); border-radius: 60px; 
    max-width: 650px; margin: 80px auto; padding: 60px; text-align: center; position: relative; 
    box-shadow: 0 50px 100px rgba(0,0,0,0.8);
}
.close { position: absolute; top: 40px; right: 40px; font-size: 1.5rem; color: var(--text-dim); cursor: pointer; transition: 0.3s; }
.close:hover { color: #fff; transform: rotate(90deg); }

.price-modal { display: inline-block; font-size: 1.3rem; color: var(--primary); font-weight: 700; margin-top: 20px; margin-bottom: 35px; padding: 10px 30px; background: rgba(var(--primary-rgb), 0.05); border-radius: 100px; border: 1px solid rgba(var(--primary-rgb), 0.2); }
.modal-content ul { text-align: left; max-width: 450px; margin: 0 auto 40px; list-style: none; }
.modal-content li { margin-bottom: 20px; color: var(--text-dim); display: flex; align-items: center; gap: 12px; font-size: 1.05rem; }
.modal-content li::before { content: ""; width: 6px; height: 6px; background: var(--primary); border-radius: 50%; box-shadow: 0 0 10px var(--primary); }
.booking-form-compact .row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 15px; margin-bottom: 15px; }
.booking-form-compact input, .select-trigger { background: rgba(255, 255, 255, 0.03); border: 1px solid rgba(var(--primary-rgb), 0.2); border-radius: 12px; padding: 12px 18px; color: #fff; font-size: 1rem; width: 100%; transition: 0.3s; }

.booking-form-compact input:hover, .select-trigger:hover, .booking-form-compact .cta:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.1); }

/* Custom UI items */
.custom-select, .custom-calendar { position: relative; }
.select-options, .calendar-dropdown { position: absolute; bottom: calc(100% + 10px); left: 0; width: 100%; background: rgba(10, 15, 25, 0.98); border: 1px solid var(--primary); border-radius: 20px; z-index: 100; opacity: 0; visibility: hidden; transform: translateY(10px); transition: 0.3s; }
.custom-select.active .select-options, .custom-calendar.active .calendar-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.calendar-dropdown { width: 280px; padding: 15px; left: 50%; transform: translateX(-50%) translateY(10px); }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; padding: 0 5px; }
.day { padding: 8px; text-align: center; cursor: pointer; border-radius: 10px; font-size: 0.85rem; color: var(--text-dim); }
.day.selected { background: var(--primary); color: #000; font-weight: 700; }
.day.today { color: var(--primary); font-weight: 700; border: 1px solid rgba(var(--primary-rgb), 0.4); }

/* --- CONTACTS POPUP --- */
.contacts-popup .contact-links { display: flex; flex-direction: column; gap: 15px; margin-top: 35px; }
.contact-item { 
    display: flex; align-items: center; gap: 15px; padding: 18px 25px; 
    background: rgba(255, 255, 255, 0.03); border: 1px solid var(--glass-border); 
    border-radius: 20px; text-decoration: none; color: #fff; transition: 0.3s; 
}
.contact-item:hover { border-color: var(--primary); background: rgba(var(--primary-rgb), 0.05); transform: translateY(-3px); }
.contact-item svg { width: 22px; color: var(--primary); }

/* --- FOOTER (Ripristino Totale) --- */
.footer-panel { border-top: 1px solid var(--glass-border); padding: 40px; text-align: center; }
.footer-links { margin-top: 30px; display: flex; justify-content: center; gap: 30px; }
.footer-links a, .link-btn { color: var(--text-dim); text-decoration: none; font-weight: 600; transition: 0.3s; background: none; border: none; font-size: 1rem; cursor: pointer; font-family: inherit; }
.footer-links a:hover, .link-btn:hover { color: var(--primary); }

/* Global Buttons */
.cta { display: inline-block; padding: 18px 45px; background: var(--primary); color: #000; text-decoration: none; font-weight: 700; border-radius: 100px; transition: 0.3s; cursor: pointer; border: none; }
.cta.secondary { background: transparent; border: 1px solid var(--primary); color: var(--primary); }

.glassmorphism { opacity: 0; transform: translateY(30px); transition: all 1s ease-out; }
.glassmorphism.visible { opacity: 1; transform: translateY(0); }

/* --- RESPONSIVITÀ AVANZATA --- */
@media (max-width: 1024px) {
    header h1 { font-size: clamp(2.5rem, 8vw, 5rem); }
    .pacchetto { grid-column: span 6; min-height: 280px; }
}

@media (max-width: 768px) {
    header.hero-panel { padding: 50px 30px; margin-top: -40px; }
    #pacchetti { padding: 80px 20px 60px; }
    .pacchetto { grid-column: span 12; min-height: auto; padding: 30px 25px; }
    .booking-section { margin: 40px 15px; border-radius: 30px; padding: 25px; }
    .booking-form-compact .row { grid-template-columns: 1fr; gap: 15px; }
    .calendar-dropdown { width: 100%; left: 0; transform: none; }
    .footer-links { flex-direction: column; gap: 20px; text-align: center; }
}

* { -webkit-tap-highlight-color: transparent; }
input, button, .select-trigger { touch-action: manipulation; }