/* ============================================================
   nws.RO — COMPONENTS
   Componente reutilizabile: butoane, carduri, formulare,
   alerte, badges, breadcrumbs, spinner.

   Mobile-first. Toate componentele folosesc design tokens.
   Autor: nrg evolution srl
   ============================================================ */


/* ==========================================================
   1. BUTOANE — Sistem complet de butoane
   ========================================================== */

/* ── Buton de bază ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    height: var(--btn-height);
    padding: 0 var(--btn-padding-x);
    font-family: var(--font-body);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    line-height: 1;
    letter-spacing: var(--ls-wide);
    border: 2px solid transparent;
    border-radius: var(--btn-radius);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: all var(--duration-normal) var(--ease-out);
    position: relative;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
}

.btn:focus-visible {
    outline: var(--focus-ring-width) solid var(--focus-ring-color);
    outline-offset: var(--focus-ring-offset);
}

.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Buton Primary — Albastru nws ── */
.btn-primary {
    background-color: var(--nws-primary);
    color: var(--nws-text-inverse);
    border-color: var(--nws-primary);
}

.btn-primary:hover {
    background-color: var(--nws-dark);
    border-color: var(--nws-dark);
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
    background-color: var(--nws-primary-dark);
}

/* ── Buton Outline — Contur albastru ── */
.btn-outline {
    background-color: transparent;
    color: var(--nws-primary);
    border-color: var(--nws-primary);
}

.btn-outline:hover {
    background-color: var(--nws-primary);
    color: var(--nws-text-inverse);
    box-shadow: var(--shadow-primary);
    transform: translateY(-1px);
}

.btn-outline:active {
    transform: translateY(0);
    background-color: var(--nws-primary-dark);
}

/* ── Buton Outline Light — Pentru fundal închis ── */
.btn-outline-light {
    background-color: transparent;
    color: var(--nws-text-inverse);
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-light:hover {
    background-color: var(--nws-text-inverse);
    color: var(--nws-primary);
    border-color: var(--nws-text-inverse);
}

/* ── Buton Dark — Negru elegant ── */
.btn-dark {
    background-color: var(--nws-dark);
    color: var(--nws-text-inverse);
    border-color: var(--nws-dark);
}

.btn-dark:hover {
    background-color: var(--nws-primary);
    border-color: var(--nws-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-dark:active {
    transform: translateY(0);
}

/* ── Buton Ghost — Fără fundal ── */
.btn-ghost {
    background-color: transparent;
    color: var(--nws-text);
    border-color: transparent;
}

.btn-ghost:hover {
    background-color: var(--nws-surface-2);
    color: var(--nws-primary);
}

/* ── Buton White — Pe fundal închis ── */
.btn-white {
    background-color: var(--nws-text-inverse);
    color: var(--nws-primary);
    border-color: var(--nws-text-inverse);
}

.btn-white:hover {
    background-color: transparent;
    color: var(--nws-text-inverse);
    border-color: var(--nws-text-inverse);
}

/* ── Dimensiuni butoane ── */
.btn-sm {
    height: var(--btn-height-sm);
    padding: 0 var(--btn-padding-x-sm);
    font-size: var(--fs-xs);
}

.btn-lg {
    height: var(--btn-height-lg);
    padding: 0 var(--btn-padding-x-lg);
    font-size: var(--fs-base);
}

/* ── Buton full-width ── */
.btn-full {
    width: 100%;
}

/* ── Buton cu icon ── */
.btn svg,
.btn .btn-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-sm svg,
.btn-sm .btn-icon {
    width: 14px;
    height: 14px;
}

/* ── Buton icon-only (circular) ── */
.btn-icon-only {
    width: var(--btn-height);
    height: var(--btn-height);
    padding: 0;
    border-radius: var(--radius-full);
}

.btn-icon-only.btn-sm {
    width: var(--btn-height-sm);
    height: var(--btn-height-sm);
}


/* ==========================================================
   2. FORMULARE — Inputs, textareas, selects
   ========================================================== */

/* ── Grup de formular ── */
.form-group {
    margin-bottom: var(--space-5);
}

/* ── Label ── */
.form-label {
    display: block;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    color: var(--nws-text);
    margin-bottom: var(--space-2);
}

.form-label .required {
    color: var(--nws-error);
    margin-left: 2px;
}

/* ── Input & Textarea — Stiluri comune ── */
.form-input,
.form-textarea,
.form-select {
    display: block;
    width: 100%;
    height: var(--input-height);
    padding: 0 var(--input-padding-x);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    color: var(--nws-text);
    background-color: var(--nws-input-bg);
    border: 1px solid var(--nws-input-border);
    border-radius: var(--input-radius);
    transition: border-color var(--duration-fast) var(--ease-out),
                box-shadow var(--duration-fast) var(--ease-out);
    -webkit-appearance: none;
    appearance: none;
}

.form-textarea {
    height: auto;
    min-height: 120px;
    padding: var(--space-3) var(--input-padding-x);
    resize: vertical;
    line-height: var(--lh-relaxed);
}

/* Placeholder */
.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--nws-input-placeholder);
}

/* Focus */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--nws-primary);
    box-shadow: 0 0 0 3px rgba(var(--nws-primary-rgb), 0.15);
}

