/*
 * VOGO eBS — public shortcode styles for [vogo_ebs_services].
 * Two display modes: cards (grid) and list (vertical).
 *
 * Palette aligned with html_ansvsa_1/2.html templates:
 *   navy #0C2F59 / teal #0a2648 / green #01255C / gold #c5a572 / slate text #1f2937
 *
 * @file_version 1.0.9
 */

/* ──────────────────────────────────────────────────────────────────────
   CARDS mode — responsive grid with hover lift
   ────────────────────────────────────────────────────────────────────── */

/* Font stack consistent with vogo.me — same as list mode. */
.vogo-ebs-services-grid,
.vogo-ebs-services-grid * {
    font-family: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.vogo-ebs-services-grid {
    display: grid;
    gap: 18px;
    margin: 24px 0;
}
.vogo-ebs-services-grid--1 { grid-template-columns: minmax(0, 1fr); }
.vogo-ebs-services-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.vogo-ebs-services-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.vogo-ebs-services-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) {
    .vogo-ebs-services-grid--4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
    .vogo-ebs-services-grid--3,
    .vogo-ebs-services-grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .vogo-ebs-services-grid--2,
    .vogo-ebs-services-grid--3,
    .vogo-ebs-services-grid--4 { grid-template-columns: 1fr; }
}

.vogo-ebs-service-card {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 22px 22px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    min-height: 220px;
}
.vogo-ebs-service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(13, 44, 74, 0.10);
    border-color: #01255C;
}
/* Subtle accent ribbon on the left edge — picks up branding palette. */
.vogo-ebs-service-card::before {
    content: "";
    position: absolute;
    top: 18px;
    bottom: 18px;
    left: 0;
    width: 3px;
    background: linear-gradient(180deg, #01255C 0%, #0a2648 100%);
    border-radius: 0 3px 3px 0;
    opacity: 0;
    transition: opacity .15s ease;
}
.vogo-ebs-service-card:hover::before { opacity: 1; }

/* Top row: category badge (left) + small decorative icon (right). */
.vogo-ebs-service-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 2px;
}
.vogo-ebs-service-card__badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.10em;
    text-transform: uppercase;
    color: #01255C;
    line-height: 1;
}
/* Small decorative icon top-right (color tile reduced to a subtle accent). */
.vogo-ebs-service-card__icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #0a2648;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity .18s ease, transform .18s ease;
}
.vogo-ebs-service-card:hover .vogo-ebs-service-card__icon {
    opacity: 1;
    transform: translateX(2px);
}
.vogo-ebs-service-card__icon .dashicons {
    font-size: 22px;
    width: 22px;
    height: 22px;
    line-height: 1;
}
.vogo-ebs-service-card__icon i  { font-size: 18px; }
.vogo-ebs-service-card__icon svg {
    width: 22px;
    height: 22px;
    color: #01255C;
}
.vogo-ebs-service-card__icon img {
    max-width: 24px;
    max-height: 24px;
    object-fit: contain;
}

