/**
 * SavonaTime - Main Stylesheet
 * Modern, clean design with Google-style search
 */

/* ========================================
   CSS Variables & Base
   ======================================== */
:root {
    /* Colors */
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #818cf8;
    --secondary: #0ea5e9;
    --accent: #f59e0b;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;

    /* Neutrals */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-tertiary: #f3f4f6;

    /* Text */
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-muted: #9ca3af;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    /* Borders */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition: 200ms ease;
    --transition-slow: 300ms ease;

    /* Spacing */
    --container-max: 1200px;
    --header-height: 70px;
}

/* ========================================
   Reset & Base
   ======================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    min-height: 100vh;
}

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

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ========================================
   Layout
   ======================================== */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.main {
    min-height: calc(100vh - var(--header-height) - 300px);
}

.section {
    padding: 1rem 0;
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    height: var(--header-height);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.logo:hover {
    color: var(--primary);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-icon svg {
    width: 24px;
    height: 24px;
}

.logo-img {
    height: 36px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 2rem;
    list-style: none;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
    transition: all var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: var(--bg-primary);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border-bottom: none;
}

.dropdown-menu a:hover {
    background: var(--gray-100);
}

.dropdown-menu .see-all {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--primary);
    border-top: 1px solid var(--gray-200);
    margin-top: 0.5rem;
    padding-top: 0.75rem;
}

.dropdown-menu .see-all svg {
    width: 1.2em;
    height: 1.2em;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition);
}

.mobile-menu {
    display: none;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    padding: 1.5rem;
    z-index: 99;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu ul {
    list-style: none;
}

.mobile-menu li a {
    display: block;
    padding: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    border-radius: var(--radius);
}

.mobile-menu li a:hover {
    background: var(--gray-100);
}

.mobile-menu-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1.5rem 1rem 0.5rem;
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    padding: 6rem 0 4rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    color: white;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-title .highlight {
    background: linear-gradient(to right, #fde047, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2.5rem;
}

/* Hero Background Shapes */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    background: white;
}

.hero-shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation: float 20s ease-in-out infinite;
}

.hero-shape-2 {
    width: 300px;
    height: 300px;
    bottom: -150px;
    left: -100px;
    animation: float 15s ease-in-out infinite reverse;
}

.hero-shape-3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 20%;
    animation: float 25s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(10deg);
    }
}

/* ========================================
   Search Box (Google-style)
   ======================================== */
.search-box {
    max-width: 650px;
    margin: 0 auto;
}

.search-form {
    width: 100%;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border-radius: var(--radius-full);
    padding: 0.5rem 0.5rem 0.5rem 1.5rem;
    box-shadow: var(--shadow-xl);
    transition: all var(--transition);
}

.search-input-wrapper:focus-within {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.3), var(--shadow-xl);
}

.search-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    opacity: 0.5;
    color: var(--text-secondary);
}

.search-icon svg {
    width: 20px;
    height: 20px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: inherit;
    padding: 0.75rem 0;
    background: transparent;
}

.search-input::placeholder {
    color: var(--gray-400);
}

.search-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    transition: all var(--transition);
}

.search-button:hover {
    background: var(--primary-dark);
    transform: translateX(2px);
}

.search-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    margin-top: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.search-suggestions>span {
    font-weight: 500;
    margin-right: 0.25rem;
}

.suggestion {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition);
}

.suggestion svg {
    width: 1.1em;
    height: 1.1em;
}

.suggestion:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   AI Response Section
   ======================================== */
.ai-response-section {
    padding: 2rem 0;
    background: var(--bg-secondary);
}

.ai-response-section.hidden {
    display: none;
}

.ai-response-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.ai-response-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.ai-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-avatar svg {
    width: 24px;
    height: 24px;
}

.ai-label {
    font-weight: 600;
    flex: 1;
}

.close-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background var(--transition);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.ai-response-content {
    padding: 1.5rem 1.5rem 1rem;
    font-size: 1.05rem;
    line-height: 1.8;
    border-bottom: 1px solid var(--gray-200);
}

.ai-response-content p {
    margin-bottom: 0.75rem;
}

.ai-response-content p:last-child {
    margin-bottom: 0;
}

.ai-response-content a {
    color: var(--primary);
    font-weight: 600;
}

.ai-response-content a:hover {
    text-decoration: underline;
}

/* AI Events Grid - inside response card */
#ai-events-grid {
    padding: 1.5rem;
    gap: 1.5rem;
}

#ai-events-grid .event-card {
    border: 1px solid var(--gray-200);
    box-shadow: none;
}

#ai-events-grid .event-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

#ai-events-grid .event-card-image-link {
    display: block;
}

#ai-events-grid .event-card-content {
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

#ai-events-grid .event-card-date {
    flex-shrink: 0;
}

