/*
 * Oria Site Sync — styles for the full-viewport iframe embed page that
 * renders Oria-hosted routes inside WordPress (e.g. /hub/book, /hub/chat).
 * Shipped as a static asset so it can be enqueued via wp_enqueue_style()
 * per WP.org plugin guidelines.
 */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #fff;
    color: #1e293b;
}

/* Hide theme cruft on the iframe page only. Scoped to body.oria-iframe-mode
 * so the SSR blog/reviews/case-studies pages (which ALSO load this
 * stylesheet in 3.5.4+) don't accidentally hide the theme's own content
 * wrappers — which is exactly what made Alon's /hub/blog render as a
 * visually empty page in 3.5.4 initial ship. */
body.oria-iframe-mode > div:not(.oria-topbar):not(.oria-frame-wrap) {
    display: none !important;
}

.oria-topbar {
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 12px 24px;
    display: flex !important;
    width: 100% !important;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.oria-topbar a {
    color: #1e293b;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
}

.oria-topbar a:hover {
    opacity: .8;
}

.oria-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.oria-brand-logo {
    max-height: 36px;
    width: auto;
    display: block;
}

.oria-brand-name {
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
}

.oria-topbar .back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
}

.oria-topbar .back:hover {
    color: #1e293b;
}

.oria-topbar .back svg {
    width: 16px;
    height: 16px;
}

.oria-frame-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-height: calc(100vh - 52px);
}

.oria-frame-wrap iframe {
    width: 100% !important;
    min-height: calc(100vh - 52px);
    border: none;
    display: block;
}

@media (max-width: 600px) {
    .oria-topbar {
        padding: 10px 16px;
    }
    .oria-topbar a {
        font-size: 14px;
    }
}

/* ==========================================================================
   SSR content styles (3.5.4)
   These style the fragments emitted by server/oria-render.ts when the plugin
   wraps them in the tenant's theme via get_header() / get_footer().
   Before 3.5.4 the fragments had no stylesheet at all — the theme's default
   .entry-content styles gave huge unreadable typography and no grid layout.
   Scoped under .oria-ssr-content so we never touch the theme's own content.
   ========================================================================== */

.oria-ssr-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 64px;
    font-size: 16px;
    line-height: 1.6;
    color: #1e293b;
}

.oria-ssr-content .oria-section-header {
    text-align: center;
    margin: 16px 0 32px;
}

.oria-ssr-content .oria-section-header h1 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    margin: 0 0 8px;
    color: #0f172a;
}

.oria-ssr-content .oria-section-header p {
    font-size: 17px;
    color: #64748b;
    margin: 0;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Card grid used by blog list, case-studies list, projects list, service areas */
.oria-ssr-content .oria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin: 0;
}

.oria-ssr-content .oria-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: box-shadow .15s ease, transform .15s ease;
}

.oria-ssr-content .oria-card:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}

.oria-ssr-content .oria-card-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
}

.oria-ssr-content .oria-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}

.oria-ssr-content .oria-card-body {
    padding: 16px 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.oria-ssr-content .oria-card-body h2 {
    font-size: 19px;
    line-height: 1.3;
    margin: 0;
    color: #0f172a;
}

.oria-ssr-content .oria-card-body h2 a {
    color: inherit;
    text-decoration: none;
}

.oria-ssr-content .oria-card-body h2 a:hover {
    text-decoration: underline;
}

.oria-ssr-content .oria-card-body p {
    font-size: 14px;
    line-height: 1.55;
    color: #475569;
    margin: 0;
}

.oria-ssr-content .oria-card-meta {
    font-size: 12px;
    color: #94a3b8;
    margin-top: auto;
}

.oria-ssr-content .oria-card-link {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    margin-top: 4px;
}

.oria-ssr-content .oria-card-link:hover {
    text-decoration: underline;
}

/* Single-post / single-case / single-project layouts */
.oria-ssr-content .oria-post,
.oria-ssr-content .oria-case,
.oria-ssr-content .oria-project,
.oria-ssr-content .oria-service-area {
    max-width: 820px;
    margin: 0 auto;
}

.oria-ssr-content .oria-post-hero img,
.oria-ssr-content .oria-case-hero img,
.oria-ssr-content .oria-project-hero img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 0 0 16px;
    display: block;
}

.oria-ssr-content h1,
.oria-ssr-content h2,
.oria-ssr-content h3 {
    color: #0f172a;
    line-height: 1.25;
}

.oria-ssr-content .oria-post h1,
.oria-ssr-content .oria-case h1,
.oria-ssr-content .oria-project h1 {
    font-size: clamp(26px, 3.5vw, 36px);
    margin: 16px 0 8px;
}

.oria-ssr-content .oria-post h2,
.oria-ssr-content .oria-case h2 {
    font-size: 22px;
    margin: 28px 0 8px;
}

.oria-ssr-content .oria-post p,
.oria-ssr-content .oria-case p,
.oria-ssr-content .oria-project p {
    margin: 0 0 14px;
    font-size: 16px;
    line-height: 1.65;
}

.oria-ssr-content .oria-post-meta,
.oria-ssr-content .oria-case-meta,
.oria-ssr-content .oria-project-meta {
    color: #64748b;
    font-size: 13px;
    margin-bottom: 18px;
}

/* Reviews + stars */
.oria-ssr-content .oria-review {
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 18px;
    background: #fff;
    margin-bottom: 14px;
}

.oria-ssr-content .oria-review-stars {
    color: #f59e0b;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 4px;
}

.oria-ssr-content .oria-review-author {
    color: #64748b;
    font-size: 13px;
    margin-top: 8px;
}

/* Before/after project gallery */
.oria-ssr-content .oria-ba {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0;
}

.oria-ssr-content .oria-ba-col img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 4px 0;
}

@media (max-width: 600px) {
    .oria-ssr-content {
        padding: 16px 14px 48px;
    }
    .oria-ssr-content .oria-grid {
        grid-template-columns: 1fr;
    }
    .oria-ssr-content .oria-ba {
        grid-template-columns: 1fr;
    }
}
