/* NFZ News - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-header: linear-gradient(135deg, var(--primary-color), var(--info-color));
}

/* Global Styles */
body {
    background: var(--gradient-primary);
    min-height: 100vh;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
}

/* Main Container */
.main-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    margin: 20px;
    padding: 30px;
    animation: fadeInUp 0.8s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Section */
.header-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 0;
    background: var(--gradient-header);
    border-radius: 15px;
    color: white;
    position: relative;
    overflow: hidden;
}

.header-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.header-section h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.header-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

/* Stats Section */
.stats-section {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    margin-bottom: 30px;
    gap: 20px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
    min-width: 150px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.stat-card:hover::before {
    left: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.stat-card i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.stat-card:hover i {
    transform: scale(1.1);
}

.stat-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.stat-card .label {
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* News Table */
.news-table {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    animation: slideInUp 0.6s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-table .table {
    margin-bottom: 0;
}

.news-table .table thead th {
    background: var(--gradient-header);
    color: white;
    border: none;
    padding: 20px 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    position: relative;
}

.news-table .table thead th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
}

.news-table .table tbody tr {
    transition: all 0.3s ease;
    cursor: pointer;
}

.news-table .table tbody tr:hover {
    background-color: var(--light-color);
    transform: scale(1.01);
}

.news-table .table tbody td {
    padding: 20px 15px;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

/* Badges */
.oddzial-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.3);
}

.oddzial-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.4);
}

.date-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    background: var(--light-color);
    color: var(--secondary-color);
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.date-badge:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Content Cells */
.title-cell {
    max-width: 300px;
}

.title-text {
    font-weight: 600;
    color: var(--dark-color);
    line-height: 1.4;
    margin-bottom: 5px;
    transition: color 0.3s ease;
}

.description-text {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.4;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* Buttons */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--success-color);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 2px 8px rgba(25, 135, 84, 0.3);
}

.read-more-btn:hover {
    background: #157347;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 135, 84, 0.4);
    text-decoration: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--secondary-color);
    animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    text-align: center;
    padding: 40px;
    animation: fadeIn 0.5s ease-out;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        margin: 10px;
        padding: 20px;
    }
    
    .header-section h1 {
        font-size: 2rem;
    }
    
    .stats-section {
        flex-direction: column;
        align-items: center;
    }
    
    .news-table {
        overflow-x: auto;
    }
    
    .title-cell {
        max-width: 200px;
    }
    
    .stat-card {
        min-width: 120px;
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .main-container {
        margin: 5px;
        padding: 15px;
    }
    
    .header-section {
        padding: 20px 0;
    }
    
    .header-section h1 {
        font-size: 1.5rem;
    }
    
    .header-section p {
        font-size: 1rem;
    }
    
    .stat-card {
        min-width: 100px;
        padding: 10px;
    }
    
    .stat-card .number {
        font-size: 1.5rem;
    }
    
    .news-table .table thead th,
    .news-table .table tbody td {
        padding: 15px 10px;
        font-size: 0.9rem;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .main-container {
        box-shadow: none;
        margin: 0;
        padding: 20px;
    }
    
    .header-section {
        background: #f8f9fa;
        color: var(--dark-color);
    }
    
    .stats-section {
        display: none;
    }
    
    .read-more-btn {
        display: none;
    }
}
