/*
Theme Name: Wordnesia Theme
Theme URI: https://penerjemahtersumpahjakarta.com
Author: Wordnesia Team
Author URI: https://wordnesia.id
Description: Professional translation services WordPress theme. Production-ready, Accessible, SEO-Optimized.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: wordnesia
Tags: custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, full-width-template, blog, portfolio
*/

/*
 * NOTE: This is the WordPress theme stylesheet (required for theme identification).
 * 
 * Most styles are handled by the Tailwind production CSS:
 *   dist/css/main.min.css (compiled from src/css/main.css)
 * 
 * Only put WordPress-specific overrides or critical above-fold styles here.
 * Do NOT add Tailwind utilities to this file.
 */

/* ── Critical: Skip Link ─────────────────────────────────────── */
.skip-link {
    position: absolute;
    top: -100px;
    left: 1rem;
    z-index: 9999;
    background: #2563eb;
    color: #ffffff;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    transition: top 200ms ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.skip-link:focus {
    top: 1rem;
    outline: 2px solid #ffffff;
    outline-offset: 2px;
}

/* ── Screen Reader Only (Accessibility) ─────────────────────── */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f8fafc;
    border-radius: 4px;
    clip: auto !important;
    -webkit-clip-path: none;
    clip-path: none;
    color: #1e3a8a;
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 1rem;
    line-height: normal;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    top: 1rem;
    width: auto;
    z-index: 100000;
}

/* ── WordPress Core: Alignment Classes ────────────────────────── */
.alignleft  { float: left;  margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter {
    display: block;
    margin: 1.5rem auto;
    clear: both;
}

/* ── WordPress Core: Captions ─────────────────────────────────── */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1rem;
}
.wp-caption img { display: block; }
.wp-caption-text {
    font-size: 0.8125rem;
    color: #64748b;
    margin-top: 0.5rem;
    text-align: center;
}

/* ── WordPress Core: Sticky Posts ─────────────────────────────── */
.sticky {
    display: block;
}

/* ── WordPress Core: Comments ─────────────────────────────────── */
.bypostauthor { display: block; }

/* ── Scrolled Header State (via JS) ──────────────────────────── */
.site-header.scrolled {
    box-shadow: 0 4px 24px -4px rgba(0, 0, 0, 0.08);
    border-bottom-color: rgba(226, 232, 240, 0.8);
}

/* ── WordPress Blocks: Wide/Full Alignment ───────────────────── */
.alignwide {
    width: calc(100% + 4rem);
    margin-left: -2rem;
    margin-right: -2rem;
    max-width: calc(100% + 4rem) !important;
}

@media (min-width: 1280px) {
    .alignwide {
        width: calc(100% + 8rem);
        margin-left: -4rem;
        margin-right: -4rem;
    }
}

.alignfull {
    width: 100vw;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* ── Prose / Entry Content Styles ────────────────────────────── */
/* These supplement Tailwind's @tailwindcss/typography plugin */
.entry-content > * + * {
    margin-top: 1.25em;
}

.entry-content a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.entry-content a:hover {
    color: #1d4ed8;
}

/* ── Comment Form ─────────────────────────────────────────────── */
.comment-form label {
    display: block;
    font-weight: 600;
    font-size: 0.875rem;
    color: #374151;
    margin-bottom: 0.375rem;
}

/* ── Navigation: Active States ──────────────────────────── */
.current-menu-item > a span,
.current_page_item > a span,
.current-menu-ancestor > a span {
    color: #2563eb !important;
    position: relative;
}

/* Underline effect for Desktop Active Menu */
@media (min-width: 1024px) {
    .main-nav-menu .current-menu-item > a span::after,
    .main-nav-menu .current_page_item > a span::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0.5rem;
        right: 0.5rem;
        height: 2px;
        background-color: #2563eb;
        border-radius: 99px;
    }
}

/* Mobile Active Menu Highlight */
.mobile-nav-list .current-menu-item > a span {
    color: #2563eb !important;
}

.mobile-nav-list li a {
    display: block;
    transition: all 0.3s ease;
}

/* Footer Dynamic Menu Styling */
.space-y-4 .current-menu-item span {
    color: #60a5fa !important;
}

/* Prevent horizontal scroll issues */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* ── Logo Typography ────────────────────────────────────────── */
.logo-text {
    font-family: 'Inter', sans-serif;
}

/*
 * MOBILE MENU: Semua styling dikontrol via .mobile-menu-panel dan
 * .mobile-menu-backdrop classes di src/css/main.css.
 *
 * State management menggunakan data-state="closed|open" attribute (bukan class toggle).
 * JS di assets/js/main.js yang mengubah attribute ini saat open/close.
 *
 * Jangan tambahkan display atau visibility rules di sini untuk #mobile-menu.
 */

/* Fallback for aspect-ratio if JIT is not active */
.aspect-\[3\/4\] {
    aspect-ratio: 3/4;
}

/*
 * REMOVED: #mobile-menu.is-active { display: block !important }
 *
 * WHY REMOVED: This rule conflicted with Tailwind's `invisible` class
 * (visibility: hidden), which is used to remove the menu from the
 * accessibility tab order when closed. `display: block !important`
 * would override any attempt to hide the element, causing it to
 * remain interactive even when visually hidden.
 *
 * The JS now manages all open/close state via:
 *   - opacity-0 / opacity-100  → visual fade
 *   - translate-x-full / translate-x-0 → slide animation
 *   - invisible / (removed invisible) → accessibility tab order
 *   - pointer-events-none → block interaction when hidden
 */
