/* =======================
   VARIABILI E STILI GLOBALI
   ======================= */
:root {
    --primary-color: #D81E2A; 
    --dark-color: #1a1a1a;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white-color: #ffffff;
    --font-family: 'Inter', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* =======================
   HEADER E NAVIGAZIONE
   ======================= */
.main-header {
    background-color: var(--white-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    height: 45px;
}

.main-nav a {
    color: var(--text-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    background-color: var(--white-color);
    border-top: 1px solid #eee;
}

.mobile-nav a {
    color: var(--text-color);
    text-decoration: none;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}
.mobile-nav a:hover {
    background-color: var(--light-gray);
}


/* =======================
   COMPONENTI 
   ======================= */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.btn-primary:hover {
    background-color: #b81824;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.section-padding { padding: 80px 0; }
.section-title { font-size: 2.5rem; color: var(--dark-color); margin-bottom: 10px; }
.text-center { text-align: center; }
.text-left { text-align: left; }
.separator { width: 80px; height: 4px; background-color: var(--primary-color); margin: 15px auto 30px auto; }
.separator.text-left { margin-left: 0; }
.section-intro { max-width: 700px; margin: 0 auto; color: #666; font-size: 1.1rem; }
.mt-4 { margin-top: 16px; }
.mt-12 { margin-top: 48px; }

/* Griglie e Card */
.grid-2-col { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.card { background: var(--white-color); padding: 40px; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); text-align: center; transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-10px); box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.card-icon { color: var(--primary-color); width: 50px; height: 50px; margin-bottom: 20px; }
.card-title { font-size: 1.4rem; margin-bottom: 10px; }
.content-image { width: 100%; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.text-link { color: var(--primary-color); text-decoration: none; font-weight: 600; }
.text-link:hover { text-decoration: underline; }

/* =======================
   STILI DI INTESTAZIONE PAGINA
   ======================= */
.hero-section, .page-header {
    height: 60vh;
    background: url('assets/images/unical.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    text-align: center;
    overflow: hidden;
}
.hero-section { height: 80vh; } 

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1;
}

.hero-content { position: relative; z-index: 2; }

.hero-subtitle { font-size: 1.4rem; max-width: 600px; margin: 20px auto 30px auto; animation: fade-in-up 1.5s 0.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; opacity: 0; transform: translateY(20px); }
.page-header p { font-size: 1.4rem; }

.hero-title { font-size: 5rem; font-weight: 800; margin-bottom: 10px; background: linear-gradient(135deg, var(--primary-color), #ff7a8a, var(--white-color), var(--primary-color)); background-size: 300% 300%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: gradient-flow 8s ease infinite, fade-in-up 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; opacity: 0; transform: translateY(20px); }
.page-header h1 { font-size: 3.5rem; font-weight: 800; }

@keyframes gradient-flow { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
@keyframes fade-in-up { to { opacity: 1; transform: translateY(0); } }


/* =======================
   SEZIONI SPECIFICHE
   ======================= */
/* Instagram */
.insta-preview-img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.1); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.insta-preview-img:hover { transform: scale(1.05); box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.instagram-placeholder { border: 2px dashed #ccc; border-radius: 10px; padding: 50px; margin-top: 40px; color: #888; }
.instagram-placeholder i { width: 50px; height: 50px; margin-bottom: 15px; }

/* Appunti */
.filter-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.filter-btn { background: #e0e0e0; color: #555; border: none; padding: 10px 20px; border-radius: 50px; cursor: pointer; transition: all 0.3s ease; }
.filter-btn:hover { background: #ccc; }
.filter-btn.active { background: var(--primary-color); color: var(--white-color); font-weight: 600; }
.note-card { background: var(--white-color); border-radius: 10px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); text-align: center; padding: 30px; transition: transform 0.3s ease; }
.note-card:hover { transform: translateY(-5px); }
.note-icon { color: var(--primary-color); width: 40px; height: 40px; margin-bottom: 15px; }
.note-title { font-size: 1.3rem; margin-bottom: 5px; }
.note-subject { color: #777; font-style: italic; margin-bottom: 20px; }

/* Contatti */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: start; }
.contact-subtitle { font-size: 1.8rem; color: var(--dark-color); margin-bottom: 20px; }
.info-item { display: flex; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.info-item i { color: var(--primary-color); margin-top: 5px; }
.info-item strong { display: block; color: var(--dark-color); font-size: 1.1rem; }
.info-item a { color: var(--primary-color); text-decoration: none; }
.contact-social-links { display: flex; gap: 15px; }
.social-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; color: var(--primary-color); border: 2px solid var(--primary-color); border-radius: 50%; transition: all 0.3s ease; }
.social-icon:hover { background-color: var(--primary-color); color: var(--white-color); }
.map-container { border-radius: 10px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
.map-container iframe { display: block; }
.contact-form-section { margin-top: 80px; }
.contact-form { max-width: 700px; margin: 0 auto; }
.form-group { display: flex; gap: 20px; margin-bottom: 20px; }
.contact-form input, .contact-form textarea { width: 100%; padding: 15px; border: 1px solid #ddd; border-radius: 5px; font-family: var(--font-family); font-size: 1rem; transition: border-color 0.3s ease, box-shadow 0.3s ease; }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(216, 30, 42, 0.1); }
.contact-form textarea { resize: vertical; }

/* Admin Upload */
.admin-header { background-color: var(--dark-color); color: var(--white-color); padding: 20px 0; }
.admin-header .container { display: flex; justify-content: space-between; align-items: center; }
.admin-panel { background: var(--white-color); padding: 40px; border-radius: 10px; box-shadow: 0 5px 25px rgba(0,0,0,0.1); }
.admin-instructions { background: var(--light-gray); padding: 20px; border-radius: 5px; margin-bottom: 30px; }
.admin-instructions ol { padding-left: 20px; }
.admin-form label { display: block; margin-bottom: 8px; font-weight: 600; }
.admin-form .form-group { flex-direction: column; gap: 5px; }
.admin-form .form-group-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.admin-form input { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; }
#generated-code { width: 100%; background: #2d2d2d; color: #a9b7c6; border: none; padding: 15px; border-radius: 5px; font-family: monospace; }
#copy-feedback { margin-left: 10px; color: var(--primary-color); font-weight: 600; }


/* =======================
   FOOTER
   ======================= */
.main-footer { background-color: var(--dark-color); color: #a0a0a0; padding: 60px 0 20px 0; }
.footer-content { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; flex-wrap: wrap; gap: 20px; }
.footer-title { color: var(--white-color); font-size: 1.5rem; }
.social-links a { color: #a0a0a0; margin-left: 15px; transition: color 0.3s ease; }
.social-links a:hover { color: var(--primary-color); }
.footer-bottom { text-align: center; padding-top: 20px; border-top: 1px solid #444; }

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 992px) {
    .grid-2-col { grid-template-columns: 1fr; }
    .content-image { margin-top: 30px; }
}
@media (max-width: 768px) {
    .main-nav { display: none; }
    .mobile-menu-toggle { display: block; }
    .grid-3 { grid-template-columns: 1fr; }
    .hero-title { font-size: 2.8rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .page-header h1 { font-size: 2.5rem; }
    .section-title { font-size: 2rem; }
    .footer-content { flex-direction: column; text-align: center; gap: 30px; }
    .social-links a { margin: 0 10px; }
    .contact-grid { grid-template-columns: 1fr; }
    .form-group { flex-direction: column; }
    .admin-form .form-group-grid { grid-template-columns: 1fr; }
}

