/* ==========================================================
   Robnety Pakalpojumi v2.0 — Frontend Styles
   ========================================================== */

/* ── Classic wrapper ── */
.robnety-classic-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    align-items: flex-start;
}

/* Main content always takes remaining space */
.robnety-classic-content {
    flex: 1 1 600px;
    min-width: 0;
    /* Default order: content comes first (after sidebar-right) */
    order: 1;
}

/* Sidebar */
.robnety-sidebar {
    width: 280px;
    flex: 0 0 280px;
    min-height: 50px;
    /* Default: sidebar on the right → order 2 */
    order: 2;
}

/* ── Sidebar LEFT: sidebar gets order 0, content stays order 1 ── */
.robnety-classic-wrap.robnety-sidebar-pos-left .robnety-sidebar {
    order: 0;
}
.robnety-classic-wrap.robnety-sidebar-pos-left .robnety-classic-content {
    order: 1;
}

/* ── Sidebar RIGHT (explicit, same as default) ── */
.robnety-classic-wrap.robnety-sidebar-pos-right .robnety-sidebar {
    order: 2;
}
.robnety-classic-wrap.robnety-sidebar-pos-right .robnety-classic-content {
    order: 1;
}

/* ── Featured Image ── */
.robnety-classic-hero {
    margin-bottom: 1.5rem;
    border-radius: 6px;
    overflow: hidden;
}
.robnety-hero-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 420px;
}

/* ── Entry header ── */
.robnety-classic-header {
    margin-bottom: 1rem;
}
.robnety-classic-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.6rem;
    color: #1a1a1a;
}

/* ── Category Badges ── */
.robnety-service-cats {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}
.robnety-cat-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    background: #f0f5ff;
    color: #0073aa;
    border: 1px solid #c5d9f0;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}
.robnety-cat-badge:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ── Meta bar ── */
.robnety-classic-meta-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}
.robnety-meta-items {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}
.robnety-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    color: #444;
}
.robnety-meta-chip .dashicons {
    color: #0073aa;
    font-size: 1em;
    width: 1em;
    height: 1em;
    line-height: 1;
}
.robnety-meta-chip strong {
    font-weight: 600;
}
.robnety-divider {
    border: none;
    border-top: 2px solid #e0e0e0;
    margin: 1rem 0 1.5rem;
}

/* ── Entry content ── */
.robnety-entry-content p {
    margin-bottom: 1.25em;
}

/* ── Footer (CTA + Share) ── */
.robnety-classic-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* ── CTA Button ── */
.robnety-cta-button {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    background: #0073aa;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    line-height: 1.4;
}
.robnety-cta-button:hover {
    background: #005f8e;
    color: #fff;
    transform: translateY(-1px);
}
.robnety-cta-large {
    padding: 0.75rem 2rem;
    font-size: 1rem;
}

/* ── Share Buttons ── */
.robnety-share {
    display: flex;
    align-items: center;
    gap: 0;
    justify-content: flex-end;
}
.robnety-share-label {
    display: none;
}
.robnety-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 5px;
    background: #eee;
    color: #0a0a0a;
    text-decoration: none;
    border-radius: 0;
    border: none;
    transition: background 0.2s, color 0.2s;
}
.robnety-share-btn:last-child {
    margin-right: 0;
}
.robnety-share-btn svg {
    width: 13px;
    height: 13px;
    color: #0a0a0a;
}
.robnety-share-btn:hover {
    background: #0168a5;
    color: #fff;
    transform: none;
}
.robnety-share-btn:hover svg {
    color: #fff;
}

