
/* ========================================
   WORLD BEACON - EVENTS PAGE
   ======================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0b1120;
    color: #e5e7eb;
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

img {
    max-width: 100%;
}

/* ========================================
   HEADER
   ======================================== */

header {
    width: 100%;
    background: #111827;
    border-bottom: 1px solid #263247;
    padding: 16px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.logo {
    color: #60a5fa;
    font-size: 25px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

nav a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color .2s ease;
}

nav a:hover {
    color: #60a5fa;
}

/* ========================================
   HERO - COMPACT, NOT FULL SCREEN
   ======================================== */

.hero {
    width: 100%;
    padding: 36px 20px;
    text-align: center;
    background:
        radial-gradient(
            ellipse at top,
            rgba(30, 58, 138, .65) 0%,
            #111827 58%,
            #0b1120 100%
        );
    border-bottom: 1px solid #1e293b;
}

.hero h1 {
    margin: 0 0 10px;
    font-size: clamp(27px, 3vw, 40px);
    line-height: 1.2;
}

.hero p {
    max-width: 620px;
    margin: 0 auto;
    color: #cbd5e1;
    font-size: 15px;
    line-height: 1.7;
}

/* ========================================
   MAIN CONTENT
   ======================================== */

main {
    width: min(1320px, 94%);
    margin: 28px auto 55px;
    min-width: 0;
}

/* ========================================
   SEARCH AND FILTER TOOLBAR
   ======================================== */

.toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 30px;
    padding: 16px;
    background: #111827;
    border: 1px solid #263247;
    border-radius: 12px;
}

.toolbar input,
.toolbar select {
    flex: 1 1 200px;
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 11px 13px;
    background: #0b1120;
    color: #f8fafc;
    border: 1px solid #475569;
    border-radius: 8px;
    font: inherit;
    outline: none;
}

.toolbar input:focus,
.toolbar select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .13);
}

.toolbar input::placeholder {
    color: #94a3b8;
}

.toolbar select option {
    background: #111827;
    color: #f8fafc;
}

/* ========================================
   BUTTONS
   ======================================== */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 11px 17px;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: #2563eb;
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition:
        background .2s ease,
        transform .2s ease;
}

.button:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* ========================================
   SECTION HEADING
   ======================================== */

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 0 0 20px;
}

.section-heading h2 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(21px, 2.5vw, 28px);
    line-height: 1.3;
}

.muted {
    color: #94a3b8;
    line-height: 1.6;
}

/* ========================================
   EVENTS GRID - 3 PER ROW
   ======================================== */

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    align-items: stretch;
    width: 100%;
}

/* ========================================
   EVENT CARD
   ======================================== */

.event-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
    background: #111827;
    border: 1px solid #263247;
    border-radius: 13px;
    transition:
        transform .2s ease,
        border-color .2s ease,
        box-shadow .2s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    border-color: #3b82f6;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .18);
}

/* ========================================
   EVENT IMAGE
   ======================================== */

.event-image-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    flex: 0 0 190px;
    overflow: hidden;
    background: #102a43;
}

.event-image-link {
    display: block;
    width: 100%;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.event-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

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

/* Placeholder when there is no image */

.event-image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 100%;
    color: #fff;
    background: linear-gradient(
        135deg,
        #102a43,
        #1d4ed8,
        #176b87
    );
}

.event-image-placeholder .event-globe {
    font-size: 48px;
    line-height: 1;
}

.event-image-placeholder span:last-child {
    font-size: 11px;
    letter-spacing: 2px;
}

/* ========================================
   EVENT CARD CONTENT
   ======================================== */

.event-card-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    padding: 18px;
}

