/* =====================================================
   SIDeMaST 99° Congresso Nazionale
   Stile basato su Giuliani Pharma Brand
   ===================================================== */

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

:root {
    --giuliani-navy: #003477;
    --giuliani-dark: #07284d;
    --giuliani-blue: #3380c4;
    --giuliani-bright: #1e69be;
    --giuliani-cyan: #0bb2f0;
    --giuliani-light-blue: #80bbdb;
    --giuliani-pale-blue: #a7c7e3;
    --giuliani-ice: #e4eff4;

    --text-body: #292929;
    --text-dark: #07284d;
    --white: #ffffff;
    --light-gray: #f6f6f6;

    --gradient-light: linear-gradient(to left bottom, #0bb2f0, #3380c4);
    --gradient-dark: linear-gradient(to left bottom, #1e69be, #003477);

    --font-heading: "Titillium Web", sans-serif;
    --font-body: "Karla", sans-serif;

    --btn-radius: 40px;
    --card-radius: 10px;
}

/* --- RESET & BASE --- */

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

body {
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.65;
    color: var(--text-body);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--giuliani-blue);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--giuliani-navy);
}

img {
    max-width: 100%;
    height: auto;
}

/* --- TYPOGRAPHY --- */

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--giuliani-navy);
    line-height: 1.2;
}

h1 {
    font-size: 2.8rem;
    font-weight: 700;
}

h2 {
    font-size: 2rem;
    font-weight: 600;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
}

h4 {
    font-family: var(--font-body);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--giuliani-blue);
    font-weight: 400;
}

p {
    margin-bottom: 1rem;
}

/* --- LAYOUT --- */

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-narrow {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER / NAVBAR --- */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

.navbar.scrolled {
    background: var(--white);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.22);
    padding: 10px 0;
}

.navbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-logo img {
    height: 45px;
    transition: height 0.3s;
}

.navbar.scrolled .navbar-logo img {
    height: 38px;
}

.navbar-logo .logo-white { display: block; }
.navbar-logo .logo-dark { display: none; }
.navbar.scrolled .navbar-logo .logo-white { display: none; }
.navbar.scrolled .navbar-logo .logo-dark { display: block; }

.navbar-links {
    display: flex;
    align-items: center;
    gap: 30px;
    list-style: none;
}

.navbar-links a {
    font-family: var(--font-body);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    color: var(--white);
    font-weight: 700;
    transition: color 0.3s;
}

.navbar.scrolled .navbar-links a {
    color: var(--giuliani-dark);
}

.navbar-links a:hover {
    color: var(--giuliani-cyan);
}

/* Mobile menu */
.navbar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.navbar-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background: var(--white);
    margin: 6px 0;
    transition: 0.3s;
}

.navbar.scrolled .navbar-toggle span {
    background: var(--giuliani-dark);
}

/* --- HERO --- */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: var(--gradient-dark);
    overflow: hidden;
    padding: 120px 20px 80px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,160L48,176C96,192,192,224,288,213.3C384,203,480,149,576,144C672,139,768,181,864,197.3C960,213,1056,203,1152,176C1248,149,1344,107,1392,85.3L1440,64L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>') no-repeat bottom center;
    background-size: cover;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-congresso {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 300;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.hero h1 {
    color: var(--white);
    font-size: 3.2rem;
    margin-bottom: 10px;
    line-height: 1.1;
}

.hero-edition {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--giuliani-cyan);
    margin-bottom: 25px;
}

.hero-subtitle {
    font-family: var(--font-body);
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    margin-bottom: 10px;
    font-style: italic;
}

.hero-details {
    font-family: var(--font-body);
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 40px;
}

.hero-details strong {
    color: var(--white);
}

/* --- BUTTONS --- */

.btn {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -0.15px;
    border-radius: var(--btn-radius);
    padding: 16px 36px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--giuliani-blue);
    border-color: var(--giuliani-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--giuliani-dark);
    border-color: var(--giuliani-dark);
    color: var(--white);
}

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

