/* Homepage Specific Styles */

/* Ticker */
.news-ticker {
    background: var(--dark);
    color: #fff;
    padding: 8px 0;
    font-size: 0.85rem;
    overflow: hidden;
    white-space: nowrap;
}

.ticker-content {
    display: inline-block;
    animation: ticker 30s linear infinite;
}

@keyframes ticker {
    0% {
        transform: translateX(100%);
    }

    100% {
        transform: translateX(-100%);
    }
}

.ticker-item {
    margin-right: 40px;
}

.live-badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 6px;
    font-size: 0.7rem;
    border-radius: 4px;
    font-weight: bold;
    text-transform: uppercase;
    margin-right: 5px;
}

/* Hero / Featured */
.hero-section {
    padding: 40px 0;
    border-bottom: 1px solid var(--border);
}

.hero-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
}

.main-story {
    position: relative;
}

.main-story img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.main-story-content {
    margin-top: 15px;
}

.category-tag {
    color: var(--primary);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    margin-bottom: 5px;
    display: block;
}

.main-story-title {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.main-story-title a {
    text-decoration: none;
    color: var(--dark);
}

.main-story-title a:hover {
    text-decoration: underline;
}

.main-story-excerpt {
    color: var(--gray);
    font-size: 1.1rem;
}

.top-stories-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-heading {
    border-bottom: 2px solid var(--dark);
    margin: 0 0 15px 0;
    padding-bottom: 5px;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.small-story {
    display: flex;
    gap: 15px;
    align-items: start;
}

.small-story a {
    position: relative;
    display: block;
}

.replay-badge {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(204, 0, 0, 0.9);
    color: white;
    font-size: 9px;
    padding: 1px 4px;
    font-weight: bold;
    border-radius: 2px;
    line-height: normal;
}

.small-story img {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
}

.small-story-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.small-story-title a {
    color: var(--dark);
    text-decoration: none;
}

.small-story-title a:hover {
    color: var(--primary);
}

.time-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 4px;
    display: block;
}

/* News Grid */
.news-section {
    padding: 40px 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border);
    padding-bottom: 10px;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    border-left: 5px solid var(--primary);
    padding-left: 15px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.news-card {
    background: #fff;
    transition: transform 0.2s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-card-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 12px;
}

.news-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.news-card-title a {
    color: var(--dark);
    text-decoration: none;
}

.news-card-title a:hover {
    color: var(--primary);
}

.news-card-meta {
    font-size: 0.8rem;
    color: var(--gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* News List Layout (MaxPreps Style) */
.news-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-list-item {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    align-items: flex-start;
}

.news-list-item:last-child {
    border-bottom: none;
}

.news-list-img-wrapper {
    flex-shrink: 0;
    width: 200px;
    height: 130px;
}

.news-list-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.news-list-content {
    flex-grow: 1;
}

.news-list-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.news-list-title a {
    color: var(--dark);
    text-decoration: none;
}

.news-list-title a:hover {
    color: var(--primary);
}

.news-list-meta {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.news-list-excerpt {
    font-size: 0.95rem;
    color: #444;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* News Badge Overlay */
.news-list-img-wrapper {
    position: relative;
    display: block;
    overflow: hidden;
}

.news-type-badge {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 4px 8px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    z-index: 2;
    line-height: 1;
}

.news-type-badge.news {
    background-color: #004b8d;
    /* MaxPreps Blue */
}

.news-type-badge.replay {
    background-color: #cc0000;
    /* Live/Replay Red */
}

@media (max-width: 600px) {
    .news-list-item {
        flex-direction: column;
        gap: 10px;
    }

    .news-list-img-wrapper {
        width: 100%;
        height: 180px;
        /* Slightly reduced height for better proportion */
    }

    .news-type-badge {
        font-size: 0.75rem;
        /* Slightly larger text on mobile */
        padding: 5px 10px;
        bottom: 0;
        left: 0;
    }

    .main-story-title {
        font-size: 1.5rem;
        /* Reduced from 2.2rem */
        line-height: 1.3;
        margin-bottom: 5px;
    }

    .main-story-excerpt {
        font-size: 1rem;
        display: none;
        /* Optional: hide excerpt on very small screens if too cluttered */
    }
}

/* Broadcast Logos Overlay */
.broadcast-logos {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.5) 60%, transparent 100%);
    z-index: 2;
    pointer-events: none;
    /* Reset properties from news.css that cause centering issues */
    top: auto;
    transform: none;
    /* Let clicks pass through to link */
}

.bc-logo {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    padding: 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.bc-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.bc-vs {
    color: #fff;
    font-weight: 800;
    font-style: italic;
    font-size: 12px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.9);
    text-transform: uppercase;
}

.news-card a {
    display: block;
    position: relative;
}

/* Pagination controls */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.pagination-controls .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    min-width: 40px;
    height: 40px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.pagination-controls .btn-secondary {
    background-color: #fff;
    color: var(--text-main);
    border-color: #e0e0e0;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.pagination-controls .btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #d0d0d0;
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.08);
}

.pagination-controls .btn-primary {
    background-color: #004b8d;
    /* MaxPreps Blue */
    color: #fff;
    border-color: #004b8d;
    box-shadow: 0 2px 4px rgba(0, 75, 141, 0.3);
}

.pagination-controls .btn-primary:hover {
    background-color: #003666;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 75, 141, 0.4);
}

.pagination-dots {
    color: var(--gray);
    font-weight: bold;
    letter-spacing: 2px;
    padding: 0 5px;
}

/* Social Share Buttons (from player.php) */
.social-share-container {
    margin: 24px 0;
    padding: 20px;
    background: var(--theme-card-surface, #fff);
    border: 1px solid var(--theme-card-border, #ddd);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.social-share-label {
    font-size: 0.875rem;
    color: #555;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.social-share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-share-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    background: rgba(0, 0, 0, .1);
}

.social-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
}

.social-share-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-share-facebook {
    background: #1877f2;
    color: white;
}

.social-share-facebook:hover {
    background: #166fe5;
}

.social-share-twitter {
    background: #000;
    color: white;
}

.social-share-twitter:hover {
    background: #111;
}

.social-share-whatsapp {
    background: #25D366;
    color: white;
}

.social-share-whatsapp:hover {
    background: #22c35e;
}

.social-share-telegram {
    background: #2AABEE;
    color: white;
}

.social-share-telegram:hover {
    background: #229ed9;
}

.social-share-copy {
    background: #DA374A;
    color: white;
}

.social-share-copy:hover {
    background: #c92d3f;
}

.social-share-copy.copied {
    background: #22C55E;
}

.social-share-copy.copied span::after {
    content: " Copied!";
    margin-left: 4px;
}

.social-share-facebook.copied {
    background: #22C55E;
}

.social-share-facebook.copied span::after {
    content: " Copied!";
    margin-left: 4px;
}

@media (max-width: 600px) {
    .social-share-container {
        padding: 15px;
        margin: 15px 0;
    }

    .social-share-buttons {
        gap: 8px;
    }

    .social-share-btn {
        flex: 1 1 calc(50% - 8px);
        /* 2 buttons per row */
        justify-content: center;
        padding: 8px 10px;
        font-size: 0.75rem;
        min-width: 120px;
        /* Prevent crushing */
    }

    .social-share-btn svg {
        width: 16px;
        height: 16px;
    }

    /* Make the Copy Link button full width if total is odd (5 buttons -> 2, 2, 1) */
    .social-share-btn:last-child {
        flex: 1 1 100%;
        max-width: 100%;
    }

    /* Fix Broadcast Logos Centering */
    .broadcast-logos {
        justify-content: center;
    }

    .broadcast-info {
        text-align: center;
    }
}