/* ==========================================================
   
   ========================================================== */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=Fraunces:ital,wght@0,300;0,600;1,300&display=swap');

/* ---- CSS Variables ---- */
:root {
    --sg-bg: #f8f7f4;
    --sg-white: #ffffff;
    --sg-text: #1a1a1a;
    --sg-muted: #6b7280;
    --sg-border: rgba(0, 0, 0, 0.06);
    --sg-radius: 22px;
    --space-xs: 8px;
    --space-sm: 16px;
    --space-md: 24px;
    --space-lg: 2px;
    --space-xl: 2px;
    --space-2xl: 96px;
    /* Accent per tip card */
    --blue: #244da8;
    --blue-bg: #eef3ff;
    --green: #0f7a55;
    --green-bg: #e8f7f1;
    --amber: #b45309;
    --amber-bg: #fff7ed;
    --purple: #7c3aed;
    --purple-bg: #f5f0ff;
    --gold: #d97706;
    --gold-bg: #fffbeb;
    --sky: #0369a1;
    --sky-bg: #e0f2fe;
    --rose: #be185d;
    --rose-bg: #fdf2f8;
}

/* ---- Section wrapper ---- */
.sg-section {
    background: var(--sg-bg);
    padding: var(--space-xl) 10px;
}

/* ---- Wrapper ---- */
.sg-wrap {
    padding-block:50px;
    font-family: 'DM Sans', sans-serif;
    grid-auto-columns:auto;
    margin-left:2%;
    
}

/* ---- Decor Frame ---- */
.decor-frame {
    position: relative;
    width: 95%;
    padding: var(--space-xl);
    background: #ffffff;
   
    margin-bottom: var(--space-xl);
   
   
}

/* ---- Header (Warm Edition) ---- */
.sg-header {
    position: relative;
    align-self: start;
    padding: 56px;
    
    
    color: #3a2f1a;
    overflow: visible;
    
}

    /* Glow cald subtil */
    .sg-header::after {
        content: '';
        position: absolute;
        inset: 0;
        opacity: 0;
        transition: opacity .4s ease;
        z-index: -1;
    }

    .sg-header:hover::after {
        opacity: 1;
    }

/* Titlu */
.sg-title {
    font-size: 2.4rem;
    line-height: 1.2;
    font-weight: 600;
    margin-bottom: 12px;
    color: #5a3b1a;
}

    

/* Eyebrow */
.sg-eyebrow {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.75;
    margin-bottom: 12px;
    color: #8a5a2a;
}

/* Subtitlu */
.sg-sub {
    margin-top: 12px;
    font-size: 15px;
    opacity: 0.85;
    color: #5c4a2d;
}


/* ---- Grid ---- */
.sg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

/* ---- Card ---- */
.sc {
    background: var(--sg-white);
    border-radius: var(--sg-radius);
    padding: 36px 30px 32px;
    border: 1px solid var(--sg-border);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), box-shadow .35s ease, border-color .3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

    .sc:hover {
        transform: translateY(-8px);
        box-shadow: 0 24px 60px rgba(0,0,0,0.08);
        border-color: rgba(36, 77, 168, 0.18);
    }

    /* Accent bottom bar */
    .sc::before {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--card-accent, var(--blue));
        transform: scaleX(0);
        transform-origin: left;
        transition: transform .4s cubic-bezier(.4, 0, .2, 1);
    }

    .sc:hover::before {
        transform: scaleX(1);
    }



.sc:hover {
    color: rgba(36, 77, 168, 0.1);
}

/* Icon */
.sc-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: var(--card-icon-bg, var(--blue-bg));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    color: var(--card-accent, var(--blue));
    transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}

.sc:hover .sc-icon {
    transform: scale(1.15) rotate(-4deg);
}

/* Tag */
.sc-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--card-accent, var(--blue));
    background: var(--card-icon-bg, var(--blue-bg));
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 14px;
}

/* Titlu & descriere */
.sc h3 {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    font-weight: 600;
    color: var(--sg-text);
    margin-bottom: 12px;
}

.sc p {
    font-size: 15px;
    font-weight: 300;
    color: var(--sg-muted);
    line-height: 1.7;
    margin-bottom: 22px;
}

/* Link */
.sc-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--card-accent, var(--blue));
    transition: gap .25s ease;
}

.sc:hover .sc-link {
    gap: 12px;
}

.sc-link svg {
    width: 15px;
    height: 15px;
    transition: transform .25s ease;
}

.sc:hover .sc-link svg {
    transform: translateX(4px);
}

/* ---- Variante de culoare ---- */
.sc--blue {
    --card-accent: var(--blue);
    --card-icon-bg: var(--blue-bg);
}

.sc--green {
    --card-accent: var(--green);
    --card-icon-bg: var(--green-bg);
}

