/* Klidný Důchod — Blog pro české důchodce */
/* Inspired by penize.cz layout, unique branding */

@import url("https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@300;400;600;700;900&family=Merriweather:wght@400;700&display=swap");

:root {
  --primary: #1a7a4a;
  --primary-dark: #145e38;
  --primary-light: #e8f5ee;
  --accent: #c8922e;
  --accent-light: #fdf4e4;
  --dark: #1c1c2e;
  --dark-light: #2d2d44;
  --text: #2c2c2c;
  --text-muted: #6b6b6b;
  --bg: #faf9f6;
  --bg-white: #ffffff;
  --bg-light: #f3f2ef;
  --border: #ddd8cf;
  --border-light: #eae6df;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 24px rgba(0, 0, 0, 0.12);
  --max-width: 1100px;
  --font: "Source Sans 3", "Trebuchet MS", Arial, sans-serif;
  --font-serif: "Merriweather", Georgia, serif;
  --transition: all 0.2s ease;
}

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

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}
a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* === HEADER === */
.site-header {
  background: var(--bg-white);
  border-bottom: 3px solid var(--primary);
  padding: 18px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-icon {
  width: 52px;
  height: 52px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
}
.logo-text h1 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.1;
}
.logo-text span {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
}

.header-search {
  display: flex;
  align-items: center;
  gap: 8px;
}
.header-search input {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 15px;
  width: 260px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.header-search input:focus {
  border-color: var(--primary);
}
.header-search button {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 10px 18px;
  font-size: 15px;
  cursor: pointer;
  transition: var(--transition);
}
.header-search button:hover {
  background: var(--primary-dark);
}

/* === NAVIGATION === */
.main-nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav-inner {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-inner a {
  color: #d6d6d6;
  padding: 14px 22px;
  font-size: 15px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.nav-inner a:hover,
.nav-inner a.active {
  color: #fff;
  background: var(--dark-light);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px 20px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  margin: 5px 0;
}

/* === BREADCRUMB === */
.breadcrumb {
  padding: 14px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.breadcrumb a {
  color: var(--text-muted);
}
.breadcrumb a:hover {
  color: var(--primary);
}
.breadcrumb span {
  margin: 0 6px;
}

/* === MAIN LAYOUT === */
.main-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 36px;
  padding: 30px 0 60px;
}

.content-area {
  min-width: 0;
}

/* === SIDEBAR === */
.sidebar {
}
.sidebar-widget {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 24px;
}
.sidebar-widget h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
  margin-bottom: 14px;
}
.sidebar-widget ul {
  list-style: none;
}
.sidebar-widget li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.sidebar-widget li:last-child {
  border-bottom: none;
}
.sidebar-widget li a {
  color: var(--text);
}
.sidebar-widget li a:hover {
  color: var(--primary);
}

.sidebar-widget.highlight {
  background: var(--primary-light);
  border-color: var(--primary);
}
.sidebar-widget.highlight h3 {
  border-bottom-color: var(--accent);
}

.newsletter-widget input[type="email"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: 15px;
  font-family: var(--font);
  margin-bottom: 10px;
  outline: none;
}
.newsletter-widget input:focus {
  border-color: var(--primary);
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 12px 32px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  text-decoration: none;
}
.btn:hover {
  text-decoration: none;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover {
  background: var(--primary-dark);
  color: #fff;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover {
  background: #b5832a;
  color: #fff;
}
.btn-dark {
  background: var(--dark);
  color: #fff;
}
.btn-dark:hover {
  background: var(--dark-light);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-sm {
  padding: 8px 20px;
  font-size: 14px;
}
.btn-block {
  display: block;
  width: 100%;
}

/* === HERO === */
.hero {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 60%,
    var(--accent) 100%
  );
  color: #fff;
  padding: 50px 0;
  margin-bottom: 10px;
}
.hero h2 {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 16px;
}
.hero p {
  font-size: 19px;
  opacity: 0.92;
  max-width: 600px;
  margin-bottom: 24px;
}
.hero .btn {
  background: #fff;
  color: var(--primary-dark);
  font-weight: 700;
}
.hero .btn:hover {
  background: var(--accent-light);
}

/* === CARDS GRID === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin: 30px 0;
}

.card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.card-img {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--bg-light);
  overflow: hidden;
}
.card-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--accent-light)
  );
  color: var(--primary);
}
.card-body {
  padding: 18px 20px 22px;
}
.card-category {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
  margin-bottom: 8px;
}
.card-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 8px;
}
.card-title a {
  color: inherit;
}
.card-title a:hover {
  color: var(--primary);
  text-decoration: none;
}
.card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 12px;
}
.card-meta {
  font-size: 13px;
  color: var(--text-muted);
  display: flex;
  gap: 16px;
}

/* === ARTICLE LIST === */
.article-list {
  margin: 20px 0;
}

.article-item {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 22px;
  padding: 22px 0;
  border-bottom: 1px solid var(--border-light);
}
.article-item:first-child {
  padding-top: 0;
}

.article-thumb {
  width: 100%;
  aspect-ratio: 16/11;
  background: var(--bg-light);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--primary);
  background: linear-gradient(
    135deg,
    var(--primary-light),
    var(--accent-light)
  );
}

.article-content {
}
.article-content .card-category {
  margin-bottom: 6px;
}
.article-content h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.3;
  margin-bottom: 8px;
}
.article-content h3 a {
  color: inherit;
}
.article-content h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}
.article-content p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 10px;
}

