/* ==========================================
   ONESPORTS POST CSS
   Matches the aesthetic of theme.txt & style.css
   ========================================== */

/* Animations */
.fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

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

/* ==========================================
   LINK UNDERLINE SUPPRESSION
   Blogger's browser default and theme CSS apply
   text-decoration:underline on <a> hover.
   Override with maximum specificity.
   ========================================== */

/* Nuclear reset — catches browser default + any theme rule */
a,
a:link,
a:visited,
a:hover,
a:active,
a:focus {
    text-decoration: none !important;
}

/* Blogger post title anchor */
.post-title a,
.post-title a:hover,
a.title-link,
a.title-link:hover,
.post-title-link,
.post-title-link:hover,
h3.post-title a,
h3.post-title a:hover {
    text-decoration: none !important;
    cursor: default;
}

/* Blogger post body — suppress hover underline on all content links */
.post-body a:hover,
.post-body a:focus,
.post-entry a:hover,
.post-entry a:focus,
.entry-content a:hover,
.entry-content a:focus,
#onesports-match a:hover,
#onesports-match a:focus {
    text-decoration: none !important;
}

/* News/related post cards — these ARE links, keep pointer but no underline */
.news-card,
.news-card:hover,
.news-card:focus {
    text-decoration: none !important;
    color: inherit !important;
}

/* Navbar — suppress default underline on nav links */
.nav-links a,
.nav-links a:hover,
.Header a,
.Header a:hover {
    text-decoration: none !important;
}

/* ==========================================
   0. BLOGGER TITLE OVERRIDE
   ========================================== */
.post-title {
    font-family: var(--font-heading) !important;
    font-size: 2.05rem !important;
    font-weight: 700 !important;
    color: var(--text-main) !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    margin-top: -15px !important;
    margin-bottom: 20px !important;
    text-align: center !important;
    width: 100%;
}

@media (max-width: 768px) {
    .post-title {
        font-size: 1.6rem !important;
    }
}

/* ==========================================
   1. POSTER BANNER
   ========================================== */
.os-poster-container {
    width: 100%;
    margin: 0 auto 20px auto;
    max-height: 380px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 21 / 9;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.os-poster-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 1024px) {
    .os-poster-container {
        width: 85%;
        max-height: 280px;
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 768px) {
    .os-poster-container {
        width: 100%;
        max-height: 220px;
        aspect-ratio: 16 / 9;
    }
}


/* ==========================================
   2. MATCH INFORMATION CARD
   ========================================== */
.os-match-info-card {
    padding: 25px;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Competition Name & Logo */
.os-mi-competition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.os-mi-competition img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Team Logos & Names */
.os-mi-teams {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 20px;
    margin-bottom: 30px;
}

.os-mi-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.os-mi-team img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    margin-bottom: 15px;
}

.os-mi-team span {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.3;
}

/* VS Separator */
.os-mi-vs {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--primary);
    font-weight: 900;
    margin: 0 10px;
}

/* Match Details List */
.os-mi-details {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    border-top: 1px solid var(--glass-border);
    padding-top: 25px;
    width: 100%;
}

.os-mi-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
    padding: 8px 14px;
    border-radius: 20px;
    white-space: nowrap;
}

.os-mi-detail-item i {
    color: var(--primary);
    font-size: 0.95rem;
}

