/**
 * NoviTravnik Theme - Main Styles
 */

:root {
    --primary-color: #1e40af;
    --secondary-color: #64748b;
    --accent-color: #dc2626;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --background: #ffffff;
    --background-alt: #f9fafb;
    --header-height: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
}

/* Header Styles */
.site-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--text-color);
    color: white;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header {
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    color: var(--text-color);
    text-decoration: none;
}

.site-description {
    font-size: 14px;
    color: var(--text-light);
    margin: 5px 0 0;
}

.header-search {
    flex: 1;
    max-width: 400px;
}

.search-form {
    display: flex;
    position: relative;
}

.search-field {
    width: 100%;
    padding: 10px 45px 10px 15px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    font-size: 14px;
}

.search-submit {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s;
}

/* Navigation */
.main-navigation {
    background: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    position: relative;
}

.nav-menu a {
    display: block;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.nav-menu a:hover {
    background: rgba(255,255,255,0.1);
}

.nav-menu .sub-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    list-style: none;
    padding: 0;
}

.nav-menu li:hover .sub-menu {
    display: block;
}

.nav-menu .sub-menu a {
    color: var(--text-color);
    padding: 10px 20px;
}

.nav-menu .sub-menu a:hover {
    background: var(--background-alt);
}

/* Trending Bar */
.trending-bar {
    background: var(--background-alt);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.trending-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.trending-label {
    font-weight: 600;
    color: var(--accent-color);
    flex-shrink: 0;
}

.trending-items {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    flex: 1;
}

.trending-item {
    color: var(--text-color);
    text-decoration: none;
    white-space: nowrap;
    font-size: 14px;
    transition: color 0.3s;
}

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

/* Content Area */
.site-content {
    padding: 40px 0;
    min-height: 500px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

/* Featured Posts */
.featured-posts {
    margin-bottom: 40px;
}

.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 400px;
}

.featured-post {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.featured-main {
    grid-row: span 2;
}

.featured-link {
    display: block;
    height: 100%;
    color: white;
    text-decoration: none;
}

.featured-image {
    position: relative;
    height: 100%;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.8));
}

.featured-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
}

.featured-category {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}

.featured-title {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.3;
}

.featured-secondary .featured-title {
    font-size: 18px;
}

.featured-excerpt {
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 10px;
    opacity: 0.9;
}

.featured-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    opacity: 0.8;
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.post-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.post-card-link {
    text-decoration: none;
    color: inherit;
}

.post-thumbnail {
    position: relative;
    padding-bottom: 56.25%;
    overflow: hidden;
}

.post-thumbnail img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0,0,0,0.7);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.post-content {
    padding: 20px;
}

.post-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.post-category {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 2px 8px;
    border: 1px solid;
    border-radius: 3px;
}

.post-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-excerpt {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Single Post */
.single-post {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.entry-header {
    margin-bottom: 30px;
}

.entry-categories {
    margin-bottom: 15px;
}

.category-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 4px;
    color: white;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-right: 8px;
}

.entry-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 15px;
}

.entry-subtitle {
    font-size: 20px;
    color: var(--text-light);
    margin-bottom: 20px;
}

.entry-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.author-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.author-info img {
    border-radius: 50%;
}

.author-name {
    font-weight: 600;
    color: var(--text-color);
    text-decoration: none;
}

.author-name:hover {
    color: var(--primary-color);
}

.post-date {
    font-size: 14px;
    color: var(--text-light);
}

.post-stats {
    display: flex;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
}

.entry-featured-image {
    margin: 30px -30px;
}

.entry-featured-image img {
    width: 100%;
    height: auto;
}

.image-caption {
    padding: 10px 30px;
    font-size: 14px;
    color: var(--text-light);
    font-style: italic;
}

.entry-content {
    font-size: 18px;
    line-height: 1.8;
    margin-bottom: 30px;
}

.entry-content h2 {
    font-size: 28px;
    margin: 30px 0 15px;
}

.entry-content h3 {
    font-size: 24px;
    margin: 25px 0 15px;
}

.entry-content p {
    margin-bottom: 20px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--text-light);
}

/* Sidebar */
.sidebar-area {
    position: sticky;
    top: 80px;
    height: fit-content;
}

.widget {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.widget-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.widget ul li:last-child {
    border-bottom: none;
}

.widget a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s;
}

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

/* Footer */
.site-footer {
    background: var(--text-color);
    color: white;
    margin-top: 60px;
}

.footer-newsletter {
    background: var(--primary-color);
    padding: 40px 0;
    text-align: center;
}

.footer-widgets {
    padding: 40px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-widgets-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-widget-area .widget {
    background: transparent;
    box-shadow: none;
    color: white;
}

.footer-widget-area .widget-title {
    color: white;
    border-color: var(--accent-color);
}

.footer-widget-area a {
    color: rgba(255,255,255,0.8);
}

.footer-widget-area a:hover {
    color: white;
}

.footer-bottom {
    padding: 20px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
}

.footer-nav {
    display: flex;
    list-style: none;
    gap: 20px;
}

.footer-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 14px;
}

.footer-nav a:hover {
    color: white;
}

/* Back to Top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-5px);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 40px;
}

.novitravnik-pagination ul {
    display: flex;
    justify-content: center;
    gap: 10px;
    list-style: none;
}

.novitravnik-pagination li {
    display: inline-block;
}

.novitravnik-pagination a,
.novitravnik-pagination span {
    display: block;
    padding: 8px 15px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.novitravnik-pagination a:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.novitravnik-pagination .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .sidebar-area {
        position: static;
    }
    
    .featured-grid {
        grid-template-columns: 1fr;
        height: auto;
    }
    
    .featured-main {
        grid-row: span 1;
        height: 300px;
    }
    
    .featured-secondary {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .header-search {
        order: 3;
        flex: 0 0 100%;
        max-width: none;
        margin-top: 15px;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        background: var(--primary-color);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .posts-grid {
        grid-template-columns: 1fr;
    }
    
    .entry-title {
        font-size: 28px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .trending-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .trending-items {
        width: 100%;
    }
}