/**
 * NexGen Editor — Frontend Block Styles
 * Applied when a post is rendered via NexGen_Editor_Renderer
 */

/* ── Button block ─────────────────────────────────────────────────────────── */
.nexgen-ed-btn-wrap {
    margin-top: 20px;
}
.nexgen-ed-btn-wrap.nexgen-align-center { text-align: center; }
.nexgen-ed-btn-wrap.nexgen-align-right  { text-align: right; }
.nexgen-ed-btn-wrap.nexgen-align-left   { text-align: left; }

/* ── Layout ───────────────────────────────────────────────────────────────── */

/* Row outer */
.nexgen-ed-row {
    width: 100%;
    box-sizing: border-box;
}

/* Row inner / container */
.nexgen-ed-row-inner {
    box-sizing: border-box;
    width: 100%;
}
.nexgen-ed-row-inner.nexgen-container {
    max-width: var(--nge-container-width, 1200px);
    margin-left: auto;
    margin-right: auto;
}
.nexgen-ed-row-inner.is-full-width {
    max-width: 100%;
}

/* Columns flex wrapper */
.nexgen-ed-cols {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    box-sizing: border-box;
}

/* Column outer */
.nexgen-ed-col {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

/* Column inner (padding + alignment) */
.nexgen-ed-col-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .nexgen-ed-cols {
        flex-direction: column;
    }
    .nexgen-ed-col {
        flex: 1 1 100% !important;
    }
}

/* ── Spacer ───────────────────────────────────────────────────────────────── */

.nge-block-spacer {
    display: block;
}

/* ── Divider ──────────────────────────────────────────────────────────────── */

.nge-block-divider {
    display: block;
    width: 100%;
}
.nge-block-divider hr {
    border: none;
    border-top: 1px solid currentColor;
    margin: 0;
}

/* ── Heading ──────────────────────────────────────────────────────────────── */

.nge-block-heading {
    margin: 0 0 .5em;
    line-height: 1.25;
}

/* ── Text ─────────────────────────────────────────────────────────────────── */

.nge-block-text {
    margin: 0 0 1em;
    line-height: 1.7;
}

/* ── Button ───────────────────────────────────────────────────────────────── */

.nge-block-button {
    display: inline-block;
    padding: .6em 1.4em;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: opacity .15s, transform .1s;
}
.nge-block-button:hover { opacity: .88; transform: translateY(-1px); }

/* ── Image ────────────────────────────────────────────────────────────────── */

.nge-block-image img {
    max-width: 100%;
    height: auto;
    display: block;
}
.nge-block-image.align-center img { margin: 0 auto; }
.nge-block-image.align-right img  { margin-left: auto; }

/* ── HTML ─────────────────────────────────────────────────────────────────── */

.nge-block-html { display: block; }

/* ── Logo ─────────────────────────────────────────────────────────────────── */

.nge-block-logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.5em;
    color: inherit;
    letter-spacing: -.03em;
}
.nge-block-logo img {
    height: auto;
    display: block;
}

/* ── Nav menu ─────────────────────────────────────────────────────────────── */

.nge-block-nav .nexgen-nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: .25em;
}
.nge-block-nav.layout-vertical .nexgen-nav-list {
    flex-direction: column;
}
.nge-block-nav .nexgen-nav-list li { margin: 0; }
.nge-block-nav .nexgen-nav-list a {
    display: inline-block;
    padding: .4em .7em;
    text-decoration: none;
    color: inherit;
    transition: opacity .15s;
}
.nge-block-nav .nexgen-nav-list a:hover { opacity: .7; }

/* ── Mobile toggle ────────────────────────────────────────────────────────── */

.nge-block-mobile-toggle .nexgen-mobile-toggle {
    cursor: pointer;
    font-size: 1.4em;
    padding: .3em;
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: none;
    color: inherit;
}

/* ── Search icon ──────────────────────────────────────────────────────────── */

.nge-block-search-icon .nexgen-search-toggle {
    cursor: pointer;
    font-size: 1.1em;
    display: inline-flex;
    align-items: center;
    background: transparent;
    border: none;
    color: inherit;
    padding: .3em;
}

