/* public/assets/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=Outfit:wght@400;700;900&display=swap');

:root {
    /* Default Dark Theme */
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --accent: #3b82f6;
    --accent-rgb: 59, 130, 246;
    --accent-hover: #60a5fa;
    --accent-gradient: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
    --card-bg: rgba(30, 41, 59, 0.7);
    --card-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
    --border-radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] {
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --accent: #2563eb;
    --accent-rgb: 37, 99, 235;
    --accent-hover: #1d4ed8;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #60a5fa 100%);
    --card-bg: rgba(255, 255, 255, 0.8);
    --card-border: rgba(0, 0, 0, 0.08);
    --shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

/* Hero Sections */
.hero {
    position: relative;
    width: 100%;
    height: var(--hero-height, 50vh);
    min-height: var(--hero-min-height, 400px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 4rem 5% 2rem 5%;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    margin-top: -1px;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(15, 23, 42, 0.3) 0%, rgba(15, 23, 42, 0.8) 100%);
    z-index: 1;
}

.hero > * {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    -webkit-text-fill-color: #ffffff;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
    max-width: 1000px;
}

.hero .hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    max-width: 700px;
    margin: 0 auto;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}


.hero.no-image {
    height: 40vh;
    min-height: 300px;
    background: var(--bg-secondary);
}

.event-detail-container {
    width: 100%;
    background: var(--bg-primary);
    position: relative;
    z-index: 10;
}

.event-detail-body {
    max-width: 1100px;
    margin: 0 auto;
    padding: 6rem 1.5rem 8rem 1.5rem;
}

/* Fix for spacing between hero and content */
.hero + .event-detail-container {
    margin-top: 4rem;
}

.back-link-hero {
    position: absolute;
    top: 2rem;
    left: 2rem;
    color: white;
    text-decoration: none;
    z-index: 10;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}
.back-link-hero:hover { opacity: 1; }

/* Navbar adjustments */
.navbar {
    padding: 1rem 5%;
    background: var(--bg-secondary);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--card-border);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex !important; /* Force flex */
    justify-content: space-between !important;
    align-items: center !important;
}

.navbar.sticky {
    position: sticky !important;
    top: 0 !important;
}

.navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 900;
    font-size: 1.5rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand span {
    color: var(--accent);
}

main {
    flex: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}


/* Event Grid */
.events-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

/* Cards (Glassmorphism) */
.event-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow);
    border-color: rgba(255, 255, 255, 0.3);
}

.event-image {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

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

.event-card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.event-date-loc {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.event-date-loc i {
    color: var(--accent);
}

/* Detail View */
.event-detail-container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.event-detail-header {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.event-detail-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
}

/* Spacing fixed above */

.event-detail-body h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: none;
    -webkit-text-fill-color: var(--text-primary);
}

.btn-primary {
    display: inline-block;
    padding: 0.75rem 2rem;
    background: var(--accent-gradient);
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    margin-top: 2rem;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 2rem;
    transition: var(--transition);
}

.back-link:hover {
    color: var(--text-primary);
}

footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    border-top: 1px solid var(--card-border);
}

/* Nav Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    background: rgba(15, 23, 42, 0.5);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

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

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Role Badges */
.role-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-admin {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.role-redattore {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.role-utente {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

/* Form Sections */
.form-section {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.form-section-title {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--card-border);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent);
}

/* Type Badges */
.type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.type-event {
    background: rgba(139, 92, 246, 0.2);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.4);
}

.type-news {
    background: rgba(34, 197, 94, 0.2);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.type-page {
    background: rgba(59, 130, 246, 0.2);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.4);
}

.type-activity {
    background: rgba(245, 158, 11, 0.2);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.4);
}

/* Status Badges */
.status-badge {
    font-size: 0.8rem;
    white-space: nowrap;
}

.status-draft { color: #fcd34d; }
.status-published { color: #86efac; }
.status-archived { color: var(--text-secondary); }

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid #16a34a;
    color: #15803d;
    font-weight: 600;
}

/* Event Detail Meta */
.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    border: 1px solid var(--card-border);
}

.event-meta-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.event-meta-item i {
    color: var(--accent);
    font-size: 1.2rem;
}

/* Event Body */
.event-body {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* Event Contacts */
.event-contacts {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
}

.event-contacts h3 {
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    color: var(--text-secondary);
}

.contact-item i {
    color: var(--accent);
    margin-top: 0.25rem;
}

/* Date Blocks Management */
.date-block {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: all 0.3s ease;
}

.date-block:hover {
    border-color: var(--accent);
}

.date-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--card-border);
}

