/* ====================================
   Events Manager Custom - Main Styles
   ==================================== */

/* ========== Form Submission ========== */
.emc-submit-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.emc-form {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.emc-form-group {
    margin-bottom: 25px;
}

.emc-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.emc-form-group .required {
    color: #e74c3c;
}

.emc-form-group input[type="text"],
.emc-form-group input[type="email"],
.emc-form-group input[type="url"],
.emc-form-group input[type="datetime-local"],
.emc-form-group textarea,
.emc-form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.emc-form-group input:focus,
.emc-form-group textarea:focus,
.emc-form-group select:focus {
    border-color: #e30613;
    outline: none;
}

.emc-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.emc-form-group input[type="file"] {
    padding: 10px 0;
}

.emc-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Testo di aiuto per upload immagine */
.emc-form-group small.emc-field-help {
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    padding: 12px 15px;
    margin-top: 10px;
    border-radius: 4px;
    line-height: 1.6;
}

.emc-form-group small.emc-field-help strong {
    color: #2c3e50;
    display: inline-block;
    min-width: 140px;
}

.emc-form-group small.emc-field-help em {
    color: #7f8c8d;
    font-style: normal;
}

/* Checkbox groups */
.emc-checkbox-group {
    margin-bottom: 20px;
}

.emc-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}

