/* Additional Modern Enhancements */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Modern selection styling */
::selection {
    background: rgba(102, 126, 234, 0.2);
    color: #2c3e50;
}

/* Modern focus states */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Enhanced button hover effects */
.modern-btn,
.btn {
    position: relative;
    overflow: hidden;
}

.modern-btn:before,
.btn:before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.modern-btn:hover:before,
.btn:hover:before {
    width: 300px;
    height: 300px;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Enhanced typography for readability */
.page__content p {
    text-align: justify;
    hyphens: auto;
}

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2, #667eea);
}

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

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Apply animations on page load */
.modern-card,
.archive__item,
.page__content > * {
    animation: fadeInUp 0.6s ease-out;
}

.sidebar {
    animation: slideInLeft 0.6s ease-out;
}

/* Stagger animation delays */
.modern-card:nth-child(1) { animation-delay: 0.1s; }
.modern-card:nth-child(2) { animation-delay: 0.2s; }
.modern-card:nth-child(3) { animation-delay: 0.3s; }
.modern-card:nth-child(4) { animation-delay: 0.4s; }

/* Modern notice styling */
.notice {
    background: var(--modern-card-bg);
    border-left: 4px solid #667eea;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.notice--info {
    border-left-color: #2f7f93;
}

.notice--warning {
    border-left-color: #f89406;
}

.notice--success {
    border-left-color: #62c462;
}

.notice--danger {
    border-left-color: #ee5f5b;
}

/* Print optimizations */
@media print {
    .modern-btn,
    .btn,
    .sidebar,
    .masthead,
    .page__share,
    .social-icons {
        display: none !important;
    }
    
    .page__content {
        width: 100% !important;
        box-shadow: none !important;
        border-radius: 0 !important;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .modern-card {
        border: 2px solid currentColor;
    }
    
    .modern-btn {
        border: 2px solid currentColor;
    }
}
