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

/* Global Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --neon-text-color: rgba(255, 255, 255, 0.95);
    --neon-border-color: #08f;
    --heading-font: 'Inter', sans-serif;
    --body-font: 'Inter', sans-serif;
    --text-shadow-soft: 0 0 10px rgba(255, 255, 255, 0.2);
}

body {
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), url('../img/bg.webp') no-repeat center center fixed;
    background-size: cover;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    color: var(--neon-text-color);
    font-family: var(--body-font);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    font-weight: 300;
}

/* Text Styles */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--neon-text-color);
    text-shadow: var(--text-shadow-soft);
    font-weight: 600;
    letter-spacing: 0.5px;
}

p, span, a, label, button {
    color: var(--neon-text-color);
    text-shadow: var(--text-shadow-soft);
    font-weight: 300;
}

/* Heading Styles */
h1 {
    font-size: 2.8rem;
    text-transform: uppercase;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

h2 {
    font-size: 2.2rem;
    text-shadow: 0 0 12px rgba(255, 255, 255, 0.25);
    letter-spacing: 0.8px;
}

h3 {
    font-size: 1.8rem;
    letter-spacing: 0.6px;
}

h4 {
    font-size: 1.5rem;
    letter-spacing: 0.4px;
}

/* Link Styles */
a {
    text-decoration: none;
    color: var(--neon-text-color);
    transition: all 0.3s ease;
    font-weight: 400;
}

a:hover {
    text-shadow: 0 0 15px rgba(8, 136, 255, 0.4);
    color: #fff;
}

/* Button Styles */
button {
    font-family: var(--body-font);
    font-weight: 500;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

button:hover {
    text-shadow: 0 0 15px rgba(8, 136, 255, 0.4);
    color: #fff;
}

/* Background styling */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/bg.webp') no-repeat center center;
    background-size: cover;
    z-index: -2;
}

/* Light overlay for better readability */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: -1;
}

/* Glass effect for containers */
.glass-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.1);
}

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

/* Responsive Container */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .container {
        max-width: 540px;
    }
}

@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }
}

ul {
    list-style: none;
}

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

/* Common utility classes */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

main {
    min-height: calc(100vh - 80px - 400px);
    padding: 0;
    position: relative;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    /*top: 100px; !* Below header *!*/
    bottom: 100px; /* Full height minus header and some padding */
    right: 10px;
    width: 80px;
    height: 80px;
    /*height: calc(100vh - 180px); !* Full height minus header and some padding *!*/
    background: url(../img/icon/scroll.png) no-repeat center center;
    background-size: contain;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: auto;
    cursor: pointer;
}

.scroll-to-top::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    cursor: pointer;
    pointer-events: auto;
    background: transparent;
}

.scroll-to-top.visible {
    opacity: 0.9;
    visibility: visible;
    transform: translateX(0);
}

.scroll-to-top:hover {
    opacity: 1;
}

/* Animation classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

.slide-up {
    animation: slideUp 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Responsive Design */
@media (max-width: 768px) {
    /*body::after {*/
    /*    !*background: rgba(255, 255, 255, 0.9);*!*/
    /*    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), url('../img/bg.webp') no-repeat center center fixed;*/
    /*}*/
} 

/* Neon Text Effect for Important Elements */
.neon-text {
    font-weight: 700;
    letter-spacing: 1px;
    animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        text-shadow: 
            -1px -1px 0 #000,  
             1px -1px 0 #000,
            -1px  1px 0 #000,
             1px  1px 0 #000,
            0 0 15px var(--neon-text-color),
            0 0 25px var(--neon-text-color);
    }
    20%, 24%, 55% {
        text-shadow: none;
    }
}

/* Form Elements */
input, select, textarea {
    font-family: var(--body-font);
    font-size: 1rem;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000;
    color: var(--neon-text-color);
}

/* List Items */
li {
    color: var(--neon-text-color);
    font-weight: 400;
    letter-spacing: 0.3px;
    text-shadow: 
        -1px -1px 0 #000,  
         1px -1px 0 #000,
        -1px  1px 0 #000,
         1px  1px 0 #000,
        0 0 8px rgba(255, 255, 255, 0.7);
} 

.document-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: transform 0.2s ease;
}

.document-link:hover {
    transform: translateY(-5px);
}

.document-card {
    background: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.document-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(var(--primary-rgb), 0.3);
} 

/* Mobile Responsive Styles */
@media (max-width: 576px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1.2rem;
    }

    .main-content {
        padding: 10px;
    }

    .sidebar {
        padding: 15px;
        margin-bottom: 20px;
    }

    .search-box {
        flex-direction: column;
    }

    .search-box input {
        width: 100%;
        margin-bottom: 10px;
    }

    .search-box button {
        width: 100%;
    }

    .filters {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .filter-group {
        margin-bottom: 15px;
    }

    .documents-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }

    .page-numbers {
        display: flex;
        gap: 5px;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 20px;
    }

    .footer-social {
        justify-content: center;
    }

    .decorative-image {
        display: none;
    }
}

/* Tablet Responsive Improvements */
@media (max-width: 768px) {
    .content-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .main-content {
        width: 100%;
    }

    .documents-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        padding: 40px 20px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .mobile-menu-btn {
        display: block;
    }

    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: rgba(0, 0, 0, 0.9);
        padding: 20px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
    }

    .main-nav ul li {
        margin: 10px 0;
    }
}

/* Improve Performance */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Add smooth loading for images */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Optimize touch targets for mobile */
@media (max-width: 576px) {
    button,
    a,
    input[type="button"],
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
        padding: 12px;
    }

    input,
    select {
        height: 44px;
    }
} 

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent image stretching */
.logo img {
    object-fit: contain;
    max-height: 50px;
    width: auto;
}

