/**
 * Divine Soul - Main CSS
 * Consolidated styles from blade templates
 */

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

/* Back to top button animation */
a[href="#top"] {
    transition: all 0.3s ease;
}

a[href="#top"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

/* Navigation link styles */
.nav-link {
    padding: 0.5rem 1rem;
    color: #374151;
    font-weight: 600;
    transition: color 0.2s ease-in-out;
    position: relative;
}

.nav-link:hover {
    color: #ea580c;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(45deg, #ea580c, #dc2626);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after {
    width: 80%;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 1rem;
    color: #374151;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.mobile-nav-link:hover {
    background-color: #fff7ed;
    color: #ea580c;
}

/* Active navigation states */
.nav-link-active {
    color: #ea580c !important;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.1), rgba(251, 146, 60, 0.1));
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.2);
}

.nav-link-active::after {
    width: 90% !important;
    height: 3px;
    background: linear-gradient(45deg, #ea580c, #fb923c, #f97316);
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}

.mobile-nav-link-active {
    background: linear-gradient(135deg, #fff7ed, #fed7aa);
    color: #ea580c !important;
    font-weight: 700;
    border-left: 4px solid #ea580c;
    box-shadow: 0 2px 8px rgba(234, 88, 12, 0.15);
}

/* Animation classes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.animate-slide-up {
    animation: slideUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-400 {
    animation-delay: 400ms;
}

.delay-500 {
    animation-delay: 500ms;
}

.delay-600 {
    animation-delay: 600ms;
}

.delay-700 {
    animation-delay: 700ms;
}

.delay-1000 {
    animation-delay: 1000ms;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

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

/* Social Share Responsive Styles - Simple and Safe */
@media (max-width: 500px) {
    /* At 500px and smaller, adjust the share panel */
    #sharePanel {
        width: 240px !important;
    }
    
    /* Make grid 2 columns on very small screens */
    #socialGrid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem !important;
    }
    
    /* Hide text labels on small screens for more space */
    #sharePanel .text-xs {
        display: none !important;
    }
    
    /* Slightly smaller icons */
    #sharePanel .w-10 {
        width: 2.25rem !important;
        height: 2.25rem !important;
    }
    
    /* Hide the URL input section on mobile for cleaner UI */
    #sharePanel .mb-4 {
        display: none !important;
    }
    
    /* Show the mobile copy button */
    .mobile-copy-section {
        display: block !important;
    }
    
    /* Mobile copy button animations */
    .mobile-copy-section button:active {
        transform: scale(0.95);
    }
}

@media (max-width: 400px) {
    /* Even smaller screens */
    #sharePanel {
        width: 220px !important;
    }
    
    #sharePanel .w-10 {
        width: 2rem !important;
        height: 2rem !important;
    }
    
    #sharePanel .p-3 {
        padding: 0.5rem !important;
    }
}

/* Om Loader Styles */
#om-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #fff7ed 0%, #fff 50%, #fefce8 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

body.nt-loaded #om-loader {
    display: none;
}

#om-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.om-symbol {
    font-size: 120px;
    color: #ea580c;
    animation: omPulse 2s ease-in-out infinite;
    text-shadow: 0 0 20px rgba(234, 88, 12, 0.3),
                 0 0 40px rgba(234, 88, 12, 0.2);
}

@keyframes omPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

/* Global Search Bar Animations and Styles */
@keyframes slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-scale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-slide-up {
    animation: slide-up 0.6s ease-out forwards;
}

.animate-slide-up.delay-200 {
    animation-delay: 0.2s;
    opacity: 0;
}

/* Search Input Focus Effects */
#globalSearch:focus + .absolute svg {
    transform: scale(1.1);
    transition: transform 0.2s ease-in-out;
}

#globalSearch:focus {
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.2), 0 10px 10px -5px rgba(249, 115, 22, 0.1);
}

/* Popular Search Tags Hover Effect */
.popular-tag {
    transform: translateY(0);
    transition: all 0.2s ease-in-out;
}

.popular-tag:hover {
    transform: translateY(-2px);
}

