/* =========================================================
   MoGolf Events Widget v2 — style.css
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=DM+Sans:wght@400;500;600;700&display=swap');

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

.mogolf-wrap {
    background: #0d2240;
    padding: 48px 36px;
    font-family: 'DM Sans', sans-serif;
    width: 100%;
}

/* ── Heading ── */
.mogolf-heading {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;
    color: #fff;
    margin: 0 0 28px;
    letter-spacing: -0.02em;
}

/* ══════════════════════════════════════
   FILTER BAR
══════════════════════════════════════ */
.mogolf-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: flex-end;
    background: rgba(255,255,255,0.07);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 14px;
    padding: 20px 24px;
    margin-bottom: 32px;
}

.mgf-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 150px;
}

.mgf-group label {
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.50);
}

.mgf-group input[type=text],
.mgf-group input[type=date],
.mgf-group select {
    background: rgba(255,255,255,0.09);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 8px;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.86rem;
    padding: 9px 12px;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color .2s, background .2s;
}

.mgf-group input::placeholder { color: rgba(255,255,255,.3); }

.mgf-group input:focus,
.mgf-group select:focus {
    border-color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.14);
}

.mgf-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,.45)'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}
.mgf-group select option { background: #0d2240; color: #fff; }

.mgf-btns { flex-direction: row; align-items: flex-end; gap: 8px; flex: 0 0 auto; }

.mgf-search, .mgf-reset {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.84rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    padding: 9px 20px;
    transition: opacity .2s, transform .15s;
    white-space: nowrap;
}
.mgf-search { background: #AB0635; color: #fff; }
.mgf-reset  { background: rgba(255,255,255,.12); color: rgba(255,255,255,.8); }
.mgf-search:hover { opacity:.86; transform:translateY(-1px); }
.mgf-reset:hover  { background: rgba(255,255,255,.2); }

/* ══════════════════════════════════════
   GRID
══════════════════════════════════════ */
.mogolf-grid {
    display: grid;
    gap: 24px;
}
.mogolf-cols-1 { grid-template-columns: 1fr; }
.mogolf-cols-2 { grid-template-columns: repeat(2,1fr); }
.mogolf-cols-3 { grid-template-columns: repeat(3,1fr); }
.mogolf-cols-4 { grid-template-columns: repeat(4,1fr); }

/* ══════════════════════════════════════
   CARD
══════════════════════════════════════ */
.mogolf-card {
    background: #f0f2f5;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 22px rgba(0,0,0,.18);
    transition: transform .28s ease, box-shadow .28s ease;
    animation: mgCardIn .35s ease both;
}

@keyframes mgCardIn {
    from { opacity:0; transform:translateY(14px); }
    to   { opacity:1; transform:translateY(0); }
}

.mogolf-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 38px rgba(0,0,0,.28);
}

/* Image */
.mogolf-card-img {
    position: relative;
    height: 190px;
    overflow: hidden;
    flex-shrink: 0;
}

.mogolf-card-img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .4s ease;
}

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

