/* ================= RESET ================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ================= BASE ================= */
body {
    font-family: 'Inter', sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 20px;
}

/* corectie doar pentru mobil */
@media (max-width: 768px) {

    .container {
        padding-left: 16px;
        padding-right: 16px;
        padding-top: 20px;
        padding-bottom: 20px;
        box-sizing: border-box;
    }

}

/* ================= CARD GENERAL ================= */
.card {
    background: #ffffff;
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

h1 {
    text-align: center;
    margin-bottom: 24px;
    font-size: 28px;
}

h2 {
    margin-bottom: 16px;
    font-size: 20px;
}

/* ================= GRID GENERAL ================= */
.category-grid {
    display: grid;
    gap: 16px;
}

/* ================================================= */
/* ================= TIP LOCAȚIE =================== */
/* ================================================= */

.card.tip-locatie .category-grid {
    grid-template-columns: repeat(3, 1fr);
}

.card.tip-locatie .category-card img {
    height: 70px;
    padding: 8px;
}

.card.tip-locatie h3 {
    font-size: 13px;
}

/* ================================================= */
/* ============ TIP SISTEM & TIP ECHIPAMENT ========= */
/* ================================================= */

.card.tip-sistem .category-grid,
.card.tip-echipament .category-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
}

@media (max-width: 768px) {
    .card.tip-sistem .category-grid,
    .card.tip-echipament .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ================= CARD ================= */
.category-card {
    position: relative;
    border-radius: 14px;
    overflow: hidden;
    cursor: pointer;
    background: #f9fafb;
    border: 2px solid transparent;
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease;
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.12);
}

/* ================= IMAGINI ================= */
.category-card img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    padding: 10px;
    background: #ffffff;
    transition: transform 0.15s ease;
}

/* ================= TEXT ================= */
.category-card .content {
    padding: 10px;
    text-align: center;
}

.category-card h3 {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

/* ================= INPUT ================= */
.category-card input {
    position: absolute;
    opacity: 0;
}

/* ================= SELECT + ANIMAȚIE ================= */
.category-card .overlay {
    position: absolute;
    inset: 0;
    background: rgba(37, 99, 235, 0.08);
    opacity: 0;
    transition: opacity 0.15s ease;
}

.category-card input:checked ~ .overlay {
    opacity: 1;
}

.category-card:has(input:checked) {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.25);
    border-color: #2563eb;
}

.category-card input:checked ~ img {
    transform: scale(1.04);
}

.category-card input:checked ~ .content h3 {
    color: #2563eb;
}

/* ================= BUTON ================= */
button {
    width: 100%;
    margin-top: 24px;
    padding: 14px;
    border-radius: 10px;
    border: none;
    background: #2563eb;
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

button:hover {
    background: #1d4ed8;
}

/* ================================================= */
/* ================ CARD ECHIPAMENT ================ */
/* ================================================= */

.echipament-card {
    padding: 16px;
}

.echipament-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 16px;
    align-items: center;
}

@media (max-width: 640px) {
    .echipament-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.echipament-image {
    background: #ffffff;
    border-radius: 10px;
    padding: 8px;
    text-align: center;
}

.echipament-image img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.echipament-info {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.echipament-model {
    font-size: 15px;
    font-weight: 600;
}

.echipament-desc {
    font-size: 13px;
    color: #4b5563;
}

.echipament-price {
    font-weight: 600;
    color: #1f2937;
}

.echipament-qty input {
    width: 80px;
    margin-left: 8px;
}

/* ================================================= */
/* ===== AJUSTARE LAYOUT – TIP ECHIPAMENT (SAFE) ==== */
/* ================================================= */

.card.tip-echipament h2 {
    margin-bottom: 6px;   /* titlul mai aproape de producător */
}

.card.tip-echipament label {
    display: block;
    margin-bottom: 20px;  /* depărtare clară față de opțiuni */
}

.card.tip-echipament .category-grid {
    margin-top: 0;        /* elimină lipirea de label */
}

/* ================================================= */
/* ================= LANDING PAGE ================== */
/* ================================================= */

.landing-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.landing-card {
    max-width: 720px;
    text-align: center;
    padding: 48px 32px;
}

.landing-text {
    font-size: 16px;
    margin-top: 16px;
    line-height: 1.6;
}

.landing-button {
    margin-top: 32px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

/* ================================================= */
/* ===== FORMULAR DATE CLIENT – MOBILE FIX ========= */
/* ================================================= */

@media (max-width: 640px) {
    .card form label {
        display: block;
        width: 100%;
    }

    .card form input {
        width: 100%;
        margin-top: 6px;
    }
}

/* ================================================= */
/* ===== VALIDARE VIZUALĂ FORMULAR (SAFE) =========== */
/* ================================================= */

.card form input:valid {
    border: 2px solid #16a34a; /* verde */
}

.card form input:invalid {
    border: 2px solid #dc2626; /* roșu */
}

.card form input {
    transition: border-color 0.2s ease;
}

/* ================================================= */
/* == FINISAJ SPATIERE VERTICALA – TIP ECHIPAMENT == */
/* ================================================= */

.card.tip-echipament .category-card {
    margin-bottom: 0;     /* elimină orice spațiu vertical suplimentar */
}

.card.tip-echipament .category-grid {
    row-gap: 16px;        /* forțează verticala să fie identică cu orizontala */
}

/* ================================================= */
/* === TERMENI TEHNICI – HIGHLIGHT + TOOLTIP ======= */
/* ================================================= */

.tech-term {
    color: #1d4ed8; /* albastru */
    font-weight: 600;
    position: relative;
    cursor: help;
}

/* tooltip invizibil by default */
.tech-term::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);

    background: #111827;
    color: #fff;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.4;
    border-radius: 6px;

    min-width: 160px;
    max-width: min(90vw, 320px);

    white-space: normal;
    overflow-wrap: break-word;

    text-align: center;

    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 999;
}

/* săgețică */
.tech-term::before {
    content: "";
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #111827 transparent transparent transparent;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 999;
}

/* hover desktop */
.tech-term:hover::after,
.tech-term:hover::before {
    opacity: 1;
}

/* ================================================= */
/* === FIX ALINIERE TEXT – TIP LOCATIE (MOBIL) ===== */
/* ================================================= */

.category-card .content {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.system-info {
    font-size: 13px;
    color: #555;
    margin: 6px 0 14px 0;
    line-height: 1.4;
}

.landing-features {
    display: flex;
    justify-content: center;
    margin: 35px 0 20px 0;
    gap: 30px;
}

.feature {
    flex: 1;
    text-align: center;
    font-size: 14px;
    color: #444;
}

.icon {
    display: block;
    font-size: 24px;
    margin-bottom: 5px;
}

.landing-text.muted {
    margin-bottom: 25px;
}