/* ── Dimensiuni input ── */
.form-input-sm {
    height: var(--input-height-sm);
    font-size: var(--fs-sm);
    padding: 0 var(--space-3);
}

.form-input-lg {
    height: var(--input-height-lg);
    font-size: var(--fs-md);
}

/* ── Select cu săgeată custom ── */
.form-select {
    padding-right: var(--space-10);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234b5363' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* ── Stare eroare ── */
.form-input.is-error,
.form-textarea.is-error,
.form-select.is-error {
    border-color: var(--nws-error);
}

.form-input.is-error:focus,
.form-textarea.is-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-error {
    display: block;
    font-size: var(--fs-sm);
    color: var(--nws-error);
    margin-top: var(--space-1);
}

/* ── Stare succes ── */
.form-input.is-success {
    border-color: var(--nws-success);
}

/* ── Help text sub input ── */
.form-help {
    display: block;
    font-size: var(--fs-xs);
    color: var(--nws-text-muted);
    margin-top: var(--space-1);
}

/* ── Checkbox & Radio custom ── */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: var(--space-2);
    cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--nws-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.form-check-label {
    font-size: var(--fs-sm);
    color: var(--nws-text-soft);
    line-height: var(--lh-normal);
}

/* ── Row de formular (2 coloane) ── */
.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
}

@media (min-width: 640px) {
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
}


/* ==========================================================
   3. CARDURI DE SERVICII — Design nws.ro
   ========================================================== */

/* ── Card serviciu cu icon, titlu, descriere ── */
.service-card {
    position: relative;
    background: var(--nws-surface);
    border: 1px solid var(--nws-border);
    border-radius: var(--card-radius);
    padding: var(--space-8) var(--space-6);
    text-align: left;
    overflow: hidden;
    transition: all var(--duration-normal) var(--ease-out);
}

/* Efect zoom fundal la hover (stilul nws.ro) */
.service-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--nws-gradient-primary);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity var(--duration-slow) var(--ease-out),
                transform var(--duration-slow) var(--ease-out);
    z-index: 0;
    border-radius: inherit;
}

.service-card:hover {
    border-color: transparent;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
    opacity: 1;
    transform: scale(1);
}

/* Conținut deasupra pseudo-element */
.service-card > * {
    position: relative;
    z-index: 1;
}

/* Icon box */
.service-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--nws-primary-rgb), 0.08);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-5);
    transition: all var(--duration-normal) var(--ease-out);
}

.service-card__icon svg,
.service-card__icon img {
    width: 28px;
    height: 28px;
    color: var(--nws-primary);
    transition: color var(--duration-normal) var(--ease-out);
}

.service-card:hover .service-card__icon {
    background: rgba(255, 255, 255, 0.15);
}

