/* static/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Lato:wght@300;400;700&display=swap');

/* === VARIABILI CSS E STILI GENERALI === */
:root {
    --color-background-nav: #F3EADC;
    --color-background-body: #FFFFFF;
    --color-text: #2c2c2c;
    --color-primary: #8C5B3F;
    --color-overlay: rgba(0, 0, 0, 0.2);
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --nav-height-mobile: 80px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--font-body);
    background-color: var(--color-background-body);
    color: var(--color-text);
    line-height: 1.6;
}
h1, h2, h3 { font-family: var(--font-heading); }
a { text-decoration: none; color: inherit; }
section { padding: 80px 40px; max-width: 1200px; margin: 0 auto; text-align: center; }


/* === FINAL REVISED HEADER & NAVIGATION === */
.main-header {
    position: relative; 
    width: 100%;
    background-color: var(--color-background-nav);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    padding: 20px 40px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: padding 0.3s ease;
}

.header-center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.header-logo-image-link { display: block; }
.logo { height: 50px; display: block; }

.header-logo-text {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-text);
}

.main-nav-desktop { display: block; }
.main-nav-desktop ul { list-style: none; display: flex; gap: 50px; }
.main-nav-desktop a {
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
}
.main-nav-desktop a:hover, .main-nav-desktop a.active { color: var(--color-primary); }

/* --- Mobile Navigation & Dropdown --- */
.hamburger-menu {
    display: none; width: 30px; height: 22px;
    flex-direction: column; justify-content: space-between;
    cursor: pointer; position: absolute; top: 50%;
    right: 40px; transform: translateY(-50%);
    z-index: 1002;
}
.hamburger-menu span {
    display: block; width: 100%; height: 2px;
    background-color: var(--color-text);
    transition: all 0.3s ease-in-out;
    border-radius: 1px;
}

.main-nav-mobile-dropdown {
    display: none; position: absolute; top: 100%;
    left: 0; width: 100%;
    background-color: var(--color-background-nav);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
    z-index: 1001;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.main-nav-mobile-dropdown ul { list-style: none; padding: 10px 0; }
.main-nav-mobile-dropdown li a {
    display: block; padding: 15px 40px;
    text-align: center; font-size: 1.2rem;
    transition: background-color 0.2s ease;
}
.main-nav-mobile-dropdown li a:hover { background-color: rgba(0,0,0,0.03); }

/* --- Active state for mobile menu --- */
body.mobile-nav-active .main-nav-mobile-dropdown { display: block; }
body.mobile-nav-active .hamburger-menu span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
body.mobile-nav-active .hamburger-menu span:nth-child(2) { opacity: 0; }
body.mobile-nav-active .hamburger-menu span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }


