/* Custom styles for Trading Mastery Blog */

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

/* Custom focus styles */
.focus\:ring-primary:focus {
    --tw-ring-color: #1e40af;
}

/* Custom hover transitions */
.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Newsletter form styling */
.newsletter-input:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

/* Custom button hover effects */
.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.2);
}

.btn-secondary {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(5, 150, 105, 0.2);
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Navigation active state */
.nav-active {
    position: relative;
}

.nav-active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: #1e40af;
    border-radius: 2px;
}

/* Loading animation for images */
.img-loading {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Testimonial styling */
.testimonial-quote::before {
    content: '"';
    font-size: 4rem;
    color: #e5e7eb;
    position: absolute;
    top: -1rem;
    left: -1rem;
    font-family: serif;
}

.testimonial-quote {
    position: relative;
    padding-left: 2rem;
}

/* Stats counter animation */
.stats-number {
    font-variant-numeric: tabular-nums;
}

/* Form enhancements */
.form-group {
    position: relative;
}

.form-label {
    transition: all 0.2s ease;
    pointer-events: none;
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    background: white;
    padding: 0 0.25rem;
    color: #6b7280;
    transform-origin: left top;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-1.5rem) scale(0.875);
    color: #1e40af;
}

/* Table styling for article content */
.prose table {
    border-collapse: collapse;
    width: 100%;
    margin: 1.5rem 0;
}

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

.prose table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #1f2937;
}

.prose table tr:nth-child(even) {
    background-color: #f9fafb;
}

/* Code block styling */
.prose pre {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
}

.prose pre::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #1e40af, #059669, #dc2626);
}

/* Responsive navigation */
@media (max-width: 768px) {
    .mobile-menu {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .mobile-menu.open {
        transform: translateX(0);
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .prose {
        color: black !important;
    }
    
    .prose a {
        color: black !important;
        text-decoration: underline !important;
    }
}

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

/* Focus visible for keyboard navigation */
.focus-visible:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #1e40af;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Selection styling */
::selection {
    background-color: #1e40af;
    color: white;
}

/* Custom utilities */
.text-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border-image: linear-gradient(135deg, #1e40af 0%, #059669 100%) 1;
}

/* Course page specific styles */
.course-feature-icon {
    background: linear-gradient(135deg, var(--icon-color, #1e40af) 0%, #3b82f6 100%);
}

/* Article content enhancements */
.prose ul.checklist {
    list-style: none;
    padding-left: 0;
}

.prose ul.checklist li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.5rem;
}

.prose ul.checklist li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: bold;
}

/* FAQ accordion styling */
.faq-item {
    border-bottom: 1px solid #e5e7eb;
}

.faq-question {
    cursor: pointer;
    transition: color 0.2s ease;
}

.faq-question:hover {
    color: #1e40af;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-answer.open {
    max-height: 200px;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

/* Dark mode preparations */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles if needed */
}