/* === RESET & BASE === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  font-family: "Merriweather", serif;
  font-size: 16px;
  line-height: 1.6;
  color: #505d68;
  background: #ffffff;
}
a {
  color: #457dfd;
  text-decoration: none;
  transition: color 0.2s;
}
a:hover {
  color: #3366cc;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
ul,
ol {
  list-style: none;
}

/* === UTILITIES === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6,
.nav-menu a,
.btn,
.badge,
label,
input,
select,
button,
.footer-col h4 {
  font-family: "Open Sans", sans-serif;
}
h1 {
  font-size: 32px;
  line-height: 1.3;
  color: #1b2c42;
  font-weight: 700;
}
h2 {
  font-size: 24px;
  line-height: 1.3;
  color: #1b2c42;
  font-weight: 700;
}
h3 {
  font-size: 18px;
  line-height: 1.3;
  color: #1b2c42;
  font-weight: 700;
}
p {
  margin-bottom: 1em;
}

/* === HEADER / NAVIGATION === */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  transition: box-shadow 0.3s;
}
.header.scrolled {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: "Open Sans", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #1b2c42;
}
.logo span {
  color: #457dfd;
}
.nav-menu {
  display: flex;
  gap: 24px;
  align-items: center;
}
.nav-menu a {
  font-size: 14px;
  font-weight: 600;
  color: #505d68;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.nav-menu a:hover,
.nav-menu a.active {
  color: #457dfd;
}
.nav-search {
  cursor: pointer;
  color: #505d68;
  font-size: 18px;
}
.hamburger {
  display: none;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 24px;
  color: #1b2c42;
}

/* === HERO SECTION === */
.hero-section {
  padding: 30px 0;
}
.hero-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
}
.hero-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.hero-card .hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(27, 44, 66, 0.9));
  color: #fff;
}
.hero-card .hero-overlay h1 {
  color: #fff;
  font-size: 32px;
  margin-bottom: 8px;
}
.hero-card .hero-overlay h1 a {
  color: #fff;
}
.hero-card .hero-overlay p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  margin-bottom: 8px;
}
.hero-card .hero-overlay .hero-meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  font-family: "Open Sans", sans-serif;
}

/* === BADGES === */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #fff;
  margin-bottom: 8px;
}
.badge-zpravy {
  background: #457dfd;
}
.badge-navody {
  background: #10b981;
}
.badge-zdravi {
  background: #ef4444;
}
.badge-rozhovory {
  background: #8b5cf6;
}
.badge-magazin {
  background: #f59e0b;
}

/* === ARTICLE CARDS === */
.card-grid {
  display: grid;
  gap: 24px;
}
.card-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.card-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.article-card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  transition:
    transform 0.2s,
    box-shadow 0.2s;
  border: 1px solid #f0f0f0;
}
.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.article-card img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.article-card .card-body {
  padding: 16px;
}
.article-card h3 {
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.4;
}
.article-card h3 a {
  color: #1b2c42;
}
.article-card h3 a:hover {
  color: #457dfd;
}
.article-card .card-excerpt {
  font-size: 14px;
  color: #505d68;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.article-card .card-date {
  font-size: 13px;
  color: #9ca3af;
  font-family: "Open Sans", sans-serif;
}

/* === SECTION HEADINGS === */
.section-title {
  font-size: 24px;
  color: #1b2c42;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #457dfd;
  display: inline-block;
}

/* === AD PLACEHOLDER === */
.ad-zone {
  background: #f5f5f5;
  border: 2px dashed #d1d5db;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  position: relative;
  margin: 30px auto;
}
.ad-zone::before {
  content: "Reklama";
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: 11px;
  color: #bbb;
}
.ad-leaderboard {
  max-width: 728px;
  height: 90px;
}
.ad-leaderboard-wide {
  max-width: 970px;
  height: 250px;
}
.ad-rectangle {
  width: 300px;
  height: 250px;
}

/* === TRENDING (ASYMMETRIC) === */
.trending-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.trending-grid .trending-main {
  grid-row: span 2;
}
.trending-grid .trending-main .article-card img {
  aspect-ratio: 16/10;
}
.trending-grid .trending-side .article-card {
  display: flex;
  gap: 12px;
}
.trending-grid .trending-side .article-card img {
  width: 120px;
  min-width: 120px;
  aspect-ratio: 4/3;
}
.trending-grid .trending-side .article-card .card-body {
  padding: 0 8px;
}