.date-block-num {
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--accent);
    text-transform: uppercase;
}

.date-block-remove {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.2);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: all 0.2s ease;
}

.date-block-remove:hover {
    background: #ef4444;
    color: white;
}

#add-date-btn {
    transition: transform 0.2s ease;
}

#add-date-btn:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }
    .hero { padding: 3rem 0; }
    .events-grid { grid-template-columns: 1fr; }
    .navbar { flex-wrap: wrap; gap: 1rem; }
    .event-meta { flex-direction: column; gap: 1rem; }
}
/* Galleries */
.content-gallery {
    margin: 2.5rem 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.gallery-masonry {
    columns: 3 300px;
    column-gap: 1.5rem;
}

.gallery-masonry .gallery-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(0,0,0,0.3);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.gallery-slider {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
}

.gallery-slider .swiper {
    width: 100%;
    height: 500px;
}

.gallery-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-slider .swiper-button-next,
.gallery-slider .swiper-button-prev {
    color: white;
    background: rgba(0,0,0,0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.gallery-slider .swiper-button-next:after,
.gallery-slider .swiper-button-prev:after {
    font-size: 1.2rem;
    font-weight: bold;
}

@media (max-width: 600px) {
    .gallery-slider .swiper { height: 300px; }
}

/* Frontend Contacts */
.event-contacts {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
}

.event-contacts h3 {
    margin-bottom: 2rem;
    color: var(--accent);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    background: rgba(255,255,255,0.03);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    transition: var(--transition);
}

.contact-item:hover {
    background: rgba(255,255,255,0.07);
    border-color: var(--accent);
    transform: translateY(-3px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent);
    width: 30px;
    text-align: center;
}

.contact-item strong {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-item a, .contact-item span {
    font-size: 1.1rem;
    word-break: break-all;
}


/* Footer Styles */
footer {
    padding: 4rem 5% 2rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--card-border);
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-columns {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.footer-links-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links-list a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links-list a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-newsletter {
    background: rgba(var(--accent-rgb), 0.05);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 4rem;
    border: 1px solid rgba(var(--accent-rgb), 0.1);
}

.footer-newsletter h3 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 500px;
    margin: 1.5rem auto 0;
}

.newsletter-form input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--card-border);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    color: white;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-minimal-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links-inline a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links-inline a:hover {
    color: var(--text-primary);
}

@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .newsletter-form {
        flex-direction: column;
    }
}


/* Dynamic Main Menu */
.dynamic-main-menu {
    display: flex;
    gap: 2rem;
    margin: 0 1.5rem;
}

.dynamic-main-menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.dynamic-main-menu a:hover {
    color: var(--accent);
}


/* Spacing for minimal footer links */
.footer-links-inline {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}
/* Social Sharing Buttons */
.social-share-container {
    margin: 2rem 0;
    padding: 1.5rem 0;
    border-top: 1px solid var(--card-border);
    border-bottom: 1px solid var(--card-border);
}
.social-share-container.before { margin-bottom: 3rem; border-top: none; padding-top: 0; }
.social-share-container.after { margin-top: 3rem; border-bottom: none; padding-bottom: 0; }

.social-share-label {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}

.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.25rem;
    border-radius: 12px;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--card-border);
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-btn i { font-size: 1.1rem; }

.share-btn:hover {
    transform: translateY(-3px);
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 10px 20px -5px rgba(var(--accent-rgb, 109, 40, 217), 0.4);
}

/* Platform colors on hover */
.share-btn.fb:hover { background: #1877f2; border-color: #1877f2; box-shadow: 0 10px 20px -5px rgba(24, 119, 242, 0.4); }
.share-btn.wa:hover { background: #25d366; border-color: #25d366; box-shadow: 0 10px 20px -5px rgba(37, 211, 102, 0.4); }
.share-btn.tg:hover { background: #0088cc; border-color: #0088cc; box-shadow: 0 10px 20px -5px rgba(0, 136, 204, 0.4); }
.share-btn.pn:hover { background: #bd081c; border-color: #bd081c; box-shadow: 0 10px 20px -5px rgba(189, 8, 28, 0.4); }
.share-btn.em:hover { background: var(--text-secondary); border-color: var(--text-secondary); box-shadow: 0 10px 20px -5px rgba(255,255,255,0.1); }

@media (max-width: 576px) {
    .share-btn span { display: none; }
    .share-btn { padding: 0.75rem; border-radius: 50%; width: 45px; height: 45px; justify-content: center; }
}
