/* Educação — Idiomas (cartão-postal: papel, correio aéreo, selos) */

body.lg {
    --lg-ink: #1f3a5f;
    --lg-ink-2: #2b4c78;
    --lg-muted: #5f6b7d;
    --lg-paper: #f6f0e4;
    --lg-paper-2: #efe6d3;
    --lg-line: #ddd2bd;
    --lg-red: #d8453b;
    --lg-blue: #2f5f9e;
    --lg-mustard: #e7a93b;
    --lg-teal: #2d7f7a;
    --lg-free: #2d7f7a;
    --lg-freemium: #2f5f9e;
    --lg-paid: #d8453b;
    --lg-max: 1160px;
    margin: 0;
    min-height: 100vh;
    color: var(--lg-ink);
    font-family: "Outfit", system-ui, sans-serif;
    -webkit-font-smoothing: antialiased;
    background:
        radial-gradient(ellipse 60% 40% at 0% 0%, rgba(231, 169, 59, 0.14), transparent 60%),
        radial-gradient(ellipse 50% 35% at 100% 10%, rgba(47, 95, 158, 0.1), transparent 60%),
        var(--lg-paper) !important;
    background-attachment: scroll !important;
}
html:has(> body.lg) { background: var(--lg-paper); }

.lg h1, .lg h2, .lg h3 {
    font-family: "DM Serif Display", Georgia, serif !important;
    font-weight: 400;
    color: var(--lg-ink);
    margin: 0;
    letter-spacing: -0.01em;
}
.lg a { color: inherit; }

.lg-wrap {
    max-width: var(--lg-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    box-sizing: border-box;
}

/* ---------- Topo ---------- */
.lg-top {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 1.4rem 5.5rem 0 0;
}
.lg-brand {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 1.6rem;
    font-weight: 600;
    text-decoration: none;
}
.lg-crumb { font-size: 0.85rem; color: var(--lg-muted); }
.lg-crumb a { text-decoration: none; }
.lg-crumb a:hover { color: var(--lg-ink); }
.lg-crumb::before { content: "/"; margin-right: 0.75rem; color: #c5b9a3; }

/* ---------- Hero (envelope de correio aéreo) ---------- */
.lg-hero {
    position: relative;
    margin-top: 1.5rem;
    padding: 12px;
    border-radius: 22px;
    background: repeating-linear-gradient(-45deg,
        var(--lg-red) 0 18px, #fff 18px 30px, var(--lg-blue) 30px 48px, #fff 48px 60px);
    box-shadow: 0 24px 50px rgba(31, 58, 95, 0.14);
}
.lg-hero-in {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 2rem;
    align-items: center;
    padding: clamp(1.8rem, 4vw, 3.2rem);
    border-radius: 14px;
    background:
        repeating-linear-gradient(0deg, transparent 0 31px, rgba(31, 58, 95, 0.05) 31px 32px),
        #fffaf0;
    overflow: hidden;
}
.lg-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0 0 1rem;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lg-red);
}
.lg-kicker .material-icons-outlined { font-size: 1.1rem; }
.lg .lg-hero h1 {
    font-size: clamp(2.5rem, 5.6vw, 4.2rem);
    line-height: 1;
}
.lg-hero h1 em {
    font-style: italic;
    color: var(--lg-red);
}
.lg-lead {
    margin: 1.1rem 0 0;
    max-width: 34rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: var(--lg-muted);
}
.lg-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 1.5rem 0 0;
    padding: 0;
    list-style: none;
}
.lg-chips a {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border: 1.5px solid var(--lg-ink);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    background: #fff;
    transition: background 0.15s ease, color 0.15s ease;
}
.lg-chips a:hover { background: var(--lg-ink); color: #fff; }
.lg-chips .material-icons-outlined { font-size: 1rem; }

/* Carimbos de saudação */
.lg-hellos {
    position: relative;
    min-height: 300px;
}
.lg-hello {
    position: absolute;
    display: inline-block;
    padding: 0.55rem 1rem;
    border: 2.5px solid currentColor;
    border-radius: 10px;
    font-family: "DM Serif Display", Georgia, serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    line-height: 1;
    background: rgba(255, 250, 240, 0.85);
    white-space: nowrap;
}
.lg-hello small {
    display: block;
    margin-top: 0.25rem;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.8;
}
.lg-hello:nth-child(1) { top: 4%; left: 6%; color: var(--lg-red); transform: rotate(-8deg); }
.lg-hello:nth-child(2) { top: 0; right: 4%; color: var(--lg-blue); transform: rotate(6deg); }
.lg-hello:nth-child(3) { top: 30%; left: 30%; color: var(--lg-teal); transform: rotate(-3deg); }
.lg-hello:nth-child(4) { top: 44%; right: 0; color: var(--lg-mustard); transform: rotate(9deg); }
.lg-hello:nth-child(5) { top: 54%; left: 2%; color: var(--lg-blue); transform: rotate(4deg); }
.lg-hello:nth-child(6) { bottom: 0; left: 6%; color: var(--lg-red); transform: rotate(-6deg); }
.lg-hello:nth-child(7) { bottom: 8%; right: 0; color: var(--lg-teal); transform: rotate(3deg); }
.lg-postmark {
    position: absolute;
    top: 38%;
    left: -4%;
    width: 120px;
    height: 120px;
    border: 2px dashed rgba(31, 58, 95, 0.25);
    border-radius: 50%;
    pointer-events: none;
}

/* ---------- Guia rápido ---------- */
.lg-guide {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}
.lg-step {
    position: relative;
    padding: 1.25rem 1.3rem;
    border-radius: 14px;
    background: #fff;
    border: 1.5px solid var(--lg-line);
}
.lg-step-n {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lg-red);
}
.lg .lg-step h3 { font-size: 1.3rem; line-height: 1.15; }
.lg-step p { margin: 0.45rem 0 0; font-size: 0.93rem; line-height: 1.55; color: var(--lg-muted); }
.lg-step p a { color: var(--lg-ink); font-weight: 600; text-underline-offset: 3px; }

