:root {
    --primary: #7A79A8;
    --primary-dark: #44569E;
    --accent: #1e51c9;
    --accent-dark: #1640a3;
    --dark: #0a0a0a;
    --light: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #0f1419;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background: var(--light);
    overflow-x: hidden;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.loading-screen.fade-out {
    opacity: 0;
    transform: scale(1.1);
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    width: 120px;
    height: 80px;
    background: var(--light);
    border-radius: 6px;
    margin: 0 auto 30px;
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.loading-logo img {
    width: 100%;
    height: auto;
    max-height: 100%;
    object-fit: contain;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.9; }
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

.loading-text {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 20px;
    animation: fadeInUp 0.6s ease-out 0.3s both;
}

.loading-progress {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out 0.6s both;
}

.loading-bar {
    height: 100%;
    background: white;
    border-radius: 2px;
    width: 0%;
    animation: loadingBar 2s ease-in-out infinite;
}

@keyframes loadingBar {
    0%, 100% { width: 0%; transform: translateX(0); }
    50% { width: 100%; transform: translateX(0); }
    100% { width: 100%; transform: translateX(100%); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.navbar {
    background: rgba(10, 10, 10, 0.96);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(10, 10, 10, 0.98);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 15px;
}

.brand-logo {
    width: 48px;
    height: 32px;
    background: white;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 2px;
}

.brand-logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: #5B9EFF !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.login-form {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: 20px;
    transition: opacity 0.3s ease;
}

.login-form.hidden {
    opacity: 0;
    visibility: hidden;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-right: 20px;
    color: white;
}

.user-welcome {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
}

.subscription-badge {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.login-input {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    padding: 8px 12px;
    color: white;
    font-size: 0.9rem;
    width: 140px;
    transition: all 0.3s ease;
}

.login-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.login-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.login-btn {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border: none;
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.login-btn:hover {
    background: linear-gradient(135deg, var(--accent-dark), var(--accent));
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.logout-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    color: white;
}

.hero {
    min-height: 70vh;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--dark) 100%);
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="none" stroke="rgba(37,99,235,0.1)" stroke-width="1" points="0,100 100,0 200,100 100,200"/><polygon fill="none" stroke="rgba(37,99,235,0.1)" stroke-width="1" points="200,300 300,200 400,300 300,400"/></svg>');
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(37, 99, 235, 0.25);
    border: 1px solid rgba(37, 99, 235, 0.4);
    color: #5B9EFF;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1rem;
    animation: slideInDown 0.8s ease-out;
}

.hero-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: slideInLeft 0.8s ease-out 0.2s both;
}

.hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.95;
    margin-bottom: 3rem;
    max-width: 600px;
    animation: slideInLeft 0.8s ease-out 0.4s both;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: slideInUp 0.8s ease-out 0.6s both;
}

.hero-logo {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: slideInRight 0.8s ease-out 0.8s both;
}

.hero-logo img {
    max-width: 100%;
    max-height: 250px;
    width: auto;
    height: auto;
    opacity: 0.98;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.2));
    transition: all 0.3s ease;
    padding: 15px;
    background-color: rgba(255, 255, 255, 0.98);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero-logo img:hover {
    transform: scale(1.02);
    opacity: 1;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.btn {
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.4);
    color: white;
}

.btn-outline-light {
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.4);
    color: white;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-2px);
    color: white;
}

.stats-section {
    background: white;
    padding: 5rem 0;
    position: relative;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-10px);
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
    position: relative;
}

.stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.years-section {
    background: var(--gray-50);
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    background: var(--gray-50);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--gray-700);
    max-width: 600px;
    margin: 0 auto;
}

.years-selector-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
}

.years-selector {
    background: white;
    border: 2px solid var(--gray-300);
    border-radius: 12px;
    padding: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gray-900);
    min-width: 150px;
    max-width: 40vw;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.years-selector:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(122, 121, 168, 0.2), 0 4px 15px rgba(0, 0, 0, 0.15);
}

.years-selector:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.year-stats {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    min-width: 250px;
}

.year-stats-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.year-stats-label {
    color: var(--gray-700);
    font-weight: 500;
}

.documents-section {
    background: white;
    padding: 5rem 0;
}

.view-toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.view-toggle {
    background: var(--gray-100);
    border-radius: 10px;
    padding: 6px;
    display: flex;
    gap: 6px;
}

.view-toggle-btn {
    background: transparent;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.view-toggle-btn.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.view-toggle-btn:hover:not(.active) {
    color: var(--gray-900);
}

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 0;
    /*margin-top: 3rem;*/
}

