/* ===============================
   Italiano Fácil — Modern UI
   Global PT/ES Interface
   =============================== */

:root {
    --green: #16834f;
    --green-dark: #0f633b;
    --red: #c0392b;
    --cream: #fffaf1;
    --light: #f7f7f5;
    --dark: #20231f;
    --muted: #6d726b;
    --border: #e8e6df;
    --shadow: 0 16px 40px rgba(0,0,0,0.07);
}

body {
    background:
        radial-gradient(circle at top left, rgba(22,131,79,0.10), transparent 34%),
        linear-gradient(180deg, #fffaf1 0%, #f7f7f5 38%, #ffffff 100%);
    color: var(--dark);
}

.page-shell {
    padding-top: 18px;
}

.modern-topbar {
    background: rgba(255,255,255,0.86);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(232,230,223,0.9);
}

.modern-nav {
    min-height: 68px;
}

.modern-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 21px;
}

.logo-mark {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f1fff7;
    border: 1px solid #cdebd9;
    border-radius: 14px;
}

.modern-menu {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.modern-menu a {
    margin-left: 0;
    padding: 8px 10px;
    border-radius: 999px;
}

.modern-menu a:hover {
    background: #f1fff7;
    text-decoration: none;
}

.global-language-switcher {
    display: inline-flex;
    gap: 3px;
    margin-left: 8px;
    padding: 4px;
    background: #f0f0ed;
    border-radius: 999px;
}

.global-language-switcher a {
    padding: 6px 9px;
    font-size: 12px;
    font-weight: 900;
}

.global-language-switcher a.active {
    background: var(--green);
    color: #fff;
}

.modern-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 34px;
    align-items: center;
    padding: 46px;
    margin: 28px 0;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(255,255,255,0.95), rgba(241,255,247,0.95)),
        url("data:image/svg+xml,%3Csvg width='160' height='160' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 80 C40 20 120 140 160 80' fill='none' stroke='%2316834f' stroke-opacity='.08' stroke-width='8'/%3E%3C/svg%3E");
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-copy h1 {
    font-size: clamp(38px, 5vw, 64px);
    line-height: .98;
    margin: 12px 0 18px;
    letter-spacing: -0.045em;
}

.hero-copy p {
    font-size: 18px;
    line-height: 1.65;
    color: var(--muted);
    max-width: 720px;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 26px;
}

.hero-panel {
    min-height: 330px;
    border-radius: 28px;
    background: linear-gradient(160deg, #16834f, #0f633b);
    position: relative;
    overflow: hidden;
    box-shadow: 0 22px 50px rgba(22,131,79,0.25);
}

.hero-panel::before {
    content: "";
    position: absolute;
    inset: 24px;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 24px;
}

.floating-card {
    position: absolute;
    left: 34px;
    top: 48px;
    width: min(320px, 78%);
    background: rgba(255,255,255,0.94);
    border-radius: 22px;
    padding: 22px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    display: grid;
    gap: 8px;
}

.floating-card strong {
    color: var(--green);
    font-size: 38px;
    line-height: 1;
}

.floating-card span {
    color: var(--muted);
    font-weight: 800;
}

.floating-card.secondary {
    top: auto;
    left: auto;
    right: 28px;
    bottom: 42px;
}

.floating-card.secondary strong {
    font-size: 26px;
}

.home-language-card,
.language-panel {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 999px;
}

.home-language-card span,
.language-panel span {
    color: var(--muted);
    font-weight: 900;
    padding-left: 8px;
}

.home-language-card a,
.language-panel a {
    color: var(--dark);
    text-decoration: none;
    font-weight: 900;
    padding: 8px 12px;
    border-radius: 999px;
}

.home-language-card a.active,
.language-panel a.active {
    background: var(--green);
    color: #fff;
}

.modern-page-hero {
    padding: 34px;
    margin: 24px 0;
    background: linear-gradient(135deg, #fff, #f1fff7);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.04);
}

.modern-page-hero h1 {
    font-size: clamp(32px, 4vw, 48px);
    letter-spacing: -0.035em;
    margin: 8px 0 10px;
}

.modern-page-hero p {
    color: var(--muted);
    font-size: 17px;
}

.modern-card {
    border-radius: 22px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}

.modern-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 46px rgba(0,0,0,0.09);
}

.feature-grid {
    margin-bottom: 28px;
}

.feature-icon {
    font-size: 32px;
    margin-bottom: 10px;
}

.stats-grid {
    margin-bottom: 28px;
}

.stat-card span {
    font-size: 28px;
}

.stat-card h3 {
    color: var(--muted);
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.stat-card p {
    color: var(--green);
    font-size: 34px;
    font-weight: 900;
    margin: 0;
}

.section-title {
    margin-top: 28px;
    margin-bottom: 18px;
    font-size: 28px;
}

.level-card {
    position: relative;
    overflow: hidden;
}

.level-number {
    position: absolute;
    right: 18px;
    top: 18px;
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #f1fff7;
    color: var(--green);
    border: 1px solid #cdebd9;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.level-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.modern-footer {
    background: rgba(255,255,255,0.9);
}

.footer-credit {
    color: var(--green);
    font-weight: 900;
}

@media (max-width: 920px) {
    .modern-hero {
        grid-template-columns: 1fr;
        padding: 30px;
    }

    .hero-panel {
        min-height: 280px;
    }
}

@media (max-width: 720px) {
    .modern-nav {
        align-items: flex-start;
    }

    .modern-menu {
        width: 100%;
    }

    .hero-copy h1 {
        font-size: 38px;
    }

    .modern-hero,
    .modern-page-hero {
        padding: 24px;
        border-radius: 22px;
    }

    .home-language-card,
    .language-panel {
        border-radius: 16px;
    }
}
