/* 
 * Liaras Aura Theme - Custom Styles
 * Works with Tailwind CDN
 */

/* Custom base styles */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Selection colors */
::selection {
    background-color: rgb(204 251 241);
    color: rgb(19 78 74);
}

/* Focus styles */
:focus-visible {
    outline: 2px solid rgb(6 182 212);
    outline-offset: 2px;
}

/* Services filter - hide scrollbar */
#services-filter .filter-scroll-container {
    -ms-overflow-style: none !important;
    scrollbar-width: none !important;
}
#services-filter .filter-scroll-container::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}

/* Services filter - sticky positioning */
#services-filter {
    position: -webkit-sticky !important;
    position: sticky !important;
}

/* Organic blob shapes */
.organic-shape {
    border-radius: 61% 39% 53% 47% / 46% 44% 56% 54%;
}

/* Text gradient */
.text-gradient {
    background: linear-gradient(to right, #0891b2, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Line clamp utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Animation utilities */
.animate-fade-up {
    animation: fadeUp 0.6s ease-out forwards;
}

.animate-fade-in {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Ticker animation */
.ticker-track {
    animation: ticker 40s linear infinite;
    width: max-content;
}

.ticker-track:hover {
    animation-play-state: paused;
}

/* Keyframes */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes ticker {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes sweep {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Details/Summary accordion */
details > summary {
    list-style: none;
}

details > summary::-webkit-details-marker {
    display: none;
}

details[open] summary ~ * {
    animation: sweep 0.3s ease-in-out;
}

/* Prose overrides for WordPress content */
.prose img {
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
}

.prose blockquote {
    border-left-color: #06b6d4;
    background-color: #f8fafc;
    padding: 1rem 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    font-style: normal;
}

.prose a {
    color: #0891b2;
    text-decoration: none;
}

.prose a:hover {
    text-decoration: underline;
}

.prose code {
    color: #0e7490;
    background-color: #ecfeff;
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.prose code::before,
.prose code::after {
    content: none;
}

/* WordPress Block Editor alignment */
.alignwide {
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
    max-width: none;
}

/* WordPress pagination */
.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.page-numbers li a,
.page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.page-numbers li a {
    color: #475569;
    background: white;
    border: 1px solid #e2e8f0;
}

.page-numbers li a:hover {
    color: #0891b2;
    border-color: #0891b2;
    background: #ecfeff;
}

.page-numbers li span.current {
    color: white;
    background: linear-gradient(to right, #06b6d4, #10b981);
    border: none;
}

/* Comments styling */
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.comment-list > li {
    margin-bottom: 1.5rem;
}

.comment {
    padding: 1rem;
    border-radius: 0.75rem;
    border: 1px solid #f1f5f9;
    background: white;
}

.comment-author {
    font-weight: 600;
    color: #0f172a;
}

.comment-meta {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.comment-content {
    font-size: 0.875rem;
    color: #475569;
    margin-top: 0.75rem;
}

/* Glass effect helper */
.glass {
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Page Transition States */
body.is-transitioning #page-transition {
    opacity: 1;
    pointer-events: auto;
}

body.is-transitioning #transition-content {
    transform: scale(1);
}

@keyframes spin-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.animate-spin-reverse {
    animation: spin-reverse 3s linear infinite;
}

/* Smooth content fade */
main {
    transition: opacity 0.4s ease-out;
}

body.is-transitioning main {
    opacity: 0;
}

/* ── Responsive Tables ────────────────────────────────── */
/* Scrollable wrapper injected by liaras_responsive_tables() */
.liaras-table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05);
}

/* Dark mode border */
.dark .liaras-table-responsive {
    border-color: #334155;
}

/* Scroll hint gradient on right edge (mobile) */
.liaras-table-responsive::after {
    content: '';
    position: sticky;
    right: 0;
    display: block;
    width: 2rem;
    margin-top: -100%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(to left, rgba(255,255,255,0.9), transparent);
    opacity: 0;
    transition: opacity 0.2s;
}

.dark .liaras-table-responsive::after {
    background: linear-gradient(to left, rgba(15,23,42,0.9), transparent);
}

/* Show hint only when scrollable */
@media (max-width: 768px) {
    .liaras-table-responsive::after {
        opacity: 1;
    }
}

/* Tables inside the wrapper */
.liaras-table-responsive table {
    min-width: 600px;
    width: 100%;
    border-collapse: collapse;
    white-space: normal;
    word-break: normal;
}

/* Prose context: remove double border/shadow */
.prose .liaras-table-responsive table {
    margin: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

/* Cell padding & borders */
.liaras-table-responsive th,
.liaras-table-responsive td {
    padding: 0.75rem 1rem;
    vertical-align: top;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.dark .liaras-table-responsive th,
.dark .liaras-table-responsive td {
    border-bottom-color: #334155;
}

.liaras-table-responsive th {
    font-weight: 600;
    white-space: nowrap;
}

/* Prevent any child of prose from overflowing viewport */
.prose,
.entry-content {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Safety: ensure max-width and overflow hidden on content containers */
article,
.entry-content,
.post-content,
.prose {
    max-width: 100%;
    overflow-x: hidden;
}

/* But allow the table wrapper itself to scroll */
.prose .liaras-table-responsive,
article .liaras-table-responsive,
.entry-content .liaras-table-responsive {
    overflow-x: auto;
}

/* Mobile: tighter cell padding */
@media (max-width: 640px) {
    .liaras-table-responsive th,
    .liaras-table-responsive td {
        padding: 0.5rem 0.625rem;
        font-size: 0.8125rem;
        line-height: 1.4;
    }
}

/* Responsive typography */
@media (max-width: 640px) {
    html {
        font-size: 15px;
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .scroll-top,
    nav {
        display: none !important;
    }

    body {
        background: white !important;
        color: black !important;
    }

    .prose {
        max-width: none !important;
    }
}
