/* Custom Styles for LawBlogPro */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #1e293b;
}

::-webkit-scrollbar-thumb {
    background: #f59e0b;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #d97706;
}

/* Enhanced focus styles for accessibility */
*:focus {
    outline: 2px solid #f59e0b;
    outline-offset: 2px;
}

/* Animation for article cards */
article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

article:hover {
    transform: translateY(-5px);
}

/* Mobile menu animation */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
    max-height: 0;
    overflow: hidden;
}

#mobile-menu.show {
    max-height: 500px;
}

/* Form input focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Newsletter form styling */
form input[type="email"] {
    transition: all 0.3s ease;
}

form input[type="email"]:focus {
    transform: scale(1.02);
}

/* Button hover effects */
button,
a[class*="bg-amber"] {
    position: relative;
    overflow: hidden;
}

button::before,
a[class*="bg-amber"]::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

button:hover::before,
a[class*="bg-amber"]:hover::before {
    width: 300px;
    height: 300px;
}

/* Responsive typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
}

/* Print styles */
@media print {
    nav,
    footer,
    .no-print,
    #reading-progress,
    .sticky,
    button,
    #comment-form,
    .bg-gray-50 {
        display: none;
    }
    
    body {
        background: white;
    }
    
    article {
        max-width: 100%;
        padding: 0;
    }
    
    .prose {
        max-width: 100%;
    }
}

/* Loading animation for forms */
.form-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Success/Error message styles */
.message {
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    animation: slideIn 0.3s ease;
}

.message.success {
    background-color: #10b981;
    color: white;
}

.message.error {
    background-color: #ef4444;
    color: white;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Gradient text animation */
@keyframes gradient {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.bg-gradient-to-r {
    background-size: 200% 200%;
    animation: gradient 15s ease infinite;
}

/* Article image placeholder styling */
article .h-48 {
    background: linear-gradient(135deg, #475569 0%, #1e293b 100%);
    position: relative;
    overflow: hidden;
}

article .h-48::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Category filter active state */
.category-filter.active {
    background-color: #f59e0b !important;
    color: white !important;
}

/* Search input styling */
#search-input, #mobile-search-input {
    transition: all 0.3s ease;
}

#search-input:focus, #mobile-search-input:focus {
    width: 300px;
}

/* Article card transitions */
.article-card {
    transition: all 0.3s ease;
}

.article-card.hidden {
    display: none !important;
}

