/* Air Festival - Main Stylesheet
   Palette from air.png : gold #e0a020 / gold-bright #e0c000 / lagoon #0e7c7b / deep #404080 / cream #fdf8ec */

/* CSS Variables */
:root {
    --primary: #e0a020;
    --primary-dark: #b8860b;
    --gold: #e0c000;
    --secondary: #0e7c7b;
    --secondary-dark: #0a5f5e;
    --deep: #404080;
    --cream: #fdf8ec;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', sans-serif; -webkit-font-smoothing: antialiased; }

/* Font utilities */
.font-display { font-family: 'Playfair Display', serif; }
.font-body { font-family: 'Inter', sans-serif; }

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
.animate-slide-in-right { animation: slideInRight 0.3s ease-out forwards; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
.animate-float { animation: float 3s ease-in-out infinite; }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 0.6rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; }
.btn-lg { padding: 0.875rem 1.75rem; font-size: 1rem; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #f0b429);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(224, 160, 32, 0.35);
}
.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 8px 22px rgba(224, 160, 32, 0.45);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), #129e9c);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(14, 124, 123, 0.3);
}
.btn-secondary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--secondary-dark), var(--secondary));
    transform: translateY(-1px);
}

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

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

.btn-outline-white {
    background: transparent;
    color: white;
    border-color: rgba(255,255,255,0.7);
    backdrop-filter: blur(4px);
}
.btn-outline-white:hover:not(:disabled) {
    background: white;
    color: var(--primary);
}

.btn-white {
    background: white;
    color: var(--primary);
    border-color: white;
    box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}
.btn-white:hover:not(:disabled) {
    background: #fdf8ec;
    transform: translateY(-1px);
}

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

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

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}
.badge-primary { background: var(--primary); color: white; }
.badge-secondary { background: var(--secondary); color: white; }
.badge-success { background: var(--success); color: white; }
.badge-warning { background: var(--warning); color: white; }
.badge-danger { background: var(--danger); color: white; }
.badge-gray { background: #e5e7eb; color: #374151; }

/* Cards */
.event-card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #f3f4f6;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(64, 64, 128, 0.12);
}

/* Form Styles */
input, select, textarea {
    font-family: inherit;
    font-size: 1rem;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(224, 160, 32, 0.35);
    border-color: var(--primary);
}
.form-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: white;
    transition: all 0.2s;
}
.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

/* Toast Notifications */
.toast-container { position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; pointer-events: none; }
.toast { padding: 0.875rem 1.5rem; border-radius: 0.5rem; color: white; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,0.2); animation: slideUp 0.3s ease-out; pointer-events: auto; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }
.toast.warning { background: var(--warning); }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* Flash Messages */
.flash-message { animation: slideInRight 0.3s ease-out; }
@keyframes slideInRight { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* Navigation (public header) */
.public-nav-link {
    font-weight: 500;
    color: #374151;
    transition: color 0.2s;
    position: relative;
}
.public-nav-link:hover { color: var(--primary); }
.public-nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.25s;
}
.public-nav-link:hover::after { width: 100%; }

/* Mobile Menu */
@media (max-width: 768px) {
    .admin-sidebar { transform: translateX(-100%); transition: transform 0.3s ease; }
    .admin-sidebar.open { transform: translateX(0); }
    .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 40; }
    .sidebar-overlay.open { display: block; }
}

/* Leaflet Map Fixes */
.leaflet-container { font-family: 'Inter', sans-serif; }
.leaflet-popup-content-wrapper { border-radius: 0.75rem; box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.leaflet-popup-content { margin: 0.75rem 1rem; line-height: 1.5; }
.leaflet-popup-tip { box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* Custom Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    .event-card { break-inside: avoid; box-shadow: none; border: 1px solid #e5e7eb; }
    header, footer, .admin-banner { display: none !important; }
}

/* Focus Visible for Accessibility */
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Loading States */
.loading { position: relative; overflow: hidden; }
.loading::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent); animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }

/* Text Utilities */
.line-clamp-1 { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Hero Background Parallax */
.hero-bg { background-attachment: fixed; background-position: center; background-size: cover; }
@media (prefers-reduced-motion: reduce) { .hero-bg { background-attachment: scroll; } }

/* Social Links */
.social-footer {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    transition: all 0.3s;
}
.social-footer:hover { color: white; background: var(--primary); transform: translateY(-2px); }

/* Footer Links */
.footer-link { color: #9ca3af; transition: color 0.2s; }
.footer-link:hover { color: white; }

/* Prose Override for Markdown */
.prose { color: #374151; line-height: 1.75; }
.prose h1, .prose h2, .prose h3, .prose h4 { font-family: 'Playfair Display', serif; font-weight: 700; color: #111827; }
.prose a { color: var(--primary); text-decoration: underline; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin: 0.5rem 0; }
.prose ol { list-style: decimal; padding-left: 1.5rem; margin: 0.5rem 0; }
.prose blockquote { border-left: 4px solid var(--primary); padding-left: 1rem; font-style: italic; color: #6b7280; margin: 1rem 0; }
.prose code { background: #f3f4f6; padding: 0.125rem 0.375rem; border-radius: 0.25rem; font-size: 0.875rem; font-family: monospace; }
.prose pre { background: #111827; color: #f3f4f6; padding: 1rem; border-radius: 0.5rem; overflow-x: auto; }
.prose pre code { background: transparent; padding: 0; color: inherit; }
.prose img { border-radius: 0.75rem; margin: 1rem 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid #e5e7eb; padding: 0.5rem 1rem; }
.prose th { background: #f3f4f6; font-weight: 600; }

/* Utilities */
.text-balance { text-wrap: balance; }
.bg-grid-pattern { background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"); }

/* Construction Page Specific */
.construction-container { min-height: 100vh; }
.countdown-item { min-width: 80px; }
.countdown-number { font-size: 2.5rem; font-weight: 700; line-height: 1; font-family: 'Playfair Display', serif; }
@media (max-width: 640px) { .countdown-number { font-size: 1.75rem; } }

/* Event Filters */
.filter-btn {
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
}
.filter-btn.active { background: var(--primary); color: white; }
.filter-btn:not(.active) { background: #f3f4f6; color: #374151; }
.filter-btn:not(.active):hover { background: #e5e7eb; }

/* Section headers with festival flair */
.section-eyebrow {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    background: rgba(224, 160, 32, 0.12);
    color: var(--primary-dark);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Hero decorative sun */
.sun-glow {
    background: radial-gradient(circle, rgba(224, 192, 0, 0.45) 0%, transparent 65%);
}

/* Admin Specific (also in admin.css but duplicated for standalone) */
.admin-body { background: #f8fafc; }
.admin-sidebar { background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%); }
.admin-topbar { background: white; border-bottom: 1px solid #e5e7eb; }
.admin-content { background: #f8fafc; }
.admin-footer { background: white; border-top: 1px solid #e5e7eb; }

.stat-card { background: white; border: 1px solid #e5e7eb; transition: box-shadow 0.2s; }
