@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600&display=swap');

@font-face {
    font-family: 'El Messiri';
    src: url('/assets/fonts/ElMessiri-VariableFont_wght.ttf') format('truetype');
    font-weight: 400;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    user-select: none;
    transition: .2s ease-in-out;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    font-family: 'Montserrat', sans-serif;
    background: whitesmoke;
    color: #000;
    overflow-x: hidden;
    width: 100%;
}

/* Header Styles */
header {
    background-color: #F5F5F5D9;
    padding: 1.5rem 1rem;
    width: 100%;
    top: 0;
    border-bottom: 1px solid #000;
    position: fixed;
    z-index: 9999;
    backdrop-filter: blur(15px);
}

nav {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.site-title {
    font-size: 1.3rem;
    font-weight: 900;
    font-family: 'El Messiri' !important;
    text-decoration: none;
    color: #000;
}

a {
    text-decoration: none;
}

a:hover {
    opacity: 0.5;
}

.nav-link {
    color: #000;
    font-size: calc(1.3rem / 1.618);
}

/* Search Section (keep old design) */
.search-section {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 0 1rem;
    margin-top: 1.5rem;
}

.search-container {
    display: flex;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.search-wrapper {
    display: flex;
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #000000;
}

.search-input {
    flex-grow: 1;
    padding: 0.8rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    border: none;
    outline: none;
    background: transparent;
    color: #333;
    width: 100%;
}

.search-input:hover{
    background: #FFFFFF;
}

.search-button {
    padding: 0 1.5rem;
    background: #000000;
    color: white;
    border: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.search-button:hover {
    background: #333;
}

@media (max-width:768px) {
    .search-section {
        padding: 0 0.5rem;
        margin-top: 1rem;
    }
    
    .search-button {
        padding: 0 1.2rem;
    }
}

/* Main Content */
main {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
    padding-top: 140px;
    
}

.ticket-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    border: 1px solid #000;
    border-radius: 10px;
    overflow: hidden;
}

.ticket {
    width: 100%;
    height: auto;
    display: block;
    background: #ddd center/cover no-repeat;
    opacity: 0.6;
    transition: opacity .35s ease, transform .35s ease;
    border: 1px solid #000;
}

.ticket.loaded {
    opacity: 1;
}

.caption {
    padding: 0.6rem 0.8rem;
    border: 1px solid #000;
    font-size: 0.9rem;
    color: #222;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.98));
}

.caption small {
    display: block;
    color: #666;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.no-results {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    display: none;
}

/* Footer */
footer {
    position: relative;
    bottom: 0;
    text-align: center;
    padding: 1.5rem;
    color: #666;
    font-size: 0.875rem;
    width: 100%;
    font-family: 'Montserrat';
}

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 99999;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}

.lightbox.show {
    opacity: 1;
    pointer-events: auto;
}

.lightbox img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 6px;
}

.lightbox .info {
    margin-top: 0.6rem;
    color: #fff;
    text-align: center;
}