/**
 * Lifegence Theme - Custom CSS
 * TailwindCSS supplemental styles
 *
 * @since 2.0.0
 */

/* Prevent horizontal scroll on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

/* Japanese typography optimization */
body {
    font-feature-settings: "palt" 1;
    word-break: break-all;
    overflow-wrap: break-word;
}

h1, h2, h3, h4, h5, h6 {
    word-break: keep-all;
    overflow-wrap: normal;
}

/* Scroll animations */
.animate-hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.animate-fade-up {
    /* default animation */
}

.animate-fade-in {
    transform: none !important;
}

.animate-slide-left {
    transform: translateX(-30px) !important;
}

.animate-slide-left.animate-visible {
    transform: translateX(0) !important;
}

.animate-slide-right {
    transform: translateX(30px) !important;
}

.animate-slide-right.animate-visible {
    transform: translateX(0) !important;
}

.animate-scale {
    transform: scale(0.95) !important;
}

.animate-scale.animate-visible {
    transform: scale(1) !important;
}

/* Prose styles for blog content */
.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 2rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.prose h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.prose img {
    border-radius: 0.5rem;
    margin: 1.5rem 0;
}

.prose a {
    color: #2150A0;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.prose a:hover {
    color: #1B3D70;
}

.prose blockquote {
    border-left: 4px solid #D1E2F5;
    padding-left: 1rem;
    color: #4B5563;
    font-style: italic;
    margin: 1.5rem 0;
}

.prose code {
    background-color: #F3F4F6;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.prose pre {
    background-color: #111827;
    color: #F3F4F6;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.prose pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.prose th, .prose td {
    border: 1px solid #D1D5DB;
    padding: 0.5rem 0.75rem;
    text-align: left;
}

.prose th {
    background-color: #F3F4F6;
    font-weight: 600;
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 2px solid #2150A0;
    outline-offset: 2px;
}

/* Selection colors */
::selection {
    background-color: #D1E2F5;
    color: #0F2340;
}
