/* ════════════════════════════════════════════════════════════════════════
   public.css — Premium Sport Styling for Liga Municipal de Softball Femenil
   ════════════════════════════════════════════════════════════════════════ */

:root {
    --brand-emerald: #10b981;
    --brand-slate: #0f172a;
    --brand-bg: #f8fafc;
}

/* ══════════════════════════════════════════════════
   AD SYSTEM — Premium advertising containers
   ══════════════════════════════════════════════════ */

/* ── Label above each ad unit ── */
.ad-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: #94a3b8;
    user-select: none;
}

.ad-label-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    border-radius: 9999px;
    background: #10b981;
    opacity: 0.6;
    flex-shrink: 0;
}

/* ── Wrapper: hover lifts the entire unit ── */
.ad-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.ad-wrapper:hover {
    transform: translateY(-4px);
}

/* ── Vertical sidebar container ── */
.ad-container-vertical {
    position: relative;
    background: #000;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Ad Skins (Background Margins) ── */
.ad-skin-side {
    position: fixed;
    top: 64px; /* Below Navbar */
    bottom: 0;
    width: calc((100vw - 1100px) / 2); /* Based on max-w-5xl (1024px) + gap */
    z-index: 5;
    background: #000;
    overflow: hidden;
}

.left-skin { left: 0; }
.right-skin { right: 0; }

@media (max-width: 1399px) {
    .ad-skin-side { display: none !important; }
}

.ad-wrapper:hover .ad-container-vertical {
    box-shadow:
        0 16px 40px rgba(0, 0, 0, 0.12),
        0 0 0 1.5px rgba(16, 185, 129, 0.25);
}

/* Subtle emerald glow ring on hover */
.ad-container-vertical::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1.5px rgba(16, 185, 129, 0);
    transition: box-shadow 0.3s ease;
    pointer-events: none;
    z-index: 20;
}

.ad-wrapper:hover .ad-container-vertical::after {
    box-shadow: inset 0 0 0 1.5px rgba(16, 185, 129, 0.3);
}

/* Placeholder text when no ad is loaded */
.ad-placeholder-text {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: #cbd5e1;
    position: absolute;
}

/* ── Top billboard ── */
.ad-top-billboard {
    background: #f1f5f9;
    border-radius: 0.875rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
}

.ad-top-billboard:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(16, 185, 129, 0.2);
}

/* ── Mobile slot ── */
.ad-mobile-slot {
    background: #ffffff;
    border-radius: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: box-shadow 0.3s ease;
}

/* ── AD SLOT STYLING (inner rendered content) ── */
.ad-slot {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    height: 100%;
    background: #000;
}

/* Smart Container for mismatched aspect ratios */
.ad-smart-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #000;
}

.ad-blur-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(15px) opacity(0.3);
    z-index: 1;
}

.ad-main-img {
    position: relative;
    z-index: 5;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-slot:hover .ad-main-img {
    transform: scale(1.02);
}


/* "Publicidad" micro-label on the image */
.ad-slot::after {
    content: 'Publicidad';
    position: absolute;
    bottom: 6px;
    right: 8px;
    font-size: 8px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    pointer-events: none;
    z-index: 15;
}


/* ── STICKY SIDEBARS ── */
.sticky-sidebar {
    position: -webkit-sticky;
    position: sticky;
    top: 6rem;
    max-height: calc(100vh - 120px);
}

/* ── UTILITIES ── */
.spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 4px solid #ecfdf5;
    border-top-color: #10b981;
    border-radius: 9999px;
    animation: spin 1s linear infinite;
    margin: 5rem auto;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ── SCOREBOARD ANIMATIONS ── */
@keyframes pulse-red {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}
.animate-pulse-red {
    animation: pulse-red 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ── TABLE WRAPPERS ── */
.tbl-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

/* ── MODALS (Custom logic for smoother transitions) ── */
#modal-overlay {
    transition: opacity 0.3s ease;
}
#modal-overlay.open {
    opacity: 1 !important;
    pointer-events: auto !important;
}

/* ── VIDEO AD PREMIUM STYLING ── */
.video-ad-container {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    background: #000;
    transition: transform 0.3s ease;
    animation: fadeInModal 0.5s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(10px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.video-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: rgba(16, 185, 129, 0.9);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 0.1em;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ── FOOTER AD PREMIUM ── */
#ad-footer {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

#ad-footer:hover {
    border-color: #10b981;
    background: #ffffff;
}

#ad-footer span {
    color: rgba(16, 185, 129, 0.4);
    transition: color 0.3s ease;
}

#ad-footer:hover span {
    color: #10b981;
}

/* ── RESPONSIVE TWEAKS ── */
@media (max-width: 1023px) {
    .match-card {
        box-shadow: none;
        border-left: 0;
        border-right: 0;
        border-radius: 0;
    }
}