body.light-mode .os-mi-detail-item {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .os-mi-teams {
        gap: 10px;
    }
    .os-mi-team img {
        width: 50px;
        height: 50px;
    }
    .os-mi-team span {
        font-size: 1rem;
    }
    .os-mi-details {
        gap: 10px;
    }
    .os-mi-detail-item {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}

/* ==========================================
   3. COMMUNITY BUTTONS
   ========================================== */
.community-join-section {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    margin-bottom: 30px;
    width: 100%;
}

.community-btn { flex: 1; padding: 12px !important; border-radius: 8px !important; text-align: center !important; text-decoration: none !important; font-weight: 600 !important; color: #ffffff !important; font-size: 0.9rem !important; transition: transform 0.2s, box-shadow 0.2s; border: none !important; outline: none !important; }
.community-btn:hover { transform: translateY(-2px); box-shadow: var(--glass-shadow); color: #ffffff !important; }
.telegram-btn { background: linear-gradient(135deg, #0088cc, #00aaff) !important; }
.whatsapp-btn { background: linear-gradient(135deg, #25D366, #128C7E) !important; }

@media (max-width: 768px) {
    .community-join-section {
        flex-direction: column;
    }
}

/* ==========================================
   4. MATCH WIDGET
   ========================================== */
.os-widget-container {
    width: 100%;
    margin-top: 25px;
    margin-bottom: 40px;
    position: relative;
    /* No min-height — height is driven entirely by the widget natively */
    height: auto;
    overflow: visible;
}

.os-widget-skeleton {
    position: absolute;
    top: 0; left: 0; width: 100%;
    height: 220px; /* skeleton placeholder — replaced once widget loads */
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    z-index: 2;
    background: var(--card-bg);
    border-radius: 12px;
}

.os-skeleton-row {
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    animation: shimmer 1.5s infinite linear;
}

body.light-mode .os-skeleton-row {
    background: rgba(0, 0, 0, 0.04);
}

.os-skeleton-row:first-child { height: 150px; }

@keyframes shimmer {
    0% { opacity: 0.4; }
    50% { opacity: 1; }
    100% { opacity: 0.4; }
}

.os-widget-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
    background: rgba(255, 0, 0, 0.05);
    border: 1px solid rgba(255, 0, 0, 0.2);
    border-radius: 16px;
    color: var(--text-main);
}

/* ==========================================
   5. WATCH LIVE BUTTON
   ========================================== */
.os-watch-btn-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.watch-btn {
    background: linear-gradient(135deg, var(--secondary), #ff4d4d) !important;
    padding: 16px 40px !important;
    font-size: 1.1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    min-width: 250px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

.watch-btn.os-disabled {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--text-muted) !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.7;
}

body.light-mode .watch-btn.os-disabled {
    background: rgba(0, 0, 0, 0.1) !important;
}

@media (max-width: 768px) {
    .watch-btn {
        width: 100%;
    }
}

/* ==========================================
   6. STANDINGS WIDGET
   ========================================== */
.os-standings-container {
    width: 100%;
    margin-top: 25px;
    margin-bottom: 40px;
    position: relative;
    height: auto;
    overflow: visible;
}

.os-standings-skeleton {
    position: absolute;
    top: 0; left: 0; width: 100%;
    height: 220px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    z-index: 2;
    background: var(--card-bg);
    border-radius: 12px;
}

/* ==========================================
   7. BLOGGER CONTENT (RELATED & RECENT)
   ========================================== */
.os-blogger-section {
    margin-top: 40px;
    margin-bottom: 40px;
    width: 100%;
}

/* ── Stylish section header with accent bar ── */
.os-posts-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--glass-border);
}
.os-posts-section-bar {
    display: inline-block;
    width: 4px;
    height: 24px;
    background: var(--primary);
    border-radius: 2px;
    flex-shrink: 0;
}
.os-posts-section-title {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ── 3×2 grid ── */
.os-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* ── Card ── */
.os-post-card {
    display: flex;
    flex-direction: column;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--glass-border);
    text-decoration: none !important;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
    cursor: pointer;
}
.os-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.45);
    border-color: rgba(255,195,0,0.25);
    text-decoration: none !important;
}
body.light-mode .os-post-card {
    background: #ffffff;
    border-color: rgba(0,0,0,0.08);
}

/* ── Image wrapper — fixed height, cover crop ── */
.os-post-card-img-wrap {
    width: 100%;
    height: 160px;
    overflow: hidden;
    position: relative;
    background: rgba(255,255,255,0.04);
    flex-shrink: 0;
}
.os-post-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.os-post-card:hover .os-post-card-img {
    transform: scale(1.05);
}

/* ── Card body ── */
.os-post-card-body {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.os-post-card-title {
    margin: 0;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
body.light-mode .os-post-card-title { color: #111; }

.os-post-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: auto;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.os-post-card-meta i { color: var(--primary); font-size: 0.7rem; }
body.light-mode .os-post-card-meta { color: #6b7280; border-top-color: rgba(0,0,0,0.06); }

/* ── Skeleton state ── */
.os-skeleton-card {
    pointer-events: none;
    border-color: rgba(255,255,255,0.04);
}
.os-skeleton-img {
    background: rgba(255,255,255,0.04);
    animation: shimmer 1.5s infinite linear;
    height: 160px;
}
body.light-mode .os-skeleton-card { border-color: rgba(0,0,0,0.05); }
body.light-mode .os-skeleton-img  { background: rgba(0,0,0,0.04); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .os-posts-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .os-posts-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .os-post-card-img-wrap { height: 130px; }
    .os-post-card-title { font-size: 0.9rem; }
    .os-posts-section-title { font-size: 1.25rem; }
}
@media (max-width: 480px) {
    .os-posts-grid { grid-template-columns: 1fr; }
    .os-post-card-img-wrap { height: 180px; }
}


@media (max-width: 768px) {
    .match-card { padding: 15px 15px 20px 15px !important; }
    .match-header { flex-direction: column !important; align-items: center !important; gap: 15px !important; text-align: center; }
    .match-teams-score { margin-bottom: 25px !important; }
    .match-teams-score .team { width: 45% !important; }
    .match-teams-score .team-name { font-size: 1.1rem !important; word-break: break-word; }
    .match-teams-score .team img { width: 60px !important; height: 60px !important; margin-bottom: 10px !important; }
    .score-area { width: 10% !important; }
    .score-area div { font-size: 1.8rem !important; }
    .os-mi-details { flex-direction: column; gap: 10px !important; }
    .os-mi-detail-item { font-size: 0.85rem !important; width: 100%; justify-content: center; }
}
