/* ==========================================================================
   Paciência Online & Solitaire Online - Portal Articles & Guides Stylesheet
   ========================================================================== */

:root {
  --felt-green-dark: #0f3d14;
  --felt-green-base: #144218;
  --felt-green-light: #1b5e20;
  --primary-green: #2e7d32;
  --primary-hover: #1b5e20;
  --accent-gold: #fbc02d;
  --accent-gold-hover: #f9a825;
  --bg-body: #0d2e10;
  --bg-card: #ffffff;
  --text-main: #212529;
  --text-secondary: #495057;
  --text-muted: #6c757d;
  --border-light: #e9ecef;
  --border-green: #c8e6c9;
  --callout-tip-bg: #e8f5e9;
  --callout-tip-border: #81c784;
  --callout-rule-bg: #fff8e1;
  --callout-rule-border: #ffd54f;
  --callout-history-bg: #ede7f6;
  --callout-history-border: #b39ddb;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.12);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.25);
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: radial-gradient(circle at 50% 20%, #17531c 0%, var(--bg-body) 100%);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */
.portal-header {
  background-color: rgba(10, 36, 12, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0.6rem 1rem;
  width: 100%;
  box-sizing: border-box;
}

.portal-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  box-sizing: border-box;
}

.portal-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.3px;
  flex: 0 0 185px;
  min-width: 185px;
  max-width: 185px;
  order: 1;
  cursor: default;
  user-select: none;
  pointer-events: none;
  box-sizing: border-box;
}

.portal-brand:hover {
  opacity: 1;
  color: #ffffff;
}

.portal-brand__icon {
  color: var(--accent-gold);
  font-size: 1.35rem;
  line-height: 1;
}

.portal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  flex-wrap: nowrap;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  order: 2;
  padding: 0.15rem 0.25rem;
  max-width: 100%;
  box-sizing: border-box;
}

.portal-nav::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.portal-nav__link {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  line-height: normal;
  display: inline-block;
  box-sizing: border-box;
  white-space: nowrap;
  flex-shrink: 0;
}

.portal-nav__link:hover {
  color: #ffffff;
  background-color: rgba(255, 255, 255, 0.12);
}

.portal-nav__link--active {
  color: #ffffff;
  background-color: rgba(46, 125, 50, 0.6);
  font-weight: 600;
}

.portal-header__actions {
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  flex: 0 0 210px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  order: 3;
  box-sizing: border-box;
}

.portal-header__cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 210px;
  min-width: 210px;
  max-width: 210px;
  flex: 0 0 210px;
  height: 36px;
  min-height: 36px;
  max-height: 36px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #fbc02d 0%, #f57f17 100%);
  color: #1a2a10;
  text-decoration: none;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 0 0.75rem;
  border-radius: 20px;
  border: none;
  outline: none;
  box-shadow: 0 2px 8px rgba(245, 127, 23, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
  cursor: pointer;
  text-align: center;
  line-height: normal;
}

.portal-header__cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 127, 23, 0.6);
  color: #0d1e07;
}

.portal-header__cta:active {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Article Container & Typography
   -------------------------------------------------------------------------- */
.portal-main {
  flex: 1;
  padding: 2.2rem 1rem 3.5rem;
}

.portal-container {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-card);
  padding: 3rem 2.8rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.article-header {
  border-bottom: 2px solid var(--border-light);
  padding-bottom: 1.6rem;
  margin-bottom: 2rem;
}

.article-badge {
  display: inline-block;
  background-color: var(--callout-tip-bg);
  color: var(--primary-hover);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.8rem;
}

.article-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--felt-green-light);
  line-height: 1.25;
  margin-bottom: 0.8rem;
  letter-spacing: -0.5px;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* --------------------------------------------------------------------------
   Content Elements
   -------------------------------------------------------------------------- */
.article-lead {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 2rem;
  padding: 1.2rem 1.4rem;
  background: #f8faf8;
  border-left: 4px solid var(--primary-green);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body h2 {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--felt-green-light);
  margin-top: 2.4rem;
  margin-bottom: 0.9rem;
  line-height: 1.35;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.4rem;
}

.article-body h3 {
  font-size: 1.22rem;
  font-weight: 600;
  color: #2e7d32;
  margin-top: 1.7rem;
  margin-bottom: 0.6rem;
  line-height: 1.4;
}