.sc--amber {
    --card-accent: var(--amber);
    --card-icon-bg: var(--amber-bg);
}

.sc--purple {
    --card-accent: var(--purple);
    --card-icon-bg: var(--purple-bg);
}

.sc--gold {
    --card-accent: var(--gold);
    --card-icon-bg: var(--gold-bg);
}

.sc--sky {
    --card-accent: var(--sky);
    --card-icon-bg: var(--sky-bg);
}

.sc--rose {
    --card-accent: var(--rose);
    --card-icon-bg: var(--rose-bg);
}

/* ---- Featured ---- */
.sc.featured {
    grid-column: span 2;
    background: linear-gradient(135deg, #1a3a8a 0%, #244da8 60%, #2d5fc4 100%);
    color: #fff;
    border-color: transparent;
    --card-accent: rgba(255,255,255,0.9);
    --card-icon-bg: rgba(255,255,255,0.15);
    box-shadow: 0 24px 70px rgba(36, 77, 168, 0.35);
}

    .sc.featured:hover {
        box-shadow: 0 28px 80px rgba(36, 77, 168, 0.45);
    }

    .sc.featured h3 {
        color: #fff;
    }

    .sc.featured p {
        color: rgba(255,255,255,0.75);
    }

    .sc.featured .sc-link {
        color: #fff;
    }

    .sc.featured {
        color: rgba(255,255,255,0.08);
    }





/* Animația de tastare tip cursiv */
.typing-text {
    overflow: hidden;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
    animation: typing 4s steps(20, end) infinite;
}
.sg-bubble {
    display: flex;
    align-items: center;
    justify-content: right;
    margin-right: -50px;
    margin-top: -130px;
}
.bubble-text {
    color: #00f5;
    font-family: Consolas, monospace;
    font-size: 14px;
    white-space: nowrap;
}

/* Cursorul intermitent */
.cursor {
    stroke: #00f5ff;
    stroke-width: 2;
    animation: blink 0.8s step-end infinite;
}

@keyframes typing {
    0% {
        width: 0;
    }

    50% {
        width: 150px;
    }
    /* Timp de așteptare cu mesajul complet */
    90% {
        width: 150px;
        opacity: 1;
    }

    100% {
        width: 0;
        opacity: 0;
    }
    /* Reset scurt */
}

@keyframes blink {
    50% {
        opacity: 0;
    }
}

.banner-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 24px;
}

/* ─────────────────────────────────────
   CONTAINER PRINCIPAL
───────────────────────────────────── */
.sg-wrap.banner-wrap {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 28px;
    background: radial-gradient(circle at center, #24142f 0%, #0c0710 100%);
    box-shadow: 0 30px 80px rgba(0,0,0,0.35), 0 0 120px rgba(91, 58, 130, 0.18);
    transition: transform .45s cubic-bezier(.34,1.56,.64,1), box-shadow .4s ease;
    isolation: isolate;
}

    /* Hover cinematic */
    .sg-wrap.banner-wrap:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 0 45px 100px rgba(0,0,0,0.45), 0 0 160px rgba(91,58,130,0.28);
    }

    /* ─────────────────────────────────────
   LIGHT GLOW BACKGROUND
───────────────────────────────────── */
    .sg-wrap.banner-wrap::before {
        content: '';
        position: absolute;
        inset: -20%;
        background: radial-gradient(circle at 30% 40%, rgba(77,184,255,0.10), transparent 45%), radial-gradient(circle at 75% 60%, rgba(168,85,247,0.12), transparent 40%);
        animation: ambientMove 14s ease-in-out infinite alternate;
        z-index: 0;
    }

    /* Border Glow */
    .sg-wrap.banner-wrap::after {
        content: '';
        position: absolute;
        inset: 1px;
        border-radius: inherit;
        border: 1px solid rgba(255,255,255,0.06);
        background: linear-gradient( 135deg, rgba(255,255,255,0.03), transparent 35% );
        pointer-events: none;
        z-index: 5;
    }

/* ─────────────────────────────────────
   EFFECT LAYER
───────────────────────────────────── */
.sg-effect-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
   /* SAU, pentru un ton mai cald: */
    background-color: rgba(255, 255, 255, 0.2);  /* Alb 20% transparent, dacă textul e negru */
    z-index: 1; /* Peste imagine, sub text */
}

/* ─────────────────────────────────────
   NOISE FILM GRAIN
───────────────────────────────────── */
.sg-noise {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
    opacity: .12;
    mix-blend-mode: overlay;
    z-index: 2;
    pointer-events: none;
}