.btn-outline:hover {
    background-color: var(--white);
    color: var(--giuliani-navy);
}

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

.btn-outline-blue:hover {
    background-color: var(--giuliani-blue);
    color: var(--white);
}

.btn-sm {
    padding: 10px 24px;
    font-size: 13px;
}

.btn-lg {
    padding: 20px 48px;
    font-size: 16px;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: var(--white);
}

.btn-danger:hover {
    background-color: #a71d2a;
    border-color: #a71d2a;
    color: var(--white);
}

/* --- SECTIONS --- */

.section {
    padding: 80px 0;
}

.section-gradient-light {
    background: var(--gradient-light);
    color: var(--white);
}

.section-gradient-dark {
    background: var(--gradient-dark);
    color: var(--white);
}

.section-ice {
    background: var(--giuliani-ice);
}

.section-title-center {
    text-align: center;
    margin-bottom: 50px;
}

.section-title-center h4 {
    margin-bottom: 10px;
}

.section-title-center h2 {
    margin-bottom: 15px;
}

.section-title-center p {
    max-width: 600px;
    margin: 0 auto;
    color: #6c757d;
}

/* --- EVENT INFO CARDS --- */

.info-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.info-card {
    background: var(--white);
    border-radius: var(--card-radius);
    padding: 35px 30px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.info-card-icon {
    width: 60px;
    height: 60px;
    background: var(--giuliani-ice);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 24px;
    color: var(--giuliani-blue);
}

.info-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.info-card p {
    color: #6c757d;
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* --- REGISTRATION FORM --- */

.form-section {
    padding: 80px 0;
}

.form-card {
    background: var(--white);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 50px;
    max-width: 720px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--giuliani-dark);
    margin-bottom: 8px;
}

.form-group label .required {
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    font-family: var(--font-body);
    font-size: 15px;
    color: var(--text-body);
    background: var(--light-gray);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: border-color 0.3s, box-shadow 0.3s;
    outline: none;
}

.form-control:focus {
    border-color: var(--giuliani-blue);
    box-shadow: 0 0 0 3px rgba(51, 128, 196, 0.15);
    background: var(--white);
}

.form-control::placeholder {
    color: #adb5bd;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* --- TOUR CARDS --- */

.tour-card {
    background: var(--white);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 25px;
    overflow: hidden;
    display: flex;
    transition: transform 0.3s, box-shadow 0.3s;
}

.tour-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.tour-card-badge {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: var(--gradient-dark);
    color: var(--white);
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 25px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.tour-card-badge.badge-blue {
    background: var(--gradient-light);
}

.tour-card-content {
    padding: 30px 35px;
    flex: 1;
}

.tour-card-content h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.tour-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    color: var(--giuliani-blue);
    font-weight: 700;
}

.tour-card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.tour-card-content p {
    color: #5a6c7d;
    line-height: 1.7;
    margin-bottom: 0;
}

.tour-note {
    background: var(--white);
    border-left: 4px solid var(--giuliani-blue);
    padding: 18px 25px;
    border-radius: 0 8px 8px 0;
    margin-top: 10px;
    color: #5a6c7d;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* --- FORM TOUR RADIO --- */

.form-section-label {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--giuliani-navy);
    margin: 35px 0 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--giuliani-ice);
}

.form-section-label .required {
    color: #dc3545;
}

.form-hint {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.tour-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tour-radio-option {
    position: relative;
}

.tour-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.tour-radio-option label {
    display: flex;
    align-items: center;
    padding: 18px 22px;
    background: var(--light-gray);
    border: 2px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: none;
    font-weight: 400;
    font-size: 15px;
    gap: 16px;
}

.tour-radio-option input[type="radio"]:checked + label {
    background: var(--giuliani-ice);
    border-color: var(--giuliani-blue);
    box-shadow: 0 0 0 3px rgba(51, 128, 196, 0.15);
}

.tour-radio-option label:hover {
    border-color: var(--giuliani-pale-blue);
}

.tour-radio-badge {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    background: var(--gradient-dark);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.tour-radio-badge.badge-blue {
    background: var(--gradient-light);
}

.tour-radio-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tour-radio-text strong {
    font-family: var(--font-heading);
    color: var(--giuliani-dark);
    font-size: 0.95rem;
}

.tour-radio-text small {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Hero tours */
.hero-tours {
    display: block !important;
    min-height: 0 !important;
    padding: 130px 40px 140px !important;
    overflow: hidden !important;
    text-align: center;
}

.hero-tours .hero-content {
    max-width: 1000px;
    margin: 0 auto;
}

.hero-tours .hero-img {
    max-height: none !important;
}

@media (max-width: 768px) {
    .hero-tours {
        padding: 120px 20px 100px !important;
    }
    .hero-tours .hero-img {
        width: 90vw;
    }
}

/* Hero showcooking */
.hero-showcooking {
    min-height: auto !important;
    padding: 130px 40px 110px !important;
    overflow: visible !important;
}

.hero-showcooking .hero-content {
    max-width: 1000px;
}

.hero-showcooking .hero-img {
    display: block;
    width: clamp(300px, 50vw, 860px);
    max-height: 58vh;
    object-fit: contain;
    margin: 12px auto 20px;
}

@media (max-width: 768px) {
    .hero-showcooking {
        padding: 120px 20px 90px !important;
    }
    .hero-showcooking .hero-img {
        width: 85vw;
        max-height: none;
    }
}

.tour-posti {
    color: #2e8b57;
    font-size: 0.82rem;
    font-weight: 600;
}

.posti-esauriti {
    color: #c0392b;
}

.tour-radio-pieno {
    opacity: 0.55;
    pointer-events: none;
}

.tour-radio-pieno label {
    cursor: not-allowed;
    background: #f8f8f8;
}

/* Form messages */
.form-message {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    font-weight: 600;
}

.form-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* --- FOOTER --- */

.footer {
    background: var(--giuliani-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 50px 0 30px;
}

.footer-inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 40px;
    align-items: start;
}

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

.footer-text {
    font-size: 14px;
    line-height: 1.7;
}

.footer-text a {
    color: var(--giuliani-cyan);
}

.footer-links {
    text-align: right;
}

.footer-links a {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.65px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    font-size: 13px;
}

/* --- SUCCESS PAGE --- */

.success-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--giuliani-ice);
    padding: 40px 20px;
}

.success-card {
    background: var(--white);
    border-radius: var(--card-radius);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 60px 50px;
    max-width: 600px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #d4edda;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    font-size: 36px;
    color: #28a745;
}

.success-card h2 {
    margin-bottom: 15px;
}

.success-card p {
    color: #6c757d;
    margin-bottom: 25px;
}

/* --- RESPONSIVE --- */

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

    .hero-edition {
        font-size: 1.2rem;
    }

    .info-cards {
        grid-template-columns: 1fr;
    }

    .navbar-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        gap: 0;
    }

    .navbar-links.active {
        display: flex;
    }

    .navbar-links a {
        color: var(--giuliani-dark) !important;
        padding: 12px 0;
        border-bottom: 1px solid var(--light-gray);
        width: 100%;
        text-align: center;
    }

    .navbar-toggle {
        display: block;
    }

    .footer-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

@media (max-width: 768px) {
    .hero {
        min-height: auto;
        padding: 140px 20px 80px;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .form-card {
        padding: 30px 25px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 50px 0;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .tour-card {
        flex-direction: column;
    }

    .tour-card-badge {
        writing-mode: horizontal-tb;
        padding: 12px 25px;
        min-width: auto;
    }

    .tour-card-content {
        padding: 20px 25px;
    }

    .tour-card-meta {
        flex-direction: column;
        gap: 8px;
    }

    .tour-radio-option label {
        padding: 14px 16px;
    }

    .tour-radio-badge {
        width: 38px;
        height: 38px;
        font-size: 0.8rem;
    }
}