/* ── Post Navigation ── */
.robnety-post-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}
.robnety-nav-prev,
.robnety-nav-next { flex: 1; }
.robnety-nav-next { text-align: right; }
.robnety-nav-prev a,
.robnety-nav-next a {
    display: inline-flex;
    flex-direction: column;
    text-decoration: none;
    color: #333;
    transition: color 0.2s;
    max-width: 200px;
}
.robnety-nav-prev a:hover,
.robnety-nav-next a:hover { color: #0073aa; }
.robnety-nav-label {
    font-size: 0.75rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}
.robnety-nav-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.robnety-nav-arrow { font-size: 1.1rem; }
.robnety-nav-archive {
    color: #888;
    transition: color 0.2s;
    flex-shrink: 0;
}
.robnety-nav-archive:hover { color: #0073aa; }

/* ── Sidebar Widgets ── */
.robnety-sidebar .widget {
    background: #fff;
    border: 1px solid #e5e8ee;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.robnety-widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #0073aa;
}

/* ── Related Services Widget ── */
.robnety-related-list { list-style: none; margin: 0; padding: 0; }
.robnety-related-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
}
.robnety-related-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.robnety-related-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}
.robnety-related-link:hover { color: #0073aa; }
.robnety-related-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    flex: 1;
    min-width: 0;
}
.robnety-related-thumb {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
}
.robnety-no-thumb {
    width: 60px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f0f5ff;
    color: #aac5e0;
    font-size: 1.4rem;
    border-radius: 4px;
    flex-shrink: 0;
}
.robnety-related-title {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.robnety-related-price { font-size: 0.8rem; font-weight: 700; color: #0073aa; }
.robnety-no-related { font-size: 0.9rem; color: #888; margin: 0; }

/* ── Minimal Template ── */
.robnety-minimal-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.robnety-minimal-content {
    font-size: 1rem;
    line-height: 1.7;
}
/* Hide theme-injected post title on minimal template */
body.robnety-template-minimal .entry-title,
body.robnety-template-minimal h1.page-title,
body.robnety-template-minimal .post-title {
    display: none !important;
}

/* ── Responsive ── */
@media ( max-width: 900px ) {
    .robnety-classic-wrap {
        flex-direction: column !important;
    }
    .robnety-sidebar,
    .robnety-classic-content {
        width: 100%;
        flex: 1 1 100%;
        order: unset !important;
    }
    /* On mobile, sidebar always goes after content */
    .robnety-classic-content { order: 1 !important; }
    .robnety-sidebar          { order: 2 !important; }

    .robnety-classic-title { font-size: 1.5rem; }
    .robnety-classic-meta-bar { flex-direction: column; align-items: flex-start; }
    .robnety-classic-footer   { flex-direction: column; align-items: flex-start; }
    .robnety-nav-next { text-align: left; }
}

/* ==========================================================
   Modern Template
   ========================================================== */

.robnety-modern-wrap {
    max-width: 100%;
    margin: 0 auto;
}

/* Full-width hero */
.robnety-modern-hero {
    position: relative;
    width: 100%;
    max-height: 520px;
    overflow: hidden;
    background: #1a1a2e;
}
.robnety-modern-hero-img {
    width: 100%;
    height: 520px;
    object-fit: cover;
    display: block;
    opacity: 0.55;
}
.robnety-modern-hero-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-end;
}
.robnety-modern-hero-inner {
    padding: 2.5rem 3rem;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}
.robnety-modern-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0.5rem 0 1rem;
    line-height: 1.15;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.robnety-cats-light { margin-bottom: 0.5rem; }
.robnety-cat-light {
    background: rgba(255,255,255,0.2) !important;
    color: #fff !important;
    border-color: rgba(255,255,255,0.4) !important;
    backdrop-filter: blur(4px);
}
.robnety-cat-light:hover {
    background: #fff !important;
    color: #0073aa !important;
}
.robnety-cta-hero {
    margin-top: 0.5rem;
    background: #fff;
    color: #0073aa;
    font-size: 1rem;
    padding: 0.7rem 2rem;
}
.robnety-cta-hero:hover {
    background: #0073aa;
    color: #fff;
}

/* Meta strip below hero */
.robnety-modern-meta-strip {
    background: #f8f9fb;
    border-bottom: 1px solid #e5e8ee;
}
.robnety-modern-meta-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding: 0.9rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}
.robnety-modern-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.88rem;
    color: #555;
    font-weight: 500;
}
.robnety-modern-meta-chip .dashicons {
    color: #0073aa;
    font-size: 1em;
    width: 1em;
    height: 1em;
    line-height: 1;
}

