/* =========================================================
   Toyaab Translate — Premium SaaS Stylesheet
   Mobile-first, accessible, performant
   ========================================================= */

/* ─── CSS Custom Properties ─────────────────────────────── */
:root {
    /* Brand */
    --primary:        #2563EB;
    --primary-dark:   #1D4ED8;
    --primary-light:  #DBEAFE;
    --primary-soft:   #EFF6FF;
    --accent:         #06B6D4;

    /* Neutrals */
    --bg:             #F8FAFC;
    --surface:        #FFFFFF;
    --surface-2:      #F1F5F9;
    --border:         #E2E8F0;
    --border-2:       #CBD5E1;

    /* Text */
    --text:           #0F172A;
    --text-2:         #475569;
    --text-3:         #94A3B8;
    --text-invert:    #FFFFFF;

    /* Feedback */
    --success:        #10B981;
    --error:          #EF4444;
    --warning:        #F59E0B;

    /* Shadows */
    --shadow-sm:      0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.05);
    --shadow-md:      0 4px 16px rgba(0,0,0,.08), 0 2px 8px rgba(0,0,0,.04);
    --shadow-lg:      0 10px 40px rgba(0,0,0,.10), 0 4px 16px rgba(0,0,0,.06);
    --shadow-glow:    0 0 0 4px rgba(37,99,235,.15);

    /* Radius */
    --r-sm:   6px;
    --r-md:   12px;
    --r-lg:   18px;
    --r-xl:   24px;
    --r-full: 9999px;

    /* Timing */
    --ease:   cubic-bezier(.4,0,.2,1);
    --dur:    180ms;
}

/* ─── Reset & Base ────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Inter', 'Poppins', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button, select { font-family: inherit; cursor: pointer; }

ul { list-style: none; }

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--primary);
    background: var(--primary-light);
    padding: 4px 12px;
    border-radius: var(--r-full);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 16px;
}

.section-sub {
    font-size: 1.05rem;
    color: var(--text-2);
    max-width: 600px;
}

.text-center { text-align: center; }
.text-center .section-sub { margin: 0 auto; }

/* ─── Hidden / Utility ───────────────────────────────────── */
.hidden { display: none !important; }
.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* =========================================================
   HEADER / NAV
   ========================================================= */
#site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--dur) var(--ease),
                box-shadow  var(--dur) var(--ease);
}

#site-header.scrolled {
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

/* Logo */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--r-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-logo-text {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.nav-logo-text span { color: var(--primary); }

/* Nav links */
#nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-2);
    padding: 8px 14px;
    border-radius: var(--r-sm);
    transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
    white-space: nowrap;
}

.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }

.nav-badge {
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .05em;
    background: var(--primary-light);
    color: var(--primary);
    padding: 1px 5px;
    border-radius: var(--r-full);
    vertical-align: middle;
    margin-left: 3px;
}

.nav-cta {
    background: var(--primary);
    color: #fff;
    padding: 8px 18px;
    border-radius: var(--r-sm);
    font-weight: 600;
    font-size: .875rem;
    transition: background var(--dur) var(--ease);
    margin-left: 8px;
}

.nav-cta:hover { background: var(--primary-dark); text-decoration: none; }

/* Mobile toggle */
#nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
}

#nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform .3s var(--ease), opacity .3s;
}

#nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#nav-toggle.active span:nth-child(2) { opacity: 0; }
#nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =========================================================
   AD PLACEHOLDERS
   ========================================================= */
.ad-placeholder {
    background: var(--surface-2);
    border: 2px dashed var(--border-2);
    border-radius: var(--r-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-3);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    padding: 12px;
    text-align: center;
}

.ad-banner-top    { height: 90px;  max-width: 728px; margin: 12px auto; }
.ad-native        { height: 120px; margin: 24px 0; }
.ad-inline        { height: 90px;  margin: 32px auto; max-width: 728px; }
.ad-sidebar       { height: 600px; width: 160px; }
.ad-footer        { height: 90px;  max-width: 728px; margin: 0 auto 24px; }