.document-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid var(--gray-200);
}

.document-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15);
}

.document-card.subscription {
    border: 2px solid var(--accent);
}

.document-card.subscription::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-dark));
    z-index: 1;
}

.document-header {
    background: linear-gradient(135deg, var(--gray-50), white);
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
}

.subscription-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.fallback-indicator {
    background: linear-gradient(135deg, var(--gray-500), var(--gray-600));
    color: white;
}

.document-month {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.document-year {
    color: var(--gray-600);
    font-weight: 500;
}

.document-body {
    padding: 1.5rem;
}

.document-preview {
    width: 100%;
    height: 200px;
    background: var(--gray-100);
    border-radius: 4px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.document-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    transition: transform 0.4s ease;
}

.document-card:hover .document-preview img {
    transform: scale(1.1);
}

.document-preview-one img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
    transition: transform 0.4s ease;
}


.document-placeholder {
    color: var(--gray-500);
    text-align: center;
}

.document-placeholder i {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    display: block;
}

.documents-grid.minimal-view .document-preview {
    display: none;
}

.documents-grid.minimal-view .document-card {
    min-height: auto;
}

.documents-grid.minimal-view .document-body {
    padding-top: 0;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.document-title {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.document-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.document-link:hover {
    transform: translateX(5px);
    box-shadow: 0 8px 25px rgba(122, 121, 168, 0.3);
    color: white;
}

.abo_bestellen_warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 12px 16px;
    margin-top: 10px;
    display: flex;
    align-items: start;
    gap: 10px;
    color: #856404;
}

.abo_bestellen_warning i {
    font-size: 1.2rem;
    color: #ffc107;
    margin-top: 2px;
}

.abo_bestellen_warning p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.no-documents {
    text-align: center;
    color: var(--gray-600);
    font-style: italic;
    grid-column: 1 / -1;
    padding: 3rem;
}

.footer {
    background: var(--gray-900);
    color: white;
    padding: 4rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    opacity: 0.95;
    padding: 0.5rem;
}

.footer-logo img {
    max-height: 120px;
    width: auto;
    filter: brightness(1.1) drop-shadow(0 4px 15px rgba(37, 99, 235, 0.1));
    transition: all 0.3s ease;
}

.footer-logo:hover img {
    transform: scale(1.05);
    filter: brightness(1.2) drop-shadow(0 6px 20px rgba(37, 99, 235, 0.2));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--accent);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-section p {
    color: var(--gray-300);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray-300);
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: #5B9EFF;
    transform: translateX(5px);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    color: var(--gray-300);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.footer-contact-item i {
    color: var(--accent);
    width: 20px;
    text-align: center;
    margin-top: 2px;
    flex-shrink: 0;
}

.footer-publisher-section {
    background: var(--gray-800);
    padding: 3rem 0;
    border-top: 1px solid var(--gray-700);
    margin-bottom: 2rem;
}

.footer-publisher-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
}

.publisher-info {
    background: rgba(15, 20, 25, 0.5);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--gray-700);
}

