/* =============================================================
   SDG turinio blokai
   Naudojama ir svetainėje, ir TinyMCE redaktoriaus viduje.
   Visos klasės prasideda "sdg-", kad nesimaišytų su Tailwind.
   ============================================================= */

.sdg-block {
    --sdg-red: #d6262b;
    --sdg-red-dark: #b71c22;
    --sdg-ink: #231f20;
    --sdg-text: #5b5f66;
    --sdg-line: #dfe3e8;
    --sdg-soft: #f1f4f7;
    --sdg-card: #f7f7f7;
    --sdg-title-font: 'Montserrat', 'Nunito', system-ui, sans-serif;

    box-sizing: border-box;
    margin: 0 0 28px;
    font-family: inherit;
    color: var(--sdg-ink);
}

.sdg-block *,
.sdg-block *::before,
.sdg-block *::after {
    box-sizing: border-box;
}

.sdg-block .material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: 300;
    font-style: normal;
    font-size: 28px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    color: var(--sdg-red);
    user-select: none;
}

/* -------------------------------------------------------------
   1. Misija / Vizija / Vertybės
   ------------------------------------------------------------- */
.sdg-mvv {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: var(--sdg-soft);
    border-radius: 14px;
    padding: 40px 0;
}

.sdg-mvv__item {
    padding: 0 40px;
    border-left: 1px solid var(--sdg-line);
}

.sdg-mvv__item:first-child {
    border-left: 0;
}

.sdg-mvv__title {
    margin: 18px 0 8px;
    font-family: var(--sdg-title-font);
    font-size: 15px;
    font-weight: 800;
    color: var(--sdg-ink);
}

.sdg-mvv__text {
    margin: 0;
    font-size: 15px;
    line-height: 1.75;
    color: var(--sdg-text);
}

.sdg-mvv__values {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--sdg-ink);
}

.sdg-mvv__values strong {
    font-size: 20px;
    font-weight: 600;
    color: var(--sdg-red);
}

/* -------------------------------------------------------------
   2. Mygtukų grupė
   ------------------------------------------------------------- */
.sdg-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.sdg-btns a.sdg-btn,
.sdg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 12px 24px;
    border: 2px solid var(--sdg-red);
    border-radius: 8px;
    background: #fff;
    color: var(--sdg-red);
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .15s, color .15s;
}

.sdg-btns a.sdg-btn:hover {
    background: #fdf0f0;
}

.sdg-btns a.sdg-btn--primary {
    background: var(--sdg-red);
    color: #fff;
}

.sdg-btns a.sdg-btn--primary:hover {
    background: var(--sdg-red-dark);
    border-color: var(--sdg-red-dark);
}

.sdg-btns a.sdg-btn:focus-visible {
    outline: 3px solid #f6b5b7;
    outline-offset: 2px;
}

/* -------------------------------------------------------------
   3. Paslaugų kortelės
   ------------------------------------------------------------- */
.sdg-services {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 16px;
}

.sdg-services a.sdg-service {
    display: flex;
    flex-direction: column;
    gap: 18px;
    min-height: 168px;
    padding: 26px 24px;
    border: 1px solid #ededed;
    border-radius: 24px;
    background: linear-gradient(160deg, #fafafa 0%, #f2f2f2 100%);
    color: var(--sdg-ink);
    text-decoration: none;
    transition: border-color .15s;
}

.sdg-services a.sdg-service:hover {
    border-color: #f1b9bb;
}

.sdg-services a.sdg-service:focus-visible {
    outline: 3px solid #f6b5b7;
    outline-offset: 2px;
}

.sdg-service__title {
    margin: 0;
    font-family: var(--sdg-title-font);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--sdg-ink);
}

.sdg-service img {
    max-height: 32px;
    width: auto;
    align-self: flex-start;
}

/* -------------------------------------------------------------
   4. Raudona antraštės juosta
   ------------------------------------------------------------- */
.sdg-hero {
    position: relative;
    overflow: hidden;
    padding: 30px 36px 44px;
    border-radius: 22px;
    background: var(--sdg-red-dark);
    color: #fff;
}