.service-card:hover .service-card__icon svg,
.service-card:hover .service-card__icon img {
    color: white;
}

/* Titlu */
.service-card__title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--nws-text);
    margin-bottom: var(--space-3);
    transition: color var(--duration-normal) var(--ease-out);
}

.service-card:hover .service-card__title {
    color: white;
}

/* Descriere */
.service-card__desc {
    font-size: var(--fs-sm);
    color: var(--nws-text-soft);
    line-height: var(--lh-relaxed);
    margin-bottom: var(--space-5);
    transition: color var(--duration-normal) var(--ease-out);
}

.service-card:hover .service-card__desc {
    color: rgba(255, 255, 255, 0.8);
}

/* Link "vezi detalii" */
.service-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--nws-primary);
    transition: all var(--duration-fast) var(--ease-out);
}

.service-card__link::after {
    content: '→';
    transition: transform var(--duration-fast) var(--ease-out);
}

.service-card:hover .service-card__link {
    color: white;
}

.service-card:hover .service-card__link::after {
    transform: translateX(4px);
}


/* ==========================================================
   4. CARDURI PORTOFOLIU — Imagine cu overlay
   ========================================================== */

.portfolio-card {
    position: relative;
    border-radius: var(--card-radius);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.portfolio-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-out);
}

.portfolio-card:hover .portfolio-card__img {
    transform: scale(1.05);
}

/* Overlay gradient */
.portfolio-card__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.1) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-5);
    opacity: 0;
    transition: opacity var(--duration-normal) var(--ease-out);
}

.portfolio-card:hover .portfolio-card__overlay {
    opacity: 1;
}

.portfolio-card__category {
    font-family: var(--font-accent);
    font-size: var(--fs-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: var(--ls-wider);
    color: var(--nws-primary-light);
    margin-bottom: var(--space-2);
}

.portfolio-card__title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: white;
    line-height: var(--lh-snug);
}

.portfolio-card__desc {
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-2);
    line-height: var(--lh-normal);
}


/* ==========================================================
   5. CTA SECTIONS — Call to Action
   ========================================================== */

.cta-section {
    background: var(--nws-gradient-cta);
    padding: var(--space-12) 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

/* Pattern decorativ subtil */
.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 80% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.cta-section > * {
    position: relative;
    z-index: 1;
}

.cta-section__title {
    font-family: var(--font-heading);
    font-size: var(--fs-3xl);
    font-weight: var(--fw-bold);
    color: white;
    margin-bottom: var(--space-4);
    line-height: var(--lh-tight);
}

@media (min-width: 768px) {
    .cta-section__title {
        font-size: var(--fs-4xl);
    }
}

.cta-section__text {
    font-size: var(--fs-md);
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto var(--space-8);
    line-height: var(--lh-relaxed);
}

.cta-section__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
}

@media (min-width: 640px) {
    .cta-section__actions {
        flex-direction: row;
        justify-content: center;
    }
}


/* ==========================================================
   6. ICON LIST — Listă cu iconuri (pentru beneficii)
   ========================================================== */

.icon-list {
    list-style: none;
    padding: 0;
}

.icon-list__item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
    padding: var(--space-4) 0;
}

.icon-list__item + .icon-list__item {
    border-top: 1px solid var(--nws-border-lighter);
}

.icon-list__icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(var(--nws-primary-rgb), 0.08);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    color: var(--nws-primary);
}

.icon-list__icon svg {
    width: 20px;
    height: 20px;
}

.icon-list__content h4 {
    font-size: var(--fs-base);
    font-weight: var(--fw-semibold);
    color: var(--nws-text);
    margin-bottom: var(--space-1);
}

.icon-list__content p {
    font-size: var(--fs-sm);
    color: var(--nws-text-soft);
    margin-bottom: 0;
}


/* ==========================================================
   7. INDUSTRY LOGO CARDS — Carduri industrie
   ========================================================== */

.industry-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-6) var(--space-4);
    background: var(--nws-surface);
    border: 1px solid var(--nws-border);
    border-radius: var(--card-radius);
    text-align: center;
    transition: all var(--duration-normal) var(--ease-out);
}