/* ── Cart icon ────────────────────────────────────────────────────────────── */

.nge-block-cart-icon .nexgen-cart-icon {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    text-decoration: none;
    color: inherit;
    font-size: 1.1em;
    padding: .3em;
}
.nexgen-cart-count {
    font-size: .7em;
    background: currentColor;
    color: #fff;
    border-radius: 50%;
    width: 1.4em;
    height: 1.4em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ── My Account ───────────────────────────────────────────────────────────── */

.nge-block-my-account .nexgen-account-icon {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    text-decoration: none;
    color: inherit;
    font-size: 1.1em;
    padding: .3em;
}

/* ── Contact info ─────────────────────────────────────────────────────────── */

.nge-block-contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: .8em 1.4em;
    font-size: .9em;
}
.nexgen-contact-item {
    display: inline-flex;
    align-items: center;
    gap: .4em;
    color: inherit;
    text-decoration: none;
}
.nexgen-contact-item:hover { text-decoration: underline; }

/* ── Post title ───────────────────────────────────────────────────────────── */

.nge-block-post-title {
    margin: 0 0 .5em;
}
.nge-block-post-title a {
    text-decoration: none;
    color: inherit;
}
.nge-block-post-title a:hover { text-decoration: underline; }

/* ── Post content ─────────────────────────────────────────────────────────── */

.nge-block-post-content { line-height: 1.7; }
.nge-block-post-content > * + * { margin-top: 1em; }

/* ── Post excerpt ─────────────────────────────────────────────────────────── */

.nge-block-post-excerpt { line-height: 1.6; color: #555; }

/* ── Featured image ───────────────────────────────────────────────────────── */

.nge-block-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ── Post meta ────────────────────────────────────────────────────────────── */

.nge-block-post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .4em 1em;
    font-size: .85em;
    color: #666;
}
.nexgen-meta-item {
    display: inline-flex;
    align-items: center;
    gap: .3em;
}

/* ── Breadcrumbs ──────────────────────────────────────────────────────────── */