.sdg-hero::before,
.sdg-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    pointer-events: none;
}

.sdg-hero::before {
    width: 260px;
    height: 260px;
    top: -90px;
    right: -40px;
}

.sdg-hero::after {
    width: 100px;
    height: 100px;
    bottom: -30px;
    left: 41%;
}

.sdg-hero>* {
    position: relative;
    z-index: 1;
}

.sdg-hero__badge {
    display: inline-block;
    margin: 0 0 14px;
    padding: 5px 14px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.sdg-hero__title {
    margin: 0 0 10px;
    font-family: var(--sdg-title-font);
    font-size: 28px;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
}

.sdg-hero__text {
    max-width: 520px;
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: rgba(255, 255, 255, .92);
}

/* -------------------------------------------------------------
   5. Dokumentų / sertifikatų tinklelis
   ------------------------------------------------------------- */
.sdg-docs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
}

.sdg-docs a.sdg-doc {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 10px;
    background: #fff;
    color: var(--sdg-ink);
    text-decoration: none;
    transition: border-color .15s;
}

.sdg-docs a.sdg-doc:hover {
    border-color: #f1b9bb;
}

.sdg-docs a.sdg-doc:focus-visible {
    outline: 3px solid #f6b5b7;
    outline-offset: 2px;
}

.sdg-doc__preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    height: 180px;
    padding: 14px;
    background: #f8f9fa;
    border-bottom: 1px solid #ececec;
    font-size: 12px;
    color: #9a9ea5;
}

.sdg-doc__preview img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* PDF piktograma be paveikslėlio */
.sdg-doc__file {
    position: relative;
    display: block;
    width: 64px;
    height: 80px;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    background:
        linear-gradient(#e6e6e6, #e6e6e6) 12px 14px / 40px 3px no-repeat,
        linear-gradient(#e6e6e6, #e6e6e6) 12px 24px / 40px 3px no-repeat,
        linear-gradient(#e6e6e6, #e6e6e6) 12px 34px / 30px 3px no-repeat,
        #fff;
}

.sdg-doc__tag {
    position: absolute;
    left: -8px;
    bottom: 12px;
    padding: 3px 7px;
    border-radius: 3px;
    background: var(--sdg-red-dark);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
}

.sdg-doc__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    padding: 16px;
}

.sdg-doc__title {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.5;
    color: var(--sdg-ink);
}

.sdg-doc__arrow {
    flex: none;
    font-size: 14px;
    color: var(--sdg-red);
}

/* -------------------------------------------------------------
   Mobilieji
   ------------------------------------------------------------- */
@media (max-width: 768px) {
    .sdg-mvv {
        grid-template-columns: 1fr;
        padding: 8px 0;
    }

    .sdg-mvv__item {
        padding: 24px;
        border-left: 0;
        border-top: 1px solid var(--sdg-line);
    }

    .sdg-mvv__item:first-child {
        border-top: 0;
    }

    .sdg-hero {
        padding: 24px 22px 32px;
    }

    .sdg-hero__title {
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sdg-block * {
        transition: none !important;
    }
}

/* -------------------------------------------------------------
   Tik redaktoriuje (TinyMCE prideda klasę mce-content-body)
   ------------------------------------------------------------- */
.mce-content-body .sdg-block {
    outline: 1px dashed transparent;
    outline-offset: 6px;
}

.mce-content-body .sdg-block:hover {
    outline-color: #e9a3a5;
}

/* Elementas, kurį šiuo metu redaguoja */
.mce-content-body [data-mce-sdg-active] {
    outline: 2px solid #d6262b !important;
    outline-offset: 3px;
}

.mce-content-body .sdg-block[data-mce-sdg-active] {
    outline-offset: 6px;
}

/* Ikona – paspaudžiama */
.mce-content-body .sdg-block .material-symbols-outlined {
    cursor: pointer;
    border-radius: 6px;
}

.mce-content-body .sdg-block .material-symbols-outlined:hover {
    background: #fde8e8;
    box-shadow: 0 0 0 4px #fde8e8;
}