/* === CTA CALCULATOR === */
.cta-calculator {
  background: #457dfd;
  color: #fff;
  text-align: center;
  padding: 48px 20px;
  margin: 40px 0;
  border-radius: 12px;
}
.cta-calculator h2 {
  color: #fff;
  font-size: 28px;
  margin-bottom: 12px;
}
.cta-calculator p {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
  font-size: 17px;
}
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: 6px;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition:
    background 0.2s,
    transform 0.1s;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-white {
  background: #fff;
  color: #457dfd;
}
.btn-white:hover {
  background: #f0f0f0;
}
.btn-blue {
  background: #457dfd;
  color: #fff;
}
.btn-blue:hover {
  background: #3366cc;
}
.btn-green {
  background: #10b981;
  color: #fff;
}
.btn-green:hover {
  background: #0d9668;
}

/* === NEWSLETTER === */
.newsletter-box {
  max-width: 623px;
  margin: 40px auto;
  padding: 32px;
  border: 2px solid #457dfd;
  border-radius: 8px;
  text-align: center;
  background: #fff;
}
.newsletter-box h3 {
  font-size: 22px;
  margin-bottom: 8px;
}
.newsletter-box p {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}
.newsletter-form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.newsletter-form input[type="email"] {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
}
.newsletter-form button {
  padding: 12px 24px;
  background: #457dfd;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  cursor: pointer;
}
.newsletter-form button:hover {
  background: #3366cc;
}
.newsletter-privacy {
  font-size: 12px;
  color: #9ca3af;
}
.newsletter-privacy label {
  cursor: pointer;
  font-family: "Open Sans", sans-serif;
}
.newsletter-success {
  display: none;
  color: #10b981;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
  padding: 16px;
}

/* === LOAD MORE === */
.load-more {
  text-align: center;
  padding: 30px 0;
}

/* === CATEGORY SECTION ROWS === */
.category-row {
  margin-bottom: 40px;
}

/* === ARTICLE DETAIL === */
.article-detail {
  padding: 30px 0;
}
.breadcrumb {
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 20px;
}
.breadcrumb a {
  color: #457dfd;
}
.breadcrumb span {
  margin: 0 6px;
}
.article-header {
  margin-bottom: 24px;
}
.article-header .article-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #9ca3af;
  font-family: "Open Sans", sans-serif;
  margin-bottom: 12px;
}
.article-header h1 {
  font-size: 36px;
  margin-bottom: 16px;
  line-height: 1.25;
}
.article-hero-img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 24px;
  aspect-ratio: 16/9;
  object-fit: cover;
}
.article-lead {
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 24px;
  color: #1b2c42;
}
.article-body {
  font-size: 16px;
  line-height: 1.7;
  max-width: 720px;
}
.article-body h2 {
  font-size: 22px;
  margin: 32px 0 16px;
}
.article-body h3 {
  font-size: 18px;
  margin: 24px 0 12px;
}
.article-body p {
  margin-bottom: 1em;
}
.article-body ul,
.article-body ol {
  margin: 1em 0;
  padding-left: 24px;
  list-style: disc;
}
.article-body ol {
  list-style: decimal;
}
.article-body li {
  margin-bottom: 8px;
}
.article-body strong {
  color: #1b2c42;
}
.article-body blockquote {
  border-left: 4px solid #457dfd;
  padding: 16px 20px;
  margin: 24px 0;
  font-style: italic;
  font-size: 18px;
  color: #1b2c42;
  background: #f8fafc;
  border-radius: 0 8px 8px 0;
}

/* === ARTICLE LAYOUT (content + sidebar) === */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
}