/* Body area (content + sidebar) */
.robnety-modern-body {
    display: flex;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    align-items: flex-start;
}
.robnety-modern-content {
    flex: 1 1 600px;
    min-width: 0;
    order: 1;
}
.robnety-modern-body.robnety-sidebar-pos-right .robnety-sidebar  { order: 2; }
.robnety-modern-body.robnety-sidebar-pos-left  .robnety-sidebar  { order: 0; }
.robnety-modern-body.robnety-sidebar-pos-left  .robnety-modern-content { order: 1; }
.robnety-modern-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

/* ==========================================================
   Card Template
   ========================================================== */

.robnety-card-outer {
    max-width: 1100px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
.robnety-card-wrap {
    display: flex;
    gap: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10);
    overflow: hidden;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}
.robnety-card-image {
    flex: 0 0 45%;
    max-width: 45%;
}
.robnety-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-height: 320px;
}
.robnety-card-body {
    flex: 1 1 55%;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}
.robnety-card-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    line-height: 1.2;
    margin: 0 0 0.5rem;
}
.robnety-card-meta-list {
    list-style: none;
    margin: 0 0 0.5rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.robnety-card-meta-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: #444;
}
.robnety-card-meta-row .dashicons {
    color: #0073aa;
    font-size: 1em;
    width: 1em;
    height: 1em;
    line-height: 1;
    flex-shrink: 0;
}
.robnety-card-meta-row strong {
    font-weight: 600;
    margin-right: 0.2em;
}
.robnety-card-cta { margin-top: 0.5rem; }
.robnety-cta-full { width: 100%; text-align: center; justify-content: center; display: block; }
.robnety-card-content-area {
    padding: 0 0.5rem;
}

/* Responsive: Card */
@media ( max-width: 800px ) {
    .robnety-card-image,
    .robnety-card-body {
        flex: 1 1 100%;
        max-width: 100%;
    }
    .robnety-card-img { min-height: 220px; }
    .robnety-card-title { font-size: 1.5rem; }
}

/* Responsive: Modern */
@media ( max-width: 900px ) {
    .robnety-modern-hero-inner { padding: 1.5rem; }
    .robnety-modern-title { font-size: 1.8rem; }
    .robnety-modern-meta-inner { padding: 0.75rem 1.5rem; }
    .robnety-modern-body { flex-direction: column; }
    .robnety-modern-body .robnety-sidebar,
    .robnety-modern-body .robnety-modern-content {
        order: unset !important;
    }
    .robnety-modern-body .robnety-modern-content { order: 1 !important; }
    .robnety-modern-body .robnety-sidebar          { order: 2 !important; }
    .robnety-modern-footer { flex-direction: column; align-items: flex-start; }
}

/* ── Widget: archive link button ── */
.robnety-widget-archive {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid #eee;
    text-align: center;
}
.robnety-widget-archive-btn {
    display: inline-block;
    width: 100%;
    padding: 0.55rem 1rem;
    background: #f4f6f9;
    color: #0073aa;
    border: 1px solid #d1dce8;
    border-radius: 4px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    box-sizing: border-box;
}
.robnety-widget-archive-btn:hover {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* ==========================================================
   Blank Template
   ========================================================== */

.robnety-blank-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    align-items: flex-start;
}

.robnety-blank-content {
    flex: 1 1 600px;
    min-width: 0;
    order: 1;
}

/* Sidebar positioning */
.robnety-blank-wrap.robnety-sidebar-pos-left .robnety-sidebar {
    order: 0;
}
.robnety-blank-wrap.robnety-sidebar-pos-left .robnety-blank-content {
    order: 1;
}
.robnety-blank-wrap.robnety-sidebar-pos-right .robnety-sidebar {
    order: 2;
}
.robnety-blank-wrap.robnety-sidebar-pos-right .robnety-blank-content {
    order: 1;
}

/* Hide theme-injected post title on blank template */
body.robnety-template-blank .entry-title,
body.robnety-template-blank h1.page-title,
body.robnety-template-blank .post-title {
    display: none !important;
}

/* Responsive */
@media ( max-width: 900px ) {
    .robnety-blank-wrap {
        flex-direction: column !important;
    }
    .robnety-blank-content {
        width: 100%;
        flex: 1 1 100%;
        order: 1 !important;
    }
    .robnety-blank-wrap .robnety-sidebar {
        order: 2 !important;
        width: 100%;
        flex: 1 1 100%;
    }
}