.vogo-ebs-service-card__title {
    margin: 0;
    font-size: 18px;
    font-weight: 800;
    line-height: 1.3;
    color: #0C2F59;
}
.vogo-ebs-service-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s ease;
}
.vogo-ebs-service-card__title a:hover { color: #01255C; }

.vogo-ebs-service-card__description {
    margin: 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.55;
    /* Clamp to 3 lines so cards stay roughly equal-height. */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.vogo-ebs-service-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    font-size: 12px;
}
.vogo-ebs-service-card__deadline,
.vogo-ebs-service-card__cost {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}
.vogo-ebs-service-card__deadline { background: #fef3c7; color: #92400e; }
.vogo-ebs-service-card__cost     { background: #dcfce7; color: #15803d; }

/* CTA row at bottom: external "official details" left, primary CTA right. */
.vogo-ebs-service-card__cta-row {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.vogo-ebs-service-card__details-link {
    font-size: 12px;
    color: #64748b;
    text-decoration: none;
    transition: color .15s ease;
}
.vogo-ebs-service-card__details-link:hover { color: #0a2648; }
.vogo-ebs-service-card__cta {
    font-size: 13px;
    font-weight: 700;
    color: #01255C;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: color .15s ease;
}
.vogo-ebs-service-card__cta:hover { color: #0a2648; }
.vogo-ebs-service-card__cta-arrow {
    display: inline-block;
    transition: transform .18s ease;
}
.vogo-ebs-service-card:hover .vogo-ebs-service-card__cta-arrow,
.vogo-ebs-service-card__cta:hover .vogo-ebs-service-card__cta-arrow {
    transform: translateX(4px);
}

/* ──────────────────────────────────────────────────────────────────────
   LIST mode — stacked mini-cards (one per service, icon + title + description + meta)
   Inspired by Romanian gov portal style: each row is its own bordered card.
   ────────────────────────────────────────────────────────────────────── */

/* Font stack consistent with vogo.me (Inter Tight) — applied to entire list mode
   so titles, descriptions, badges, CTA all inherit. Google Fonts loaded via
   wp_enqueue_style in ebs_shortcode_services.php. */
.vogo-ebs-services-list,
.vogo-ebs-services-list * {
    font-family: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}
.vogo-ebs-services-list {
    list-style: none;
    margin: 24px 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vogo-ebs-service-row {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    padding: 20px 24px;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-left: 4px solid #0a2648;
    border-radius: 10px;
    transition: transform .15s ease, box-shadow .15s ease, border-left-color .15s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.vogo-ebs-service-row:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(13, 44, 74, 0.10);
    border-left-color: #01255C;
}

/* CTA pill button — TEXT "Accesează" + arrow în ANSVSA navy @ 80% opacity (transparent),
   fără background. Pe hover capătă full opacity + bg subtle pentru affordance. */
.vogo-ebs-service-row__cta {
    flex-shrink: 0;
    align-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: transparent;
    color: rgba(12, 47, 89, 0.8) !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-radius: 999px;
    line-height: 1;
    white-space: nowrap;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}
.vogo-ebs-service-row__cta:hover,
.vogo-ebs-service-row:hover .vogo-ebs-service-row__cta {
    color: #0C2F59 !important;                  /* full navy on hover */
    background: rgba(12, 47, 89, 0.08);         /* subtle navy wash for affordance */
    transform: translateY(-1px);
}
.vogo-ebs-service-row__cta-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    transition: transform .18s ease;
}
.vogo-ebs-service-row__cta:hover .vogo-ebs-service-row__cta-icon,
.vogo-ebs-service-row:hover .vogo-ebs-service-row__cta-icon {
    transform: translateX(3px);
}
@media (max-width: 560px) {
    .vogo-ebs-service-row__cta { padding: 8px 14px; font-size: 12px; }
    .vogo-ebs-service-row__cta-label { display: none; }
    .vogo-ebs-service-row__cta-icon { width: 16px; height: 16px; }
}

/* Icon tile — mirrors the admin template-gallery square cards (services list page
   Setup pane). Subtle gray bg + border + flat aspect for visual parity. */
.vogo-ebs-service-row__icon {
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    border-radius: 5px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #1e40af;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, border-color .15s ease;
}
.vogo-ebs-service-row:hover .vogo-ebs-service-row__icon {
    background: #eff6ff;
    border-color: #2563eb;
}
.vogo-ebs-service-row__icon svg {
    width: 28px;
    height: 28px;
}
.vogo-ebs-service-row__icon .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    line-height: 1;
}
.vogo-ebs-service-row__icon i { font-size: 22px; }
.vogo-ebs-service-row__icon img {
    max-width: 36px;
    max-height: 36px;
    object-fit: contain;
    border-radius: 4px;
}

.vogo-ebs-service-row__main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vogo-ebs-service-row__header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.vogo-ebs-service-title {
    font-size: 20px;
    font-weight: 700;
    color: #0C2F59;
    text-decoration: none;
    line-height: 1.3;
    transition: color .15s ease;
}
.vogo-ebs-service-title:hover { color: #01255C; }

.vogo-ebs-service-code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11px;
    padding: 2px 8px;
    background: #eff6ff;
    color: #0C2F59;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.vogo-ebs-service-row__desc {
    margin: 0;
    color: #475569;
    font-size: 16px;
    line-height: 1.6;
}

.vogo-ebs-service-row__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 2px;
}

/* Termen + Cost pills — italic on ANSVSA navy bg @ 80% opacity (institutional). */
.vogo-ebs-service-deadline,
.vogo-ebs-service-cost {
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-weight: 500;
    font-style: italic;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(12, 47, 89, 0.8);
    color: #ffffff;
}
.vogo-ebs-service-deadline strong,
.vogo-ebs-service-cost strong {
    font-weight: 700;
    font-style: normal;
}

@media (max-width: 560px) {
    .vogo-ebs-service-row { padding: 16px 18px; gap: 14px; }
    .vogo-ebs-service-row__icon { width: 38px; height: 38px; }
    .vogo-ebs-service-row__icon svg { width: 18px; height: 18px; }
    .vogo-ebs-service-title { font-size: 18px; }
}

/* ──────────────────────────────────────────────────────────────────────
   Empty state shared by both modes
   ────────────────────────────────────────────────────────────────────── */
.vogo-ebs-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    font-style: italic;
    margin: 24px 0;
}

/* ──────────────────────────────────────────────────────────────────────
   RESPONSIVE COMPREHENSIVE PASS — list + cards mode mobile refinements.
   ────────────────────────────────────────────────────────────────────── */

/* Tablet — cards grid intermediate stop at 680px (was 3→1 jump at 560px). */
@media (max-width: 680px) and (min-width: 561px) {
    .vogo-ebs-services-grid--3,
    .vogo-ebs-services-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

/* Phone — list row compaction: smaller icon tile, reduced padding, full-width CTA. */
@media (max-width: 480px) {
    .vogo-ebs-service-row {
        padding: 14px 16px;
        gap: 12px;
        flex-wrap: wrap;
    }
    .vogo-ebs-service-row__icon {
        width: 48px;
        height: 48px;
    }
    .vogo-ebs-service-row__icon svg { width: 22px; height: 22px; }
    .vogo-ebs-service-row__icon .dashicons { font-size: 22px; width: 22px; height: 22px; }
    .vogo-ebs-service-row__cta {
        flex-basis: 100%;
        order: 3;
        justify-content: center;
        padding: 10px;
        min-height: 44px;
    }
    .vogo-ebs-service-row__cta-label { display: inline; }  /* show full label on mobile when CTA is full-width */
    .vogo-ebs-service-title { font-size: 17px; }
    .vogo-ebs-service-row__desc { font-size: 15px; }
    .vogo-ebs-service-deadline,
    .vogo-ebs-service-cost { font-size: 11px; padding: 3px 10px; }
}

/* Ultra-narrow — final compaction. */
@media (max-width: 360px) {
    .vogo-ebs-service-row { padding: 12px 12px; gap: 10px; }
    .vogo-ebs-service-row__icon { width: 40px; height: 40px; }
    .vogo-ebs-service-row__icon svg { width: 18px; height: 18px; }
    .vogo-ebs-service-row__icon .dashicons { font-size: 18px; width: 18px; height: 18px; }
    .vogo-ebs-service-title { font-size: 16px; }
    .vogo-ebs-service-row__desc { font-size: 14px; }
    .vogo-ebs-service-card { padding: 14px 12px; }
}