/* === SECTION HEADERS === */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}
.section-header h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
}
.section-header a {
  font-size: 14px;
  font-weight: 600;
}

/* === PAGE HEADER === */
.page-header {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-light) 100%);
  color: #fff;
  padding: 40px 0 36px;
  margin-bottom: 0;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 8px;
}
.page-header p {
  font-size: 17px;
  opacity: 0.85;
  max-width: 650px;
}

/* === FULL ARTICLE === */
.article-full {
}
.article-full .article-meta {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.article-full h2 {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 30px 0 14px;
}
.article-full h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  margin: 24px 0 12px;
}
.article-full p {
  margin-bottom: 16px;
  line-height: 1.75;
}
.article-full ul,
.article-full ol {
  margin: 14px 0 18px 24px;
}
.article-full li {
  margin-bottom: 6px;
  line-height: 1.65;
}
.article-full blockquote {
  border-left: 4px solid var(--accent);
  padding: 16px 22px;
  margin: 20px 0;
  background: var(--accent-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--text);
}

.info-box {
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 24px 0;
}
.info-box h4 {
  color: var(--primary-dark);
  margin-bottom: 8px;
  font-size: 16px;
}
.info-box p {
  margin-bottom: 8px;
  font-size: 15px;
}

.warning-box {
  background: #fff8e1;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin: 24px 0;
}
.warning-box h4 {
  color: #8a6d1f;
  margin-bottom: 8px;
  font-size: 16px;
}

/* === CALCULATOR === */
.calc-container {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 30px;
  margin: 24px 0;
}
.calc-container h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 24px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

.calc-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.calc-field {
  margin-bottom: 16px;
}
.calc-field.full {
  grid-column: 1 / -1;
}
.calc-field label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}
.calc-field input,
.calc-field select {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 16px;
  font-family: var(--font);
  outline: none;
  transition: var(--transition);
}
.calc-field input:focus,
.calc-field select:focus {
  border-color: var(--primary);
}

.calc-result {
  background: var(--primary-light);
  border: 2px solid var(--primary);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 24px;
  text-align: center;
}
.calc-result h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.calc-result .amount {
  font-size: 42px;
  font-weight: 900;
  color: var(--primary-dark);
  line-height: 1.1;
}
.calc-result .amount span {
  font-size: 22px;
}
.calc-result .note {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 10px;
}

.calc-details {
  margin-top: 20px;
  text-align: left;
}
.calc-details table {
  width: 100%;
  border-collapse: collapse;
}
.calc-details th,
.calc-details td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border-light);
  font-size: 14px;
}
.calc-details th {
  font-weight: 600;
  color: var(--text-muted);
}
.calc-details td {
  font-weight: 600;
  color: var(--dark);
}
.calc-details tr.total th,
.calc-details tr.total td {
  font-size: 16px;
  border-top: 2px solid var(--primary);
  border-bottom: none;
  padding-top: 14px;
}