/* ========================================
   Loading Overlay & Scanner
   ======================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    max-width: 400px;
    width: 100%;
}

/* Scanner Visual - Tech Spinner */
.scanner-container {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinner-ring-outer {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--primary);
    border-right-color: rgba(79, 70, 229, 0.3);
    animation: spin-right 2s linear infinite;
    box-shadow: 0 0 15px rgba(79, 70, 229, 0.2);
}

.spinner-ring-middle {
    position: absolute;
    inset: 15px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-left-color: var(--secondary);
    border-bottom-color: rgba(14, 165, 233, 0.3);
    animation: spin-left 1.5s linear infinite;
}

.spinner-center-image {
    position: absolute;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    animation: pulse 1.5s ease-in-out infinite alternate;
    background: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.spinner-center-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    animation: spin-right 3s linear infinite;
}

@keyframes spin-right {
    to {
        transform: rotate(360deg);
    }
}

@keyframes spin-left {
    to {
        transform: rotate(-360deg);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1.1);
    }
}

/* Text Effects */
.loading-text-wrapper {
    text-align: center;
    width: 100%;
}

.static-text {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.dynamic-text-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Courier New', Courier, monospace;
    /* Tech look */
    background: var(--gray-100);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    border: 1px solid var(--gray-200);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.scanning-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

.dynamic-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    min-width: 150px;
    text-align: left;
    position: relative;
}

/* Cursor blink effect for text */
.dynamic-text::after {
    content: '|';
    animation: blink 0.8s infinite;
    color: var(--primary);
    margin-left: 2px;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* ========================================
   Section Headers
   ======================================== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

.section-title svg {
    width: 1.5em;
    height: 1.5em;
}

.see-all-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: var(--primary);
    font-weight: 500;
}

.see-all-link svg {
    width: 1.25em;
    height: 1.25em;
}

.see-all-link:hover {
    text-decoration: underline;
}

/* ========================================
   Event Cards
   ======================================== */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.events-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

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

.event-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.event-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--gray-100);
}

.event-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.event-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-100), var(--gray-200));
}

.event-card-placeholder svg {
    width: 64px;
    height: 64px;
    opacity: 0.5;
}

.event-card-image-link {
    display: block;
}

.event-card-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 500;
}

.event-card-badge svg {
    width: 1rem;
    height: 1rem;
}

.event-card-featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.25rem;
}

.event-card-content {
    padding: 1.25rem;
}

.event-card-featured .event-card-content {
    display: flex;
    gap: 1rem;
}

.event-card-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    padding: 0.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    text-align: center;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.date-month {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.event-card-info {
    flex: 1;
}

.event-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5rem;
}

.event-card-title a {
    color: var(--text-primary);
}

.event-card-title a:hover {
    color: var(--primary);
}

.event-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.event-card-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.event-card-price {
    display: inline-block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--success);
}

/* ========================================
   Categories Grid
   ======================================== */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 2rem 1.5rem;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: all var(--transition);
    height: 100%;
}

.category-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.category-icon svg {
    width: 32px;
    height: 32px;
}

.category-name {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.category-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-top: 0.25rem;
}

.category-icon-small {
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-icon-small svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ========================================
   CTA Section
   ======================================== */
.section-cta {
    padding: 4rem 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem;
    border-radius: var(--radius-xl);
    text-align: center;
}

.cta-card h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cta-card p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

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

.btn-primary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.btn-block {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* ========================================
   Breadcrumb
   ======================================== */
.breadcrumb {
    background: var(--bg-secondary);
    padding: 1rem 0;
}

.breadcrumb-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    list-style: none;
    font-size: 0.9rem;
}

.breadcrumb-list li:not(:last-child)::after {
    content: '›';
    margin-left: 0.5rem;
    color: var(--gray-400);
}

.breadcrumb-list a {
    color: var(--text-secondary);
}

.breadcrumb-list a:hover {
    color: var(--primary);
}

.breadcrumb-list li:last-child {
    color: var(--text-muted);
}

/* ========================================
   Event Detail Page
   ======================================== */
.event-hero {
    position: relative;
    height: 400px;
    background: var(--gray-800);
    overflow: hidden;
}

.event-hero-image {
    position: absolute;
    inset: 0;
}

.event-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
}

.event-hero-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.placeholder-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.5;
}

.placeholder-icon svg {
    width: 120px;
    height: 120px;
}

.event-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 3rem 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 100%);
}

.event-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: all var(--transition);
    text-decoration: none;
}

.event-category-badge:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    color: white;
}

.event-category-badge svg {
    width: 1.25rem;
    height: 1.25rem;
}

.event-title {
    font-size: clamp(1.75rem, 4vw, 3rem);
    color: white;
    margin-bottom: 1rem;
}

.event-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
}

