/**
 * Article Listing Page - COMPLETE STANDALONE STYLES
 * 
 * This CSS contains EVERYTHING needed for article-listing.php
 * NO dependencies on style.css - completely self-contained
 * 
 * Upload to: /css/article-listing-styles.css
 * 
 * @project vysokotlakovy-cistic.sk
 * @version 3.0 - Fully standalone
 */

/* ===================================================================
   BASE LAYOUT - Container & Main Content
   =================================================================== */

/* More specific selector to override style.css */
.main-content .container,
main.main-content .container {
    max-width: 1400px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 1rem !important;
}

.main-content,
main.main-content {
    padding: 2rem 0 !important;
    min-height: 60vh !important;
}

@media (min-width: 768px) {
    .main-content .container,
    main.main-content .container {
        padding: 0 2rem !important;
    }
}

/* ===================================================================
   BREADCRUMBS
   =================================================================== */

.listing-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
}

.listing-breadcrumbs a {
    color: #0066CC;
    text-decoration: none;
    transition: color 0.2s;
}

.listing-breadcrumbs a:hover {
    color: #004999;
    text-decoration: underline;
}

.listing-breadcrumbs-separator {
    color: #D1D5DB;
}

.listing-breadcrumbs-current {
    color: #111827;
    font-weight: 600;
}

/* ===================================================================
   PAGE HEADER
   =================================================================== */

.listing-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #E5E7EB;
}

.listing-page-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: #111827;
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
    font-family: 'Open Sans', sans-serif;
}

.listing-page-subtitle {
    font-size: 1.125rem;
    color: #6B7280;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
}

@media (max-width: 768px) {
    .listing-page-title {
        font-size: 2rem;
    }
    
    .listing-page-subtitle {
        font-size: 1rem;
    }
}

/* ===================================================================
   MAIN CONTAINER - Two column layout (Sidebar + Content)
   =================================================================== */

.listing-container {
    display: grid !important;
    grid-template-columns: 280px 1fr !important;
    gap: 2rem !important;
    margin-top: 2rem !important;
}

@media (max-width: 992px) {
    .listing-container {
        grid-template-columns: 1fr !important;
    }
}

/* ===================================================================
   SIDEBAR - Filters section
   =================================================================== */

.listing-sidebar {
    position: sticky;
    top: 100px;
    height: fit-content;
}

@media (max-width: 992px) {
    .listing-sidebar {
        position: static;
        display: none;
    }
    
    .listing-sidebar.active {
        display: block;
    }
}

.listing-filters {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.listing-filters-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1.5rem 0;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #0066CC;
    font-family: 'Open Sans', sans-serif;
}

.listing-filter-group {
    margin-bottom: 1.5rem;
}

.listing-filter-group:last-child {
    margin-bottom: 0;
}

.listing-filter-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
    font-family: 'Open Sans', sans-serif;
}

.listing-filter-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 0.9375rem;
    color: #111827;
    background-color: #FFFFFF;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Open Sans', sans-serif;
}

.listing-filter-select:hover {
    border-color: #0066CC;
}

.listing-filter-select:focus {
    outline: none;
    border-color: #0066CC;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.listing-filter-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #E5E7EB;
}

/* ===================================================================
   POPULAR ARTICLES (Sidebar)
   =================================================================== */

.listing-popular {
    margin-top: 2rem;
}

.listing-popular-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #E5E7EB;
    font-family: 'Open Sans', sans-serif;
}

.listing-popular-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.listing-popular-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid #E5E7EB;
}

.listing-popular-item:last-child {
    border-bottom: none;
}

.listing-popular-link {
    color: #0066CC;
    text-decoration: none;
    font-size: 0.9375rem;
    transition: color 0.2s;
    font-family: 'Open Sans', sans-serif;
}

.listing-popular-link:hover {
    color: #004999;
    text-decoration: underline;
}

/* ===================================================================
   MAIN CONTENT AREA
   =================================================================== */

.listing-main {
    min-width: 0;
}

/* ===================================================================
   GRID - Article cards container
   =================================================================== */

.listing-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 2rem !important;
}

@media (max-width: 768px) {
    .listing-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .listing-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===================================================================
   ARTICLE CARD
   =================================================================== */

.listing-card {
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.listing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #0066CC;
}

/* ===================================================================
   CARD IMAGE CONTAINER
   =================================================================== */

.listing-card-image {
    position: relative;
    width: 100%;
    padding-top: 60%; /* 5:3 aspect ratio */
    background-color: #F3F4F6;
    overflow: hidden;
}

.listing-card-image a {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

.listing-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

/* ===================================================================
   IMAGE PLACEHOLDER
   =================================================================== */

.listing-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    color: #9CA3AF;
}

.listing-placeholder span {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.listing-placeholder p {
    font-size: 0.875rem;
    margin: 0;
    font-family: 'Open Sans', sans-serif;
}

/* ===================================================================
   TYPE BADGE (on image)
   =================================================================== */

.listing-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0066CC;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 10;
    font-family: 'Open Sans', sans-serif;
}

/* ===================================================================
   CARD CONTENT
   =================================================================== */

.listing-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* ===================================================================
   CATEGORY TAG
   =================================================================== */

.listing-category {
    margin-bottom: 0.75rem;
}

.listing-category a {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #0066CC;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    text-decoration: none;
    transition: color 0.2s;
    font-family: 'Open Sans', sans-serif;
}

.listing-category a:hover {
    color: #004999;
}

/* ===================================================================
   CARD TITLE
   =================================================================== */

.listing-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 0.75rem 0;
    font-family: 'Open Sans', sans-serif;
}

