:root {
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --primary-bg: #eff6ff;
    --secondary: #f8fafc;
    --accent: #f59e0b;
    --accent-dark: #d97706;
    --dark: #0f172a;
    --gray: #64748b;
    --light-gray: #e2e8f0;
    --card-bg: rgba(255, 255, 255, 0.9);
    --card-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    --radius: 16px;
    --radius-sm: 12px;
    --radius-lg: 24px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --text-color: #333333;
    --meta-color: #888888;
  }

  /* Ensure no body margins interfere with full width */
  body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
  }

  /* Post Detail Container */
  .post-detail {
    font-family: 'Georgia', serif;
    line-height: 1.6;
    color: var(--text-color);
    width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
  }

  /* Post Header - Full Width - ORIGINAL DESKTOP CODE */
  .post-header {
    width: 100vw;
    min-height: 200px;
    position: relative;
    left: 50%;
    margin-left: -50vw;
    text-align: center;
    margin-top: 0;
    margin-bottom: 4rem;
    padding: 6rem 4rem;
    background: #2563eb;
    border-bottom: none;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .post-title {
    font-size: clamp(1.8rem, 5vw, 4rem);
    font-weight: 400;
    line-height: 1.3;
    margin: 0 0 1.5rem 0;
    color: white;
    letter-spacing: -0.02em;
    word-break: break-word;
    word-wrap: break-word;
    hyphens: auto;
    max-width: 100%;
    width: 100%;
    overflow-wrap: break-word;
    white-space: normal;
    display: block;
  }

  .post-author-name {
    margin: 1.5rem 0 0.3rem 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-align: center;
  }

  .post-author-name a {
    color: rgba(255, 255, 255, 0.9) !important;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
  }

  .post-author-name a:hover {
    color: white !important;
    text-decoration: underline;
  }

  .post-date {
    margin: 0 0 0.3rem 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-align: center;
    font-style: italic;
  }

  .post-tags {
    margin-top: 0.5rem;
    margin-bottom: 0;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  .tag {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 0.25rem;
    text-decoration: none;
    transition: var(--transition);
  }

  .tag:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: white;
  }

  /* Post Body Container */
  .post-body {
    max-width: 900px;
    margin: 0 auto 2rem auto;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--card-shadow);
    padding: 2.5rem;
  }

  /* Image section - matches article width */
  .post-image-container {
    margin: 2rem 0 3rem 0;
  }

  .post-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
  }

  .post-image:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }

  /* Content - full width within white background */
  .post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-color);
  }

  /* Drop cap for first letter */
  .post-content p:first-child::first-letter {
    float: left;
    font-size: 6rem;
    line-height: 0.75;
    padding: 0.1rem 0.3rem 0 0;
    margin: 0.3rem 0.2rem 0.1rem 0;
    font-weight: 700;
    color: var(--dark);
    font-family: 'Georgia', serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .post-content p {
    margin-bottom: 1.5rem;
    text-align: justify;
  }

  .post-content a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: var(--transition);
  }

  .post-content a:hover {
    border-bottom-color: var(--primary);
  }

  .post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
    margin: 2rem 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  }

  .post-content h2,
  .post-content h3,
  .post-content h4 {
    margin: 1.5rem 0 0.25rem 0;
    font-weight: 600;
    color: var(--dark);
  }

  .post-content h2 {
    font-size: 2rem;
  }

  .post-content h3 {
    font-size: 1.5rem;
  }

  .post-content blockquote {
    border-left: 4px solid var(--primary);
    margin: 2rem 0;
    padding: 1rem 2rem;
    background: var(--secondary);
    border-radius: var(--radius-sm);
    font-style: italic;
    color: var(--gray);
  }

  /* Modern Table Styles */
  .post-content .table-container {
    margin: 0 0 1.5rem 0;
    overflow-x: auto;
    border-radius: var(--radius);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    background: white;
    border: 1px solid #e5e7eb;
  }

  /* Remove spacing from elements immediately before table */
  .post-content h2 + .table-container,
  .post-content h3 + .table-container,
  .post-content p + .table-container,
  .post-content br + .table-container {
    margin-top: 0;
  }

  /* Remove extra spacing from br tags before tables */
  .post-content .table-container {
    clear: both;
  }

  /* Allow normal spacing for br tags before tables */
  .post-content br + .table-container {
    margin-top: 1rem;
  }

  .post-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
    line-height: 1.5;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    margin: 0;
    border-spacing: 0;
  }

  .post-content table thead {
    background: #f8f9fa;
    color: white;
    border-bottom: 2px solid #1f2937;
  }

  .post-content table thead th {
    padding: 1.2rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    position: relative;
    vertical-align: middle;
    color: black !important;
    font-weight: 700;
  }

  .post-content table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
  }

  .post-content table tbody tr:hover {
    background-color: #f8fafc;
    transform: scale(1.002);
  }

  .post-content table tbody tr:last-child {
    border-bottom: none;
  }

  .post-content table tbody td {
    padding: 1rem;
    vertical-align: top;
    border: none;
  }

  /* Column-specific styling */
  .post-content table .element-col {
    font-weight: 600;
    color: var(--dark);
    background-color: #fafbfc;
    min-width: 150px;
  }

  .post-content table .american-col {
    background-color: #fef3e2;
    border-left: 3px solid #f59e0b;
  }

  .post-content table .international-col {
    background-color: #eff6ff;
    border-left: 3px solid var(--primary);
  }

  /* Highlight class for important differences */
  .post-content table .highlight {
    background: linear-gradient(120deg, #fbbf24 0%, #f59e0b 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.3);
  }

  /* Code styling within tables */
  .post-content table code {
    background: #1f2937;
    color: #fbbf24;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    font-weight: 500;
  }

  /* Responsive table design */
  @media (max-width: 768px) {
    .post-content .table-container {
      margin: 1.5rem -1.5rem;
      border-radius: 0;
      box-shadow: none;
      border-top: 1px solid #e5e7eb;
      border-bottom: 1px solid #e5e7eb;
    }

    .post-content table {
      font-size: 0.85rem;
    }

    .post-content table thead th {
      padding: 1rem 0.75rem;
      font-size: 0.8rem;
    }

    .post-content table tbody td {
      padding: 0.75rem;
    }

    .post-content table .element-col {
      min-width: 120px;
    }

    .post-content table .highlight {
      font-size: 0.8rem;
      padding: 0.2rem 0.4rem;
    }

    .post-content table code {
      font-size: 0.75rem;
      padding: 0.15rem 0.3rem;
    }
  }

  @media (max-width: 480px) {
    .post-content .table-container {
      overflow-x: scroll;
      -webkit-overflow-scrolling: touch;
    }

    .post-content table {
      min-width: 600px;
      font-size: 0.8rem;
    }

    .post-content table thead th {
      padding: 0.8rem 0.5rem;
      font-size: 0.75rem;
    }

    .post-content table tbody td {
      padding: 0.6rem 0.5rem;
    }
  }

  /* Read Later section */
  #read-later-controls {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1.5rem;
    text-align: center;
  }

  #read-later-controls button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
  }

  #read-later-controls button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
  }

  /* Comments section */
  #comments {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 1.5rem;
  }

  #comments h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--dark);
    position: relative;
    padding-bottom: 0.75rem;
  }

  #comments h2::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--accent);
  }

  /* Comment form */
  #comments form {
    background: var(--secondary);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
  }

  .form-control {
    margin-bottom: 1.5rem;
  }

  .form-control label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
  }

  .form-control input,
  .form-control textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--light-gray);
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
  }

  .form-control input:focus,
  .form-control textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  }

  .form-control.invalid input,
  .form-control.invalid textarea {
    border-color: #dc2626;
  }

  .form-control.invalid label {
    color: #dc2626;
  }

  .errorlist {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0 0 0;
    color: #dc2626;
    font-size: 0.9rem;
  }

  #comments button[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-sm);
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
  }

  #comments button[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
  }

  /* Comment list */
  #comments ul {
    list-style: none;
    padding: 0;
    margin: 0;
  }

  #comments li {
    background: var(--secondary);
    border-radius: var(--radius-sm);
    padding: 1.5rem;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  #comments li h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  #comments li p {
    margin: 0;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    word-break: break-word;
  }