.industry-card:hover {
    border-color: var(--nws-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.industry-card__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--nws-primary);
}

.industry-card__icon svg,
.industry-card__icon img {
    width: 32px;
    height: 32px;
}

.industry-card__name {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--nws-text);
}


/* ==========================================================
   8. TESTIMONIAL CARDS — Carduri cu recenzii
   ========================================================== */

.testimonial-card {
    background: var(--nws-surface);
    border: 1px solid var(--nws-border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    position: relative;
}

/* Ghilimele decorative */
.testimonial-card::before {
    content: '"';
    font-family: var(--font-heading);
    font-size: 72px;
    font-weight: var(--fw-extrabold);
    color: rgba(var(--nws-primary-rgb), 0.1);
    position: absolute;
    top: var(--space-4);
    left: var(--space-6);
    line-height: 1;
}

.testimonial-card__text {
    font-size: var(--fs-md);
    color: var(--nws-text-soft);
    line-height: var(--lh-relaxed);
    font-style: italic;
    margin-bottom: var(--space-6);
    position: relative;
    z-index: 1;
}

.testimonial-card__author {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.testimonial-card__avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.testimonial-card__name {
    font-family: var(--font-heading);
    font-size: var(--fs-sm);
    font-weight: var(--fw-semibold);
    color: var(--nws-text);
}

.testimonial-card__role {
    font-size: var(--fs-xs);
    color: var(--nws-text-muted);
}

/* Varianta pe fundal închis */
.testimonial-card--dark {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.1);
}

.testimonial-card--dark .testimonial-card__text {
    color: rgba(255, 255, 255, 0.8);
}

.testimonial-card--dark .testimonial-card__name {
    color: white;
}

.testimonial-card--dark .testimonial-card__role {
    color: rgba(255, 255, 255, 0.5);
}


/* ==========================================================
   9. ALERT / NOTICE BOXES
   ========================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    border: 1px solid;
    margin-bottom: var(--space-5);
    font-size: var(--fs-sm);
    line-height: var(--lh-normal);
}

.alert__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
}

.alert__content {
    flex: 1;
}

.alert__title {
    font-weight: var(--fw-semibold);
    margin-bottom: var(--space-1);
}

/* Variante de alertă */
.alert-info {
    background: var(--nws-info-light);
    border-color: var(--nws-info);
    color: #1e40af;
}

.alert-success {
    background: var(--nws-success-light);
    border-color: var(--nws-success);
    color: #065f46;
}

.alert-warning {
    background: var(--nws-warning-light);
    border-color: var(--nws-warning);
    color: #92400e;
}

.alert-error {
    background: var(--nws-error-light);
    border-color: var(--nws-error);
    color: #991b1b;
}


/* ==========================================================
   10. BREADCRUMBS — Navigație ierarhică
   ========================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-2);
    padding: var(--space-4) 0;
    font-size: var(--fs-sm);
    color: var(--nws-text-muted);
}

.breadcrumb__item {
    display: inline-flex;
    align-items: center;
}

.breadcrumb__link {
    color: var(--nws-text-muted);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

.breadcrumb__link:hover {
    color: var(--nws-primary);
}

.breadcrumb__separator {
    margin: 0 var(--space-1);
    color: var(--nws-text-faint);
    font-size: var(--fs-xs);
}

.breadcrumb__separator::after {
    content: '/';
}

.breadcrumb__current {
    color: var(--nws-text);
    font-weight: var(--fw-medium);
}


/* ==========================================================
   11. BADGE / CHIP — Etichete mici
   ========================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 4px 10px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-semibold);
    line-height: 1;
    border-radius: var(--radius-full);
    white-space: nowrap;
}

/* Variante badge */
.badge-primary {
    background: rgba(var(--nws-primary-rgb), 0.1);
    color: var(--nws-primary);
}

.badge-dark {
    background: var(--nws-dark);
    color: var(--nws-text-inverse);
}

.badge-success {
    background: var(--nws-success-light);
    color: var(--nws-success-dark);
}

.badge-warning {
    background: var(--nws-warning-light);
    color: var(--nws-warning-dark);
}

.badge-error {
    background: var(--nws-error-light);
    color: var(--nws-error-dark);
}

.badge-outline {
    background: transparent;
    border: 1px solid var(--nws-border);
    color: var(--nws-text-soft);
}

/* Chip — badge mai mare, clickabil */
.chip {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 14px;
    font-size: var(--fs-sm);
    font-weight: var(--fw-medium);
    border-radius: var(--radius-full);
    border: 1px solid var(--nws-border);
    background: var(--nws-surface);
    color: var(--nws-text-soft);
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
}

.chip:hover {
    border-color: var(--nws-primary);
    color: var(--nws-primary);
}

.chip.active {
    background: var(--nws-primary);
    border-color: var(--nws-primary);
    color: white;
}


/* ==========================================================
   12. LOADING SPINNER
   ========================================================== */

.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--nws-border);
    border-top-color: var(--nws-primary);
    border-radius: var(--radius-full);
    animation: spin 0.7s linear infinite;
}

