/* =========================================================
   PATENTS PAGE - PREMIUM RESEARCH OUTPUT (FINAL PROD)
========================================================= */

/* =========================
   FEATURE HEADER
========================= */

.patents-feature {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 34px;
    align-items: center;

    margin: 0 0 54px;
    padding: 36px 40px;

    background: linear-gradient(135deg, #0a2540, #14395f);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .16);
}

.patents-feature .section-kicker {
    color: #cbaf75;
}

.patents-feature h2 {
    margin: 10px 0 12px;
    color: #ffffff;
    font-size: 32px;
    line-height: 1.2;
}

.patents-feature p {
    margin: 0;
    max-width: 760px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.75;
}

/* =========================
   GRID STABLE (NO BREAK)
========================= */

.patent-grid,
.patent-grid-premium {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
    align-items: stretch;
}

/* =========================
   CARD STABLE
========================= */

.patent-card,
.patent-card-premium {
    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #fff;
    border: 1px solid rgba(15,23,42,.09);
    border-radius: 20px;

    box-shadow: 0 16px 38px rgba(15,23,42,.06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.patent-card:hover,
.patent-card-premium:hover {
    transform: translateY(-6px);
    border-color: rgba(203,175,117,.38);
    box-shadow: 0 26px 60px rgba(15,23,42,.14);
}

/* =========================
   IMAGE FIX FINAL (ICPEST STYLE)
========================= */

.patent-image,
.patent-card > img {
    width: 100%;
    height: 280px; /* mai compact */

    display: block;

    background: linear-gradient(180deg,#f8fafc,#eef2f7);

    object-fit: contain;   /* păstrează brevetul complet */
    object-position: center;

    padding: 14px;

    border-bottom: 1px solid rgba(15,23,42,.06);
}

/* separare mai bună imagine / text */
.patent-content {
    padding: 20px 26px 26px;
}

/* badge aerisit */
.patent-badge {
    margin-top: 14px;
    margin-bottom: 8px;
}

.patent-image,
.patent-card > img {
    width: 100%;
    height: 300px;

    object-fit: contain;
    object-position: center;

    display: block;
}

.patent-card:hover img {
    transform: scale(1.03);
}

/* =========================
   CONTENT FIX
========================= */

.patent-content {
    padding: 22px 26px 26px;
    flex: 1;
}

.patent-card h3 {
    margin: 14px 0 10px;
}

.patent-card p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

/* =========================
   SAFETY RESET (IMPORTANT)
========================= */

.patent-card img {
    max-width: 100%;
    height: 320px;
}

/* =========================
   CONTENT
========================= */

.patent-content {
    padding: 26px;
}

.patent-card:not(.patent-card-premium) {
    padding: 0;
}

.patent-card:not(.patent-card-premium) .patent-badge,
.patent-card:not(.patent-card-premium) h3,
.patent-card:not(.patent-card-premium) p {
    margin-left: 26px;
    margin-right: 26px;
}

.patent-card:not(.patent-card-premium) .patent-badge {
    margin-top: 24px;
}

.patent-card:not(.patent-card-premium) p {
    margin-bottom: 28px;
}

.patent-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 14px;
    margin-bottom: 16px;
}

.patent-badge {
    display: inline-flex;

    padding: 7px 12px;
    border-radius: 999px;

    background: rgba(203, 175, 117, .12);
    color: #b8954f;

    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.patent-index {
    color: rgba(15, 23, 42, .13);
    font-size: 30px;
    font-weight: 900;
    line-height: 1;
}

.patent-card h3,
.patent-card-premium h3 {
    margin: 16px 0 12px;
    color: #0f172a;

    font-size: 22px;
    font-weight: 900;
    line-height: 1.25;
}

.patent-card p,
.patent-card-premium p {
    margin: 0;
    color: #64748b;
    line-height: 1.7;
}

/* =========================
   META
========================= */

.patent-meta {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;

    margin-top: 24px;
    padding-top: 20px;

    border-top: 1px solid rgba(15, 23, 42, .08);
}

.patent-meta span {
    display: block;
    margin-bottom: 4px;

    color: #94a3b8;

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.patent-meta strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 1024px) {
    .patent-grid,
    .patent-grid-premium {
        grid-template-columns: 1fr;
    }

    .patents-feature {
        grid-template-columns: 1fr;
    }

    .patent-image,
    .patent-image img,
    .patent-card > img {
        height: 360px;
    }
}

@media (max-width: 700px) {
    .patents-feature {
        padding: 28px;
    }

    .patents-feature h2 {
        font-size: 26px;
    }

    .patent-image,
    .patent-image img,
    .patent-card > img {
        height: 280px;
    }

    .patent-meta {
        grid-template-columns: 1fr;
    }
}

/* FORCE CLEAN IMAGE BEHAVIOR */
.patent-card img {
    width: 100% !important;
    height: 280px !important;

    object-fit: contain !important;
    object-position: center !important;

    display: block;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;

    font-size: 40px;
    color: #fff;

    cursor: pointer;
    z-index: 10001;

    line-height: 1;
}

.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.85);
    align-items: center;
    justify-content: center;
    z-index: 9999;
}