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

:root {
    --red: #be0016;
    --red-dark: #9e0012;
    --text: #333;
    --text-light: #666;
    --text-muted: #999;
    --bg: #fff;
    --bg-light: #f5f5f5;
    --border: #e0e0e0;
    --link: #c41230;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

body {
    font-family: var(--font);
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

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

/* ===== Navbar ===== */
.navbar {
    background: var(--red);
    color: #fff;
    position: relative;
    z-index: 1030;
    display: flex;
    flex-wrap: wrap;
    padding: 0;
}

.navbar-container {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- Top links row (small utility links, right-aligned) --- */
.navbar-top-links {
    width: 100%;
    padding: 8px 0;
}

.navbar-top-links .navbar-container {
    display: flex;
    justify-content: flex-end;
}

.top-links-list {
    display: flex;
    align-items: center;
    gap: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin: 0;
}

.top-links-list li {
    display: inline-block;
}

.top-links-list li a {
    font-size: 11.2px;
    text-transform: uppercase;
    color: #fff;
    padding: 0 8px;
    white-space: nowrap;
    opacity: 0.9;
    transition: opacity 0.2s;
}

.top-links-list li a:hover {
    opacity: 1;
}

.top-icon-link {
    display: inline-flex !important;
    align-items: center;
}

.top-lang-link {
    display: inline-flex !important;
    align-items: center;
    gap: 4px;
}

.lang-arrow {
    font-size: 8px;
    opacity: 0.7;
}

/* --- Main row: logo + collapse --- */
.navbar-main {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.navbar-brand {
    flex-shrink: 0;
    display: block;
    padding: 5px 0;
    margin-top: -30px;
}

.navbar-brand img {
    height: 60px;
    width: auto;
}

/* Mobile controls (hidden on desktop) */
.navbar-mobile-controls {
    display: none;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.mobile-lang {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #fff;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.menu-toggle span {
    width: 24px;
    height: 2px;
    background: #fff;
    border-radius: 1px;
}

.navbar-search-mobile {
    display: none;
    color: #fff;
    margin-left: 8px;
}

/* --- Collapse block (visible on desktop) --- */
.navbar-collapse {
    display: flex;
    flex-direction: row;
    flex: 1;
    min-width: 0;
}

.navbar-ctnr {
    width: 100%;
    margin-left: auto;
}

/* Shared nav list styles */
.navbar-nav {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navbar-nav li a {
    display: block;
    color: #fff;
    white-space: nowrap;
    transition: opacity 0.2s;
}

.navbar-nav li a:hover {
    opacity: 0.8;
}

/* Main nav (Home, Crypto, etc.) — bold, uppercase, smaller */
.nav-main {
    justify-content: flex-end;
    font-weight: 700;
    margin-top: 4px;
    margin-bottom: 0;
}

.nav-main li a {
    font-size: 12px;
    text-transform: uppercase;
    padding: 8px 5.6px;
    line-height: 18px;
}

/* Categories nav (Notícias, Portugal, etc.) — normal weight */
.nav-categories {
    justify-content: flex-end;
    margin-top: 2px;
    margin-bottom: 4px;
}

.nav-categories {
    flex-wrap: nowrap;
    overflow: hidden;
}

.nav-categories li a {
    font-size: 12px;
    font-weight: 400;
    padding: 8px 5.6px;
    text-transform: uppercase;
    line-height: 18px;
}

.dd-arrow {
    font-size: 8px;
    vertical-align: middle;
    opacity: 0.7;
    margin-left: 2px;
}

/* Nav link transitions */
.nav-main li a,
.nav-categories li a {
    transition: opacity 0.2s;
}

/* Body offset (navbar is no longer fixed) */
body {
    padding-top: 0;
}

/* ===== TICKER (scrolling headline bar) ===== */
.ticker {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    background: var(--red);
    color: #fff;
    height: 36px;
    display: flex;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

.ticker.vis {
    opacity: 1;
    pointer-events: auto;
}

.ticker-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
    height: 100%;
    background: rgba(0,0,0,0.15);
}

.ticker-scroll {
    flex: 1;
    overflow: hidden;
    height: 100%;
    display: flex;
    align-items: center;
    position: relative;
}

.ticker-track {
    display: flex;
    align-items: center;
    white-space: nowrap;
    animation: marquee var(--dur, 30s) linear infinite;
    gap: 20px;
}

.ticker-item {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    text-transform: uppercase;
}

.ticker-dot {
    font-size: 10px;
    opacity: 0.6;
    flex-shrink: 0;
}

.scroll-progress {
    position: absolute;
    top: 100%;
    left: 0;
    height: 3px;
    background: #fff;
    width: 0;
    z-index: 1;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Breadcrumb */
.breadcrumb {
    padding: 12px 0;
    font-size: 13px;
    color: var(--text-light);
    border-bottom: 1px solid var(--border);
}

.breadcrumb a {
    color: var(--link);
    font-weight: 500;
}

.breadcrumb span {
    color: var(--link);
}

/* Main Content Grid */
.main-content {
    padding-top: 30px;
    padding-bottom: 60px;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
}

/* Article */
.article {
    position: relative;
    padding-left: 60px;
}

/* Share column — separate left column like original */
.share-column {
    position: sticky;
    top: 48px;
    float: left;
    margin-left: -60px;
    width: 42px;
    text-align: center;
}

.share-label {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 8px;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: center;
}

.share-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0;
    background: none;
    transition: opacity 0.2s;
}

.share-btn:hover {
    opacity: 0.7;
}

.share-facebook { color: #1877f2; }
.share-x { color: #000; }
.share-linkedin { color: #0a66c2; }
.share-whatsapp { color: #25d366; }

.article h1 {
    font-size: 32px;
    line-height: 1.25;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111;
}

.lead {
    font-size: 18px;
    line-height: 1.5;
    color: var(--text);
    font-weight: 500;
    margin-bottom: 12px;
}

.lead a {
    color: var(--link);
    text-decoration: underline;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.article-meta .category {
    font-weight: 600;
}

.article-meta .comments-link {
    color: var(--link);
}

.article-hero {
    margin-bottom: 24px;
}

.article-hero img {
    width: 100%;
    border-radius: 4px;
}

.article-hero figcaption {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 6px;
    font-style: italic;
}

.article-body p {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 18px;
    color: var(--text);
}

.article-body a {
    color: var(--link);
    text-decoration: underline;
}

.article-body h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 28px 0 12px;
    color: var(--text);
}

.article-body ul {
    margin: 0 0 18px 20px;
    padding: 0;
    list-style: disc;
}

.article-body ul li {
    font-size: 16px;
    line-height: 1.75;
    margin-bottom: 6px;
    color: var(--text);
}

/* Trigger phrases — red underline highlight */
.article .trigger,
.article-body .trigger {
    text-decoration: underline;
    text-decoration-color: var(--red);
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

/* H1 trigger — subtle inline highlight instead of underline */
.article h1 .trigger {
    text-decoration: none;
    background-image: linear-gradient(var(--red), var(--red));
    background-position: 0 100%;
    background-size: 100% 2px;
    background-repeat: no-repeat;
    padding-bottom: 1px;
}

.article-body blockquote {
    margin: 24px 0;
    padding: 16px 24px;
    border-left: 4px solid var(--primary, #c00);
    background: #f9f9f9;
    font-style: italic;
    color: #333;
}

.article-body blockquote p {
    margin-bottom: 0;
}

.article-body figure {
    margin: 24px 0;
}

/* Chart / diagram */
.chart-wrap {
    max-width: 480px;
    margin: 32px auto;
}

.chart-title {
    background: var(--primary, #c00);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    text-align: center;
    text-transform: uppercase;
    padding: 16px 20px;
    border-radius: 6px 6px 0 0;
    line-height: 1.4;
}

.chart-subtitle {
    text-align: center;
    font-size: 14px;
    color: #666;
    padding: 12px 0 8px;
}

.chart-bars {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 24px;
    height: 280px;
    padding: 0 20px 0;
    border-bottom: 2px solid #333;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0,
        transparent calc(20% - 1px),
        #e0e0e0 calc(20% - 1px),
        #e0e0e0 20%
    );
}

.chart-bar {
    flex: 1;
    max-width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, #ff4444 0%, #c00 100%);
    border-radius: 4px 4px 0 0;
    position: relative;
    min-height: 20px;
    transition: height 0.6s ease;
}

.chart-bar-fill span {
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    font-size: 14px;
    color: #333;
    white-space: nowrap;
}

.chart-labels {
    display: flex;
    justify-content: center;
    gap: 24px;
    padding: 0 20px;
}

.chart-labels div {
    flex: 1;
    max-width: 80px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    padding: 8px 0;
    color: #333;
}

/* Results grid (before/after photos) */
.results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 24px 0;
}

.results-item {
    text-align: center;
}

.results-item img {
    width: 100%;
    border-radius: 6px;
    display: block;
}

.results-item p {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin: 8px 0 0;
}

/* ===== Quiz Block ===== */
.quiz-block {
    margin: 36px 0;
    border: 1px solid var(--border);
    border-radius: 7px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.quiz-block__header {
    background: var(--red);
    color: #fff;
    padding: 20px 24px;
    position: relative;
}

.quiz-block__badge {
    display: inline-block;
    background: #fff;
    color: var(--red);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 3px 10px;
    margin-bottom: 10px;
}

.quiz-block__title,
.article-body .quiz-block__title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.8;
    margin: 0;
    color: #fff;
}

.quiz-block__title--form {
    display: none;
}

.quiz-block.quiz-done .quiz-block__title--quiz {
    display: none;
}

.quiz-block.quiz-done .quiz-block__title--form {
    display: block;
}

.quiz-block.quiz-done .quiz-block__steps {
    display: none;
}

.quiz-block__title span {
    font-weight: 800;
    display: inline;
}

.quiz-block__body {
    padding: 24px;
}

/* Step indicators */
.quiz-block__steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 24px;
}

.quiz-step-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    background: #fff;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.quiz-step-dot.active {
    border-color: var(--red);
    background: var(--red);
    color: #fff;
}

.quiz-step-dot.done {
    border-color: var(--red);
    background: #fff;
    color: var(--red);
}

.quiz-step-line {
    height: 2px;
    flex: 1;
    max-width: 60px;
    background: var(--border);
    transition: background 0.3s ease;
}

.quiz-step-line.done {
    background: var(--red);
}

/* Question slides */
.quiz-block__question {
    display: none;
}

.quiz-block__question.active {
    display: block;
    animation: quizFadeIn 0.35s ease;
}

@keyframes quizFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.quiz-block__q-text,
.article-body .quiz-block__q-text {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Radio options */
.quiz-block__options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--border);
    border-radius: 7px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    position: relative;
    min-height: 48px;
}

.quiz-option:hover {
    border-color: var(--red);
    background: #fef7f7;
}

.quiz-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.quiz-option__radio {
    width: 22px;
    height: 22px;
    border: 2px solid #ccc;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.2s;
}

.quiz-option__radio::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--red);
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

.quiz-option input[type="radio"]:checked ~ .quiz-option__radio {
    border-color: var(--red);
}

.quiz-option input[type="radio"]:checked ~ .quiz-option__radio::after {
    transform: translate(-50%, -50%) scale(1);
}

.quiz-option input[type="radio"]:checked ~ .quiz-option__label {
    color: var(--red);
    font-weight: 600;
}

.quiz-option__label {
    font-size: 15px;
    color: var(--text);
    line-height: 1.3;
    transition: color 0.2s;
}

/* Order form (step 4) */
.quiz-block__form-header {
    text-align: center;
    margin-bottom: 20px;
}

.quiz-block__form-title,
.article-body .quiz-block__form-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}

.quiz-block__timer {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-light);
    background: #f9f9f9;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 7px;
}

.quiz-block__timer strong {
    color: var(--red);
    font-size: 18px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.05em;
}

.quiz-block__timer svg {
    color: var(--red);
    flex-shrink: 0;
}

.quiz-block__product-img {
    text-align: center;
    margin-bottom: 16px;
}

.quiz-block__product-img img {
    max-width: 220px;
    height: auto;
    margin: 0 auto;
    border-radius: 4px;
}

.quiz-block__prices {
    text-align: center;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.quiz-block__price-old {
    font-size: 22px;
    color: var(--text-muted);
    text-decoration: line-through;
    font-weight: 400;
}

.quiz-block__price-new {
    font-size: 36px;
    font-weight: 800;
    color: var(--red);
}

.quiz-block__order-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 380px;
    margin: 0 auto;
}

.quiz-block__field-wrap {
    position: relative;
}

.quiz-block__input,
.quiz-block__select {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    appearance: none;
    border-radius: 7px;
    min-height: 48px;
}

.quiz-block__input:focus,
.quiz-block__select:focus {
    border-color: var(--red);
}

.quiz-block__input::placeholder {
    color: var(--text-muted);
}

.quiz-block__select {
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23999' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.quiz-block__submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(90deg, var(--red), #e8243a, var(--red), #e8243a);
    background-size: 300% 100%;
    animation: btnGradientShift 3s ease infinite;
    color: #fff;
    border: none;
    font-size: 17px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    font-family: inherit;
    margin-top: 4px;
    border-radius: 7px;
    min-height: 52px;
}

@keyframes btnGradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.quiz-block__submit:hover {
    filter: brightness(1.1);
}

/* Footer */
.quiz-block__footer {
    background: #f5f5f5;
    padding: 12px 24px;
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    border-top: 1px solid var(--border);
}

.quiz-block__footer strong {
    color: var(--red);
}

/* Quiz mobile */
@media (max-width: 480px) {
    .quiz-block__header {
        padding: 16px 18px;
    }
    .quiz-block__title {
        font-size: 16px;
    }
    .quiz-block__body {
        padding: 18px 16px;
    }
    .quiz-option {
        padding: 12px 14px;
    }
    .quiz-option__label {
        font-size: 14px;
    }
    .quiz-block__price-new {
        font-size: 28px;
    }
}

/* Sidebar */
.sidebar {
    border-left: 1px solid var(--border);
    padding-left: 30px;
}

.sidebar-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.sidebar-section:last-child {
    border-bottom: none;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--red);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sidebar-article {
    margin-bottom: 16px;
}

.sidebar-article a {
    display: block;
    transition: color 0.2s;
}

.sidebar-article a:hover h3 {
    color: var(--red);
}

.sidebar-article img {
    width: 100%;
    border-radius: 4px;
    margin-bottom: 8px;
    aspect-ratio: 16/9;
    object-fit: cover;
}

.sidebar-article h3 {
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
}

.sidebar-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar-prev-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.sidebar-prev-link {
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
}

.sidebar-prev-link:hover {
    text-decoration: underline;
}

/* More Articles */
.more-articles {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border);
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.card a {
    display: block;
}

.card a:hover h3 {
    color: var(--red);
}

.card img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 10px;
}

.card h3 {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 4px;
    transition: color 0.2s;
}

.card-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer */
.footer {
    margin-top: 60px;
}

.footer-top {
    background: #1a1a1a;
    color: #ccc;
    padding: 50px 0;
}

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

.footer-logo {
    height: 40px;
    margin-bottom: 16px;
}

.footer-brand p {
    font-size: 13px;
    line-height: 1.6;
    opacity: 0.7;
}

.footer-contacts h4,
.footer-menu h4,
.footer-social h4 {
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-contacts p {
    font-size: 13px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer-contacts small {
    opacity: 0.5;
}

.footer-menu ul li a {
    font-size: 13px;
    display: block;
    padding: 3px 0;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer-menu ul li a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 10px;
}

.social-links a {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    transition: background 0.2s;
}

.social-links a:hover {
    background: var(--red);
}

.footer-bottom {
    background: #111;
    color: #666;
    padding: 16px 0;
    text-align: center;
    font-size: 12px;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--red);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, background 0.2s;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--red-dark);
}

/* Responsive */
@media (max-width: 1199px) {
    /* Below XL: hide collapse, show mobile controls */
    .navbar-top-links {
        display: none;
    }

    .navbar-main {
        display: block;
        padding: 0 16px;
        position: relative;
    }

    /* Fixed top bar row with burger | logo | search */
    .navbar-main::before {
        content: '';
        display: block;
        height: 52px;
    }

    .navbar-brand {
        margin-top: 0;
        padding: 0;
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }

    .navbar-brand img {
        height: 36px;
    }

    .navbar-mobile-controls {
        display: flex;
        margin-left: 0;
        position: absolute;
        left: 16px;
        top: 8px;
        z-index: 2;
        height: 36px;
        align-items: center;
    }

    .navbar-search-mobile {
        display: flex;
        align-items: center;
        position: absolute;
        right: 16px;
        top: 8px;
        z-index: 2;
        height: 36px;
    }

    .menu-toggle {
        display: flex;
    }

    /* Collapse block: hidden by default, slides open */
    .navbar-collapse {
        display: none;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .navbar-collapse.open {
        display: block;
    }

    .navbar-collapse .navbar-ctnr {
        margin-left: 0;
        padding: 8px 0 12px;
    }

    .navbar-collapse .navbar-nav {
        flex-direction: column;
        flex-wrap: nowrap;
    }

    .navbar-collapse .nav-main {
        justify-content: flex-start;
        margin-top: 0;
        border-bottom: 1px solid rgba(255,255,255,0.15);
        padding-bottom: 8px;
        margin-bottom: 8px;
    }

    .navbar-collapse .nav-main li a {
        padding: 6px 0;
        font-size: 13px;
    }

    .navbar-collapse .nav-categories {
        justify-content: flex-start;
        flex-wrap: wrap;
        overflow: visible;
        margin-top: 0;
        margin-bottom: 0;
    }

    .navbar-collapse .nav-categories li a {
        padding: 6px 0;
        font-size: 13px;
    }

    /* Burger animation */
    .menu-toggle span {
        transition: transform 0.3s, opacity 0.3s;
        transform-origin: center;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    body {
        padding-top: 0;
    }
}

@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr 280px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .article {
        padding-left: 0;
    }

    .share-column {
        position: static;
        float: none;
        margin-left: 0;
        width: auto;
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 16px;
    }

    .share-label {
        margin-bottom: 0;
    }

    .share-buttons {
        flex-direction: row;
    }

    .sidebar {
        border-left: none;
        padding-left: 0;
        border-top: 1px solid var(--border);
        padding-top: 20px;
    }

    .articles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

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

    .article h1 {
        font-size: 26px;
        line-height: 1.4;
    }

    .lead {
        font-size: 16px;
    }

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

    .results-item p {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .article h1 {
        font-size: 22px;
        line-height: 1.45;
    }

    .results-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        gap: 20px;
    }

    .results-item img {
        width: 100%;
        border-radius: 8px;
    }

    .results-item p {
        font-size: 13px;
        margin-top: 6px;
    }
}
