/* kb.css — Mini Bridge Blog */

/* Google Fonts - load Inter and Merriweather */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;800&family=Merriweather:wght@400;700&display=swap');

/* Base styles */
* {
  box-sizing: border-box;
}

body {
  margin: 0 auto;
  max-width: 860px;
  padding: 48px 24px;
  font-family: "Merriweather", Georgia, serif;
  font-size: 18px;
  line-height: 1.7;
  color: #1f2937;
  background-color: #f3f4f6;
}

/* Headings - BLUE */
h1, h2, h3, h4 {
  font-family: "Inter", Arial, sans-serif;
  color: #3b82f6;
  letter-spacing: -0.02em;
}

h1 {
  font-size: 28px;
  font-weight: 700;
  margin: 36px 0 10px 0;
  line-height: 1.2;
}

h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 28px 0 10px 0;
}

h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 24px 0 10px 0;
}

h4 {
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0 10px 0;
}

/* Title block - centered */
.title-block {
  text-align: center;
  margin-bottom: 32px;
}

.title-block h1 {
  font-size: 32px;
  margin-bottom: 8px;
  color: #3b82f6;
}

.title-block h1::after {
  display: none;
}

.subtitle {
  font-family: "Inter", Arial, sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #4b5563;
  margin: 0;
}

/* Paragraphs */
p {
  margin: 0 0 14px 0;
}

/* Links - blue */
a {
  color: #3b82f6;
  text-decoration: none;
  font-weight: 600;
}

a:hover {
  text-decoration: underline;
}

/* Divider line */
hr.divider {
  border: none;
  height: 3px;
  background-color: #e5e7eb;
  border-radius: 999px;
  margin: 32px auto 40px auto;
  max-width: 80%;
}

/* Floating images */
.float-right {
  float: right;
  margin: 0 0 16px 20px;
  max-width: 150px;
}

.float-left {
  float: left;
  margin: 0 20px 16px 0;
  max-width: 150px;
}

.float-right img,
.float-left img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
}

/* Clearfix */
.clearfix::after,
section::after {
  content: "";
  display: table;
  clear: both;
}

/* Figures */
figure {
  margin: 22px auto 26px auto;
  text-align: center;
}

figure img {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #6b7280;
  font-family: "Inter", Arial, sans-serif;
}

/* Image sizes */
.small-img { max-width: 420px; }
.wide-img { max-width: 900px; }
.tiny-img { max-width: 180px; }

/* Tables */
table {
  width: 100%;
  max-width: 860px;
  margin: 20px auto;
  border-collapse: collapse;
}

table td,
table th {
  padding: 12px 16px;
  vertical-align: middle;
  border: none;
}

table td img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}

/* Card values table */
table.card-values tr {
  border-bottom: 1px solid #e5e7eb;
}

table.card-values tr:last-child {
  border-bottom: none;
}

table.card-values td:last-child {
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
  font-size: 17px;
}

/* Social icons table */
table.social-icons {
  max-width: 400px;
  margin: 30px auto;
  text-align: center;
}

table.social-icons td {
  padding: 10px 20px;
  vertical-align: top;
  text-align: center;
}

table.social-icons img {
  width: 32px;
  height: auto;
  margin-bottom: 6px;
  border-radius: 0;
  box-shadow: none;
}

table.social-icons p {
  margin: 4px 0 0 0;
  font-size: 13px;
  font-family: "Inter", Arial, sans-serif;
  color: #6b7280;
}

/* Blockquotes */
blockquote {
  margin: 20px 0 24px 0;
  padding: 18px 24px;
  background-color: #f8fafc;
  border-left: 5px solid #3b82f6;
  border-radius: 0 14px 14px 0;
  font-family: "Inter", Arial, sans-serif;
}

blockquote p {
  margin: 8px 0;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
}