.event-content {
    padding: 3rem 0;
}

.event-grid {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

.event-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.event-description {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.section-related {
    background: var(--bg-secondary);
    padding-top: 3rem;
    padding-bottom: 4rem;
    border-top: 1px solid var(--gray-200);
}

/* Event Sidebar */
.event-info-card {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    /* Sticky removed from here to allow the container to handle it, or stick only the inner content */
}

.event-sidebar {
    position: sticky;
    top: calc(var(--header-height) + 1rem);
    height: fit-content;
}

.event-info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--gray-200);
}

.event-info-card h3 svg {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.info-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-label svg {
    width: 1.1rem;
    height: 1.1rem;
}

.info-value {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.info-value svg {
    width: 1.1em;
    height: 1.1em;
}

.info-price {
    color: var(--success);
}

.info-contacts {
    margin: 1.5rem 0;
}

.info-contacts h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.contact-link svg {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--primary);
}

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

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
    font-size: 0.9rem;
    color: var(--text-muted);
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--text-secondary);
    transition: all var(--transition);
}

.share-btn svg {
    width: 18px;
    height: 18px;
}

.share-btn:hover {
    transform: scale(1.1);
}

.share-btn.share-facebook:hover {
    background: #1877f2;
    color: white;
}

.share-btn.share-x:hover {
    background: #000000;
    color: white;
}

.share-btn.share-whatsapp:hover {
    background: #25d366;
    color: white;
}

/* Category Header */
.category-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 3rem 0;
}

.category-header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.category-icon-large {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    width: 100px;
    height: 100px;
    border-radius: var(--radius-lg);
}

.category-icon-large svg {
    width: 60px;
    height: 60px;
}

.category-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin: 0;
    line-height: 1;
}

.category-description {
    opacity: 0.9;
    font-size: 1.1rem;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    font-weight: 500;
    transition: all var(--transition);
}

.pagination-btn svg {
    width: 1.2em;
    height: 1.2em;
}

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

.pagination-current {
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.empty-icon svg {
    width: 80px;
    height: 80px;
    color: var(--gray-300);
}

.empty-state h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 4rem 0 2rem;
}

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

.footer-col h3 {
    font-size: 1.25rem;
    color: white;
    margin-bottom: 1rem;
}

.footer-col h4 {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.footer-col p {
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.5rem;
}

.footer-col a {
    color: var(--gray-400);
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* Footer Submit Event Section */
.footer-submit-event {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-700);
}

.footer-submit-event strong {
    color: var(--gray-200);
    font-size: 0.95rem;
}

.btn-reveal-email {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.6rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-reveal-email:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.btn-reveal-email svg {
    width: 16px;
    height: 16px;
}

.email-revealed {
    display: inline-block;
    margin-top: 0.5rem;
}

.email-revealed a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-light);
    font-weight: 500;
    padding: 0.4rem 0;
    border-bottom: 1px dashed var(--primary-light);
    transition: color var(--transition);
}

.email-revealed a:hover {
    color: white;
    border-bottom-color: white;
}

/* ========================================
   Admin Panel
   ======================================== */
.admin-header {
    background: var(--gray-900);
    color: white;
    padding: 1rem 0;
}

.admin-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-title {
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-section {
    padding: 2rem 0;
}

.admin-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.admin-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--gray-200);
}

