/* ============================
   GLOBAL STYLE
   ============================ */

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

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #2a2a2a;
    background: #f0f4f8;
}

/* LINKS */
a {
    color: #0077b6;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}

/* ============================
   HEADER
   ============================ */

header {
    background: linear-gradient(135deg, #005a8c, #0077b6);
    color: #fff;
    padding: 20px 20px 15px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

header .brand {
    display: flex;
	/*align-items: stretch;*/
	align-items: flex-start;
    /*flex-wrap: wrap;*/          /* <--- impedisce di andare a capo */
    align-items: center;        /* centratura verticale */
    gap: 22px;                  /* spazio fra logo e testo */
}

header .brand-logo {
  display: flex;
  align-items: flex-start;
  height: 100%;
}
header .brand-logo img {
	margin-top: 4px;
  height: 100%;
  max-height: 100px;   /* limite di sicurezza */
  width: auto;
}

header .brand-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

header .brand-text h1 {
  font-size: 1.35rem;
  line-height: 1.25;
  margin: 0;
  font-weight: 700;
}

header .brand-text h1 span {
  display: block;
  font-weight: 500;
  opacity: 0.9;
  margin-top: 4px;
}

header .brand-text p {
  margin: 6px 0 0;
  font-size: 0.9rem;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .brand {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .brand-logo img {
    margin-top: 0;
    max-height: 60px;
  }

  .brand-text h1 span {
    margin-top: 2px;
  }
}

/* immagine responsiva */
.logo-small {
    max-width: 100%;
    height: auto;
}

header h1 {
    font-size: 1.5rem;
    font-weight: 600;
}

header p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.logo-small {
    height: 55px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* MENU */

/* NAV DESKTOP */
.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 10px 0 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-nav a {
    color: #fff;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 500;
}

.main-nav a:hover,
.main-nav a.active {
    background: rgba(255,255,255,0.15);
}

/* BOTTONE HAMBURGER */
.nav-toggle {
    display: none;           
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-top: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    margin: 4px 0;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

/* mobile: menu a colonna, ma sempre leggibile */
@media (max-width: 768px) {

    header {
        padding-bottom: 5px;
    }

    header .brand {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-toggle {
        display: block;       /* visibile su mobile */
    }

    .main-nav {
        display: none;        /* chiuso di default */
        width: 100%;
    }

    .main-nav.open {
        display: block;       /* aperto quando cliccato */
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        margin-top: 5px;
    }

    .main-nav li {
        width: 100%;
    }

    .main-nav a {
        display: block;
        width: 100%;
        padding: 10px 12px;
        border-radius: 0;
        border-top: 1px solid rgba(255,255,255,0.15);
        background: rgba(0,0,0,0.05);
    }

    /* animazione iconcina hamburger -> X opzionale */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }    
    .nav-toggle {
            display: block;       /* visibile su mobile */
    }
}

/* ============================
   MAIN LAYOUT
   ============================ */

main {
    max-width: 1100px;
    margin: 30px auto 40px;
    padding: 0 18px;
}

/* ============================
   HERO SECTION
   ============================ */
/* HERO PANORAMICO */
.hero {
    display: grid;
    grid-template-columns: 2fr 3fr; /* più spazio all'immagine */
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
    margin-bottom: 30px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* mantiene l’effetto “pieno” */
    object-position: center;   /* centra la parte importante */
}

.hero-text {
    padding: 12px;
}

/* BTN */
.btn {
    display: inline-block;
    background: #0077b6;
    padding: 12px 20px;
    font-weight: 600;
    color: #fff;
    border-radius: 28px;
    margin-top: 12px;
    transition: 0.2s;
}
.btn:hover {
    background: #005a8c;
}

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

.section {
    background: #ffffff;
    padding: 26px 26px 30px;
    border-radius: 16px;
    margin-bottom: 24px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
}

.section h1,
.section h2 {
    color: #004a70;
    margin-bottom: 12px;
    font-weight: 600;
}

.section ul {
    margin-left: 22px;
    margin-top: 8px;
}

/* CARDS */
.card-grid {
    margin-top: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.card {
    background: linear-gradient(180deg, #ffffff, #f7fbff);
    border-radius: 14px;
    padding: 20px;
    border: 1px solid #dce8f0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
}
.card p {
    font-size: 0.95rem;
}

/* ICONS */
.icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: inline-block;
    color: #0077b6;
}

/* SPEAKERS */
.speaker-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 22px;
    margin-top: 18px;
}
.speaker-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    text-align: center;
    border: 1px solid #dce8f0;
    box-shadow: 0 3px 8px rgba(0,0,0,0.06);
}
.speaker-photo {
    width: 105px;
    height: 105px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
    border: 3px solid #e6f2fa;
}

.relatori-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.relatore-card {
    background: #ffffff;
    border-left: 5px solid #0077b6;
    padding: 18px 20px;
    border-radius: 8px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
}

.relatore-card h2 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: #0f172a;
}

.relatore-card p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #374151;
}

/* Mobile */
@media (max-width: 768px) {
    .relatore-card {
        padding: 16px;
    }
}

/* PROGRAMMA */
.programma {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

.programma th,
.programma td {
    border: 1px solid #ddd;
    padding: 10px;
    vertical-align: top;
}

.programma th {
    background: #f2f2f2;
    text-align: left;
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {

    .programma thead {
        display: none;
    }

    .programma,
    .programma tbody,
    .programma tr,
    .programma td {
        display: block;
        width: 100%;
    }

    .programma tr {
        margin-bottom: 1.5rem;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0,0,0,0.05);
    }

    .programma td {
        border: none;
        padding: 6px 0;
    }

    /* Etichette */
    .programma td:nth-of-type(1)::before {
        content: "Orario";
        font-weight: bold;
        display: block;
        color: #666;
        margin-bottom: 2px;
    }

    .programma td:nth-of-type(2)::before {
        content: "Titolo";
        font-weight: bold;
        display: block;
        color: #666;
        margin-bottom: 2px;
    }

    .programma td:nth-of-type(3)::before {
        content: "Relatore";
        font-weight: bold;
        display: block;
        color: #666;
        margin-bottom: 2px;
    }

    /* Righe con colspan */
    .programma td[colspan]::before {
        content: "";
        display: none;
    }
}

/* FOOTER */
footer {
    background: #003a5e;
    color: #fff;
    text-align: center;
    padding: 18px 12px;
    margin-top: 40px;
    box-shadow: 0 -4px 10px rgba(0,0,0,0.18);
    border-top-left-radius: 18px;
    border-top-right-radius: 18px;
}
footer a {
    color: #bbe6ff;
}

/* MOBILE */
@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
    }
    nav ul {
        flex-direction: column;
    }
}

/* ============================
   BADGE GENERICI
   ============================ */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Colori badge */
.badge-info {
    background: #e0f3ff;
    color: #005a8c;
}

.badge-accent {
    background: #ffda79;
    color: #5a4100;
}

.badge-success {
    background: #d3f9d8;
    color: #1b5e20;
}

/* ============================
   BADGE SU PULSANTI
   ============================ */

.btn.with-badge {
    position: relative;
    padding-left: 48px; /* spazio per il bollino a sinistra */
}

.btn-badge {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

/* Variante per badge chiaro su pulsante chiaro (se la usi) */
.btn-light.with-badge .btn-badge {
    background: #0077b6;
    border-color: #ffffff;
}

/* ============================
   BADGE PER LE SEZIONI
   ============================ */

.section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.section-badge {
    @media (max-width: 0px) { }
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    background: #e6f2fa;
    color: #005a8c;
}

.section-title {
    margin: 0;
	border-left: 6px solid #00b4a0;padding-left: 24px;
	background: linear-gradient(135deg, #f7fbff, #eef6fb);
  border-radius: 14px;
}