blockquote img {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

/* Lists */
ul {
  margin: 10px 0 18px 0;
  padding-left: 22px;
}

li {
  margin: 8px 0;
}

.links-list {
  list-style: none;
  padding-left: 0;
}

.links-list li {
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

.links-list li:last-child {
  border-bottom: none;
}

/* Video links */
a[href*=".mp4"] {
  display: inline-block;
  padding: 10px 16px;
  background-color: #eff6ff;
  border-radius: 10px;
  margin: 10px 0;
}

a[href*=".mp4"]::before {
  content: "▶ ";
  font-size: 12px;
}

/* Embedded video */
.video-container {
  margin: 24px auto;
  text-align: center;
  max-width: 500px;
}

.video-container video {
  width: 100%;
  max-width: 480px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.video-container figcaption {
  margin-top: 10px;
  font-size: 14px;
  color: #6b7280;
  font-family: "Inter", Arial, sans-serif;
}

/* CTA button */
h4 a {
  display: inline-block;
  padding: 12px 24px;
  background-color: #3b82f6;
  color: white !important;
  border-radius: 10px;
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
}

h4 a:hover {
  background-color: #2563eb;
  text-decoration: none;
}

/* Golden rule box */
.golden-rule {
  padding: 14px 18px;
  background-color: #fef3c7;
  border-left: 5px solid #f59e0b;
  border-radius: 0 12px 12px 0;
  margin: 18px 0;
}

/* Simple rule box */
.simple-rule {
  padding: 12px 16px;
  background-color: #ecfdf5;
  border-left: 4px solid #10b981;
  border-radius: 0 10px 10px 0;
  margin: 14px 0;
}

/* About section */
.about-section {
  margin-top: 40px;
  padding: 24px;
  background-color: #f8fafc;
  border-radius: 14px;
}

/* Card container */
.card {
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 20px 30px;
  margin: 20px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.card .links-list {
  margin: 0;
  padding-left: 20px;
  list-style: disc;
}

.card .links-list li {
  border-bottom: none;
  padding: 8px 0;
}

/* References */
.references {
  margin-top: 48px;
  padding-top: 32px;
  border-top: 2px solid #e5e7eb;
}

.references p {
  font-size: 15px;
  line-height: 1.6;
  margin-bottom: 10px;
  text-indent: -24px;
  padding-left: 24px;
}

/* Motto text */
p.motto strong {
  font-family: "Inter", Arial, sans-serif;
  font-size: 1.1em;
  display: block;
  margin: 20px 0;
}

/* Key point highlight box */
.key-point,
p.motto {
  padding: 16px 20px;
  background-color: #f0fdf4;
  border-left: 5px solid #22c55e;
  border-radius: 0 10px 10px 0;
  margin: 20px 0;
  font-family: "Inter", Arial, sans-serif;
  font-weight: 600;
  color: #166534;
}

/* ============================================
   QUIZ STYLES
   ============================================ */

.intro {
  text-align: center;
  font-size: 1.1rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

#quiz-container {
  max-width: 800px;
  margin: 0 auto;
}

.question {
  background-color: white;
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.question.answered {
  opacity: 0.95;
}

.question-row {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.question-image {
  width: 200px;
  height: auto;
  border-radius: 10px;
  flex-shrink: 0;
}

.question-content {
  flex: 1;
}

.question-number {
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.9rem;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 600;
}

.question-text {
  font-family: "Inter", Arial, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 16px;
}

.options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}

.option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background-color: #f8fafc;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: "Inter", Arial, sans-serif;
}

.option:hover {
  background-color: #eff6ff;
  border-color: #3b82f6;
}

.option input[type="radio"] {
  margin-right: 12px;
  cursor: pointer;
}

.option.correct {
  background-color: #ecfdf5;
  border-color: #22c55e;
  color: #166534;
}

.option.incorrect {
  background-color: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}

.question.answered .option {
  cursor: not-allowed;
}

.feedback {
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 8px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.95rem;
  display: none;
}

.question.answered .feedback {
  display: block;
}

.feedback.correct {
  background-color: #ecfdf5;
  color: #166534;
  border-left: 4px solid #22c55e;
}

.feedback.incorrect {
  background-color: #fef2f2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

/* Special displays for quiz questions */
.suit-ranking {
  text-align: center;
  font-size: 2rem;
  margin: 16px 0;
  letter-spacing: 8px;
}

.hand-display {
  background-color: #f8fafc;
  padding: 16px;
  border-radius: 10px;
  margin: 16px 0;
  font-family: "Courier New", monospace;
  font-size: 1rem;
}

.hand-display div {
  margin: 4px 0;
}

.trick-display {
  display: grid;
  grid-template-areas:
    ". north ."
    "west . east"
    ". south .";
  gap: 12px;
  justify-items: center;
  align-items: center;
  margin: 20px auto;
  max-width: 300px;
}

.trick-display .card {
  background-color: white;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  padding: 16px 20px;
  font-size: 1.8rem;
  min-width: 60px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.trick-display .north { grid-area: north; }
.trick-display .south { grid-area: south; }
.trick-display .east { grid-area: east; }
.trick-display .west { grid-area: west; }

/* Score section */
.score-section {
  background-color: white;
  border-radius: 14px;
  padding: 32px;
  margin-top: 32px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.score-section h2 {
  color: #3b82f6;
  margin-bottom: 16px;
}

.score {
  font-family: "Inter", Arial, sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: #3b82f6;
  margin: 16px 0;
}

.reset-btn {
  margin-top: 20px;
  padding: 12px 32px;
  background-color: #3b82f6;
  color: white;
  border: none;
  border-radius: 10px;
  font-family: "Inter", Arial, sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.3);
  transition: background-color 0.2s ease;
}

.reset-btn:hover {
  background-color: #2563eb;
}

/* Suit colors */
.spade, .club {
  color: #1e293b;
}

.heart {
  color: #dc2626;
}

.diamond {
  color: #f97316;
}

/* Mobile responsive */
@media (max-width: 768px) {
  body {
    padding: 24px 16px;
  }

  h1 {
    font-size: 28px;
    margin-top: 32px;
  }

  h2 {
    font-size: 22px;
  }

  .float-right,
  .float-left {
    float: none;
    margin: 16px auto;
    max-width: 200px;
    display: block;
  }
  
  /* Quiz mobile styles */
  .question-row {
    flex-direction: column;
  }
  
  .question-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 16px auto;
  }
  
  .trick-display {
    max-width: 250px;
    gap: 8px;
  }
  
  .trick-display .card {
    padding: 12px 16px;
    font-size: 1.4rem;
    min-width: 50px;
  }
  
  .score {
    font-size: 2.5rem;
  }
}