/* Badge */
.mogolf-badge {
    position: absolute;
    bottom: 12px; left: 12px;
    background: rgba(255,255,255,.92);
    color: #0d2240;
    font-size: 0.70rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 4px 12px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* Body */
.mogolf-card-body {
    padding: 20px 22px 22px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.mogolf-card-title {
    font-family: 'Libre Baskerville', Georgia, serif;
    font-size: 1.10rem;
    font-weight: 700;
    color: #0d2240;
    margin: 0 0 14px;
    line-height: 1.35;
}

.mogolf-card-title a {
    color: inherit;
    text-decoration: none;
}

.mogolf-card-title a:hover { text-decoration: underline; }

/* Meta */
.mogolf-meta {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.mogolf-meta li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #444;
    line-height: 1.4;
}

.mogolf-meta .ico {
    flex-shrink: 0;
    margin-top: 1px;
}

.mogolf-meta svg {
    width: 13px; height: 13px;
    fill: none;
    stroke: #AB0635;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.mogolf-spacer { flex: 1; }

/* View Details button — same tilt-icon flood-fill as Register Now */
.mogolf-btn-reg {
    display: inline-flex;
    align-items: center;
    gap: 20px;
    background: #AB0635;
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 0.87rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-decoration: none;
    border-radius: 100px;
    padding: 6px 6px 6px 18px;
    overflow: hidden;
    align-self: stretch;
    border: none;
    cursor: pointer;
    transition: color .25s;
    width: 100%;
    box-sizing: border-box;
}

.mogolf-btn-reg:hover {
    color: #fff;
    text-decoration: none;
}

.mogolf-btn-reg-text {
    flex: 1;
    white-space: nowrap;
    z-index: 1;
}

.mogolf-btn-reg-icon {
    transform: rotate(-45deg);
    transition: transform .3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    position: relative;
    flex-shrink: 0;
}

.mogolf-btn-reg-icon::after {
    content: '';
    position: absolute;
    background-color: rgb(145, 0, 41);
    display: block;
    width: 100%;
    height: 100%;
    z-index: -1;
    border-radius: 100%;
    transition: width .5s ease-in-out, height .5s ease-in-out;
}

.mogolf-btn-reg:hover .mogolf-btn-reg-icon::after {
    width: 1000px;
    height: 1000px;
}

.mogolf-btn-reg:hover .mogolf-btn-reg-icon {
    transform: rotate(0deg);
}

/* ── Loading / Empty / Error ── */
.mogolf-loading,
.mogolf-no-results,
.mogolf-error {
    grid-column: 1/-1;
    text-align: center;
    padding: 60px 20px;
    color: rgba(255,255,255,.55);
}

.mogolf-spin {
    width: 40px; height: 40px;
    border: 3px solid rgba(255,255,255,.14);
    border-top-color: rgba(255,255,255,.8);
    border-radius: 50%;
    animation: mgSpin .75s linear infinite;
    margin: 0 auto 14px;
}

@keyframes mgSpin { to { transform:rotate(360deg); } }

/* ── Responsive ── */
@media (max-width:1024px) {
    .mogolf-cols-4 { grid-template-columns: repeat(2,1fr); }
    .mogolf-cols-3 { grid-template-columns: repeat(2,1fr); }
}

@media (max-width:640px) {
    .mogolf-wrap { padding: 28px 16px; }
    .mogolf-cols-1,.mogolf-cols-2,.mogolf-cols-3,.mogolf-cols-4 { grid-template-columns:1fr; }
    .mogolf-filter-bar { padding:16px; gap:10px; }
    .mgf-group { flex: 1 1 100%; }
    .mgf-btns  { width:100%; }
    .mgf-search, .mgf-reset { flex:1; justify-content:center; }
}

/* ══════════════════════════════════════
   FOOTER (count + load more)
══════════════════════════════════════ */
.mogolf-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 32px;
}

.mogolf-count {
    font-size: 0.80rem;
    color: rgba(255,255,255,.45);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.mogolf-btn-more {
    font-family: 'DM Sans', sans-serif;
    font-size: 0.90rem;
    font-weight: 700;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.35);
    border-radius: 30px;
    padding: 12px 36px;
    cursor: pointer;
    transition: background .2s, border-color .2s, transform .15s;
    letter-spacing: 0.02em;
}

.mogolf-btn-more:hover {
    background: rgba(255,255,255,.10);
    border-color: rgba(255,255,255,.7);
    transform: translateY(-2px);
}

.mogolf-meta li {
    display: flex;
    align-items: flex-start;
    gap: 7px;
}

.mogolf-footer { display:flex; flex-direction:column; align-items:center; gap:14px; margin-top:32px; }
.mogolf-count  { font-size:.80rem; color:rgba(255,255,255,.45); letter-spacing:.05em; text-transform:uppercase; }
.mogolf-btn-more { font-family:'DM Sans',sans-serif; font-size:.90rem; font-weight:700; background:transparent; color:#fff; border:2px solid rgba(255,255,255,.35); border-radius:30px; padding:12px 36px; cursor:pointer; transition:background .2s,border-color .2s,transform .15s; }
.mogolf-btn-more:hover { background:rgba(255,255,255,.10); border-color:rgba(255,255,255,.7); transform:translateY(-2px); }
.mogolf-meta li { display:flex; align-items:flex-start; gap:7px; }
.mogolf-no-results { grid-column:1/-1; text-align:center; padding:40px 20px; color:rgba(255,255,255,.55); }
.mogolf-no-results a { color:#93c5fd; }

/* ══════════════════════════════════════
   PAST EVENT CARD STATES
══════════════════════════════════════ */

/* Slightly desaturated image on past cards */
.mogolf-card-past .mogolf-card-img img {
    filter: grayscale(30%) brightness(0.9);
    transition: filter .3s ease;
}
.mogolf-card-past:hover .mogolf-card-img img {
    filter: grayscale(0%) brightness(1);
}

/* "Past Event" overlay ribbon on image */
.mogolf-past-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0,0,0,.55);
    color: rgba(255,255,255,.9);
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 30px;
    backdrop-filter: blur(4px);
    pointer-events: none;
}

/* "Registration Closed" text row above button */
.mogolf-reg-closed {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    font-weight: 600;
    color: #888;
    margin-bottom: 8px;
}
.mogolf-reg-closed svg { flex-shrink: 0; stroke: #aaa; }