.admin-card-header h2 {
    font-size: 1.1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.admin-table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.admin-table tr:hover {
    background: var(--gray-50);
}

.admin-form {
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .event-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .event-sidebar {
        order: 0;
        /* Non metterla più prima del contenuto */
        position: static;
        /* Rimuovi sticky su tablet */
    }

    .event-info-card {
        position: static;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero {
        padding: 4rem 0 3rem;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .search-button .btn-text {
        display: none;
    }

    .search-suggestions {
        flex-direction: column;
        gap: 0.75rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .events-grid {
        grid-template-columns: 1fr;
    }

    /* ========================================
       Event Hero Mobile Layout Fix
       ======================================== */
    .event-hero {
        height: auto;
        min-height: 400px;
        position: relative;
    }

    .event-hero-image {
        position: absolute;
        inset: 0;
    }

    .event-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .event-hero-overlay {
        position: relative;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        justify-content: flex-end;
        padding: 1.5rem 0;
        padding-top: 100px;
        /* Spazio per l'header fisso */
        background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
    }

    .event-title {
        font-size: 1.4rem;
        line-height: 1.3;
        margin-bottom: 0.75rem;
    }

    .event-category-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.75rem;
        margin-bottom: 0.75rem;
    }

    .event-hero-meta {
        gap: 0.75rem;
        font-size: 0.85rem;
        flex-wrap: wrap;
    }

    .event-hero-meta .meta-item {
        display: flex;
        align-items: center;
        gap: 0.3rem;
    }

    /* Sidebar e Contenuto Evento Mobile */
    .event-content {
        padding: 1.5rem 0;
    }

    .event-grid {
        gap: 1.5rem;
    }

    .event-sidebar {
        order: 0;
        position: static;
    }

    .event-info-card {
        padding: 1rem;
    }

    .event-section h2 {
        font-size: 1.25rem;
    }

    .event-description {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* CTA Search Banner Mobile Fix */
    .sidebar-banner .banner-link {
        padding: 1.25rem 1rem !important;
    }

    .sidebar-banner .banner-link span:first-child {
        font-size: 1.1rem !important;
        line-height: 1.3 !important;
    }

    .section-related {
        padding-top: 2rem;
        padding-bottom: 2.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-card {
        padding: 2rem 1.5rem;
    }

    .category-header-content {
        display: flex;
        align-items: center;
        gap: 1.5rem;
    }

    .category-icon-large {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .category-icon-large svg {
        width: 80px;
        height: 80px;
    }

    /* Event Page Extra Small Screens */
    .event-hero {
        min-height: 350px;
    }

    .event-hero-overlay {
        min-height: 350px;
        padding-top: 80px;
    }

    .event-title {
        font-size: 1.25rem;
    }

    .event-hero-meta {
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .event-category-badge {
        font-size: 0.75rem;
        padding: 0.35rem 0.6rem;
    }

    .event-info-card h3 {
        font-size: 1rem;
    }

    .info-item {
        padding: 0.5rem 0;
    }

    .info-label {
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.9rem;
    }

    .sidebar-banner .banner-link span:first-child {
        font-size: 1rem !important;
    }

    /* Eventi Correlati Mobile */
    .events-grid-3 {
        gap: 1rem;
    }

    .events-grid-3 .event-card-image {
        height: 140px;
    }
}

/* Update background color of date for upcoming events */
.event-card-upcoming .event-card-date {
    background-color: #4338ca;
    /* Dark purple/blue matching image example */
}

/* Update background color of date for upcoming events explicitly */
.event-card-upcoming .event-card-date {
    background-color: #8B0000 !important;
    /* Dark red as requested */
}

/* Ensure upcoming cards have the same horizontal layout as featured cards */
.event-card-upcoming .event-card-content {
    display: flex;
    gap: 1rem;
}

.section-subtitle {
    color: var(--text-muted);
    font-style: italic;
    font-size: 1rem;
}

/* ========================================
   Text Pages (Privacy, Terms, etc.)
   ======================================== */
.page-header {
    background: var(--bg-secondary);
    padding: 1.5rem 0 1rem;
    /* Drastically reduced padding */
    margin-bottom: 0;
    /* Remove margin as section-page will handle it */
    text-align: center;
    border-bottom: 1px solid var(--gray-200);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 800;
}

.page-header .lead {
    color: var(--text-secondary);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

.section-page {
    padding: 1rem 0;
    background: var(--bg-primary);
}

.text-content {
    max-width: 1000px;
    /* Increased from 800px */
    margin: 0 auto;
    font-size: 1.1rem;
    /* Slightly larger text */
}

.text-content h2 {
    font-size: 1.8rem;
    margin: 1.5rem 0 1rem;
    color: var(--text-primary);
    font-weight: 700;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--gray-100);
    display: inline-block;
    /* Title underline effect */
    padding-right: 1rem;
}

.text-content h2:first-child {
    margin-top: 0;
}

.text-content h3 {
    font-size: 1.4rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
}

.text-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.text-content ul {
    margin-bottom: 2rem;
    padding-left: 2rem;
    color: var(--text-secondary);
}

.text-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.text-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.spacer {
    border: none;
    border-top: 1px solid var(--gray-200);
    margin: 2rem 0;
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
.cc-window {
    overflow: hidden !important;
    overflow-x: hidden !important;
    border-top: 1px solid var(--gray-300) !important;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05) !important;
}

.cc-banner {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    padding: 1rem 1.5rem !important;
    overflow: hidden !important;
}

.cc-message {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding-right: 1rem !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

.cc-compliance {
    flex-shrink: 0 !important;
}

.cc-btn {
    border-radius: var(--radius-full) !important;
    font-weight: 600 !important;
    padding: 0.75rem 1.5rem !important;
    white-space: nowrap !important;
}

/* Mobile styles for cookie banner */
@media (max-width: 768px) {
    .cc-banner {
        flex-direction: column !important;
        align-items: stretch !important;
        text-align: center !important;
        padding: 1rem !important;
    }

    .cc-message {
        padding-right: 0 !important;
        margin-bottom: 0.5rem !important;
    }

    .cc-compliance {
        width: 100% !important;
    }

    .cc-btn {
        width: 100% !important;
        display: block !important;
    }
}