.spinner-sm {
    width: 16px;
    height: 16px;
    border-width: 2px;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Overlay de loading pentru secțiuni */
.loading-overlay {
    position: absolute;
    inset: 0;
    background: var(--nws-overlay-light);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    border-radius: inherit;
}


/* ==========================================================
   13. CARD GENERIC — Container universal
   ========================================================== */

.card {
    background: var(--nws-surface);
    border: var(--card-border);
    border-radius: var(--card-radius);
    overflow: hidden;
    transition: box-shadow var(--duration-normal) var(--ease-out),
                transform var(--duration-normal) var(--ease-out);
}

.card:hover {
    box-shadow: var(--card-shadow-hover);
}

.card-body {
    padding: var(--card-padding);
}

.card-img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Card horizontal (imagine stânga, conținut dreapta) */
.card-h {
    display: flex;
    gap: var(--space-4);
}

.card-h .card-img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .card-h .card-img {
        width: 160px;
        height: 100px;
    }
}


/* ==========================================================
   14. TAG LIST — Tags de proiect/tehnologie
   ========================================================== */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tag {
    display: inline-block;
    padding: 4px 10px;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    color: var(--nws-text-soft);
    background: var(--nws-surface-2);
    border-radius: var(--radius-sm);
    transition: all var(--duration-fast) var(--ease-out);
}

.tag:hover {
    background: rgba(var(--nws-primary-rgb), 0.1);
    color: var(--nws-primary);
}


/* ==========================================================
   15. AVATAR
   ========================================================== */

.avatar {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-full);
    object-fit: cover;
    flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-lg { width: 56px; height: 56px; }
.avatar-xl { width: 72px; height: 72px; }


/* ==========================================================
   16. TOOLTIP (CSS-only)
   ========================================================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    padding: 6px 12px;
    background: var(--nws-dark);
    color: white;
    font-size: var(--fs-xs);
    font-weight: var(--fw-medium);
    border-radius: var(--radius-sm);
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all var(--duration-fast) var(--ease-out);
    z-index: var(--z-tooltip);
}

[data-tooltip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}


/* ==========================================================
   17. BACK TO TOP BUTTON
   ========================================================== */

.back-to-top {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--nws-surface);
    border: 1px solid var(--nws-border);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    color: var(--nws-text);
    cursor: pointer;
    z-index: var(--z-base);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: all var(--duration-normal) var(--ease-out);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--nws-primary);
    border-color: var(--nws-primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
}


/* ============ UTILITY & PAGE-SPECIFIC CLASSES ============ */

/* ── Spațiere — margini și padding ── */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-10 { margin-top: var(--space-10); }
.mt-12 { margin-top: var(--space-12); }

.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-10 { margin-bottom: var(--space-10); }
.mb-12 { margin-bottom: var(--space-12); }

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.p-6 { padding: var(--space-6); }
.py-10 { padding-top: var(--space-10); padding-bottom: var(--space-10); }

