/* Additional custom styles for Vedic Wisdom School theme */

/* Enhanced scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #f97316, #ea580c);
    border-radius: 5px;
    box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.2);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #ea580c, #dc2626);
}

/* Enhanced focus styles for better accessibility */
*:focus-visible {
    outline: 3px solid #f97316;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Skip link for accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.sr-only:focus,
.focus\:not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 0.5rem 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
}

/* Enhanced card hover effects */
.card-hover {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-hover:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(249, 115, 22, 0.15);
}

/* Enhanced button animations */
.btn-primary,
.btn-secondary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    left: 100%;
}

/* Loading spinner animation */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading {
    animation: spin 1s linear infinite;
}

/* Pulse animation for important elements */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Enhanced fade-in animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.8s ease-out;
}

/* Slide in from left animation */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

/* Slide in from right animation */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

/* Enhanced gradient backgrounds */
.gradient-bg-orange {
    background: linear-gradient(135deg, #fed7aa, #fdba74, #fb923c, #f97316, #ea580c);
    background-size: 300% 300%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced form styles */
.form-input {
    transition: all 0.3s ease;
    background: white;
    border: 2px solid #e5e7eb;
}

.form-input:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
    transform: translateY(-2px);
}

.form-input:hover {
    border-color: #d1d5db;
}

/* Enhanced image overlay effects */
.image-overlay {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
}

.image-overlay img {
    transition: transform 0.5s ease;
}

.image-overlay:hover img {
    transform: scale(1.05);
}

.image-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(249, 115, 22, 0.8), rgba(234, 88, 12, 0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-overlay:hover::after {
    opacity: 1;
}

/* Enhanced navigation styles */
.main-navigation .sub-menu {
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.main-navigation li:hover .sub-menu {
    transform: translateY(0);
}

/* Enhanced mobile menu animation */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

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

/* Notification styles */
.notification {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Enhanced responsive utilities */
@media (max-width: 640px) {
    .mobile-spacing {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .mobile-text-center {
        text-align: center;
    }
    
    .mobile-hidden {
        display: none;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: white;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 0;
    }
    
    h1, h2, h3, h4, h5, h6 {
        color: #000;
        page-break-after: avoid;
    }
    
    img {
        max-width: 100% !important;
        height: auto !important;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid #000;
        background: white;
        color: #000;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1f2937;
        color: #f9fafb;
    }
    
    .auto-dark-card {
        background-color: #374151;
        border-color: #4b5563;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        color: #fff;
        border: 2px solid #fff;
    }
    
    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
    
    .text-orange-600 {
        color: #000;
    }
    
    .bg-orange-600 {
        background-color: #000;
    }
}

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

/* Enhanced WordPress specific styles */
.wp-block-image {
    margin: 0;
}

.wp-block-image img {
    border-radius: 0.75rem;
}

.wp-block-quote {
    border-left: 4px solid #f97316;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #6b7280;
}

.wp-block-pullquote {
    border-top: 4px solid #f97316;
    border-bottom: 4px solid #f97316;
    padding: 2rem 0;
    text-align: center;
    font-size: 1.25rem;
    font-weight: 600;
}

/* Enhanced gallery styles */
.wp-block-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.wp-block-gallery .wp-block-image {
    margin: 0;
}

/* Custom WordPress editor styles */
.editor-styles-wrapper {
    font-family: 'Inter', sans-serif;
}

.editor-styles-wrapper h1,
.editor-styles-wrapper h2,
.editor-styles-wrapper h3,
.editor-styles-wrapper h4,
.editor-styles-wrapper h5,
.editor-styles-wrapper h6 {
    font-family: 'Crimson Text', serif;
}

/* Enhanced accessibility features */
.visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

/* Focus management for modals and overlays */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
}

/* Enhanced table styles */
.wp-block-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.wp-block-table th,
.wp-block-table td {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: left;
}

.wp-block-table th {
    background-color: #f97316;
    color: white;
    font-weight: 600;
}

.wp-block-table tr:nth-child(even) {
    background-color: #fef3e2;
}

/* Enhanced code block styles */
.wp-block-code code {
    background-color: #1f2937;
    color: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    display: block;
    overflow-x: auto;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

/* Enhanced list styles */
.wp-block-list {
    padding-left: 1.5rem;
}

.wp-block-list li {
    margin-bottom: 0.5rem;
}

.wp-block-list li::marker {
    color: #f97316;
}

/* Custom utility classes */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(45deg, #f97316, #ea580c) 1;
}

/* Enhanced responsive image styles */
.responsive-image {
    width: 100%;
    height: auto;
    max-width: 100%;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Enhanced link styles */
a {
    color: #f97316;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #ea580c;
}

a:focus {
    outline: 2px solid #f97316;
    outline-offset: 2px;
}

/* Custom WordPress widget styles */
.widget {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.widget-title {
    color: #1f2937;
    font-family: 'Crimson Text', serif;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f97316;
}

/* Enhanced comment styles */
.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: #f9fafb;
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #f97316;
}

.comment-author {
    font-weight: 600;
    color: #1f2937;
}

.comment-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0.5rem 0;
}

.comment-content {
    color: #374151;
    line-height: 1.6;
}

.reply-link {
    color: #f97316;
    font-size: 0.875rem;
    font-weight: 500;
}

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