/*
Theme Name: Offx
Description: Modern news portal theme inspired by klix.ba design with dark theme support
Author: OffBA Team
Version: 1.0.0
*/

/* Tailwind-inspired CSS Variables */
:root {
    /* News Portal Color System */
    --background: hsl(0, 0%, 98%);
    --foreground: hsl(0, 0%, 13%);
    
    --card: hsl(0, 0%, 100%);
    --card-foreground: hsl(0, 0%, 13%);
    
    /* Brand Red */
    --primary: hsl(6, 78%, 57%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-hover: hsl(6, 78%, 47%);
    
    --secondary: hsl(0, 0%, 95%);
    --secondary-foreground: hsl(0, 0%, 13%);
    
    --muted: hsl(0, 0%, 96%);
    --muted-foreground: hsl(0, 0%, 45%);
    
    --accent: hsl(6, 78%, 57%);
    --accent-foreground: hsl(0, 0%, 100%);
    
    --border: hsl(0, 0%, 90%);
    --input: hsl(0, 0%, 90%);
    --ring: hsl(6, 78%, 57%);
    
    /* Category Colors */
    --category-politics: hsl(210, 100%, 45%);
    --category-sports: hsl(120, 60%, 40%);
    --category-tech: hsl(280, 70%, 50%);
    --category-lifestyle: hsl(45, 90%, 50%);
    --category-business: hsl(30, 80%, 45%);
    
    /* Gradients */
    --gradient-overlay: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.8));
    
    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition-base: all 0.2s ease;
    --transition-slow: all 0.3s ease;
}

[data-theme="dark"] {
    --background: hsl(222, 84%, 5%);
    --foreground: hsl(210, 40%, 98%);
    --card: hsl(222, 84%, 5%);
    --card-foreground: hsl(210, 40%, 98%);
    --secondary: hsl(217, 33%, 18%);
    --secondary-foreground: hsl(210, 40%, 98%);
    --muted: hsl(217, 33%, 18%);
    --muted-foreground: hsl(215, 20%, 65%);
    --border: hsl(217, 33%, 18%);
    --input: hsl(217, 33%, 18%);
}

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    margin: 0;
    padding: 0;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.site-header {
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.site-logo h1 {
    font-size: 1.875rem;
    font-weight: bold;
    margin: 0;
}

.site-logo .logo-text {
    color: var(--foreground);
}

.site-logo .logo-accent {
    color: var(--foreground);
}

.site-logo-img {
    max-height: 40px;
    max-width: 200px;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
}

/* Navigation */
.main-navigation {
    display: none;
    align-items: center;
    gap: 1.5rem;
}

.main-navigation a {
    font-weight: 500;
    text-decoration: none;
    color: var(--foreground);
    transition: var(--transition-base);
}

.main-navigation a:hover {
    color: var(--primary);
}

/* Category Colors */
.main-navigation .category-biznis { color: var(--category-business); }
.main-navigation .category-sport { color: var(--category-sports); }
.main-navigation .category-tech { color: var(--category-tech); }
.main-navigation .category-lifestyle { color: var(--category-lifestyle); }
.main-navigation .category-vijesti { color: var(--primary); }
.main-navigation .category-politics { color: var(--category-politics); }

/* Mobile Menu Category Colors */
.mobile-nav .category-biznis { color: var(--category-business); }
.mobile-nav .category-sport { color: var(--category-sports); }
.mobile-nav .category-tech { color: var(--category-tech); }
.mobile-nav .category-lifestyle { color: var(--category-lifestyle); }
.mobile-nav .category-vijesti { color: var(--primary); }
.mobile-nav .category-politics { color: var(--category-politics); }

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.header-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 0.375rem;
    color: var(--foreground);
    cursor: pointer;
    transition: var(--transition-base);
}

.header-btn:hover {
    background-color: var(--secondary);
}

.header-btn svg {
    width: 20px;
    height: 20px;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: block;
}

/* Trending Bar */
.trending-bar {
    background-color: var(--secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem 0;
    overflow-x: auto;
}

.trending-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    white-space: nowrap;
}

.trending-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
}