/* ---------- Filtro por preço ---------- */
.lg-filter {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin: 2.5rem 0 0;
    padding: 0.8rem 5.5rem 0.8rem 0;
    background: linear-gradient(var(--lg-paper) 80%, rgba(246, 240, 228, 0));
}
.lg-filter-label {
    margin-right: 0.25rem;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--lg-muted);
}
.lg-filter-btn {
    appearance: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.9rem;
    border: 1.5px solid var(--lg-ink);
    border-radius: 999px;
    background: #fff;
    color: var(--lg-ink);
    font: inherit;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.lg-filter-btn i {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: var(--dot, var(--lg-ink));
}
.lg-filter-btn[aria-pressed="true"] { background: var(--lg-ink); color: #fff; }
.lg-filter-btn[aria-pressed="true"] i { box-shadow: 0 0 0 2px #fff; }
.lg-filter-btn:focus-visible { outline: 2px solid var(--lg-red); outline-offset: 2px; }
.lg-filter-count { margin-left: auto; font-size: 0.85rem; color: var(--lg-muted); }

/* ---------- Seções ---------- */
.lg-main { padding-bottom: 2rem; }
.lg-sec {
    padding: clamp(2rem, 4vw, 3rem) 0 0;
    scroll-margin-top: 4.5rem;
}
.lg-sec[hidden] { display: none; }
.lg-sec-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem 1.5rem;
    margin-bottom: 1.25rem;
    padding-bottom: 0.9rem;
    border-bottom: 2px dashed var(--lg-line);
}
.lg-sec-head > div { max-width: 44rem; }
.lg-sec-kicker {
    margin: 0 0 0.3rem;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--lg-red);
}
.lg .lg-sec-head h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); line-height: 1.05; }
.lg-sec-head p:not(.lg-sec-kicker) { margin: 0.45rem 0 0; color: var(--lg-muted); line-height: 1.55; }

/* Cartões-postais */
.lg-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1.1rem;
}
.lg-card {
    --stamp: var(--lg-freemium);
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.3rem 1.3rem 1.1rem;
    background:
        linear-gradient(90deg, transparent calc(100% - 4px), rgba(31, 58, 95, 0.04) 0) ,
        #fff;
    border-radius: 6px;
    box-shadow: 0 1px 0 var(--lg-line), 0 10px 24px rgba(31, 58, 95, 0.08);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.lg-card[hidden] { display: none; }
.lg-card::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 5px;
    border-radius: 6px 6px 0 0;
    background: repeating-linear-gradient(-45deg,
        var(--lg-red) 0 8px, #fff 8px 12px, var(--lg-blue) 12px 20px, #fff 20px 24px);
}
.lg-card:nth-child(even) { transform: rotate(0.4deg); }
.lg-card:nth-child(odd) { transform: rotate(-0.4deg); }
.lg-card:hover,
.lg-card:focus-visible {
    transform: translateY(-4px) rotate(0deg);
    box-shadow: 0 1px 0 var(--lg-line), 0 18px 36px rgba(31, 58, 95, 0.16);
}
.lg-card:focus-visible { outline: 2px solid var(--lg-red); outline-offset: 3px; }
.lg-card[data-price="gratuito"] { --stamp: var(--lg-free); }
.lg-card[data-price="pago"] { --stamp: var(--lg-paid); }

.lg-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}
.lg-card-num {
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--lg-muted);
    letter-spacing: 0.06em;
}
.lg .lg-card h3 { font-size: 1.45rem; line-height: 1.1; margin-top: 0.1rem; }