/* Search Section Background Pulse Animation */
@keyframes background-pulse {
    0%, 100% {
        opacity: 0.3;
    }
    50% {
        opacity: 0.6;
    }
}

.bg-pulse {
    animation: background-pulse 3s ease-in-out infinite;
}

/* Responsive Search Bar */
@media (max-width: 640px) {
    #globalSearch {
        padding: 1rem 1rem 1rem 3rem;
        font-size: 1rem;
    }
    
    .search-button-mobile {
        right: 0.25rem;
        padding: 0.625rem 1rem;
    }
    
    .search-section-mobile {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    .search-title-mobile {
        font-size: 1.75rem;
        line-height: 2.25rem;
    }
}

@media (max-width: 445px) {
    #globalSearch {
        padding: 0.875rem 0.875rem 0.875rem 2.75rem;
        font-size: 0.95rem;
    }
    
    .search-section-mobile {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }
    
    .search-title-mobile {
        font-size: 1.5rem;
        line-height: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .search-subtitle-mobile {
        font-size: 0.875rem;
        margin-bottom: 1.5rem;
    }
    
    .popular-tags-mobile {
        margin-top: 1rem;
    }
    
    .popular-tags-mobile .px-4 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 0.875rem;
    }
}

.om-text {
    position: absolute;
    bottom: 30%;
    font-size: 18px;
    color: #9a3412;
    font-weight: 600;
    letter-spacing: 2px;
    animation: omFadeIn 1s ease-in-out infinite alternate;
}

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

/* ============================================
   PROGRESS BAR & THEME TOGGLE STYLES
   ============================================ */

/* Progress Bar */
#progress-bar {
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(251, 146, 60, 0.3);
}

/* Theme Toggle Button */
#theme-toggle {
    backdrop-filter: blur(10px);
    border: 2px solid rgba(251, 146, 60, 0.4);
    animation: pulseGlow 4s ease-in-out infinite;
    background: rgba(255, 255, 255, 0.9);
}

.dark #theme-toggle {
    background: rgba(31, 41, 55, 0.9);
    border-color: rgba(251, 146, 60, 0.6);
}

#theme-toggle:hover {
    transform: scale(1.1);
    border-color: rgba(251, 146, 60, 0.8);
}

.dark #theme-toggle:hover {
    border-color: rgba(251, 146, 60, 1);
}

@keyframes pulseGlow {
    0%, 100% { 
        box-shadow: 0 0 15px rgba(251, 146, 60, 0.3);
    }
    50% { 
        box-shadow: 0 0 25px rgba(251, 146, 60, 0.6);
    }
}

/* Scrollbar styling */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Custom scrollbar for dark mode */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.dark ::-webkit-scrollbar-track {
    background: #374151;
}

::-webkit-scrollbar-thumb {
    background: #fb923c;
    border-radius: 4px;
}

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

/* ============================================
   DARK MODE STYLES
   ============================================ */

/* Dark mode for navigation */
.dark .nav-link {
    color: #d1d5db;
}

.dark .nav-link:hover {
    color: #fb923c;
}

.dark .mobile-nav-link {
    color: #d1d5db;
}

.dark .mobile-nav-link:hover {
    background-color: rgba(251, 146, 60, 0.1);
    color: #fb923c;
}

/* Dark mode for active navigation */
.dark .nav-link-active {
    color: #fb923c !important;
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.2), rgba(249, 115, 22, 0.1));
    box-shadow: 0 2px 12px rgba(251, 146, 60, 0.3);
}

.dark .nav-link-active::after {
    background: linear-gradient(45deg, #fb923c, #fdba74, #fbbf24);
    box-shadow: 0 2px 6px rgba(251, 146, 60, 0.4);
}

.dark .mobile-nav-link-active {
    background: linear-gradient(135deg, rgba(251, 146, 60, 0.25), rgba(249, 115, 22, 0.15));
    color: #fb923c !important;
    border-left-color: #fb923c;
    box-shadow: 0 2px 12px rgba(251, 146, 60, 0.2);
}

/* Dark mode for general elements */
.dark .bg-white {
    background-color: #1f2937 !important;
}

.dark .bg-gray-50 {
    background-color: #111827 !important;
}

.dark .bg-gray-100 {
    background-color: #374151 !important;
}

.dark .text-gray-900 {
    color: #f3f4f6 !important;
}

.dark .text-gray-800 {
    color: #e5e7eb !important;
}

.dark .text-gray-700 {
    color: #d1d5db !important;
}

.dark .text-gray-600 {
    color: #9ca3af !important;
}

.dark .text-gray-500 {
    color: #6b7280 !important;
}

/* Dark mode for cards and containers */
.dark .shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
}