.trending-links {
    display: flex;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.trending-links a {
    color: var(--foreground);
    text-decoration: none;
    transition: var(--transition-base);
}

.trending-links a:hover {
    color: var(--primary);
}

/* Main Content */
.site-main {
    padding: 1.5rem 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* News Cards */
/* Featured/Breaking News */
.featured-news {
    margin-bottom: 2rem;
    position: relative;
}

.news-card {
    background-color: var(--card);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: var(--transition-slow);
}

.news-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.news-card.featured {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.news-card.featured:hover {
    transform: none;
}

.news-image {
    position: relative;
    height: 12rem;
    overflow: hidden;
    z-index: 1;
}

.news-card.featured .news-image {
    height: 16rem;
    z-index: 1;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

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

.news-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-overlay);
    z-index: 2;
}

.news-category {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 3;
}

.news-content {
    padding: 1rem;
}

.news-card.featured .news-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    color: white;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    z-index: 10;
}

.news-title {
    font-weight: bold;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-title a {
    color: inherit;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

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

.news-card.featured .news-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.news-card.featured .news-title a {
    color: white;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.news-card.featured .news-title a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.news-description {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card.featured .news-description {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
}

.news-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.news-card.featured .news-meta {
    color: rgba(255, 255, 255, 0.8);
}

.meta-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.meta-item svg {
    width: 12px;
    height: 12px;
}

/* Category Background Colors */
.bg-primary { background-color: var(--primary); }
.bg-category-business { background-color: var(--category-business); }
.bg-category-sports { background-color: var(--category-sports); }
.bg-category-tech { background-color: var(--category-tech); }
.bg-category-lifestyle { background-color: var(--category-lifestyle); }
.bg-category-politics { background-color: var(--category-politics); }

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: bold;
}

.section-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

/* News Grid */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget {
    background-color: var(--card);
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.widget-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
    font-size: 1.125rem;
    font-weight: bold;
}

.widget-title svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
}

.sidebar-news-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-news-item {
    cursor: pointer;
    transition: var(--transition-base);
}

.sidebar-news-item:hover .sidebar-news-title {
    color: var(--primary);
}

.sidebar-news-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: var(--transition-base);
}

.sidebar-news-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.sidebar-news-category {
    color: var(--primary);
    font-weight: 500;
    text-transform: uppercase;
}

.sidebar-news-item:not(:last-child) {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
}

/* Footer */
.site-footer {
    background-color: var(--card);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
    color: var(--muted-foreground);
}

/* Mobile Logo Responsive */
@media (max-width: 767px) {
    .site-logo-img {
        max-height: 32px;
        max-width: 150px;
    }
    
    .site-logo {
        gap: 1rem;
    }
    
    .site-logo h1 {
        font-size: 1.5rem;
    }
}

/* Responsive Design */
@media (min-width: 768px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .content-grid {
        gap: 2rem;
    }
}

@media (min-width: 1024px) {
    .main-navigation {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: none;
    }
    
    .content-grid {
        grid-template-columns: 2fr 1fr;
    }
    
    .news-card.featured .news-image {
        height: 20rem;
        z-index: 1;
    }
    
    .news-card.featured .news-title {
        font-size: 1.875rem;
    }
    
    .news-card.featured .news-title a {
        color: white;
        text-decoration: none;
        display: block;
        transition: color 0.2s ease;
    }
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background-color: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-nav a {
    padding: 0.5rem 0;
    font-weight: 500;
    text-decoration: none;
    color: var(--foreground);
    transition: var(--transition-base);
}

.mobile-nav a:hover {
    color: var(--primary);
}

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.featured-news .fade-in {
    animation: none;
    opacity: 1;
}

/* Penistreamer Plugin Fixes */
.penistreamer-container {
    overflow: visible !important;
    margin: 20px 0 !important;
}

.penistreamer-player {
    width: 100% !important;
    height: 400px !important;
}

.video-js.vjs-fluid {
    padding-top: 56.25% !important; /* 16:9 Aspect Ratio */
    height: 0 !important;
    position: relative !important;
}

.video-js.vjs-fluid .vjs-tech {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

/* Ensure video player controls are visible */
.video-js .vjs-control-bar {
    z-index: 10 !important;
}

.penistreamer-description {
    margin-top: 10px !important;
}

/* Utility Classes */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Admin Panel Styles */
.offx-logo-upload {
    margin: 10px 0;
}

.offx-logo-upload #offx-logo-preview img {
    max-width: 300px;
    height: auto;
    display: block;
    margin: 10px 0;
}

.offx-logo-upload .button {
    margin-right: 10px;
}

.offx-trending-tags .tag-preview {
    display: inline-block;
    background: #f0f0f0;
    padding: 5px 10px;
    margin: 5px;
    border-radius: 3px;
    position: relative;
}

.offx-trending-tags .remove-tag {
    cursor: pointer;
    color: #f00;
    font-weight: bold;
    margin-left: 5px;
}

/* Hide the specific empty div */
#block-3.widget_block.fade-in {
    display: none;
}