/* ─────────────────────────────────────
   IMAGINEA
───────────────────────────────────── */
.sc-banner-img {
    position: relative;
    z-index: 3;
    width: 100%;
    display: block;
    object-fit: cover;
    opacity: 0.88;
    mix-blend-mode: screen;
    filter: brightness(1.02) contrast(1.08) saturate(1.05);
    transform: scale(1.01);
    transition: transform .7s ease, filter .6s ease, opacity .5s ease;
}

/* hover imagine */
.sg-wrap.banner-wrap:hover .sc-banner-img {
    transform: scale(1.035);
    opacity: 0.95;
    filter: brightness(1.08) contrast(1.12) saturate(1.08);
}

/* ─────────────────────────────────────
   SOFT EDGE GLOW
───────────────────────────────────── */
.sg-edge-glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, transparent 55%, rgba(0,0,0,0.22));
    z-index: 4;
    pointer-events: none;
}

/* ─────────────────────────────────────
   ANIMAȚII
───────────────────────────────────── */
@keyframes unityBreathing {
    0%,100% {
        opacity: .45;
        transform: scale(1);
    }

    50% {
        opacity: .65;
        transform: scale(1.025);
    }
}

@keyframes ambientMove {
    0% {
        transform: translate(-2%, -1%);
    }

    100% {
        transform: translate(2%, 1%);
    }
}



/* Linie orizontală 1 */
.SG-line-h1 {
    left: 0;
    right: 0;
    top: 30%;
    height: 1px;
    background: linear-gradient( 90deg, transparent, rgba(0,120,212,0.14), transparent );
}

/* ============================================================
   services-grid.css — Responsive FINAL
   Înlocuiește blocul @media din fișierul existent.
   ============================================================ */

/* ── 1024px — Tablet landscape ─────────────────────────────── */
@media (max-width: 1024px) {

    .sg-wrap {
        padding: 40px 24px 48px;
    }

    .sg-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        padding:20px;
    }

    .sc.featured {
        grid-column: span 2;
    }

    .sg-title {
        font-size: 32px;
    }

    .sg-bubble svg {
        width: 180px;
        height: 100px;
    }

    .sc-banner-img {
        max-height: 200px;
        object-fit: cover;
    }
}

