/**
 * PQ Crypta Press Releases - Enhanced Styles
 * Modern, responsive design with professional look and feel
 */

/* CSS Variables for theming */
:root {
    --primary-color: #667eea;
    --primary-hover: #5568d3;
    --secondary-color: #764ba2;
    --linkedin-blue: #0077b5;
    --text-dark: #1a202c;
    --text-medium: #4a5568;
    --text-light: #718096;
    --bg-white: #ffffff;
    --bg-light: #f7fafc;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --transition-base: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background Canvas */
#three-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

#custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 9999;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* Breadcrumbs */
.breadcrumbs {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
    font-size: 0.95em;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

.breadcrumbs a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.breadcrumbs span {
    color: var(--text-medium);
    margin: 0 8px;
}

/* Header */
.header {
    text-align: center;
    color: white;
    padding: 60px 20px 40px;
    margin-bottom: 40px;
    animation: fadeInDown 0.8s ease-out;
}

.header h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.header p {
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    opacity: 0.95;
    font-weight: 300;
    max-width: 800px;
    margin: 0 auto;
}

/* Controls Section */
.controls-section {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.search-container {
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 16px 20px;
    font-size: 1.05em;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition-base);
    background: var(--bg-white);
    font-family: inherit;
}

#search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    transform: translateY(-1px);
}

#search-input::placeholder {
    color: var(--text-light);
}

.filter-controls {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-controls select {
    flex: 1;
    min-width: 200px;
    padding: 14px 16px;
    font-size: 1em;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-white);
    transition: var(--transition-base);
    font-family: inherit;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234a5568' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.filter-controls select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 25px 30px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.section-header h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    font-weight: 700;
}

.section-header .count {
    font-size: 1em;
    color: var(--text-medium);
    font-weight: 600;
    background: var(--bg-light);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid var(--border-color);
}

.articles-section-header {
    margin-top: 60px;
}

/* Table Layout */
.content-table {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.8s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.table-header {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 18px 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    font-weight: 600;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 0.95em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    padding: 22px 25px;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
    color: inherit;
    transition: var(--transition-base);
    align-items: start;
    position: relative;
}

.table-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s ease;
    border-radius: 12px 0 0 12px;
}

.table-row:hover::before {
    width: 4px;
}

.table-row:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.03), transparent);
    transform: translateX(8px);
    box-shadow: var(--shadow-sm);
}

.table-row:last-child {
    border-bottom: none;
}

.col-date {
    font-size: 0.95em;
    color: var(--primary-color);
    font-weight: 600;
    padding-top: 2px;
    white-space: nowrap;
}

.col-title {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.title-text {
    font-size: 1.1em;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.5;
}

.tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    color: var(--primary-color);
    font-weight: 500;
    white-space: nowrap;
    border: 1px solid rgba(102, 126, 234, 0.2);
    transition: var(--transition-base);
}

.tag:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-1px);
}

/* Articles Table - 3 Column Layout */
.articles-header {
    grid-template-columns: 120px 1fr 150px;
}

.article-row {
    grid-template-columns: 120px 1fr 150px;
    align-items: center;
}

.article-row .col-title {
    flex-direction: row;
    align-items: center;
}

.col-source {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.source-badge {
    background: var(--linkedin-blue);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.source-badge:hover {
    background: #006396;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin: 30px 0;
    padding: 25px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pagination-btn {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1em;
    font-weight: 600;
    transition: var(--transition-base);
    box-shadow: var(--shadow-sm);
    font-family: inherit;
}

.pagination-btn:not(:disabled) {
    cursor: none;
}

.pagination-btn:not(:disabled):hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-hover), #6a3d99);
}

.pagination-btn:not(:disabled):active {
    transform: translateY(0);
}

.pagination-btn:disabled {
    background: #cbd5e0;
    opacity: 0.6;
    cursor: not-allowed;
}

.pagination-info {
    font-size: 1.05em;
    color: var(--text-dark);
    font-weight: 600;
    min-width: 130px;
    text-align: center;
}

/* Back to Home */
.back-home {
    text-align: center;
    margin-top: 50px;
    margin-bottom: 30px;
}

.back-home a {
    display: inline-block;
    padding: 16px 40px;
    background: rgba(255, 255, 255, 0.98);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-base);
    border: 2px solid transparent;
}

.back-home a:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-xl);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Custom Cursor */
* {
    cursor: none !important;
}

html, body {
    cursor: none !important;
}

a, button, .table-row, .back-home a, select {
    cursor: none !important;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .table-header,
    .table-row {
        grid-template-columns: 110px 1fr;
        gap: 15px;
    }

    .articles-header,
    .article-row {
        grid-template-columns: 110px 1fr 140px;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .header {
        padding: 40px 15px 30px;
    }

    .controls-section,
    .section-header,
    .content-table,
    .pagination {
        padding: 20px;
    }

    .filter-controls {
        flex-direction: column;
    }

    .filter-controls select {
        min-width: 100%;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .table-header {
        display: none;
    }

    .table-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px 20px;
    }

    .table-row::before {
        border-radius: 12px 12px 0 0;
        width: 100%;
        height: 0;
    }

    .table-row:hover::before {
        height: 4px;
    }

    .table-row:hover {
        transform: translateX(0) translateY(-2px);
    }

    .article-row {
        grid-template-columns: 1fr;
    }

    .tags-row {
        justify-content: flex-start;
    }

    .col-source {
        justify-content: flex-start;
    }

    .col-date {
        font-size: 0.9em;
    }

    .title-text {
        font-size: 1em;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 12px;
    }

    .pagination-btn {
        padding: 12px 24px;
        font-size: 0.95em;
    }
}

@media (max-width: 480px) {
    .controls-section {
        padding: 15px;
    }

    #search-input {
        padding: 14px 16px;
        font-size: 1em;
    }

    .filter-controls select {
        padding: 12px 14px;
        font-size: 0.95em;
    }

    .section-header {
        padding: 18px 15px;
    }

    .content-table {
        padding: 15px;
    }

    .table-row {
        padding: 15px;
    }

    .tag {
        font-size: 0.8em;
        padding: 5px 12px;
    }

    .pagination-btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .back-home a {
        padding: 14px 32px;
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
        color: black;
    }

    #three-background,
    #custom-cursor,
    .controls-section,
    .pagination,
    .back-home {
        display: none !important;
    }

    .container {
        max-width: 100%;
    }

    .table-row {
        page-break-inside: avoid;
    }
}