/* MOBILE RESPONSIVE - FIXED HERO SECTION */
@media (max-width: 768px) {
  .post-header {
    margin-top: 0 !important; /* Remove white space above */
    margin-bottom: 0 !important; /* Remove colored space below */
    padding: 2rem 1rem 1.5rem 1rem !important; /* Added a bit more top padding */
  }

  .post-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    line-height: 1.3;
    margin-bottom: 1.2rem;
    color: white;
    display: block;
    visibility: visible;
    opacity: 1;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    font-weight: 500;
    text-align: center;
  }

  .post-author-name {
    font-size: 0.95rem;
    margin: 1.2rem 0 0.3rem 0;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
  }

  .post-date {
    font-size: 0.85rem;
    margin: 0 0 0.3rem 0;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-style: italic;
  }

  .post-tags {
    margin-top: 0.4rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }
}

@media (max-width: 480px) {
  .post-header {
    margin-top: 0 !important; /* Remove white space above */
    margin-bottom: 0 !important; /* Remove colored space below */
    padding: 1.6rem 0.8rem 1.2rem 0.8rem !important; /* Added a bit more top padding */
  }

  .post-title {
    font-size: clamp(1.2rem, 4vw, 1.6rem);
    line-height: 1.4;
    margin-bottom: 1rem;
    color: white;
    display: block;
    visibility: visible;
    opacity: 1;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    font-weight: 600;
    text-align: center;
  }

  .post-author-name {
    font-size: 0.85rem;
    margin: 1rem 0 0.2rem 0;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
  }

  .post-date {
    font-size: 0.8rem;
    margin: 0 0 0.3rem 0;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-style: italic;
  }

  .post-tags {
    margin-top: 1.2rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }
}

@media (max-width: 360px) {
  .post-header {
    margin-top: 0 !important; /* Remove white space above */
    margin-bottom: 0 !important; /* Remove colored space below */
    padding: 1.3rem 0.6rem 1rem 0.6rem !important; /* Added a bit more top padding */
  }

  .post-title {
    font-size: clamp(1.2rem, 8vw, 1.8rem);
    line-height: 1.3;
    margin-bottom: 1rem;
    color: white;
    display: block;
    visibility: visible;
    opacity: 1;
    word-wrap: break-word;
    font-weight: 600;
    text-align: center;
  }

  .post-author-name {
    font-size: 0.8rem;
    margin: 1rem 0 0.2rem 0;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
  }

  .post-date {
    font-size: 0.75rem;
    margin: 0 0 0.3rem 0;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    font-style: italic;
  }

  .post-tags {
    margin-top: 1rem;
    text-align: center;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.3rem;
  }
}