@media (max-width: 900px) {

    .sg-wrap {
        padding: 28px 16px 36px;
    }



    .sg-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .sg-header {
        grid-column: span 2;
    }

    .sc.featured {
        grid-column: span 2;
    }

    .sg-title-grid {
        flex-direction: row;
        align-items: flex-start;
        gap: 10px;
    }

    .sg-bubble svg {
        width: 150px;
        height: 84px;
    }

    .sc {
        padding: 13px 12px;
    }

    .sc-icon {
        width: 34px;
        height: 34px;
    }

        .sc-icon svg {
            width: 17px;
            height: 17px;
        }

   

    

}
    /* ── 768px — Tablet portrait ───────────────────────────────── */
    @media (max-width: 768px) {

        .sg-wrap {
            padding: 28px 16px 36px;
        }

        .sg-title {
            font-size: 26px;
            line-height: 1.2;
        }

        .sg-sub {
            font-size: 13px;
        }

        .sg-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
            gap: 10px;
        }

        .sg-header {
            grid-column: span 2;
        }

        .sc.featured {
            grid-column: span 2;
        }

        .sg-title-grid {
            flex-direction: row;
            align-items: flex-start;
            gap: 10px;
        }

        .sg-bubble svg {
            width: 150px;
            height: 84px;
        }

        .sc {
            padding: 13px 12px;
        }

        .sc-icon {
            width: 34px;
            height: 34px;
        }

            .sc-icon svg {
                width: 17px;
                height: 17px;
            }


        .sc-banner-img {
            max-height: 160px;
        }

        .decor-frame {
            margin: 6px;
            border-radius: 10px;
        }
    }


    /* ── 480px — Mobile: 1 coloană ─────────────────────────────── */
    @media (max-width: 480px) {

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
        }

        .phone {
            width: 375px;
            margin: 16px auto;
            background: #f5f4f0;
            border: 1px solid rgba(0,0,0,0.1);
            border-radius: 16px;
            overflow: hidden;
            font-family: 'DM Sans',sans-serif;
        }

        /* ─── RESET TOTAL pe mobile ─── */
        .sg-section {
            background: #f5f4f0;
            padding: 0;
            margin: 0;
            overflow-x: hidden;
        }

        .sg-wrap {
            width: 100%;
            padding: 0;
            margin: 0;
            background: transparent;
        }

        .decor-frame {
            margin: 0;
            padding: 0;
            border: none;
            border-radius: 0;
            background: transparent;
            box-shadow: none;
        }

        .SG-line-h1 {
            height: 1px;
            background: rgba(0,0,0,0.07);
            margin: 0;
        }

        /* ─── HEADER SECȚIUNE ─── */
        .sg-section-header {
            padding: 20px 16px 14px;
        }

        .sg-eyebrow {
            font-size: 10px;
            font-weight: 600;
            letter-spacing: 2px;
            text-transform: uppercase;
            color: #888;
            margin-bottom: 6px;
        }

        .sg-title {
            font-size: 21px;
            font-weight: 600;
            color: #0f1f4a;
            line-height: 1.15;
            margin-bottom: 4px;
        }

        .sg-sub {
            font-size: 12px;
            color: #888;
            font-weight: 300;
            line-height: 1.5;
            margin-bottom: 0;
        }

        /* ─── GRID = flex column, card-urile edge-to-edge ─── */
        .sg-grid {
            display: flex;
            flex-direction: column;
            gap: 0;
            padding: 0;
        }

        /* ─── CARD BAZA ─── */
        .sc {
            display: flex;
            align-items: center;
            gap: 12px;
            width: 100%;
            padding: 14px 16px;
            background: #fff;
            border: none;
            border-bottom: 1px solid rgba(0,0,0,0.06);
            border-radius: 0;
            text-decoration: none;
            color: inherit;
            -webkit-tap-highlight-color: transparent;
            touch-action: manipulation;
            transition: background 0.15s;
        }

            .sc:active {
                background: #f0f4ff;
            }

            .sc:last-child {
                border-bottom: none;
            }

        /* Icon */
        .sc-icon {
            width: 38px;
            height: 38px;
            min-width: 38px;
            border-radius: 10px;
            flex-shrink: 0;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #f0f2f8;
        }

            .sc-icon svg {
                width: 18px;
                height: 18px;
            }

        /* Text */
        .sc-text {
            flex: 1;
            min-width: 0;
        }

        .sc h3 {
            font-size: 13px;
            font-weight: 600;
            color: #0f1f4a;
            line-height: 1.2;
            margin-bottom: 2px;
        }

        .sc p {
            font-size: 11px;
            color: #777;
            line-height: 1.4;
            font-weight: 300;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
        }

        .sc-tag, .sc-num {
            display: none;
        }

        /* Săgeată */
        .sc-link {
            flex-shrink: 0;
            font-size: 0;
            display: flex;
            align-items: center;
            color: #185FA5;
            margin-left: 4px;
        }

            .sc-link svg {
                width: 18px;
                height: 18px;
                stroke: #aac4e0;
            }

        /* ─── CARD FEATURED ─── */
        .sc.featured {
            flex-direction: row;
            align-items: center;
            background: linear-gradient(135deg,#0f1f4a 0%,#1a3a7a 100%);
            padding: 16px;
            border-bottom: none;
        }

            .sc.featured .sc-icon {
                background: rgba(255,255,255,0.15);
            }

                .sc.featured .sc-icon svg {
                    stroke: #fff;
                }

            .sc.featured h3 {
                color: #fff;
                font-size: 14px;
            }

            .sc.featured p {
                color: rgba(255,255,255,0.6);
                font-size: 11px;
            }

            .sc.featured .sc-link {
                color: #64b0ff;
            }

                .sc.featured .sc-link svg {
                    stroke: #64b0ff;
                    width: 20px;
                    height: 20px;
                }

        /* ─── DIVIDER SECȚIUNI ─── */
        .sg-section-divider {
            height: 8px;
            background: #e8e6e0;
            border-top: 1px solid rgba(0,0,0,0.06);
            border-bottom: 1px solid rgba(0,0,0,0.06);
        }

        /* ─── BANNER ─── */
        .banner-slot {
            width: 100%;
            height: 100px;
            background: linear-gradient(135deg,#0f1f4a,#1a3a7a);
            display: flex;
            align-items: center;
            justify-content: center;
        }

            .banner-slot span {
                color: rgba(255,255,255,0.35);
                font-size: 10px;
                letter-spacing: 0.12em;
                text-transform: uppercase;
            }

        /* ─── CULORI VARIANTE ─── */
        .sc--blue .sc-icon {
            background: #E6F1FB;
        }

            .sc--blue .sc-icon svg {
                stroke: #185FA5;
            }

        .sc--green .sc-icon {
            background: #EAF3DE;
        }

            .sc--green .sc-icon svg {
                stroke: #3B6D11;
            }

        .sc--amber .sc-icon {
            background: #FAEEDA;
        }

            .sc--amber .sc-icon svg {
                stroke: #854F0B;
            }

        .sc--gold .sc-icon {
            background: #FEF4D0;
        }

            .sc--gold .sc-icon svg {
                stroke: #7A5200;
            }

        .sc--sky .sc-icon {
            background: #E6F1FB;
        }

            .sc--sky .sc-icon svg {
                stroke: #0C447C;
            }

        .sc--rose .sc-icon {
            background: #FBEAF0;
        }

            .sc--rose .sc-icon svg {
                stroke: #993556;
            }
    }