/* === SIDEBAR === */
.sidebar .widget {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 24px;
}
.sidebar .widget h4 {
  font-size: 16px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid #457dfd;
  color: #1b2c42;
}
.sidebar .widget ul li {
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.sidebar .widget ul li:last-child {
  border-bottom: none;
}
.sidebar .widget ul li a {
  color: #1b2c42;
  font-family: "Open Sans", sans-serif;
}
.sidebar .widget ul li a:hover {
  color: #457dfd;
}

.sidebar .popular-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.sidebar .popular-list li img {
  width: 60px;
  min-width: 60px;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 4px;
}
.sidebar .popular-list li .pop-title {
  font-size: 13px;
  font-weight: 600;
  color: #1b2c42;
  line-height: 1.4;
}
.sidebar .popular-list li .pop-title:hover {
  color: #457dfd;
}

/* === CALCULATOR PAGE === */
.calc-container {
  max-width: 700px;
  margin: 30px auto;
}
.calc-form {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 32px;
}
.calc-form h2 {
  margin-bottom: 24px;
  text-align: center;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 6px;
  color: #1b2c42;
}
.form-group input[type="range"] {
  width: 100%;
  margin-bottom: 4px;
}
.form-group .range-value {
  text-align: right;
  font-weight: 700;
  font-size: 18px;
  color: #457dfd;
  font-family: "Open Sans", sans-serif;
}
.form-group input[type="number"],
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  font-family: "Open Sans", sans-serif;
}
.radio-group {
  display: flex;
  gap: 20px;
}
.radio-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-weight: 400;
}
.calc-result {
  display: none;
  background: #ecfdf5;
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 32px;
  margin-top: 24px;
  text-align: center;
}
.calc-result.show {
  display: block;
}
.calc-result .pension-amount {
  font-size: 42px;
  font-weight: 800;
  color: #10b981;
  font-family: "Open Sans", sans-serif;
  margin: 12px 0;
}
.calc-result .pension-label {
  font-size: 16px;
  color: #065f46;
}
.calc-breakdown {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  text-align: left;
}
.calc-breakdown th,
.calc-breakdown td {
  padding: 10px 14px;
  border-bottom: 1px solid #d1fae5;
  font-size: 14px;
}
.calc-breakdown th {
  background: #f5f5f5;
  font-family: "Open Sans", sans-serif;
  font-weight: 600;
  color: #1b2c42;
}
.calc-breakdown tr:nth-child(even) td {
  background: #eef6ff;
}

/* === RELATED ARTICLES === */
.related-articles {
  margin: 40px 0;
}
.related-articles h2 {
  margin-bottom: 20px;
}

/* === FOOTER === */
.footer {
  background: #1b2c42;
  color: rgba(255, 255, 255, 0.8);
  padding: 48px 0 0;
  margin-top: 60px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer .logo {
  color: #fff;
  margin-bottom: 12px;
  display: block;
}
.footer .issn {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  font-family: "Open Sans", sans-serif;
}
.footer .footer-desc {
  font-size: 13px;
  line-height: 1.6;
}
.footer-col h4 {
  color: #fff;
  font-size: 15px;
  margin-bottom: 16px;
}
.footer-col ul li {
  margin-bottom: 8px;
}
.footer-col ul li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
}
.footer-col ul li a:hover {
  color: #fff;
}
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.footer-social a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
}
.footer-social a:hover {
  background: #457dfd;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Open Sans", sans-serif;
}
.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 8px;
}
.footer-bottom a:hover {
  color: #fff;
}

/* === ABOUT / CONTACT PAGES === */
.page-content {
  max-width: 800px;
  margin: 30px auto;
  padding: 0 20px;
}
.page-content h1 {
  margin-bottom: 20px;
}
.page-content h2 {
  margin: 28px 0 12px;
}
.page-content p {
  line-height: 1.7;
}
.contact-form {
  max-width: 600px;
  margin: 24px 0;
}
.contact-form .form-group {
  margin-bottom: 16px;
}
.contact-form textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 15px;
  font-family: "Open Sans", sans-serif;
  resize: vertical;
}

/* === HOMEPAGE BEM STYLES (hero__, card__, section__, etc.) === */

/* Hero section */
.hero {
  padding: 30px 0;
}
.hero__card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #1b2c42;
}
.hero__card-link {
  color: inherit;
}
.hero__image-wrap {
  position: relative;
}
.hero__image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.hero__content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(transparent, rgba(27, 44, 66, 0.92));
  color: #fff;
}
.hero__title {
  font-family: "Open Sans", sans-serif;
  font-size: 32px;
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 8px;
}
.hero__excerpt {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.5;
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.hero__meta {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  font-family: "Open Sans", sans-serif;
  display: flex;
  gap: 12px;
}

/* Section title BEM */
.section__title {
  font-family: "Open Sans", sans-serif;
  font-size: 24px;
  color: #1b2c42;
  font-weight: 700;
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 3px solid #457dfd;
  display: inline-block;
}

/* Card BEM (homepage article cards) */
.card__link {
  color: inherit;
  text-decoration: none;
}
.card__image-wrap {
  overflow: hidden;
  border-radius: 8px 8px 0 0;
}
.card__image {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transition: transform 0.2s;
}
.card__link:hover .card__image {
  transform: scale(1.03);
}
.card__content {
  padding: 16px;
  background: #fff;
  border: 1px solid #f0f0f0;
  border-top: none;
  border-radius: 0 0 8px 8px;
}
.card__title {
  font-family: "Open Sans", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #1b2c42;
  line-height: 1.4;
  margin-bottom: 8px;
}
.card__link:hover .card__title {
  color: #457dfd;
}
.card__excerpt {
  font-size: 14px;
  color: #505d68;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 10px;
}
.card__meta,
.card__date {
  font-size: 13px;
  color: #9ca3af;
  font-family: "Open Sans", sans-serif;
}

/* Homepage article grid layout */
.articles__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}
.articles__grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Trending BEM */
.trending__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 40px;
}
.trending__grid .trending__main {
  grid-row: span 2;
}