/* === FAQ ACCORDION === */
.faq-item {
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  font-weight: 600;
  color: var(--dark);
  cursor: pointer;
  background: var(--bg-white);
  transition: var(--transition);
}
.faq-question:hover {
  background: var(--bg-light);
}
.faq-question::after {
  content: "+";
  font-size: 22px;
  color: var(--primary);
}
.faq-item.open .faq-question::after {
  content: "−";
}
.faq-answer {
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  background: var(--bg-light);
  font-size: 15px;
  line-height: 1.65;
}
.faq-item.open .faq-answer {
  padding: 16px 20px;
  max-height: 500px;
}

/* === NEWS GRID === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
  margin: 20px 0;
}
.news-item {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.news-date {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.news-item h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}
.news-item h3 a {
  color: inherit;
}
.news-item h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}
.news-item p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* === FOOTER === */
.site-footer {
  background: var(--dark);
  color: #d6d6d6;
  padding: 40px 0 0;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  padding-bottom: 30px;
}
.footer-col h4 {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--dark-light);
}
.footer-col ul {
  list-style: none;
}
.footer-col li {
  margin-bottom: 8px;
}
.footer-col a {
  color: #b0b0b0;
  font-size: 14px;
  transition: var(--transition);
}
.footer-col a:hover {
  color: var(--accent);
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid var(--dark-light);
  padding: 18px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #888;
}

.footer-newsletter input {
  background: var(--dark-light);
  border: 1px solid #444;
  border-radius: var(--radius);
  padding: 11px 14px;
  color: #fff;
  font-size: 14px;
  width: 100%;
  margin-bottom: 10px;
  font-family: var(--font);
  outline: none;
}
.footer-newsletter input:focus {
  border-color: var(--accent);
}

/* === TABLES === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 14px;
}
.data-table th {
  background: var(--dark);
  color: #fff;
  padding: 12px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border-light);
}
.data-table tr:nth-child(even) td {
  background: var(--bg-light);
}
.data-table tr:hover td {
  background: var(--primary-light);
}

/* === TAGS === */
.tag {
  display: inline-block;
  padding: 4px 12px;
  background: var(--bg-light);
  border-radius: 20px;
  font-size: 13px;
  color: var(--text-muted);
  margin: 3px 4px 3px 0;
  transition: var(--transition);
}
.tag:hover {
  background: var(--primary-light);
  color: var(--primary);
  text-decoration: none;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .main-layout {
    grid-template-columns: 1fr;
  }
  .sidebar {
    order: 2;
  }
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }
  .header-search {
    width: 100%;
  }
  .header-search input {
    flex: 1;
    width: auto;
  }

  .nav-inner {
    display: none;
    flex-direction: column;
  }
  .nav-inner.open {
    display: flex;
  }
  .nav-inner a {
    padding: 12px 20px;
    border-bottom: 1px solid var(--dark-light);
  }
  .nav-toggle {
    display: block;
  }

  .cards-grid {
    grid-template-columns: 1fr;
  }
  .article-item {
    grid-template-columns: 1fr;
  }
  .news-grid {
    grid-template-columns: 1fr;
  }
  .calc-form {
    grid-template-columns: 1fr;
  }

  .hero h2 {
    font-size: 26px;
  }
  .hero p {
    font-size: 16px;
  }
  .page-header h1 {
    font-size: 26px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 16px;
  }
  .container {
    padding: 0 14px;
  }
  .btn {
    padding: 11px 22px;
    font-size: 15px;
  }
  .card-body {
    padding: 14px 16px 18px;
  }
  .sidebar-widget {
    padding: 16px;
  }
}

/* === UTILITY === */
.text-center {
  text-align: center;
}
.text-muted {
  color: var(--text-muted);
}
.mt-20 {
  margin-top: 20px;
}
.mt-30 {
  margin-top: 30px;
}
.mb-20 {
  margin-bottom: 20px;
}
.mb-30 {
  margin-bottom: 30px;
}
.highlight-text {
  color: var(--primary);
  font-weight: 700;
}
.accent-text {
  color: var(--accent);
  font-weight: 700;
}

/* === CLICKABLE CARDS === */
.article-item[onclick] {
  cursor: pointer;
  transition: var(--transition);
}
.article-item[onclick]:hover {
  background: var(--primary-light);
  border-radius: var(--radius);
  padding: 22px;
}
.card .card-body a {
  display: block;
}