.publisher-info h5 {
    color: #5B9EFF;
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.publisher-details {
    color: var(--gray-300);
    line-height: 1.6;
}

.publisher-details strong {
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 2rem;
    text-align: center;
    color: var(--gray-400);
    font-size: 0.9rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom-links {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-bottom-links a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.footer-bottom-links a:hover {
    color: #5B9EFF;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.stagger-animation .fade-in:nth-child(1) { transition-delay: 0.1s; }
.stagger-animation .fade-in:nth-child(2) { transition-delay: 0.2s; }
.stagger-animation .fade-in:nth-child(3) { transition-delay: 0.3s; }
.stagger-animation .fade-in:nth-child(4) { transition-delay: 0.4s; }

.loading-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.pdf-viewer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-viewer-modal.show {
    opacity: 1;
    visibility: visible;
}

.pdf-viewer-modal.desktop-mode .pdf-viewer-sidebar {
    width: 300px;
    background: var(--gray-900);
    color: white;
    padding: 20px;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.pdf-viewer-modal.desktop-mode.show .pdf-viewer-sidebar {
    transform: translateX(0);
}

.pdf-viewer-modal.mobile-mode {
    flex-direction: column;
    background: var(--gray-900);
}

.pdf-viewer-modal.mobile-mode .pdf-viewer-sidebar {
    display: none;
}

.pdf-mobile-header {
    background: var(--gray-900);
    border-bottom: 1px solid var(--gray-700);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 60px;
    position: relative;
}

.pdf-mobile-title {
    font-size: 1rem;
    font-weight: 600;
    color: white;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 60px);
    text-align: center;
}

.pdf-mobile-close-btn {
    background: transparent;
    border: 1px solid var(--gray-600);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

.pdf-mobile-close-btn:active {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-50%) scale(0.95);
}

.pdf-viewer-modal.mobile-mode .pdf-viewer-content {
    flex: 1;
    overflow: hidden;
    background: var(--gray-800);
    position: relative;
}

.pdf-viewer-modal.mobile-mode .pdf-viewer-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 90px;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pdf-mobile-bottom-menu {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--gray-900);
    border-top: 1px solid var(--gray-700);
    padding: 15px 20px;
    backdrop-filter: blur(20px);
    z-index: 10001;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

.pdf-mobile-menu-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pdf-mobile-menu-navigation {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-mobile-menu-btn {
    background: transparent;
    border: 1px solid var(--gray-600);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    touch-action: manipulation;
}

.pdf-mobile-menu-btn:active {
    transform: scale(0.95);
    background: var(--primary);
    border-color: var(--primary);
}

.pdf-mobile-menu-btn:disabled {
    opacity: 0.4;
    pointer-events: none;
}

.pdf-mobile-page-counter {
    background: var(--gray-700);
    color: white;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    min-width: 100px;
    text-align: center;
    border: 1px solid var(--gray-600);
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.pdf-mobile-page-counter:active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(0.95);
}

.pdf-mobile-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-mobile-zoom-select {
    background: var(--gray-700);
    color: white;
    border: 1px solid var(--gray-600);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    min-width: 100px;
    height: 44px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
}

.pdf-mobile-zoom-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(122, 121, 168, 0.2);
}

.pdf-pages-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-pages-container.single-page {
    flex-direction: column;
    gap: 20px;
}

.pdf-pages-container.double-page {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.pdf-mobile-page {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: all 0.3s ease;
}

.pdf-mobile-page.single {
    max-width: 90vw;
    max-height: 70vh;
}

.pdf-mobile-page.double {
    max-width: 45vw;
    max-height: 70vh;
}

.pdf-mobile-page canvas {
    width: 100%;
    height: auto;
    display: block;
}

.pdf-mobile-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
}

.pdf-mobile-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

.pdf-viewer-modal.mobile-mode .pdf-viewer-header,
.pdf-viewer-modal.mobile-mode .pdf-close-btn {
    display: none;
}

.pdf-viewer-modal.desktop-mode .pdf-mobile-header,
.pdf-viewer-modal.desktop-mode .pdf-mobile-bottom-menu {
    display: none;
}

.pdf-viewer-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: var(--gray-800);
}

.pdf-viewer-header {
    background: var(--gray-900);
    color: white;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--gray-700);
}

.pdf-viewer-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-viewer-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-control-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--gray-800);
    border-radius: 6px;
    padding: 6px 12px;
}

