/*
Theme Name: Namaste LayerDom
Theme URI: https://layerdom.com
Author: LayerDom
Author URI: https://layerdom.com
Description: A minimal, unopinionated companion theme for the LayerDom Visual Editor plugin. Loads Tailwind CSS in the head, calls every WordPress hook LayerDom relies on (wp_body_open, wp_footer, the_content), and gets out of the way of your block-built pages. Includes a Canvas page template for full-screen edge-to-edge LayerDom content.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: namaste-layerdom
Tags: minimal, blog, custom-menu, threaded-comments, translation-ready, full-width-template
*/

/* ═══════════════════════════════════════════════════════════════
   Namaste LayerDom — minimal reset
   No opinionated typography, colors, or layout — LayerDom blocks
   carry their own complete CSS. These rules cover only the WP
   essentials and a basic style for plain (non-LayerDom) posts.
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.55;
    color: #111827;
    background: #ffffff;
}
img, svg, video, canvas, picture { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
a:hover { opacity: 0.85; }
button { font: inherit; cursor: pointer; }
hr { border: 0; border-top: 1px solid #e5e7eb; margin: 24px 0; }

/* Screen-reader-only utility (used by a11y labels) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

/* WordPress required alignment helpers (needed by the core editor's block markup) */
.alignleft  { float: left; margin-right: 1.5em; margin-bottom: 1em; }
.alignright { float: right; margin-left: 1.5em; margin-bottom: 1em; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide   { max-width: 1200px; margin-left: auto; margin-right: auto; }
.alignfull   { width: 100%; }

/* ═══════════════════════════════════════════════════════════════
   Fallback layout — only used by stock WP posts / archives.
   LayerDom-built pages skip these (the_content renders edge-to-edge).
   ═══════════════════════════════════════════════════════════════ */

.ld-main { display: block; }

.ld-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 20px;
}

.ld-page-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    line-height: 1.15;
    margin: 0 0 28px;
}

.ld-archive-list { display: grid; gap: 24px; }

.ld-post-card {
    padding: 24px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #ffffff;
    transition: border-color 0.15s ease;
}

.ld-post-card:hover { border-color: var(--namaste-primary, #BE1E2D); }

.ld-post-card .ld-post-title {
    font-size: 1.5rem;
    line-height: 1.25;
    margin: 0 0 8px;
}

.ld-post-card .ld-post-title a { text-decoration: none; }

.ld-post-meta {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0 0 12px;
}

.ld-post-content :first-child { margin-top: 0; }
.ld-post-content :last-child  { margin-bottom: 0; }

.ld-single .ld-post-content { max-width: 720px; margin: 0 auto; }

.ld-pagination { margin-top: 32px; text-align: center; }
.ld-pagination .page-numbers {
    display: inline-block;
    padding: 6px 12px;
    margin: 0 2px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
}
.ld-pagination .current { background: var(--namaste-primary, #BE1E2D); color: #fff; border-color: var(--namaste-primary, #BE1E2D); }

.ld-empty { text-align: center; padding: 64px 16px; color: #6b7280; }
.ld-empty h2 { font-size: 1.5rem; margin: 0 0 8px; color: #111827; }

/* Search form (used in 404 / search results) */
.ld-search-form { display: flex; gap: 8px; max-width: 480px; margin: 24px auto; }
.ld-search-form input[type="search"] {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
}
.ld-search-form button {
    padding: 10px 20px;
    background: var(--namaste-primary, #BE1E2D);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-weight: 600;
}

/* Comments — kept minimal */
.ld-comments { max-width: 720px; margin: 48px auto; padding: 0 20px; }
.ld-comments h2 { font-size: 1.25rem; margin: 0 0 16px; }
.ld-comments .commentlist { list-style: none; padding: 0; }
.ld-comments .comment { border-top: 1px solid #e5e7eb; padding: 16px 0; }

/* Canvas template body — completely blank canvas */
.namaste-canvas { background: #ffffff; }
.namaste-canvas .wp-site-blocks { padding: 0; }
