/* Custom CSS for Travel Blog */

/* Thai Font Enhancement */
body {
    font-family: 'Noto Sans Thai', sans-serif;
    line-height: 1.7;
}

/* Smooth transitions */
* {
    transition: all 0.2s ease;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Custom card hover effects */
.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

/* Image lazy loading effect */
.image-loading {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

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

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, #0ea5e9, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Custom badge */
.badge {
    @apply inline-flex items-center px-2.5 py-0.5 rounded-full text-xs font-medium;
}

/* Blog post content styling */
.blog-content {
    line-height: 1.8;
}

.blog-content h1,
.blog-content h2,
.blog-content h3,
.blog-content h4,
.blog-content h5,
.blog-content h6 {
    @apply font-semibold text-white mt-8 mb-4;
    line-height: 1.3;
}

.blog-content h1 {
    @apply text-3xl;
}

.blog-content h2 {
    @apply text-2xl border-b border-dark-600 pb-2;
}

.blog-content h3 {
    @apply text-xl;
}

.blog-content p {
    @apply mb-4 text-gray-300;
}

.blog-content ul,
.blog-content ol {
    @apply mb-4 pl-6 text-gray-300;
}

.blog-content ul li {
    @apply list-disc;
}

.blog-content ol li {
    @apply list-decimal;
}

.blog-content a {
    @apply text-primary-400 hover:text-primary-300 underline;
}

.blog-content blockquote {
    @apply border-l-4 border-primary-500 pl-4 italic text-gray-400 my-4;
}

.blog-content img {
    @apply rounded-lg shadow-lg my-6 w-full;
}

.blog-content code {
    @apply bg-dark-700 px-2 py-1 rounded text-primary-400 text-sm;
}

.blog-content pre {
    @apply bg-dark-700 p-4 rounded-lg overflow-x-auto my-4;
}

.blog-content pre code {
    @apply bg-transparent p-0;
}

/* Custom animation classes */
.fade-in {
    animation: fadeIn 0.6s ease-out;
}

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

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

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

/* Form styling */
.form-input {
    @apply bg-dark-700 border border-dark-600 text-white px-4 py-3 rounded-lg focus:border-primary-500 focus:ring-1 focus:ring-primary-500 focus:outline-none transition-all duration-200;
}

.form-textarea {
    @apply bg-dark-700 border border-dark-600 text-white px-4 py-3 rounded-lg focus:border-primary-500 focus:ring-1 focus:ring-primary-500 focus:outline-none transition-all duration-200 resize-none;
}

.btn-primary {
    @apply bg-primary-600 hover:bg-primary-700 text-white font-medium px-6 py-3 rounded-lg transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-primary-500 focus:ring-offset-2 focus:ring-offset-dark-900;
}

.btn-secondary {
    @apply bg-dark-600 hover:bg-dark-500 text-white font-medium px-6 py-3 rounded-lg transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-dark-400 focus:ring-offset-2 focus:ring-offset-dark-900;
}

/* Loading spinner */
.spinner {
    border: 2px solid #334155;
    border-top: 2px solid #0ea5e9;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive breakpoint adjustments */
@media (max-width: 640px) {
    .blog-content h1 {
        @apply text-2xl;
    }
    
    .blog-content h2 {
        @apply text-xl;
    }
    
    .blog-content h3 {
        @apply text-lg;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-dark-900 {
        background-color: #000000;
    }
    
    .bg-dark-800 {
        background-color: #1a1a1a;
    }
    
    .text-gray-300 {
        color: #ffffff;
    }
}