.article-body p {
  font-size: 1.02rem;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.article-body ul,
.article-body ol {
  margin-bottom: 1.4rem;
  padding-left: 1.6rem;
}

.article-body li {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 0.55rem;
}

.article-body strong {
  color: #1b381d;
  font-weight: 600;
}

.article-body a {
  color: var(--primary-green);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body a:hover {
  color: var(--primary-hover);
}

/* Card representation badge */
.card-badge {
  display: inline-block;
  padding: 0.1rem 0.45rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.88rem;
  font-family: monospace;
  background: #f1f3f5;
  border: 1px solid #ced4da;
  margin: 0 0.15rem;
}

.card-badge.red {
  color: #d32f2f;
  border-color: #ffcdd2;
  background: #ffebee;
}

.card-badge.black {
  color: #212529;
  border-color: #cfd8dc;
  background: #eceff1;
}

/* Callout Boxes */
.callout {
  padding: 1.25rem 1.4rem;
  border-radius: var(--radius-md);
  margin: 1.6rem 0;
  border-left: 4px solid;
}

.callout-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.callout-tip {
  background-color: var(--callout-tip-bg);
  border-color: var(--callout-tip-border);
}
.callout-tip .callout-title { color: #2e7d32; }

.callout-rule {
  background-color: var(--callout-rule-bg);
  border-color: var(--callout-rule-border);
}
.callout-rule .callout-title { color: #f57f17; }

.callout-history {
  background-color: var(--callout-history-bg);
  border-color: var(--callout-history-border);
}
.callout-history .callout-title { color: #512da8; }

.callout p:last-child {
  margin-bottom: 0;
}

/* Comparison Tables */
.table-wrapper {
  overflow-x: auto;
  margin: 1.8rem 0;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-light);
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.95rem;
}

.portal-table th {
  background-color: var(--felt-green-light);
  color: #ffffff;
  padding: 0.85rem 1rem;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-main);
}

.portal-table tr:nth-child(even) td {
  background-color: #fbfcfb;
}

.portal-table tr:hover td {
  background-color: #f1f8e9;
}

/* FAQ accordion style */
.faq-block {
  margin: 2rem 0;
}

.faq-card {
  background: #fdfdfd;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.faq-card__q {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--felt-green-light);
  margin-bottom: 0.5rem;
}

.faq-card__a {
  font-size: 0.98rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 0;
}

/* Bottom CTA Banner */
.bottom-cta-banner {
  margin: 3rem 0 2rem;
  background: linear-gradient(135deg, #1b5e20 0%, #0d3610 100%);
  color: #ffffff;
  padding: 2.2rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-md);
}

.bottom-cta-banner h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: #ffffff;
}

.bottom-cta-banner p {
  font-size: 1.02rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 580px;
  margin: 0 auto 1.5rem;
}

.btn-cta-big {
  display: inline-block;
  background: linear-gradient(135deg, #fbc02d 0%, #f57f17 100%);
  color: #1a2a10;
  font-size: 1.1rem;
  font-weight: 800;
  text-decoration: none;
  padding: 0.85rem 2.2rem;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(245, 127, 23, 0.5);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-cta-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 127, 23, 0.7);
  color: #0b1a05;
  text-decoration: none;
}

/* Related Guides Grid */
.related-guides {
  margin-top: 3rem;
  border-top: 2px solid var(--border-light);
  padding-top: 2.2rem;
}

.related-guides__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--felt-green-light);
  margin-bottom: 1.3rem;
}

.related-guides__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}

.related-card {
  background: #ffffff;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  text-decoration: none;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  display: flex;
  flex-direction: column;
}

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

.related-card__tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-green);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.related-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--felt-green-light);
  margin-bottom: 0.4rem;
  line-height: 1.35;
}

.related-card__desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-top: auto;
}

/* Author Box */
.author-box {
  margin-top: 2.5rem;
  padding: 1.2rem 1.4rem;
  background: #f8faf8;
  border: 1px solid var(--border-green);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.author-box__icon {
  font-size: 2.2rem;
  color: var(--primary-green);
}

.author-box__name {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--felt-green-light);
  margin-bottom: 0.2rem;
}

.author-box__bio {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.portal-footer {
  background-color: #081d09;
  color: rgba(255, 255, 255, 0.8);
  padding: 2.8rem 1rem 2rem;
  font-size: 0.9rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.portal-footer__links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  margin-bottom: 1.4rem;
}

.portal-footer__links a {
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: color 0.15s ease;
}

.portal-footer__links a:hover {
  color: var(--accent-gold);
  text-decoration: underline;
}

.portal-footer__copy {
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.6;
}

.portal-footer__copy a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Responsive Breakpoints
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
  .portal-header {
    padding: 0.5rem 0.8rem;
  }

  .portal-header__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "brand actions"
      "nav   nav";
    align-items: center;
    gap: 0.5rem 0.75rem;
    width: 100%;
  }

  .portal-brand {
    grid-area: brand;
    justify-self: start;
    font-size: 1.05rem;
    gap: 0.35rem;
    flex: 0 0 auto;
    min-width: 0;
    max-width: none;
  }

  .portal-brand__icon {
    font-size: 1.25rem;
  }

  .portal-header__actions {
    grid-area: actions;
    justify-self: end;
    width: 165px;
    min-width: 165px;
    max-width: 165px;
    flex: 0 0 165px;
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;
  }

  .portal-header__cta {
    width: 165px;
    min-width: 165px;
    max-width: 165px;
    flex: 0 0 165px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    font-size: 0.82rem;
    padding: 0 0.4rem;
    border-radius: 16px;
    box-sizing: border-box;
  }

  .portal-nav {
    grid-area: nav;
    width: 100%;
    max-width: 100%;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.2rem 0.35rem;
    margin-top: 0.15rem;
    box-sizing: border-box;
  }

  .portal-nav::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  .portal-nav__link {
    font-size: 0.82rem;
    padding: 0.3rem 0.6rem;
    flex-shrink: 0;
    white-space: nowrap;
  }

  .portal-container {
    padding: 2rem 1.4rem;
  }

  .article-title {
    font-size: 1.7rem;
  }

  .article-lead {
    font-size: 1.02rem;
    padding: 1rem 1.1rem;
  }

  .bottom-cta-banner {
    padding: 1.8rem 1.2rem;
  }
}