/* ── Gap — spațiu între elemente grid/flex ── */
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-12 { gap: var(--space-12); }

/* ── Flex utilitar ── */
.flex { display: flex; }
.flex-1 { flex: 1; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-col { flex-direction: column; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* ── Text — variante de stil ── */
.text-sm-muted {
    font-size: var(--fs-sm);
    color: var(--nws-text-muted);
}

.text-md-muted {
    font-size: var(--fs-md);
    color: var(--nws-text-muted);
}

.text-sm-soft {
    font-size: var(--fs-sm);
    color: var(--nws-text-soft);
    line-height: var(--lh-relaxed);
    margin-bottom: 0;
}

.text-emoji {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── Placeholder imagine (hartă, thumbnail lipsă) ── */
.placeholder-image {
    aspect-ratio: 16 / 10;
    background: var(--nws-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--card-radius);
    color: var(--nws-text-muted);
    font-size: var(--fs-lg);
}

/* Placeholder mic (carduri grid, fără border-radius) */
.placeholder-image--sm {
    aspect-ratio: 16 / 10;
    background: var(--nws-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

/* ── Card titlu info contact ── */
.card__heading {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-6);
}

/* ── Secțiune titlu aliniat stânga (pagini statice) ── */
.section-title--left {
    text-align: left;
    margin-bottom: var(--space-8);
}

/* ── Formular mesaj rezultat (contact) ── */
.form-message {
    margin-top: var(--space-4);
}

/* ── Rezultate căutare — componente BEM ── */
.search-result-item {
    padding: var(--space-5) 0;
    border-bottom: 1px solid var(--nws-border-lighter);
}

.search-result-item__layout {
    display: flex;
    align-items: flex-start;
    gap: var(--space-4);
}

.search-result-item__body {
    flex: 1;
}

.search-result-item__title {
    margin-bottom: var(--space-1);
}

.search-result-item__link {
    color: var(--nws-text);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
}

.search-result-item__link:hover {
    color: var(--nws-primary);
}

/* ── Stare goală (fără rezultate, așteptare query) ── */
.search-empty {
    padding: var(--space-10) 0;
}

.search-empty__icon {
    margin-bottom: var(--space-4);
}


/* ── Hero — modificatori de conținut (portofoliu, studii de caz) ── */

/* Conținut centrat cu lățime maximă (listing pages) */
.hero__content--centered {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

/* Conținut cu lățime limitată, fără centrare (detail pages) */
.hero__content--narrow {
    max-width: 800px;
}

/* Titlu hero mai mic, pentru pagini secundare */
.hero__title--sm {
    font-size: var(--fs-hero-sm);
}


/* ── Grid — variante cu spacing mai mare ── */

.grid-2--wide {
    gap: var(--space-12);
}


/* ── Imagini detaliu proiect ── */

/* Imagine principală full-width cu colțuri rotunjite */
.detail-image {
    width: 100%;
    border-radius: var(--card-radius);
}

/* Imagine cu shadow (studiu de caz thumbnail) */
.detail-image--shadow {
    width: 100%;
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-lg);
}


/* ── Section title — modificator cu spațiu mai mic (detaliu) ── */

.section-title--detail {
    text-align: left;
    margin-bottom: var(--space-4);
}


/* ── Detail meta — text secundar pe pagina de detaliu ── */

.detail-meta {
    color: var(--nws-text-soft);
    margin-bottom: var(--space-2);
}


/* ── Badge — modificator block (afișat pe rând propriu) ── */

.badge--block {
    display: inline-block;
    margin-bottom: var(--space-6);
}


/* ── Card — modificatori pentru link și conținut ── */

/* Card care funcționează ca link (fără text-decoration) */
.card--link {
    text-decoration: none;
}

/* Imagine card cu aspect ratio peisaj */
.card-img--landscape {
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

/* Titlu generic de card (studii de caz listing) */
.card__title {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: var(--fw-bold);
    color: var(--nws-text);
    margin-bottom: var(--space-2);
}

/* Excerpt / descriere scurtă pe card */
.card__excerpt {
    font-size: var(--fs-sm);
    color: var(--nws-text-soft);
    line-height: var(--lh-relaxed);
    margin-bottom: 0;
}


/* ── Empty state — placeholder când nu există conținut ── */

.empty-state {
    padding: var(--space-16) 0;
}

.empty-state__icon {
    font-size: 4rem;
    margin-bottom: var(--space-6);
}


/* ── Icon inline — aliniat cu textul din heading ── */

.icon--inline {
    vertical-align: middle;
    margin-right: 8px;
}


/* ============================================================
   INLINE-STYLE REFACTOR — Clase extrase din index.php & serviciu.php
   Emoji icons, modificatori secțiune pe fundal închis,
   sidebar sticky, detaliu serviciu hero icon.
   ============================================================ */


/* ── Icon emoji — dimensiuni pentru emoji-uri în carduri ── */

/* Dimensiune standard (28px) — carduri servicii, tech stack */
.icon-emoji {
    font-size: 28px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Dimensiune mare (32px) — carduri industrii */
.icon-emoji--lg {
    font-size: 32px;
    line-height: 1;
}

/* Dimensiune extra-mare (36px) — hero detaliu serviciu */
.icon-emoji--xl {
    font-size: 36px;
    line-height: 1;
}


/* ── Modificatori secțiune pe fundal închis (tech, contact CTA) ── */

/* Label cu opacitate redusă pe fundal închis */
.section-label--light {
    color: rgba(255, 255, 255, 0.6);
}

/* Titlu alb pe fundal închis */
.section-title--light {
    color: #fff;
}

/* Descriere cu opacitate redusă pe fundal închis */
.section-desc--light {
    color: rgba(255, 255, 255, 0.7);
}


/* ── Serviciu detaliu — icon mare din hero ── */

/* Iconul emoji din hero-ul paginii de detaliu serviciu */
.service-detail__icon {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.15);
    margin-bottom: var(--space-5);
}


/* ── Sidebar sticky — fixat sub header la scroll ── */

.sidebar-sticky {
    position: sticky;
    top: calc(var(--header-height) + var(--space-6));
}


/* ── Sidebar CTA — descriere din sidebar-ul de ofertă ── */

.sidebar-cta__desc {
    color: var(--nws-text-soft);
    font-size: var(--fs-sm);
    margin-bottom: var(--space-6);
}


/* ── Hero subtitle — centrare pe pagini listing ── */

.hero__subtitle--centered {
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================================
   BREADCRUMB IN HERO (Dark Background)
   ========================================================== */
.breadcrumb--hero {
    color: rgba(255, 255, 255, 0.7);
    margin-top: var(--space-8);
    padding-top: var(--space-4);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}
.breadcrumb--hero .breadcrumb__link {
    color: rgba(255, 255, 255, 0.7);
}
.breadcrumb--hero .breadcrumb__link:hover {
    color: #ffffff;
}
.breadcrumb--hero .breadcrumb__separator {
    color: rgba(255, 255, 255, 0.4);
}
.breadcrumb--hero .breadcrumb__current {
    color: #ffffff;
}

/* ============================================================
   DARK MODE BUTTON OVERRIDES (For buttons on permanently dark backgrounds)
   ============================================================ */
[data-theme="dark"] .btn-white {
    background-color: #fff !important;
    color: #111827 !important;
    border-color: #fff !important;
}
[data-theme="dark"] .btn-white:hover {
    background-color: #e5e7eb !important;
    border-color: #e5e7eb !important;
}

[data-theme="dark"] .btn-outline-light {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}
[data-theme="dark"] .btn-outline-light:hover {
    background-color: #fff !important;
    color: #111827 !important;
}

/* ============================================================
   PAGE-SPECIFIC DARK MODE OVERRIDES (FAQ & Suport Clienti)
   ============================================================ */

/* Suport Clienti */
[data-theme="dark"] .support-contact-label { color: var(--nws-text-soft) !important; }
[data-theme="dark"] .support-contact-value { color: var(--nws-text) !important; }
[data-theme="dark"] .support-contact-value:hover { color: var(--nws-primary-light) !important; }
[data-theme="dark"] .support-wrap { background: var(--nws-surface-2) !important; }
[data-theme="dark"] .support-wrap::after { opacity: 0.1 !important; }
[data-theme="dark"] .support-form-card { background: var(--nws-surface) !important; box-shadow: none !important; border: 1px solid var(--nws-border); }
[data-theme="dark"] .support-form-card h3 { color: var(--nws-text) !important; }
[data-theme="dark"] .sf-control { 
    background: var(--nws-surface-3) !important; 
    color: var(--nws-text) !important; 
    border-color: var(--nws-border) !important;
}
[data-theme="dark"] .sf-control::placeholder { color: rgba(255,255,255,0.4) !important; }
[data-theme="dark"] .sf-label { color: var(--nws-text) !important; }
[data-theme="dark"] .sf-info { color: var(--nws-text-soft) !important; }
[data-theme="dark"] .sf-checkbox-wrap { color: var(--nws-text-soft) !important; }

[data-theme="dark"] .stat-value { color: var(--nws-text) !important; }
[data-theme="dark"] .stat-value small { color: var(--nws-text) !important; }
[data-theme="dark"] .stat-label { color: var(--nws-text-soft) !important; }
[data-theme="dark"] .nws-badge-top, [data-theme="dark"] .nws-badge-bot { color: var(--nws-text-soft) !important; }

/* FAQ */
[data-theme="dark"] .faq-item { 
    background: var(--nws-surface-2) !important; 
    border-color: var(--nws-border) !important;
}
[data-theme="dark"] .faq-item__question { color: var(--nws-text) !important; }
[data-theme="dark"] .faq-item__answer { color: var(--nws-text-soft) !important; }

[data-theme="dark"] .highlight-box { color: var(--nws-text-soft) !important; }
[data-theme="dark"] .highlight-box__title { color: var(--nws-primary-light) !important; }
[data-theme="dark"] .highlight-box p { color: var(--nws-text-soft) !important; }

/* ============================================================
   COOKIE BANNER
   ============================================================ */
.cookie-modal-overlay {
    position: fixed;
    bottom: 0; left: 0; width: 100%;
    z-index: 99999;
    display: none;
    pointer-events: none; /* Let clicks pass through if anything goes above */
}
.cookie-modal {
    background: #ffffff;
    width: 100%;
    max-width: 100%;
    border-top: 1px solid #e2e8f0;
    padding: 24px 0;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    color: #334155;
    animation: cookieSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    pointer-events: auto; /* Catch clicks on banner */
}
.cookie-modal-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 30px;
}
.cookie-modal-body {
    flex: 1;
}
.cookie-modal-body p {
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
    color: #475569;
}
.cookie-modal-body a {
    color: var(--nws-primary);
    text-decoration: underline;
    font-weight: 500;
}
.cookie-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    flex-shrink: 0;
}
@media (max-width: 992px) {
    .cookie-modal-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}
@keyframes cookieSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Floating Cookie Button */
.floating-cookie-btn {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9990;
    transition: all 0.2s ease;
}
.floating-cookie-btn:hover {
    background: var(--nws-primary);
    color: #ffffff;
    border-color: var(--nws-primary);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

/* ── Dark Mode pentru Cookie Banner ── */
[data-theme="dark"] .cookie-modal {
    background: var(--nws-surface);
    border-top-color: var(--nws-border);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    color: var(--nws-text);
}
[data-theme="dark"] .cookie-modal-body p {
    color: var(--nws-text-soft);
}
[data-theme="dark"] .floating-cookie-btn {
    background: var(--nws-surface-2);
    color: var(--nws-text);
    border-color: var(--nws-border);
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}
[data-theme="dark"] .floating-cookie-btn:hover {
    background: var(--nws-primary);
    color: #ffffff;
    border-color: var(--nws-primary);
}