/* Responsive background images */
@media (max-width: 768px) {
    /*body {*/
    /*    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.9)), url('../img/bg.webp');*/
    /*    background-size: cover;*/
    /*    background-position: center;*/
    /*    background-attachment: fixed;*/
    /*}*/
    
    /*body::before {*/
    /*    background: url('../img/bg.webp');*/
    /*    background-size: cover;*/
    /*    background-position: center;*/
    /*    opacity: 0.7;*/
    /*}*/
    
    /*body::after {*/
    /*    background: rgba(0, 0, 0, 0.7);*/
    /*}*/
    
    .hero {
        background-size: cover;
        background-position: center;
        min-height: 300px;
    }
}

/* Image loading animation */
@keyframes imageLoadingAnimation {
    0% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 100% 0%;
    }
}

.image-loading {
    position: relative;
    overflow: hidden;
}

.image-loading::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 0%, #f8f8f8 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    animation: imageLoadingAnimation 1.5s infinite;
}

/* Optimize images for different screen sizes */
@media (max-width: 576px) {
    .logo img {
        max-height: 40px;
    }

    .hero-content img {
        max-height: 200px;
    }

    .document-card img {
        max-height: 150px;
    }
    
    /* Hide decorative images on mobile */
    .decorative-image {
        display: none;
    }
}

/* Retina display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Optimize image containers */
.image-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    overflow: hidden;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Blur-up image loading */
.blur-load {
    background-size: cover;
    background-position: center;
    position: relative;
}

.blur-load::before {
    content: "";
    position: absolute;
    inset: 0;
    animation: pulse 2.5s infinite;
    background: rgba(255, 255, 255, 0.2);
}

@keyframes pulse {
    0% { opacity: 0; }
    50% { opacity: 1; }
    100% { opacity: 0; }
}

/* Progressive image loading */
.progressive {
    position: relative;
    display: block;
    overflow: hidden;
}

.progressive img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    border: 0 none;
}

.progressive img.preview {
    filter: blur(2vw);
    transform: scale(1.05);
}

.progressive img.reveal {
    position: absolute;
    left: 0;
    top: 0;
    will-change: transform, opacity;
    animation: progressiveReveal 1s ease-out;
}

@keyframes progressiveReveal {
    0% { transform: scale(1.05); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}



/*header*/
/* Header Styles */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    padding: 15px 0;
}

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

/* Logo */
.logo {
    flex: 0 0 auto;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo img {
    max-height: 60px;
    width: auto;
    object-fit: contain;
}

/* Main Navigation */
.main-nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav a {
    color: #fff;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
    transition: all 0.3s ease;
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            0 0 8px rgba(255, 255, 255, 0.6);
}

.main-nav a:hover,
.main-nav a.active {
    color: #0091ff;
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            0 0 15px #0091ff;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #0091ff;
    transition: width 0.3s ease;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

/* User Actions */
.user-actions {
    display: flex;
    gap: 15px;
}

.btn-login,
.btn-register {
    padding: 10px 25px;
    border-radius: 25px;
    transition: all 0.3s ease;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.btn-login {
    color: rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-register {
    background: linear-gradient(45deg, #0091ff, #0066cc);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 145, 255, 0.3);
}

.btn-register:hover {
    background: linear-gradient(45deg, #0080ff, #0052cc);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 145, 255, 0.4);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000;
    z-index: 1001;
}

.mobile-menu-btn i {
    transition: transform 0.3s ease;
}

.mobile-menu-btn.active i {
    transform: rotate(90deg);
}

.mobile-menu-btn:hover {
    color: #0091ff;
}

/* Responsive Design */
@media (max-width: 992px) {
    .logo {
        flex: 0 0 auto;
    }

    .logo img {
        max-height: 50px;
    }

    .main-nav ul {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
        position: relative;
        z-index: 1001;
    }

    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.3);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 40px 20px 20px;
        z-index: 1000;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        /*gap: 30px;*/
    }

    .main-nav a {
        font-size: 1.2rem;
        padding: 10px 0;
    }

    .logo {
        flex: 0 0 auto;
    }

    .logo img {
        max-height: 45px;
    }
}

@media (max-width: 576px) {
    .header-top {
        padding: 0;
    }

    .logo {
        flex: 0 0 auto;
    }

    .logo img {
        max-height: 40px;
    }
}


/*footer*/
/* Footer Styles */
.main-footer {
    padding: 30px 0;
    position: relative;
    overflow: visible;
}

.decorative-image {
    position: absolute;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
    max-height: 300px;
    width: auto;
    object-fit: contain;
    opacity: 0.9;
}

.decorative-image.left {
    left: 0;
}

.decorative-image.right {
    right: 0;
}

@media (max-width: 1400px) {
    .decorative-image {
        max-height: 250px;
    }
}

@media (max-width: 992px) {
    .decorative-image {
        display: none;
    }
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-bottom: auto;
}

.footer-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-links a {
    color: #fff;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            0 0 8px rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: #0091ff;
    transform: translateY(-2px);
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            0 0 15px #0091ff;
}

.footer-social {
    display: flex;
    gap: 20px;
    align-items: center;
}

.footer-social a {
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000;
}

.footer-social a:hover {
    color: #0091ff;
    transform: translateY(-2px);
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            0 0 15px #0091ff;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 0.9rem;
    text-shadow:
            -1px -1px 0 #000,
            1px -1px 0 #000,
            -1px  1px 0 #000,
            1px  1px 0 #000,
            0 0 8px rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-footer {
        min-height: 200px;
        background-size: cover;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .main-footer {
        min-height: 150px;
    }
}