/* CTA Calculator BEM */
.cta__inner {
  background: #457dfd;
  color: #fff;
  text-align: center;
  padding: 48px 20px;
  margin: 40px 0;
  border-radius: 12px;
}
.cta__title {
  font-family: "Open Sans", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.cta__text {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}

/* Newsletter BEM */
.newsletter__box {
  max-width: 623px;
  margin: 40px auto;
  padding: 32px;
  border: 2px solid #457dfd;
  border-radius: 8px;
  text-align: center;
  background: #fff;
}
.newsletter__title {
  font-family: "Open Sans", sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #1b2c42;
  margin-bottom: 8px;
}
.newsletter__text {
  font-size: 14px;
  color: #6b7280;
  margin-bottom: 16px;
}
.newsletter__form {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.newsletter__input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
}
.newsletter__checkbox-wrap {
  font-size: 12px;
  color: #9ca3af;
  font-family: "Open Sans", sans-serif;
}
.newsletter__checkbox {
  margin-right: 4px;
}

/* Footer BEM */
.footer__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 32px;
  margin-bottom: 32px;
}
.footer__logo {
  font-family: "Open Sans", sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
  display: inline-block;
}
.footer__logo span {
  color: #457dfd;
}
.footer__issn {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 8px;
  font-family: "Open Sans", sans-serif;
}
.footer__desc {
  font-size: 13px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.7);
}
.footer__col {
}
.footer__col-title {
  font-family: "Open Sans", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}
.footer__links {
  list-style: none;
  padding: 0;
}
.footer__links li {
  margin-bottom: 8px;
}
.footer__links li a {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-family: "Open Sans", sans-serif;
  text-decoration: none;
}
.footer__links li a:hover {
  color: #fff;
}
.footer__social {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}
.footer__social-link {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  text-decoration: none;
}
.footer__social-link:hover {
  background: #457dfd;
}

/* Bottom bar BEM */
.bar__inner {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  font-family: "Open Sans", sans-serif;
}
.bar__copy {
  margin-bottom: 4px;
}
.bar__links a {
  color: rgba(255, 255, 255, 0.6);
  margin: 0 8px;
  text-decoration: none;
}
.bar__links a:hover {
  color: #fff;
}

/* Load more button BEM */
.articles__load {
  text-align: center;
  padding: 30px 0;
}

/* Header search button */
.header__search-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #505d68;
  font-size: 18px;
  padding: 4px;
}

/* Homepage responsive overrides */
@media (max-width: 768px) {
  .articles__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .articles__grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .trending__grid {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .newsletter__form {
    flex-direction: column;
  }
  .hero__title {
    font-size: 22px;
  }
  .hero__content {
    padding: 20px;
  }
}
@media (max-width: 430px) {
  .articles__grid {
    grid-template-columns: 1fr;
  }
  .articles__grid--4 {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .hero__title {
    font-size: 18px;
  }
  .hero__content {
    padding: 16px;
  }
}

/* === GRAY BG SECTION === */
.bg-gray {
  background: #f1f1f1;
  padding: 40px 0;
}

/* === CATEGORY PAGE HEADER === */
.category-header {
  padding: 30px 0 20px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 30px;
}
.category-header h1 {
  font-size: 28px;
}

/* === MOBILE MENU OVERLAY === */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #fff;
  z-index: 2000;
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
}
.mobile-menu.open {
  transform: translateX(0);
}
.mobile-menu-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: #1b2c42;
}
.mobile-menu nav {
  margin-top: 60px;
}
.mobile-menu nav a {
  display: block;
  padding: 14px 0;
  font-size: 18px;
  font-weight: 600;
  color: #1b2c42;
  font-family: "Open Sans", sans-serif;
  border-bottom: 1px solid #f3f4f6;
}