/* =========================================================
   HERO SECTION
   ========================================================= */
.hero {
    padding: 72px 0 56px;
    position: relative;
    overflow: hidden;
}

/* Subtle gradient blob background */
.hero::before {
    content: "";
    position: absolute;
    top: -120px;
    right: -180px;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6,182,212,.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-content { text-align: center; margin-bottom: 48px; }

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--primary-light);
    color: var(--primary);
    font-size: .8rem;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--r-full);
    margin-bottom: 24px;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 20px;
    letter-spacing: -.02em;
}

.hero-title .highlight {
    color: var(--primary);
    position: relative;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--text-2);
    max-width: 580px;
    margin: 0 auto 32px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 32px;
    margin-top: 32px;
}

.stat-item { text-align: center; }
.stat-number {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}
.stat-label {
    font-size: .8rem;
    color: var(--text-3);
    font-weight: 500;
}

/* =========================================================
   TRANSLATOR WIDGET
   ========================================================= */
.translator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* Top bar: language selectors */
.translator-header {
    display: grid;
    grid-template-columns: 1fr 64px 1fr;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}

.lang-panel {
    padding: 16px 20px;
}

.lang-panel:first-child {
    border-right: 1px solid var(--border);
}

.lang-panel:last-child {
    border-left: 1px solid var(--border);
}

.lang-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-3);
    margin-bottom: 6px;
}

.lang-select-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.lang-select {
    flex: 1;
    padding: 10px 14px;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-sm);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394A3B8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
    cursor: pointer;
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.lang-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

/* Swap button */
.swap-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

#swap-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1.5px solid var(--border-2);
    background: var(--surface);
    color: var(--text-2);
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--dur) var(--ease),
                color     var(--dur) var(--ease),
                border-color var(--dur) var(--ease),
                box-shadow   var(--dur) var(--ease);
}

#swap-btn:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37,99,235,.3);
}

#swap-btn.spin { animation: spin360 .35s var(--ease); }

@keyframes spin360 {
    from { transform: rotate(0deg); }
    to   { transform: rotate(180deg); }
}

/* Text areas */
.translator-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 240px;
}

.text-panel {
    position: relative;
    display: flex;
    flex-direction: column;
}

.text-panel:first-child { border-right: 1px solid var(--border); }

.translation-textarea {
    flex: 1;
    width: 100%;
    min-height: 220px;
    padding: 20px;
    border: none;
    resize: none;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--surface);
    font-family: inherit;
    transition: background var(--dur) var(--ease);
}

.translation-textarea:focus { outline: none; background: #FAFCFF; }

.translation-textarea:disabled,
.translation-textarea[readonly] {
    background: var(--surface-2);
    color: var(--text-2);
    cursor: default;
}

/* Char count */
#char-count {
    position: absolute;
    bottom: 8px;
    right: 12px;
    font-size: .7rem;
    color: var(--text-3);
    font-weight: 500;
    pointer-events: none;
    transition: color var(--dur) var(--ease);
}

#char-count.limit-near { color: var(--warning); }
#char-count.limit-hit  { color: var(--error); }

/* Toolbar rows */
.translator-footer {
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 12px 20px;
    gap: 12px;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
}

.toolbar-group:last-child { justify-content: flex-end; }

.toolbar-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border-radius: var(--r-sm);
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-2);
    font-size: .8rem;
    font-weight: 600;
    transition: all var(--dur) var(--ease);
    white-space: nowrap;
}

.toolbar-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-soft);
}

.toolbar-btn i { font-size: .85rem; }

/* Translate button */
#translate-btn {
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: var(--r-sm);
    padding: 10px 28px;
    font-size: .95rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background var(--dur) var(--ease), transform .1s, box-shadow var(--dur) var(--ease);
    box-shadow: 0 2px 8px rgba(37,99,235,.25);
}

#translate-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 16px rgba(37,99,235,.4);
    transform: translateY(-1px);
}

#translate-btn:active { transform: translateY(0); }
#translate-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }

/* Spinner in button */
.btn-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   TOAST NOTIFICATION
   ========================================================= */
#toast {
    position: fixed;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--text);
    color: #fff;
    padding: 12px 24px;
    border-radius: var(--r-full);
    font-size: .875rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transition: opacity .25s var(--ease), transform .25s var(--ease);
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
}

#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.error { background: var(--error); }

/* =========================================================
   POPULAR LANGUAGES
   ========================================================= */
.popular-langs { padding: 60px 0; }

.lang-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 16px;
    margin-top: 36px;
}

.lang-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--dur) var(--ease),
                box-shadow   var(--dur) var(--ease),
                transform    var(--dur) var(--ease);
}

.lang-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 16px rgba(37,99,235,.12);
    transform: translateY(-3px);
}

.lang-flag {
    font-size: 2rem;
    margin-bottom: 8px;
    line-height: 1;
}

.lang-name {
    font-size: .875rem;
    font-weight: 700;
    color: var(--text);
}

.lang-native {
    font-size: .72rem;
    color: var(--text-3);
    margin-top: 2px;
}

/* =========================================================
   FEATURES SECTION
   ========================================================= */
.features { padding: 72px 0; background: var(--surface); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.feature-card {
    padding: 28px;
    border-radius: var(--r-lg);
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color var(--dur) var(--ease),
                box-shadow   var(--dur) var(--ease),
                transform    var(--dur) var(--ease);
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--r-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.feature-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.feature-desc {
    font-size: .875rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* =========================================================
   HOW IT WORKS
   ========================================================= */
.how-it-works { padding: 72px 0; }

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 48px;
    position: relative;
}

.steps-grid::before {
    content: "";
    position: absolute;
    top: 32px;
    left: calc(16.6% + 16px);
    right: calc(16.6% + 16px);
    height: 2px;
    background: linear-gradient(90deg, var(--primary-light) 0%, var(--primary) 50%, var(--primary-light) 100%);
    z-index: 0;
}

.step-item { text-align: center; position: relative; z-index: 1; }

.step-number {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 4px 16px rgba(37,99,235,.3);
}

.step-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.step-desc {
    font-size: .875rem;
    color: var(--text-2);
    line-height: 1.6;
}

/* =========================================================
   WHY CHOOSE US
   ========================================================= */
.why-us { padding: 72px 0; background: var(--surface); }

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.why-card {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-radius: var(--r-lg);
    border: 1.5px solid var(--border);
    background: var(--surface);
    transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}

.why-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.why-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--r-sm);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.why-title {
    font-size: .95rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.why-desc {
    font-size: .825rem;
    color: var(--text-2);
    line-height: 1.55;
}

/* =========================================================
   SEO CONTENT SECTION
   ========================================================= */
.seo-section { padding: 72px 0; }

.seo-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.seo-prose h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.3;
}

.seo-prose h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text);
    margin: 24px 0 8px;
}

.seo-prose p {
    color: var(--text-2);
    line-height: 1.75;
    margin-bottom: 16px;
    font-size: .95rem;
}

.seo-prose ul {
    margin: 12px 0 16px 20px;
    list-style: disc;
}

.seo-prose ul li {
    color: var(--text-2);
    font-size: .95rem;
    line-height: 1.7;
    padding: 2px 0;
}

/* =========================================================
   FAQ SECTION
   ========================================================= */
.faq-section { padding: 72px 0; background: var(--surface); }

.faq-list {
    max-width: 760px;
    margin: 48px auto 0;
}

.faq-item {
    border: 1.5px solid var(--border);
    border-radius: var(--r-md);
    margin-bottom: 12px;
    overflow: hidden;
    transition: border-color var(--dur) var(--ease);
}

.faq-item.open { border-color: var(--primary); }

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    background: var(--surface);
    border: none;
    text-align: left;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    cursor: pointer;
    gap: 16px;
    transition: background var(--dur) var(--ease);
}

.faq-question:hover { background: var(--surface-2); }