.pdf-control-btn {
    background: transparent;
    border: 1px solid var(--gray-600);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.pdf-control-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.pdf-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pdf-page-input {
    width: 60px;
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    color: white;
    text-align: center;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pdf-zoom-select {
    background: var(--gray-700);
    border: 1px solid var(--gray-600);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.pdf-viewer-content {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.pdf-viewer-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pdf-page-container {
    position: relative;
    margin-bottom: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    border-radius: 6px;
    overflow: hidden;
    background: white;
    transition: all 0.4s ease;
}

.pdf-page-container.flipping {
    transform: rotateY(180deg);
}

.pdf-canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
}

.pdf-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

.pdf-sidebar-section {
    margin-bottom: 30px;
}

.pdf-sidebar-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #5B9EFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pdf-page-thumbs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.pdf-thumb {
    aspect-ratio: 3/4;
    background: var(--gray-700);
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pdf-thumb:hover {
    border-color: var(--accent);
}

.pdf-thumb.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(122, 121, 168, 0.3);
}

.pdf-thumb canvas {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-thumb-number {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    font-size: 0.7rem;
    padding: 2px 4px;
    border-radius: 2px;
}

.pdf-info-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 15px;
    font-size: 0.9rem;
}

.pdf-info-label {
    color: var(--gray-400);
}

.pdf-info-value {
    color: white;
    font-weight: 500;
}

.pdf-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-close-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .pdf-viewer-modal {
        flex-direction: column;
    }

    .pdf-viewer-modal .pdf-viewer-sidebar {
        display: none;
    }

    .pdf-viewer-modal .pdf-viewer-header {
        display: none;
    }

    .pdf-viewer-modal .pdf-close-btn {
        display: none;
    }

    .pdf-mobile-header {
        display: flex;
    }

    .pdf-mobile-bottom-menu {
        display: block;
        padding-bottom: calc(15px + env(safe-area-inset-bottom));
    }

    .hero {
        min-height: 70vh;
        padding: 120px 0 50px;
        text-align: center;
    }

    .hero-content {
        text-align: center;
        max-width: 100%;
    }

    .hero-badge {
        justify-content: center;
        margin: 0 auto 1.5rem;
    }

    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
        opacity: 0.9;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .btn {
        width: 100%;
        max-width: 250px;
        justify-content: center;
        padding: 10px 24px;
    }

    .hero-logo {
        order: -1;
        margin-bottom: 1.5rem;
    }

    .hero-logo img {
        max-height: 150px;
        max-width: 150px;
        padding: 8px;
    }

    .login-form {
        flex-direction: column;
        margin: 10px 0;
        gap: 8px;
        align-items: stretch;
    }

    .login-input {
        width: 100%;
    }

    .user-info {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    .documents-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .years-selector-container {
        flex-direction: column;
        gap: 1.5rem;
    }

    .years-selector {
        min-width: 90%;
        max-width: 40vw;
    }

    .years-selector {
        min-width: 90%;
        max-width: 40vw;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    #yearStats {
        min-width: 90%;
        max-width: 40vw;
    }

    .footer-publisher-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-bottom-links {
        justify-content: center;
    }

    .stats-section,
    .years-section,
    .documents-section {
        padding: 3rem 0;
        background-color: var(--gray-50);
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1.1rem;
    }
}

html {
    scroll-behavior: smooth;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

.pdf-context-menu {
    position: fixed;
    background: var(--gray-900);
    border: 1px solid var(--gray-700);
    border-radius: 6px;
    padding: 8px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 10003;
    min-width: 150px;
    display: none;
}

.pdf-context-menu-item {
    padding: 8px 16px;
    color: white;
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.pdf-context-menu-item:hover {
    background: var(--gray-700);
}

@media (max-width: 768px) {
    .pdf-context-menu {
        bottom: 120px;
        left: 20px;
        right: 20px;
        top: auto;
        transform: none;
        border-radius: 12px;
        padding: 10px 0;
    }

    .pdf-context-menu-item {
        padding: 12px 20px;
        font-size: 1rem;
        justify-content: flex-start;
    }
}

@keyframes slideInDown {
    from { opacity: 0; transform: translate3d(0, -100%, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translate3d(-100%, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translate3d(100%, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes slideInUp {
    from { opacity: 0; transform: translate3d(0, 100%, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-size: 0.9rem;
    z-index: 10004;
    animation: slideInRight 0.3s ease-out;
    max-width: 300px;
}

.toast.success {
    background: #28a745;
}

.toast.error {
    background: #dc3545;
}

.toast.info {
    background: #6c757d;
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}



.bb-contener_text-section {
    display: flex;
    justify-content: space-between;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.bb-contener_column-text {
    width: 65%;
    padding: 10px;
}
.bb-contener_column-banner {
    width: 30%;
    padding: 10px;
}

.bb-contener_banner {
    position: sticky;
    top: 90px;
    width: 100%;
    max-width: 300px;
}
.bb-contener_banner img {
    width: 100%;
    height: auto;
    display: block;
}

/*LOGIN - WCAG*/
.btn-login-outline-wcag{
    background: #ffffff !important;
    color: #111827 !important;
    border: 3px solid #111827 !important;
    border-radius: .5rem !important;
    font-weight: 700 !important;
    text-shadow: none !important;
    transition: border-color .15s ease, box-shadow .15s ease, color .15s ease, background .15s ease !important;
}

.btn-login-outline-wcag:hover{
    background: #f9fafb !important;
    border-color: #000000 !important;
}

.btn-login-outline-wcag:focus-visible{
    outline: 4px solid #000000 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 0 8px #1d4ed8 !important;
}

@media (prefers-color-scheme: dark){
    .btn-login-outline-wcag{
        background: #111827 !important;
        color: #ffffff !important;
        border-color: #ffffff !important;
    }
    .btn-login-outline-wcag:hover{
        background: #0b1220 !important;
    }
    .btn-login-outline-wcag:focus-visible{
        outline: 4px solid #ffffff !important;
        box-shadow: 0 0 0 2px #000000 !important;
    }
}