.nge-block-breadcrumbs {
    font-size: .85em;
    color: #666;
}
.nexgen-breadcrumb-sep { margin: 0 .3em; }
.nexgen-breadcrumb-item:last-child { color: #999; }

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media ( max-width: 768px ) {
    .nge-row-wrap { flex-direction: column; }
    .nge-col-wrap { flex: none; width: 100%; }
}

/* ════════════════════════════════════════════════════════
   NEW BLOCKS — Elementor widget parity
   ════════════════════════════════════════════════════════ */

/* ── Video ─────────────────────────────────────────────────────────────────── */
.nexgen-ed-video { width: 100%; }
.nexgen-video-ratio-16-9 { position: relative; padding-top: 56.25%; }
.nexgen-video-ratio-4-3  { position: relative; padding-top: 75%; }
.nexgen-video-ratio-1-1  { position: relative; padding-top: 100%; }
.nexgen-video-inner      { position: absolute; inset: 0; }
.nexgen-ed-video-self    { display: block; width: 100%; }

/* ── Image Gallery ─────────────────────────────────────────────────────────── */
.nexgen-ed-gallery {
    display: grid;
    grid-template-columns: repeat( var(--gallery-cols, 3), 1fr );
    gap: var(--gallery-gap, 10px);
}
.nexgen-ed-gallery-item img { display: block; width: 100%; height: auto; object-fit: cover; }

/* ── Image Carousel ────────────────────────────────────────────────────────── */
.nexgen-ed-carousel { position: relative; overflow: hidden; }
.nexgen-carousel-track { display: flex; transition: transform .35s ease; }
.nexgen-carousel-slide { min-width: 100%; position: relative; }
.nexgen-carousel-slide img { display: block; width: 100%; height: auto; }
.nexgen-carousel-caption { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.5); color: #fff; padding: 8px 12px; font-size: 14px; }
.nexgen-carousel-prev,
.nexgen-carousel-next { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,.5); color: #fff; border: none; padding: 8px 12px; cursor: pointer; z-index: 2; border-radius: 3px; font-size: 16px; }
.nexgen-carousel-prev { left: 8px; }
.nexgen-carousel-next { right: 8px; }
.nexgen-carousel-dots { display: flex; justify-content: center; gap: 6px; padding: 8px 0; }
.nexgen-carousel-dots .nexgen-dot { width: 8px; height: 8px; border-radius: 50%; background: #ccc; cursor: pointer; border: none; }
.nexgen-carousel-dots .nexgen-dot.active { background: #333; }

/* ── Icon ──────────────────────────────────────────────────────────────────── */
.nexgen-ed-icon-wrap { display: flex; }
.nexgen-ed-icon-wrap.nexgen-align-center { justify-content: center; }
.nexgen-ed-icon-wrap.nexgen-align-right  { justify-content: flex-end; }
.nexgen-ed-icon { line-height: 1; display: inline-block; }
.nexgen-ed-icon-link { text-decoration: none; }

/* ── Icon Box ──────────────────────────────────────────────────────────────── */
.nexgen-ed-icon-box { display: flex; gap: 16px; }
.nexgen-ed-icon-box.nexgen-icon-box-top  { flex-direction: column; }
.nexgen-ed-icon-box.nexgen-icon-box-left { flex-direction: row; align-items: flex-start; }
.nexgen-ed-icon-box.nexgen-icon-box-right { flex-direction: row-reverse; align-items: flex-start; }
.nexgen-ed-icon-box.nexgen-align-center  { text-align: center; align-items: center; }
.nexgen-icon-box-title { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.nexgen-icon-box-desc  { margin: 0; opacity: .8; }

/* ── Image Box ─────────────────────────────────────────────────────────────── */
.nexgen-ed-image-box { overflow: hidden; }
.nexgen-image-box-link { text-decoration: none; color: inherit; display: block; }
.nexgen-image-box-img-wrap { overflow: hidden; }
.nexgen-image-box-img-wrap img { display: block; width: 100%; height: auto; transition: transform .3s; }
.nexgen-image-box-img-wrap:hover img { transform: scale(1.03); }
.nexgen-has-overlay { position: relative; }
.nexgen-has-overlay::after { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.3); opacity: 0; transition: opacity .3s; }
.nexgen-has-overlay:hover::after { opacity: 1; }
.nexgen-image-box-body  { padding: 14px 0; }
.nexgen-image-box-title { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.nexgen-image-box-desc  { margin: 0; opacity: .8; }

/* ── Counter ───────────────────────────────────────────────────────────────── */
.nexgen-ed-counter { display: flex; flex-direction: column; gap: 4px; }
.nexgen-counter-number { font-weight: 700; line-height: 1; }
.nexgen-counter-label  { font-size: 14px; opacity: .7; }

/* ── Progress Bar ──────────────────────────────────────────────────────────── */
.nexgen-ed-progress-bar { display: flex; flex-direction: column; gap: 6px; }
.nexgen-progress-header { display: flex; justify-content: space-between; font-size: 14px; font-weight: 500; }
.nexgen-progress-track  { overflow: hidden; }
.nexgen-progress-fill   { transition: width .6s ease; }
.nexgen-progress-striped {
    background-image: linear-gradient(45deg, rgba(255,255,255,.2) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.2) 50%, rgba(255,255,255,.2) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

/* ── Alert ─────────────────────────────────────────────────────────────────── */
.nexgen-ed-alert { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-radius: 6px; border-left: 4px solid; position: relative; }
.nexgen-alert-info    { background: #eff6ff; border-color: #3b82f6; color: #1e3a5f; }
.nexgen-alert-success { background: #f0fdf4; border-color: #22c55e; color: #14532d; }
.nexgen-alert-warning { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.nexgen-alert-error   { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }
.nexgen-alert-icon    { font-size: 18px; flex-shrink: 0; }
.nexgen-alert-body    { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nexgen-alert-title   { font-weight: 600; }
.nexgen-alert-close   { position: absolute; top: 8px; right: 10px; border: none; background: none; cursor: pointer; font-size: 16px; opacity: .6; }
.nexgen-alert-close:hover { opacity: 1; }

/* ── Blockquote ────────────────────────────────────────────────────────────── */
.nexgen-ed-blockquote { margin: 0; }
.nexgen-bq-bordered   { border-left: 4px solid #3b82f6; padding-left: 20px; }
.nexgen-bq-background { background: #f3f4f6; padding: 20px 24px; border-radius: 8px; }
.nexgen-bq-minimal    { font-style: italic; }
.nexgen-ed-blockquote p    { margin: 0 0 8px; font-size: 17px; }
.nexgen-ed-blockquote cite { font-size: 14px; opacity: .7; }

/* ── Testimonial ───────────────────────────────────────────────────────────── */
.nexgen-ed-testimonial { display: flex; flex-direction: column; gap: 12px; }
.nexgen-testimonial-card   { background: #fff; padding: 24px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.nexgen-testimonial-bubble { background: #f3f4f6; padding: 20px; border-radius: 12px 12px 0 12px; }
.nexgen-testimonial-stars  { display: flex; gap: 2px; font-size: 18px; }
.nexgen-star.filled { color: #f59e0b; }
.nexgen-star.empty  { color: #d1d5db; }
.nexgen-testimonial-quote  { margin: 0; font-size: 16px; font-style: italic; }
.nexgen-testimonial-author { display: flex; align-items: center; gap: 12px; }
.nexgen-testimonial-avatar { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.nexgen-testimonial-info   { display: flex; flex-direction: column; }
.nexgen-testimonial-info strong { font-weight: 600; }
.nexgen-testimonial-info span   { font-size: 13px; opacity: .7; }

/* ── Star Rating ───────────────────────────────────────────────────────────── */
.nexgen-ed-star-rating { display: flex; align-items: center; gap: 4px; line-height: 1; }
.nexgen-rating-label { margin-left: 8px; font-size: .8em; opacity: .8; }

/* ── CTA ───────────────────────────────────────────────────────────────────── */
.nexgen-ed-cta { position: relative; padding: 60px 40px; }
.nexgen-cta-overlay { position: absolute; inset: 0; }
.nexgen-cta-inner   { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.nexgen-cta-heading { margin: 0; font-size: 32px; font-weight: 700; }
.nexgen-cta-sub     { margin: 0; font-size: 18px; opacity: .85; }

/* ── Accordion ─────────────────────────────────────────────────────────────── */
.nexgen-ed-accordion { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 8px; overflow: hidden; }
.nexgen-acc-item { border-bottom: 1px solid #e5e7eb; }
.nexgen-acc-item:last-child { border-bottom: none; }
.nexgen-acc-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; cursor: pointer; font-weight: 500; background: #fff; user-select: none; }
.nexgen-acc-header:hover { background: #f9fafb; }
.nexgen-acc-icon { transition: transform .25s; display: inline-block; }
.nexgen-acc-open .nexgen-acc-icon { transform: rotate(180deg); }
.nexgen-acc-body    { overflow: hidden; max-height: 0; transition: max-height .3s ease; }
.nexgen-acc-open .nexgen-acc-body { max-height: 9999px; }
.nexgen-acc-content { padding: 12px 18px 16px; }

/* ── Tabs ──────────────────────────────────────────────────────────────────── */
.nexgen-ed-tabs  { display: flex; flex-direction: column; }
.nexgen-tabs-nav { display: flex; gap: 2px; border-bottom: 2px solid #e5e7eb; flex-wrap: wrap; }
.nexgen-tab-btn  { padding: 10px 18px; border: none; background: none; cursor: pointer; font-size: 14px; font-weight: 500; color: #6b7280; border-bottom: 2px solid transparent; margin-bottom: -2px; display: flex; align-items: center; gap: 6px; }
.nexgen-tab-btn:hover { color: #111; }
.nexgen-tab-btn.nexgen-tab-active { color: #3b82f6; border-bottom-color: #3b82f6; }
.nexgen-tabs-content { padding: 16px 0; }
.nexgen-tab-panel { display: none; }
.nexgen-tab-panel.nexgen-tab-active { display: block; }

/* ── Flip Box ──────────────────────────────────────────────────────────────── */
.nexgen-ed-flip-box { perspective: 1000px; }
.nexgen-flip-inner  { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s ease; }
.nexgen-flip-horizontal .nexgen-flip-inner:hover { transform: rotateY(180deg); }
.nexgen-flip-vertical   .nexgen-flip-inner:hover { transform: rotateX(180deg); }
.nexgen-flip-front,
.nexgen-flip-back { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 30px 20px; backface-visibility: hidden; border-radius: 8px; }
.nexgen-flip-back { transform: rotateY(180deg); }
.nexgen-flip-vertical .nexgen-flip-back { transform: rotateX(180deg); }
.nexgen-flip-icon { font-size: 2em; margin-bottom: 10px; }

/* ── Icon List ─────────────────────────────────────────────────────────────── */
.nexgen-ed-icon-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--icon-list-gap, 8px); }
.nexgen-icon-list-horizontal { flex-direction: row; flex-wrap: wrap; }
.nexgen-icon-list-item { display: flex; align-items: center; gap: 8px; }
.nexgen-icon-list-icon { flex-shrink: 0; line-height: 1; }

/* ── Social Icons ──────────────────────────────────────────────────────────── */
.nexgen-ed-social-icons { display: flex; flex-wrap: wrap; }
.nexgen-ed-social-icons.nexgen-align-center { justify-content: center; }
.nexgen-ed-social-icons.nexgen-align-right  { justify-content: flex-end; }
.nexgen-social-icon { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; line-height: 1; transition: opacity .2s; }
.nexgen-social-icon:hover { opacity: .75; }
.nexgen-social-rounded .nexgen-social-icon { border-radius: 50%; padding: .4em; background: currentColor; }
.nexgen-social-square  .nexgen-social-icon { border-radius: 4px; padding: .4em; background: currentColor; }

/* ── Price Table ───────────────────────────────────────────────────────────── */
.nexgen-ed-price-table { border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; position: relative; transition: box-shadow .2s; }
.nexgen-ed-price-table:hover { box-shadow: 0 4px 20px rgba(0,0,0,.1); }
.nexgen-price-highlighted { border-width: 2px; box-shadow: 0 4px 20px rgba(0,0,0,.15); }
.nexgen-price-ribbon { position: absolute; top: 14px; right: -26px; transform: rotate(45deg); padding: 4px 32px; font-size: 11px; font-weight: 700; color: #fff; letter-spacing: .05em; }
.nexgen-price-header  { padding: 28px 24px; text-align: center; background: #f9fafb; }
.nexgen-price-title   { margin: 0 0 8px; font-size: 20px; font-weight: 700; }
.nexgen-price-amount  { display: flex; align-items: flex-start; justify-content: center; gap: 2px; margin: 4px 0; }
.nexgen-price-amount sup   { font-size: 18px; font-weight: 700; margin-top: 6px; }
.nexgen-price-amount span  { font-size: 48px; font-weight: 800; line-height: 1; }
.nexgen-price-amount small { font-size: 14px; align-self: flex-end; margin-bottom: 4px; opacity: .7; }
.nexgen-price-desc    { margin: 6px 0 0; font-size: 14px; opacity: .7; }
.nexgen-price-features { list-style: none; margin: 0; padding: 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.nexgen-price-features li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.nexgen-feature-yes span { color: #22c55e; font-weight: 700; }
.nexgen-feature-no  span { color: #ef4444; }
.nexgen-feature-no       { opacity: .55; }
.nexgen-price-footer  { padding: 16px 24px 24px; text-align: center; }

/* ── Google Maps ───────────────────────────────────────────────────────────── */
.nexgen-ed-google-maps { width: 100%; overflow: hidden; border-radius: 8px; }
.nexgen-ed-google-maps iframe { display: block; }

/* ── New blocks responsive ─────────────────────────────────────────────────── */
@media ( max-width: 768px ) {
    .nexgen-ed-gallery { grid-template-columns: repeat( 2, 1fr ); }
    .nexgen-cta-heading { font-size: 24px; }
    .nexgen-ed-cta      { padding: 40px 24px; }
    .nexgen-price-amount span { font-size: 36px; }
    .nexgen-tabs-nav    { flex-direction: column; border-bottom: none; }
    .nexgen-tab-btn     { border-bottom: none; border-left: 2px solid transparent; }
    .nexgen-tab-btn.nexgen-tab-active { border-left-color: #3b82f6; }
}