/* === RESPONSIVE: 768px === */
@media (max-width: 768px) {
  .nav-menu {
    display: none;
  }
  .nav-search {
    display: none;
  }
  .hamburger {
    display: block;
  }
  .mobile-menu {
    display: block;
  }
  .card-grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .trending-grid {
    grid-template-columns: 1fr;
  }
  .trending-grid .trending-main {
    grid-row: auto;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .article-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    margin-top: 30px;
  }
  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 20px;
  }
  .hero-card .hero-overlay h1 {
    font-size: 22px;
  }
  .newsletter-form {
    flex-direction: column;
  }
}

/* === RESPONSIVE: 430px === */
@media (max-width: 430px) {
  .card-grid-3 {
    grid-template-columns: 1fr;
  }
  .card-grid-2 {
    grid-template-columns: 1fr;
  }
  .card-grid-4 {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .hero-card .hero-overlay {
    padding: 16px;
  }
  .hero-card .hero-overlay h1 {
    font-size: 18px;
  }
  .cta-calculator h2 {
    font-size: 22px;
  }
  .calc-form {
    padding: 20px;
  }
  .article-header h1 {
    font-size: 26px;
  }
}

/* Fix: nav-search inside nav-menu */
.nav-menu .nav-search {
  margin-left: 16px;
  font-size: 18px;
  cursor: pointer;
  align-self: center;
}

/* Fix: logo span color */
.logo--blue, .logo span {
  color: #457dfd;
}

/* Fix: only first nav-link should be active on homepage */
.nav-menu a.active:first-child {
  color: #457dfd;
}

/* === FIX: HTML uses articles-grid not articles__grid === */
.articles-grid {
  display: grid;
  gap: 24px;
  margin-bottom: 40px;
}
.articles-grid--3col { grid-template-columns: repeat(3, 1fr); }
.articles-grid--4col { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) {
  .articles-grid--3col { grid-template-columns: repeat(2, 1fr); }
  .articles-grid--4col { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 430px) {
  .articles-grid--3col,
  .articles-grid--4col { grid-template-columns: 1fr; }
}

/* Card component (homepage) */
.card {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #f0f0f0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}
.card--horizontal {
  display: flex;
  flex-direction: row;
}
.card--horizontal .card__image-wrap { width: 140px; min-width: 140px; }
.card--horizontal .card__image { aspect-ratio: 4/3; height: 100%; }

/* Section spacing */
.section { padding: 30px 0; }

/* Category section grid */
.category-section .articles-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 768px) { .category-section .articles-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px) { .category-section .articles-grid { grid-template-columns: 1fr; } }

/* === SIDEBAR WIDGETS (for homepage top bar) === */
.widgets-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0;
  margin-bottom: 10px;
}
.widget-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  text-align: center;
  transition: box-shadow 0.2s;
}
.widget-card:hover { box-shadow: 0 2px 12px rgba(69,125,253,0.1); }
.widget-card__icon { font-size: 24px; margin-bottom: 6px; }
.widget-card__title {
  font-family: "Open Sans", sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #9ca3af;
  margin-bottom: 4px;
}
.widget-card__value {
  font-family: "Open Sans", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #1b2c42;
}
.widget-card__change {
  font-family: "Open Sans", sans-serif;
  font-size: 12px;
  font-weight: 600;
}
.widget-card__change--up { color: #10b981; }
.widget-card__change--down { color: #ef4444; }

/* Quick info ticker */
.info-ticker {
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 0;
  font-family: "Open Sans", sans-serif;
  font-size: 13px;
  color: #6b7280;
  overflow: hidden;
}
.info-ticker__inner {
  display: flex;
  gap: 32px;
  align-items: center;
  animation: ticker-scroll 30s linear infinite;
  white-space: nowrap;
}
.info-ticker__item { display: flex; align-items: center; gap: 6px; }
.info-ticker__dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  display: inline-block;
}
.info-ticker__dot--green { background: #10b981; }
.info-ticker__dot--red { background: #ef4444; }
.info-ticker__dot--blue { background: #457dfd; }

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

@media (max-width: 768px) {
  .widgets-bar { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 430px) {
  .widgets-bar { grid-template-columns: 1fr 1fr; }
}

/* Button variants */
.btn--primary {
  background: #457dfd;
  color: #fff;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  cursor: pointer;
}
.btn--primary:hover { background: #3366cc; }