.event-type {
    display: inline-flex;
    align-self: flex-start;
    max-width: 100%;
    padding: 5px 10px;
    overflow-wrap: anywhere;
    background: #1e293b;
    color: #93c5fd;
    border: 1px solid #334155;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

/* Event title */

.event-card h3 {
    margin: 13px 0 9px;
    color: #f8fafc;
    font-size: 19px;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.event-title-link {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.event-title-link:hover {
    color: #93c5fd;
    text-decoration: underline;
}

/* Event description */

.description {
    margin: 0 0 16px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

/* ========================================
   EVENT AUTHOR
   ======================================== */

.event-author {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 12px 0 15px;
}

.event-author-avatar {
    display: block;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid #34445c;
    background: #1e293b;
}

.event-author-name {
    min-width: 0;
    color: #79aaff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    overflow-wrap: anywhere;
}

.event-author-name:hover {
    color: #fff;
    text-decoration: underline;
}

/* ========================================
   EVENT DATE / LOCATION / DETAILS
   ======================================== */

.event-info {
    display: grid;
    gap: 9px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #263247;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.55;
}

.event-info > div,
.event-info p {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

.event-info strong {
    color: #f8fafc;
}

/* ========================================
   EMPTY RESULTS AND ERRORS
   ======================================== */

.empty,
.error-box {
    width: 100%;
    padding: 30px 20px;
    background: #111827;
    border: 1px solid #263247;
    border-radius: 12px;
    text-align: center;
    line-height: 1.7;
}

.empty h3 {
    margin-top: 0;
    color: #f8fafc;
}

.error-box {
    color: #fecaca;
    border-color: #991b1b;
}

/* ========================================
   FOOTER
   ======================================== */

footer {
    width: 100%;
    margin-top: 40px;
    padding: 22px 5%;
    border-top: 1px solid #263247;
    color: #94a3b8;
    text-align: center;
    font-size: 13px;
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.event-title-link:focus-visible,
.event-image-link:focus-visible,
.event-author-name:focus-visible,
nav a:focus-visible,
.button:focus-visible {
    outline: 2px solid #60a5fa;
    outline-offset: 3px;
}

/* ========================================
   RESPONSIVE - SMALL DESKTOP / TABLET
   ======================================== */

@media (max-width: 1050px) {
    main {
        width: 94%;
    }

    .event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .event-image-wrap {
        height: 200px;
        flex-basis: 200px;
    }
}

/* ========================================
   RESPONSIVE - MOBILE
   ======================================== */

@media (max-width: 650px) {
    header {
        align-items: flex-start;
        flex-direction: column;
        padding: 15px 5%;
    }

    nav {
        width: 100%;
        gap: 12px 16px;
    }

    .hero {
        padding: 28px 18px;
    }

    .hero h1 {
        font-size: 29px;
    }

    .hero p {
        font-size: 14px;
    }

    main {
        width: 92%;
        margin-top: 22px;
    }

    .toolbar {
        padding: 13px;
        gap: 10px;
    }

    .toolbar input,
    .toolbar select {
        flex: 1 1 100%;
    }

    .toolbar .button {
        width: 100%;
    }

    .event-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 18px;
    }

    .event-image-wrap {
        height: 215px;
        flex-basis: 215px;
    }

    .event-card-content {
        padding: 17px;
    }

    .event-card h3 {
        font-size: 20px;
    }

    .section-heading {
        align-items: flex-start;
    }
}

/* ========================================
   VERY SMALL MOBILE
   ======================================== */

@media (max-width: 360px) {
    .hero h1 {
        font-size: 25px;
    }

    .event-image-wrap {
        height: 180px;
        flex-basis: 180px;
    }

    .event-card-content {
        padding: 14px;
    }

    nav {
        gap: 10px;
    }
}


/* ========================================
   FIX DISCOVER EVENTS - COMPACT HEADER
   ======================================== */

.hero {
    width: 100%;
    padding: 22px 20px !important;
    margin: 0;
    text-align: left;
    background: #111827 !important;
    border-bottom: 1px solid #263247;
}

.hero h1 {
    max-width: 1200px;
    margin: 0 auto 5px !important;
    font-size: 27px !important;
    line-height: 1.25;
}

.hero p {
    max-width: 1200px;
    margin: 0 auto !important;
    font-size: 14px;
    line-height: 1.5;
    color: #94a3b8;
}

/* ========================================
   MAIN - LESS EMPTY SPACE
   ======================================== */

main {
    width: min(1240px, 94%) !important;
    margin: 22px auto 45px !important;
}

/* ========================================
   THREE SMALLER EVENT CARDS PER ROW
   ======================================== */

.event-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
}

/* Smaller card */
.event-card {
    min-width: 0;
    border-radius: 11px;
    overflow: hidden;
    background: #111827;
}

/* ========================================
   BIGGER IMAGE AREA - SHOW FULL IMAGE
   ======================================== */

.event-image-wrap {
    width: 100%;
    height: 250px !important;
    flex: 0 0 250px !important;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #080d18;
}

/* Show the whole image instead of cropping it */
.event-image,
.event-image-link .event-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    object-position: center;
    transition: transform .25s ease;
}

/* Disable zoom so the full image stays visible */
.event-card:hover .event-image {
    transform: none !important;
}

/* Keep the placeholder filling the image area */
.event-image-placeholder {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 6px;
}

/* ========================================
   LESS PADDING INSIDE EVENT CARDS
   ======================================== */

.event-card-content {
    padding: 14px !important;
    min-width: 0;
}

.event-type {
    font-size: 11px;
    padding: 5px 9px;
}

.event-card h3 {
    font-size: 17px !important;
    line-height: 1.4;
    margin: 10px 0 7px !important;
}

.description {
    font-size: 13px;
    line-height: 1.55;
    margin-bottom: 12px;
}

.event-author {
    margin: 10px 0 12px;
    gap: 8px;
}

.event-author-avatar {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
}

.event-author-name {
    font-size: 12px;
}

.event-info {
    gap: 7px;
    padding-top: 11px;
    font-size: 12px;
}

/* ========================================
   SEARCH BAR - COMPACT
   ======================================== */

.toolbar {
    padding: 12px;
    gap: 10px;
    margin-bottom: 24px;
}

.toolbar input,
.toolbar select {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 13px;
}

.toolbar .button,
.button {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 13px;
}

/* ========================================
   SECTION TITLE
   ======================================== */

.section-heading {
    margin-bottom: 15px;
}

.section-heading h2 {
    font-size: 22px;
}

/* ========================================
   TABLET - TWO CARDS PER ROW
   ======================================== */

@media (max-width: 950px) {
    .event-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    .event-image-wrap {
        height: 260px !important;
        flex-basis: 260px !important;
    }
}

/* ========================================
   MOBILE - ONE CARD PER ROW
   ======================================== */

@media (max-width: 600px) {
    .hero {
        padding: 18px 5% !important;
    }

    .hero h1 {
        font-size: 23px !important;
    }

    .hero p {
        font-size: 13px;
    }

    main {
        width: 92% !important;
        margin: 18px auto 35px !important;
    }

    .event-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .event-image-wrap {
        height: 280px !important;
        flex-basis: 280px !important;
        padding: 8px;
    }

    .event-card-content {
        padding: 15px !important;
    }

    .event-card h3 {
        font-size: 19px !important;
    }

    .description {
        font-size: 14px;
    }

    .toolbar input,
    .toolbar select,
    .toolbar .button {
        width: 100%;
        flex-basis: 100%;
    }
}