.emc-checkbox-label input[type="checkbox"] {
    margin-top: 4px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.emc-checkbox-label span {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.emc-checkbox-label a {
    color: #3498db;
    text-decoration: underline;
}

.emc-checkbox-label a:hover {
    color: #2980b9;
}

.emc-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.emc-col-half {
    flex: 1;
    margin-bottom: 0 !important;
}

.emc-submit-button {
    background: #e30613;
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.emc-submit-button:hover {
    background: #b8050f;
}

.emc-submit-button:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Messages */
.emc-message {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 25px;
    font-size: 14px;
}

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

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

/* ========== Archive & Filters ========== */
.emc-archive-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Filtri - Layout a riga singola */
.emc-filters {
    background: #f8f9fa !important;
    padding: 30px !important;
    border-radius: 8px !important;
    margin-bottom: 40px !important;
}

.emc-filters-form {
    display: flex !important;
    flex-direction: row !important;
    gap: 15px !important;
    align-items: flex-start !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
}

.emc-filter-group {
    flex: 1 1 auto !important;
    min-width: 150px !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
    margin: 0 !important;
    padding: 0 !important;
}

.emc-filter-group label {
    display: block !important;
    font-weight: 600 !important;
    margin: 0 0 8px 0 !important;
    padding: 0 !important;
    color: #333 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.emc-filter-group select {
    width: 100% !important;
    padding: 10px 15px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    background: #fff !important;
    display: block !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.emc-filter-button,
.emc-reset-button {
    padding: 10px 25px !important;
    border: none !important;
    border-radius: 50px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    white-space: nowrap !important;
}

.emc-filter-button {
    background: #e30613 !important;
    color: #fff !important;
}

.emc-filter-button:hover {
    background: #b8050f !important;
}

.emc-reset-button {
    background: #95a5a6 !important;
    color: #fff !important;
}

.emc-reset-button:hover {
    background: #7f8c8d !important;
}

/* Events Grid */
.emc-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.emc-event-card {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.emc-event-card:hover {
    transform: translateY(-5px);
}

.emc-event-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.emc-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.emc-event-card:hover .emc-event-image img {
    transform: scale(1.05);
}

.emc-event-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: #fff;
    padding: 10px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.emc-event-date-badge .day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
    color: #333;
}

.emc-event-date-badge .month {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
    margin-top: 2px;
}

/* Badge multi-mese: numeri grandi, mesi piccoli */
.emc-event-date-badge.emc-multi-month {
    padding: 8px 10px;
}

.emc-event-date-badge .day-multi {
    display: block;
    line-height: 1.2;
}

.emc-event-date-badge .day-multi:first-child {
    margin-bottom: 4px;
}

.emc-event-date-badge .day-multi .num {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-right: 4px;
}

.emc-event-date-badge .day-multi .mon {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: #666;
}

.emc-event-content {
    padding: 20px;
}

.emc-event-categories {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emc-event-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.emc-event-category:hover {
    transform: scale(1.05);
    opacity: 0.9;
    text-decoration: none;
}

.emc-event-category i {
    font-size: 12px;
}

.emc-event-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.3;
}

.emc-event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.emc-event-title a:hover {
    color: #e30613;
}

.emc-event-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #666;
}

.emc-event-time,
.emc-event-location {
    display: flex;
    align-items: center;
    gap: 5px;
}

.emc-event-link {
    display: inline-block;
    color: #e30613;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color 0.3s;
}

.emc-event-link:hover {
    color: #b8050f;
}

/* Loading */
.emc-loading {
    text-align: center;
    padding: 40px;
    font-size: 16px;
    color: #666;
}

/* Load More Button */
.emc-load-more-wrapper {
    text-align: center;
    margin: 50px 0;
    padding: 20px 0;
}

.emc-load-more-button {
    background: transparent;
    color: #333;
    border: 2px solid #333;
    padding: 14px 45px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.emc-load-more-button:hover {
    background: #333;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.emc-load-more-button:disabled {
    background: #f5f5f5;
    color: #999;
    border-color: #ddd;
    cursor: not-allowed;
    transform: none;
}

/* No Events Message - Full Width */
.emc-no-events {
    text-align: center !important;
    padding: 120px 40px !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 500px !important;
}

.emc-no-events-title {
    font-size: 56px !important;
    font-weight: 700 !important;
    color: #000 !important;
    margin: 0 0 30px 0 !important;
    line-height: 1.2 !important;
    letter-spacing: -1px !important;
}

.emc-no-events-subtitle {
    font-size: 32px !important;
    color: #000 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
    max-width: 1000px !important;
}

/* Responsive no events */
@media (max-width: 768px) {
    /* Filtri verticali su mobile */
    .emc-filters-form {
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .emc-filter-group {
        width: 100% !important;
        min-width: 100% !important;
        flex: none !important;
    }
    
    .emc-filter-group label {
        font-size: 15px !important;
        margin-bottom: 10px !important;
    }
    
    .emc-filter-group select {
        padding: 12px 15px !important;
        font-size: 16px !important;
    }
    
    .emc-filter-group:last-child {
        flex-direction: column !important;
        gap: 15px !important;
    }
    
    .emc-filter-button,
    .emc-reset-button {
        width: 100% !important;
        padding: 14px 25px !important;
    }
    
    .emc-no-events {
        padding: 60px 20px !important;
        min-height: 350px !important;
    }
    
    .emc-no-events-title {
        font-size: 32px !important;
        margin-bottom: 20px !important;
        letter-spacing: -0.5px !important;
    }
    
    .emc-no-events-subtitle {
        font-size: 20px !important;
    }
}

/* ========== Slider ========== */
.emc-slider-container {
    margin: 0 0 60px 0;
    padding: 0;
    line-height: 0;
}

.emc-slider-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto 60px;
    overflow: hidden;
    padding: 0 60px;
}

.emc-slider {
    display: flex;
    transition: transform 0.5s ease;
}

.emc-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.emc-slide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Slider Card (same as event card) */
.emc-slider-card {
    background: transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s;
}

.emc-slider-card:hover {
    transform: translateY(-5px);
}

.emc-slider-card-image {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.emc-slider-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.emc-slider-card:hover .emc-slider-card-image img {
    transform: scale(1.05);
}

.emc-slider-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 10px 15px;
    border-radius: 8px;
    text-align: center;
    min-width: 60px;
}

.emc-slider-date-badge .day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.emc-slider-date-badge .month {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: #fff;
    margin-top: 2px;
}

.emc-slider-card-content {
    padding: 20px;
}

.emc-slider-card-categories {
    margin-bottom: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.emc-slider-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    cursor: pointer;
}

.emc-slider-category-badge:hover {
    transform: scale(1.05);
    opacity: 0.9;
    text-decoration: none;
}

.emc-slider-category-badge i {
    font-size: 12px;
}

.emc-slider-card-title {
    margin: 0 0 15px 0;
    font-size: 20px;
    line-height: 1.3;
}

.emc-slider-card-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.emc-slider-card-title a:hover {
    color: #e30613;
}

.emc-slider-card-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.emc-slider-time,
.emc-slider-location {
    display: flex;
    align-items: center;
    gap: 6px;
}

.emc-slider-time svg,
.emc-slider-location svg {
    flex-shrink: 0;
}

/* Slider Navigation */
.emc-slider-prev,
.emc-slider-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(10px);
    border: none;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
}

.emc-slider-prev:hover,
.emc-slider-next:hover {
    background: rgba(255,255,255,0.3);
}

.emc-slider-prev {
    left: 20px;
}

.emc-slider-next {
    right: 20px;
}

/* Slider Dots */
.emc-slider-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.emc-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.emc-dot.active,
.emc-dot:hover {
    background: #fff;
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
    .emc-slide-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    /* Riduce margine slider su mobile */
    .emc-slider-container {
        margin-bottom: 10px !important;
    }
    
    .emc-slider-wrapper {
        padding: 0 20px;
        margin-bottom: 15px;
    }
    
    .emc-slide-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Nascondi frecce su mobile - usa swipe */
    .emc-slider-prev,
    .emc-slider-next {
        display: none !important;
    }
    
    .emc-form {
        padding: 25px;
    }
    
    .emc-form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .emc-col-half {
        margin-bottom: 25px !important;
    }
    
    .emc-filters-form {
        flex-wrap: wrap !important;
    }
    
    .emc-filter-group {
        flex: 1 1 100% !important;
        min-width: 100% !important;
        margin-bottom: 15px !important;
    }
    
    .emc-filter-group:last-child {
        flex: 1 1 100% !important;
        justify-content: center !important;
        margin-bottom: 0 !important;
    }
    
    .emc-filter-button,
    .emc-reset-button {
        flex: 1 !important;
    }
    
    .emc-events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .emc-slide {
        height: auto;
        min-height: auto;
    }
    
    .emc-slide-content {
        padding: 0 30px;
    }
    
    .emc-slide-title {
        font-size: 32px;
    }
    
    .emc-slide-excerpt {
        font-size: 16px;
    }
    
    .emc-slider-prev,
    .emc-slider-next {
        width: 40px;
        height: 40px;
    }
    
    .emc-slider-prev {
        left: 10px;
    }
    
    .emc-slider-next {
        right: 10px;
    }
}