/* === ALL OTHER STYLES (UNCHANGED) === */
.hero-section {
    height: auto; min-height: 500px;
    padding: 80px 20px; max-width: none;
    display: flex; flex-direction: column; justify-content: center;
    align-items: center; color: #fff; text-align: center;
    background: url('https://images.unsplash.com/photo-1572095768996-14a7roll5b2d?q=80&w=2940&auto=format&fit=crop') no-repeat center center/cover;
    position: relative;
}
.hero-section::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--color-overlay);
}
.hero-content { position: relative; z-index: 2; }
.hero-content h1 { font-size: 4.5rem; color: #fff; margin-bottom: 20px; }
.hero-content p { font-size: 1.2rem; font-weight: 300; margin-bottom: 30px; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-button {
    background-color: #fff; color: var(--color-primary); padding: 15px 40px;
    font-size: 1rem; font-weight: bold; border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.hero-button:hover { transform: scale(1.05); }
.preview-section h2, .materials-section h2 { font-size: 2.5rem; margin-bottom: 50px; }
.preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.preview-item { border: 1px solid #EAEAEA; transition: transform 0.3s ease, box-shadow 0.3s ease; text-align: left; background-color: #fff; }
.preview-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.08); }
.preview-item .image-placeholder { height: 250px; background-color: #EAEAEA; }
.preview-item .item-info { padding: 25px; }
.preview-item h3 { font-size: 1.5rem; margin-bottom: 10px; }
.preview-item p { font-weight: 300; }
.materials-section { background-color: #fff; }
.materials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.material-card .image-placeholder { width: 100%; height: 280px; background-color: #EAEAEA; margin-bottom: 20px; }
.material-card h3 { font-size: 1.8rem; margin-bottom: 10px; }
.material-card p { max-width: 300px; margin: 0 auto; }
.main-footer { background-color: #222; color: #fff; padding: 60px 40px; }
.footer-container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; text-align: left; max-width: 1200px; margin: 0 auto; }
.footer-column h3 { color: #fff; margin-bottom: 20px; }
.footer-column p, .footer-column a { color: #ccc; font-weight: 300; }
.footer-column ul { list-style: none; }
.footer-column ul li { margin-bottom: 10px; }
.footer-column a:hover { color: #fff; }
.social-icons { display: flex; gap: 15px; margin-top: 10px; }
.social-icons a { width: 40px; height: 40px; border: 1px solid #ccc; border-radius: 50%; display: flex; justify-content: center; align-items: center; transition: background-color 0.3s, border-color 0.3s; }
.social-icons a:hover { background-color: var(--color-primary); border-color: var(--color-primary); }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.chart-container { position: relative; height: 400px; width: 100%; margin-top: 40px; margin-bottom: 40px; }


/* === ENHANCED MODAL STYLING === */
/* ADDED THIS RULE for the background color */
.modal {
    background-color: var(--color-background-nav);
}
.modal .modal-content h4 {
    font-family: var(--font-heading);
    text-align: center;
    margin-bottom: 30px;
}
/* Style the modal login button with our primary color */
.modal .btn {
    background-color: var(--color-primary);
}
.modal .btn:hover {
    background-color: #7a4f37; /* A slightly darker shade for hover */
}
/* Style the focus color for text inputs in the modal */
.modal .input-field input[type=text]:focus + label,
.modal .input-field input[type=email]:focus + label,
.modal .input-field input[type=password]:focus + label {
    color: var(--color-primary);
}
.modal .input-field input[type=text]:focus,
.modal .input-field input[type=email]:focus,
.modal .input-field input[type=password]:focus {
    border-bottom: 1px solid var(--color-primary);
    box-shadow: 0 1px 0 0 var(--color-primary);
}



/* === QR CODE PAGE STYLING === */
.qr-code-page .btn, .qr-code-page .btn:hover {
    background-color: var(--color-primary);
}
.qr-code-page .card {
    background-color: #fdfbf7; /* A very light, warm off-white */
}
.qr-code-page .card .card-action a {
    color: var(--color-primary); /* Style the 'Edit' link */
    font-weight: bold;
}
.qr-code-page .card .card-action a:hover {
    color: #7a4f37; /* Darker brown on hover */
}


/* === CORRECTED EVENT FORM STYLING === */
.event-page-wrapper {
    background-color: #F5F1EC;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 0;
}

.event-form-panel {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 40px !important;
}

.event-form-panel .form-header {
    text-align: center;
    margin-bottom: 30px;
}

.event-title {
    /* APPLY THE NEW FONT HERE */
    font-family: 'Old Standard TT', serif;
    font-size: 1.5rem; /* Increased size for better appearance */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.event-subtitle {
    /* APPLY THE NEW FONT HERE */
    font-family: 'Old Standard TT', serif;
    font-size: 1.2rem;
    line-height: 1.6;
}

.event-submit-button, .event-submit-button:hover {
    background-color: var(--color-primary);
}



/* === ENHANCED EVENT SUCCESS PAGE STYLING === */
.success-page-wrapper {
    background-color: #F5F1EC;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 200px);
    padding: 40px 20px;
    text-align: center;
}

.success-card {
    border-radius: 8px;
    max-width: 500px; /* Control the max width of the card */
    margin: 0 auto; /* Center the card */
}

.success-card .card-content {
    padding: 40px;
}

.discount-header {
    font-family: var(--font-heading);
    font-size: 4rem; /* Big, impactful text */
    font-weight: 700;
    color: var(--color-primary); /* Use your primary brand color */
    line-height: 1.1;
    margin-bottom: 20px;
}

.congrats-text {
    font-size: 1.2rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.remaining-text {
    font-size: 1rem;
    color: #757575; /* A softer grey for less important text */
}

.highlight {
    font-weight: 700;
    color: var(--text-color);
    font-size: 1.2em; /* Makes the number slightly bigger */
}

/* Styling for the error panel remains similar */
.error-panel {
    background-color: #FFFFFF;
    border-radius: 8px;
    padding: 50px !important;
}
.error-panel h1 {
    font-family: 'Old Standard TT', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: #F44336;
    margin-top: 1rem;
    margin-bottom: 1rem;
}



/* ============================================== */
/* == STILI PER IL WIZARD DI CREAZIONE ALAMASTR == */
/* ============================================== */

/* Stile di base per la pagina del wizard */
.wizard-page-body {
    font-family: 'Poppins', sans-serif;
    background-color: #FDFBF5; /* Sfondo color crema/avorio */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Allinea in alto per form lunghi */
    min-height: 100vh;
    margin: 2rem 1rem;
}

.wizard-container {
    width: 100%;
    max-width: 700px;
    padding: 1rem;
}

.step-counter {
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Stile per i gruppi di domande */
.wizard-form .form-group {
    margin-bottom: 3rem;
}

.wizard-form .form-group > label {
    display: block;
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 1.5rem;
}

/* Stile per input standard (testo, email, numero, textarea) */
.wizard-form input[type="text"],
.wizard-form input[type="email"],
.wizard-form input[type="number"],
.wizard-form textarea {
    width: 100%;
    padding: 12px 0;
    border: none;
    border-bottom: 1px solid #ccc;
    background-color: transparent;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

.wizard-form input:focus,
.wizard-form textarea:focus {
    outline: none;
    border-bottom-color: #333;
}

/* Stile per i messaggi di errore di Django */
.wizard-form .errorlist {
    color: #c0392b;
    list-style: none;
    padding: 0;
    margin-top: 5px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Stile per il pulsante di invio */
.submit-container {
    text-align: center;
    margin-top: 3rem;
}

.submit-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
}

/* Stile per le scelte cliccabili personalizzate (Radio Buttons) */
.custom-radio-group {
    padding-left: 10px; /* Leggero indent */
}

.custom-radio-label {
    display: block;
    padding: 10px 0;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 300;
    transition: font-weight 0.2s, color 0.2s;
}

.custom-radio-label input[type="radio"] {
    /* Nascondiamo completamente il radio button originale */
    opacity: 0;
    position: fixed;
    width: 0;
}

.custom-radio-label.selected {
    /* Stile per l'opzione selezionata */
    font-weight: 600;
    color: #000;
}

/* Stile per l'upload di file */
.wizard-form input[type="file"] {
    border: 2px dashed #ddd;
    padding: 2rem;
    border-radius: 5px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    background-color: #fafafa;
}

/* === MEDIA QUERIES === */
@media (max-width: 992px) {
    .materials-grid, .footer-container { grid-template-columns: 1fr; }
    .footer-container { text-align: center; }
    .social-icons { justify-content: center; }
    .hero-content h1 { font-size: 3.5rem; }
}

/* CORRECTED AND FINAL MOBILE STYLES */
@media (max-width: 768px) {
    section { padding: 60px 20px; }
    
    .main-header {
        height: var(--nav-height-mobile);
        justify-content: center;
        padding: 0 20px;
    }

    .header-center-content {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .main-nav-desktop { display: none; }
    .logo { height: 35px; }

    .header-logo-text {
        font-family: 'Old Standard TT', serif;
        display: block;
        font-size: 1.8rem;
    }

    .hamburger-menu {
        display: flex;
        right: 20px;
    }

    .hero-content h1 { font-size: 2.5rem; }
    .hero-content p { font-size: 1rem; }
}