.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);
}

.dark .border-gray-200 {
    border-color: #374151 !important;
}

.dark .border-gray-300 {
    border-color: #4b5563 !important;
}

/* Dark mode for buttons and links */
.dark .hover\:bg-orange-50:hover {
    background-color: rgba(251, 146, 60, 0.1) !important;
}

/* Dark mode for prose content */
.dark .prose {
    color: #e5e7eb !important;
}

.dark .prose h1,
.dark .prose h2,
.dark .prose h3,
.dark .prose h4,
.dark .prose h5,
.dark .prose h6 {
    color: #fb923c !important;
}

.dark .prose p {
    color: #d1d5db !important;
}

.dark .prose strong {
    color: #f3f4f6 !important;
}

.dark .prose a {
    color: #fb923c !important;
}

.dark .prose a:hover {
    color: #fdba74 !important;
}

.dark .prose blockquote {
    color: #9ca3af !important;
    border-left-color: #fb923c !important;
}

.dark .prose code {
    color: #fb923c !important;
    background-color: rgba(55, 65, 81, 0.5) !important;
}

.dark .prose pre {
    background-color: #1f2937 !important;
    color: #e5e7eb !important;
}

.dark .hover\:bg-gray-50:hover {
    background-color: #374151 !important;
}

/* Dark mode for forms */
.dark input[type="text"],
.dark input[type="email"],
.dark textarea,
.dark select {
    background-color: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

.dark input[type="text"]:focus,
.dark input[type="email"]:focus,
.dark textarea:focus,
.dark select:focus {
    border-color: #fb923c;
    box-shadow: 0 0 0 1px #fb923c;
}

/* Dark mode for category cards */
.dark .group:hover .bg-white\/90 {
    background-color: rgba(31, 41, 55, 0.9) !important;
}

/* Dark mode for gradients and backgrounds */
.dark .from-orange-50 {
    --tw-gradient-from: #1f2937 !important;
}

.dark .to-yellow-50 {
    --tw-gradient-to: #111827 !important;
}

.dark .via-white {
    --tw-gradient-via: #374151 !important;
}

.dark .bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-from), var(--tw-gradient-via), var(--tw-gradient-to)) !important;
}

/* Enhanced dark theme for hero sections */
.dark .from-amber-50 {
    --tw-gradient-from: #1f2937 !important;
}

.dark .via-orange-50 {
    --tw-gradient-via: #374151 !important;
}

.dark .to-red-50 {
    --tw-gradient-to: #111827 !important;
}

/* Dark mode for post cards */
.dark .post-card {
    background-color: #1f2937;
    border-color: #374151;
}

.dark .post-card:hover {
    background-color: #374151;
}

/* Smooth transitions for theme switching */
* {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

/* Mobile responsiveness for progress bar and theme toggle */
@media (max-width: 640px) {
    #theme-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.75rem;
    }
    
    #theme-toggle svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    #progress-bar {
        height: 2px;
    }
}

/* Enhanced dark mode support for specific components */
.dark .bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, #1f2937, #111827);
}

.dark .from-orange-50.to-red-50 {
    background-image: linear-gradient(to bottom right, #374151, #1f2937);
}

.dark .shadow-orange-500\/25 {
    box-shadow: 0 25px 50px -12px rgba(251, 146, 60, 0.15);
}

/* Dark mode for search input placeholder */
.dark input::placeholder {
    color: #9ca3af;
}

/* Dark mode for ads container (if needed) */
.dark .adsbygoogle {
    filter: invert(1) hue-rotate(180deg);
}

/* Ensure icons remain visible in dark mode */
.dark svg {
    color: inherit;
}