/* Selo (preço) com borda picotada */
.lg-stamp {
    flex-shrink: 0;
    display: block;
    padding: 5px;
    background: var(--stamp);
    color: #fff;
    text-align: center;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    transform: rotate(4deg);
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        radial-gradient(circle 3px, transparent 96%, #000) -4px -4px / 8px 8px;
    mask:
        linear-gradient(#000 0 0) content-box,
        radial-gradient(circle 3px, transparent 96%, #000) -4px -4px / 8px 8px;
}
.lg-stamp b {
    display: block;
    min-width: 70px;
    padding: 0.4rem 0.45rem;
    border: 1.5px solid rgba(255, 255, 255, 0.7);
    font-weight: 700;
}

.lg-focus {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: var(--stamp);
}
.lg-card p.lg-desc {
    margin: 0;
    font-size: 0.93rem;
    line-height: 1.55;
    color: #4a5566;
}
.lg-langs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin: 0.1rem 0 0;
    padding: 0;
    list-style: none;
}
.lg-langs li {
    padding: 0.15rem 0.45rem;
    border: 1px solid var(--lg-line);
    border-radius: 4px;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--lg-ink-2);
    background: var(--lg-paper);
}
.lg-go {
    margin-top: auto;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--lg-line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-family: "Courier Prime", ui-monospace, monospace;
    font-size: 0.78rem;
    color: var(--lg-muted);
}
.lg-go span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-go strong {
    flex-shrink: 0;
    font-family: "Outfit", system-ui, sans-serif;
    font-size: 0.9rem;
    color: var(--lg-ink);
}

.lg-empty {
    margin: 2rem 0 0;
    padding: 1.5rem;
    border: 2px dashed var(--lg-line);
    border-radius: 14px;
    text-align: center;
    color: var(--lg-muted);
}

/* Dica final */
.lg-tip {
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem 1.3rem;
    padding: 1.6rem 1.8rem;
    border-radius: 16px;
    background: var(--lg-ink);
    color: #e6edf7;
}
.lg-tip > .material-icons-outlined {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    background: var(--lg-mustard);
    color: var(--lg-ink);
}
.lg .lg-tip h2 { color: #fff; font-size: 1.5rem; }
.lg-tip p { margin: 0.5rem 0 0; line-height: 1.6; }
.lg-tip p small { color: #a9b8cf; }

/* ---------- Rodapé ---------- */
.lg-foot {
    margin-top: 3rem;
    padding: 1.25rem 0 5.5rem;
    border-top: 1px solid var(--lg-line);
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--lg-muted);
}
.lg-foot nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.lg-foot a { text-decoration: none; }
.lg-foot a:hover { color: var(--lg-ink); }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
    .lg-hero-in { grid-template-columns: 1fr; }
    .lg-hellos { min-height: 220px; }
    .lg-guide { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
    .lg-wrap { padding: 0 1rem; }
    .lg-hero { padding: 8px; border-radius: 16px; }
    .lg-hero-in { padding: 1.6rem 1.25rem; }
    .lg-hellos { min-height: 200px; }
    .lg-hello { padding: 0.45rem 0.75rem; }
    .lg-hello:nth-child(n+6) { display: none; }
    .lg-list { grid-template-columns: 1fr; }
    .lg-filter { padding-right: 0; }
    .lg-filter-count { width: 100%; margin-left: 0; }
    .lg-tip { grid-template-columns: 1fr; padding: 1.3rem; }
}
@media (prefers-reduced-motion: reduce) {
    .lg-card, .lg-chips a, .lg-filter-btn { transition: none; }
}

/* ---------- Modo escuro ---------- */
[data-theme="dark"] body.lg {
    --lg-ink: #e8eef8;
    --lg-ink-2: #c7d4ea;
    --lg-muted: #a3aec0;
    --lg-paper: #141a24;
    --lg-line: #2c3646;
}
[data-theme="dark"] .lg-hero-in { background: #1b2230; }
[data-theme="dark"] .lg-hello { background: rgba(27, 34, 48, 0.9); }
[data-theme="dark"] .lg-step,
[data-theme="dark"] .lg-card,
[data-theme="dark"] .lg-chips a,
[data-theme="dark"] .lg-filter-btn { background: #1b2230; }
[data-theme="dark"] .lg-card p.lg-desc { color: #c3ccda; }
[data-theme="dark"] .lg-langs li { background: #141a24; }
[data-theme="dark"] .lg-filter { background: linear-gradient(#141a24 80%, rgba(20, 26, 36, 0)); }
[data-theme="dark"] .lg-filter-btn[aria-pressed="true"] { background: #e8eef8; color: #141a24; }
[data-theme="dark"] .lg-chips a:hover { background: #e8eef8; color: #141a24; }
[data-theme="dark"] .lg-tip { background: #0e131b; border: 1px solid var(--lg-line); }
[data-theme="dark"] .lg-tip > .material-icons-outlined { color: #1f3a5f; }