.listing-card-title a {
    color: #111827;
    text-decoration: none;
    transition: color 0.2s;
}

.listing-card-title a:hover {
    color: #0066CC;
}

/* ===================================================================
   CARD EXCERPT
   =================================================================== */

.listing-excerpt {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #6B7280;
    margin-bottom: 1rem;
    flex-grow: 1;
    font-family: 'Open Sans', sans-serif;
}

/* ===================================================================
   CARD META (date, views, reading time)
   =================================================================== */

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6B7280;
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
    font-family: 'Open Sans', sans-serif;
}

.listing-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

/* ===================================================================
   BUTTONS
   =================================================================== */

.listing-btn {
    display: inline-block;
    padding: 0.625rem 1.25rem;
    background: linear-gradient(135deg, #0066CC 0%, #004999 100%);
    color: #FFFFFF;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: 'Open Sans', sans-serif;
}

.listing-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    color: #FFFFFF;
    text-decoration: none;
}

.listing-btn-block {
    display: block;
    width: 100%;
}

.listing-btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.listing-btn-secondary:hover {
    background: #E5E7EB;
    color: #374151;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* ===================================================================
   PAGINATION
   =================================================================== */

.listing-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #E5E7EB;
}

.listing-pagination a,
.listing-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0.5rem 1rem;
    background-color: #FFFFFF;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    color: #374151;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    font-family: 'Open Sans', sans-serif;
}

.listing-pagination a:hover {
    background-color: #F3F4F6;
    border-color: #0066CC;
    color: #0066CC;
}

.listing-pagination-current {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
    border-color: #0066CC !important;
    cursor: default;
}

.listing-pagination-current:hover {
    background-color: #0066CC !important;
    color: #FFFFFF !important;
}

.listing-pagination-ellipsis {
    color: #9CA3AF;
    padding: 0 0.5rem;
    border: none !important;
    background: transparent !important;
}

@media (max-width: 576px) {
    .listing-pagination {
        gap: 0.25rem;
    }
    
    .listing-pagination a,
    .listing-pagination span {
        min-width: 40px;
        height: 40px;
        padding: 0.375rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* ===================================================================
   NO RESULTS MESSAGE
   =================================================================== */

.listing-no-results {
    text-align: center;
    padding: 4rem 2rem;
    background-color: #FFFFFF;
    border: 2px dashed #D1D5DB;
    border-radius: 12px;
}

.listing-no-results-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.listing-no-results h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem 0;
    font-family: 'Open Sans', sans-serif;
}

.listing-no-results p {
    font-size: 1rem;
    color: #6B7280;
    margin-bottom: 1.5rem;
    font-family: 'Open Sans', sans-serif;
}

/* ===================================================================
   MOBILE FILTER TOGGLE
   =================================================================== */

.listing-filter-toggle {
    display: none;
}

@media (max-width: 992px) {
    .listing-filter-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.75rem 1.25rem;
        background-color: #0066CC;
        color: #FFFFFF;
        border: none;
        border-radius: 8px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 1rem;
        font-family: 'Open Sans', sans-serif;
    }
    
    .listing-filter-toggle:hover {
        background-color: #004999;
    }
}

/* ===================================================================
   RESPONSIVE ADJUSTMENTS
   =================================================================== */

@media (max-width: 576px) {
    .listing-filters {
        padding: 1rem;
    }
    
    .listing-card-content {
        padding: 1rem;
    }
    
    .listing-card-title {
        font-size: 1.125rem;
    }
    
    .container {
        padding: 0 1rem;
    }
}

/* ===================================================================
   FOOTER STYLES
   =================================================================== */

.site-footer {
    background-color: #1F2937;
    color: #D1D5DB;
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.site-footer .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-top {
    margin-bottom: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.footer-column {
    font-family: 'Open Sans', sans-serif;
}

.footer-title {
    color: #FFFFFF;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-text {
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #D1D5DB;
}

.footer-logo {
    margin-top: 1.5rem;
}

.footer-logo img {
    height: 38px;
    width: auto;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #D1D5DB;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #FFFFFF;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
}

.footer-contact svg {
    flex-shrink: 0;
    color: #9CA3AF;
}

.footer-contact a {
    color: #D1D5DB;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-contact a:hover {
    color: #FFFFFF;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1.5rem;
    margin-top: 2rem;
}

.footer-bottom-content {
    text-align: center;
}

.copyright {
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: #9CA3AF;
}

.affiliate-disclaimer {
    font-size: 0.75rem;
    color: #6B7280;
    margin: 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background: #0066CC;
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top:hover {
    background: #004999;
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.back-to-top svg {
    display: block;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .back-to-top {
        width: 44px;
        height: 44px;
        bottom: 1rem;
        right: 1rem;
    }
}

/* Cookie Consent */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #FFFFFF;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    z-index: 1000;
    border-top: 3px solid #0066CC;
}

.cookie-consent-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-consent-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #374151;
    flex-grow: 1;
}

.cookie-consent-content a {
    color: #0066CC;
    text-decoration: underline;
}

.cookie-consent-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn {
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: #0066CC;
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #004999;
}

.btn-secondary {
    background: #F3F4F6;
    color: #374151;
}

.btn-secondary:hover {
    background: #E5E7EB;
}

@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-consent-actions {
        width: 100%;
    }
    
    .cookie-consent-actions button {
        flex: 1;
    }
}