.faq-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    flex-shrink: 0;
    transition: transform var(--dur) var(--ease);
}

.faq-item.open .faq-icon { transform: rotate(45deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s var(--ease), padding .35s var(--ease);
    padding: 0 24px;
}

.faq-item.open .faq-answer {
    max-height: 400px;
    padding: 0 24px 20px;
}

.faq-answer p {
    color: var(--text-2);
    line-height: 1.7;
    font-size: .95rem;
}

/* =========================================================
   RELATED TOOLS
   ========================================================= */
.related-tools { padding: 72px 0; }

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 48px;
}

.tool-card {
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--r-lg);
    padding: 24px 20px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: border-color var(--dur) var(--ease),
                box-shadow   var(--dur) var(--ease),
                transform    var(--dur) var(--ease);
}

.tool-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    text-decoration: none;
}

.tool-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--r-md);
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.tool-name {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
}

.tool-status {
    font-size: .7rem;
    color: var(--text-3);
    background: var(--surface-2);
    padding: 2px 8px;
    border-radius: var(--r-full);
    font-weight: 600;
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer {
    background: var(--text);
    color: var(--text-3);
    padding: 56px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 48px;
}

.footer-brand-text {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-brand-icon {
    width: 28px;
    height: 28px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .85rem;
    color: #fff;
}

.footer-tagline {
    font-size: .875rem;
    line-height: 1.65;
    margin-bottom: 20px;
    max-width: 260px;
}

.footer-heading {
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    margin-bottom: 16px;
}

.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-links a {
    font-size: .875rem;
    color: var(--text-3);
    transition: color var(--dur) var(--ease);
    text-decoration: none;
}
.footer-links a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.08);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-copy { font-size: .8rem; }

.footer-legal {
    display: flex;
    gap: 20px;
    font-size: .8rem;
}

.footer-legal a {
    color: var(--text-3);
    text-decoration: none;
    transition: color var(--dur) var(--ease);
}

.footer-legal a:hover { color: #fff; }

/* =========================================================
   LAYOUT HELPER — sidebar ad wrapper
   ========================================================= */
.with-sidebar {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 32px;
    align-items: start;
}

/* =========================================================
   RESPONSIVE — TABLET  (≤ 900px)
   ========================================================= */
@media (max-width: 900px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .steps-grid::before { display: none; }

    .seo-grid { grid-template-columns: 1fr; gap: 40px; }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }

    .with-sidebar {
        grid-template-columns: 1fr;
    }

    .ad-sidebar { display: none; }

    #nav-toggle { display: flex; }

    #nav-menu {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 20px;
        gap: 2px;
        display: none;
        box-shadow: var(--shadow-md);
    }

    #nav-menu.open { display: flex; }

    .nav-link { padding: 12px 16px; border-radius: var(--r-sm); }
    .nav-cta { margin: 8px 0 0; text-align: center; padding: 12px; }
}

/* =========================================================
   RESPONSIVE — MOBILE  (≤ 600px)
   ========================================================= */
@media (max-width: 600px) {
    .hero { padding: 48px 0 40px; }

    .hero-stats { gap: 20px; }

    /* Translator: stack vertically */
    .translator-header {
        grid-template-columns: 1fr 48px 1fr;
    }

    .lang-panel { padding: 12px 14px; }

    .translator-body { grid-template-columns: 1fr; }

    .text-panel:first-child {
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .translation-textarea { min-height: 160px; padding: 14px; }

    .translator-footer {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .toolbar-group { justify-content: center; flex-wrap: wrap; }
    .toolbar-group:last-child { justify-content: center; }

    #translate-btn { width: 100%; justify-content: center; }

    .lang-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .features-grid,
    .why-grid { grid-template-columns: 1fr; }

    .tools-grid { grid-template-columns: repeat(2, 1fr); }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-bottom { flex-direction: column; text-align: center; }
    .footer-legal { justify-content: center; }

    .section-title { font-size: 1.5rem; }

    .ad-banner-top,
    .ad-inline,
    .ad-footer { height: 60px; }
}
