/* ================================================
   CONTRAMARE - POST STYLES
   Modern, Clean & Minimalist Design
   ================================================ */

/* ================================================
   BASE RESET & TYPOGRAPHY
   ================================================ */
* {
  box-sizing: border-box;
}

/* ================================================
   MAIN CONTAINER & LAYOUT
   ================================================ */
.main.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(39, 137, 206, 0.05);
  border-radius: 12px;
  margin-top: 2rem;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 768px) {
  .main.container {
    padding: 1.5rem 1rem;
    border-radius: 8px;
  }
}

/* ================================================
   POST HEADER STYLES
   ================================================ */
.post-header header {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 2.5rem;
  margin-bottom: 3rem !important;
  margin-top: 0 !important;
}

.post-header-image img {
  width: 50px;
  /* height: 100px; */
  object-fit: contain;
  display: block;
  margin: 0 auto 2rem auto;
  box-shadow: none !important;
}

.post-title {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 1rem !important;
  letter-spacing: -0.02em;
}

.post-description {
  font-size: 1.25rem !important;
  font-weight: 400 !important;
  color: #64748b !important;
  margin: 0.75rem 0 1.5rem 0 !important;
  padding-left: 0 !important;
  line-height: 1.5;
  font-style: italic;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
}

.post-date,
.reading-time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem !important;
  color: #64748b !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.post-date i,
.reading-time i {
  color: #2789ce;
  font-size: 1rem;
}

.reading-time {
  position: relative;
  padding-left: 1.5rem;
}

.reading-time::before {
  content: '•';
  position: absolute;
  left: 0.5rem;
  color: #e9ecef;
  font-weight: bold;
}

/* Legacy selectors for backward compatibility */
.d-flex.flex-column.mt-5.mb-5 {
  border-bottom: 1px solid #e9ecef;
  padding-bottom: 2.5rem;
  margin-bottom: 3rem !important;
  margin-top: 0 !important;
}

.d-flex.flex-column.mt-5.mb-5 h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.2;
  color: #1a1a1a;
  margin-bottom: 1rem !important;
  letter-spacing: -0.02em;
}

.d-flex.flex-column.mt-5.mb-5 h2,
.d-flex.flex-column.mt-5.mb-5 p {
  font-size: 1.25rem !important;
  font-weight: 400 !important;
  color: #64748b !important;
  margin: 0.75rem 0 1.5rem 0 !important;
  padding-left: 0 !important;
  line-height: 1.5;
  font-style: italic;
}

.d-flex.flex-column.mt-5.mb-5 time {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem !important;
  color: #64748b !important;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.d-flex.flex-column.mt-5.mb-5 time i {
  color: #2789ce;
  font-size: 1rem;
}

@media (max-width: 768px) {
  .post-title,
  .d-flex.flex-column.mt-5.mb-5 h1 {
    font-size: 2.25rem;
  }

  .post-description,
  .d-flex.flex-column.mt-5.mb-5 h2,
  .d-flex.flex-column.mt-5.mb-5 p {
    font-size: 1.1rem !important;
  }
}

@media (max-width: 576px) {
  .post-meta {
    justify-content: space-around;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .reading-time {
    padding-left: 0;
  }

  .reading-time::before {
    display: none;
  }
}

/* ================================================
   POST CONTENT STYLES
   ================================================ */
.main.container > p,
.main.container > div > p,
.post-content p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: #374151;
  margin-bottom: 1.75rem;
  text-align: justify;
  hyphens: auto;
}

/* ================================================
   HEADINGS IN CONTENT
   ================================================ */
.main.container h2:not(.post-description),
.post-content h2 {
  font-size: 1.875rem;
  font-weight: 600;
  color: #1a1a1a;
  margin: 3rem 0 1.5rem 0;
  line-height: 1.3;
  position: relative;
}

.main.container h2:not(.post-description)::before,
.post-content h2::before {
  content: '';
  position: absolute;
  left: -1.5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 2rem;
  background: linear-gradient(135deg, #2789ce, #69c6ff);
  border-radius: 2px;
}

.main.container h3,
.post-content h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
  margin: 2.5rem 0 1rem 0;
  line-height: 1.4;
}

.main.container h4,
.post-content h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #374151;
  margin: 2rem 0 1rem 0;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .main.container h2:not(.post-description)::before,
  .post-content h2::before {
    left: -1rem;
    height: 1.5rem;
  }
}

/* ================================================
   QUOTES & BLOCKQUOTES
   ================================================ */
blockquote {
  background: linear-gradient(135deg, #f8fafc, #f1f5f9);
  border: none;
  border-left: 4px solid #2789ce;
  padding: 1.5rem 2rem;
  margin: 2.5rem 0;
  font-size: 1.1rem;
  font-style: italic;
  color: #475569;
  border-radius: 0 8px 8px 0;
  box-shadow: 0 2px 8px rgba(39, 137, 206, 0.08);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

blockquote:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(39, 137, 206, 0.12);
}

blockquote::before {
  content: '"';
  font-size: 4rem;
  color: #2789ce;
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-family: Georgia, serif;
  opacity: 0.3;
}

blockquote p {
  margin: 0;
  position: relative;
  z-index: 1;
}

/* ================================================
   LINKS
   ================================================ */
.main.container a,
.post-content a {
  color: #2789ce;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
  font-weight: 500;
}

.main.container a:hover,
.post-content a:hover {
  color: #1e5f8c;
  border-bottom-color: #2789ce;
  text-decoration: none;
}

/* ================================================
   LISTS
   ================================================ */
.main.container ul,
.main.container ol,
.post-content ul,
.post-content ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.main.container li,
.post-content li {
  font-size: 1.125rem;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 0.5rem;
}

.main.container ul li::marker,
.post-content ul li::marker {
  color: #2789ce;
}

/* ================================================
   CODE & PRE
   ================================================ */
code {
  background: #f1f5f9;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.9em;
  color: #e11d48;
  font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
}

pre {
  background: #1e293b;
  color: #e2e8f0;
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 2rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

pre code {
  background: transparent;
  padding: 0;
  color: inherit;
  border-radius: 0;
}

/* ================================================
   IMAGES
   ================================================ */
.main.container img,
.post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  /* margin: 2rem 0; */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.main.container img:hover,
.post-content img:hover {
  transform: scale(1.02);
}

/* ================================================
   TABLES
   ================================================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 2rem 0;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #e9ecef;
}

th {
  background: #f8fafc;
  font-weight: 600;
  color: #374151;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tr:hover {
  background: #f8fafc;
}

/* ================================================
   EMPHASIS & STRONG
   ================================================ */
strong, b {
  font-weight: 600;
  color: #1a1a1a;
}

em, i {
  font-style: italic;
  color: #475569;
}

/* ================================================
   HORIZONTAL RULE
   ================================================ */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #e9ecef, transparent);
  margin: 3rem 0;
}

/* ================================================
   SELECTION
   ================================================ */
::selection {
  background: rgba(39, 137, 206, 0.2);
  color: #1a1a1a;
}

::-moz-selection {
  background: rgba(39, 137, 206, 0.2);
  color: #1a1a1a;
}

/* ================================================
   SCROLL BEHAVIOR
   ================================================ */
html {
  scroll-behavior: smooth;
}

/* ================================================
   READING PROGRESS INDICATOR
   ================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, #2789ce, #69c6ff);
  z-index: 1000;
  transition: width 0.2s ease;
}

/* ================================================
   RESPONSIVE ADJUSTMENTS
   ================================================ */
@media (max-width: 576px) {
  .main.container {
    padding: 1rem 0.75rem;
  }

  .post-title,
  .d-flex.flex-column.mt-5.mb-5 h1 {
    font-size: 2rem;
  }

  .main.container > p,
  .post-content p {
    font-size: 1.05rem;
  }

  blockquote {
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
  }

  .main.container h2:not(.post-description)::before,
  .post-content h2::before {
    display: none;
  }
}

/* ================================================
   PRINT STYLES
   ================================================ */
@media print {
  .main.container {
    box-shadow: none;
    margin: 0;
    padding: 0;
  }

  .post-date {
    color: #000 !important;
  }

  .post-date i {
    display: none;
  }

  blockquote::before {
    display: none;
  }

  .main.container h2:not(.post-description)::before,
  .post-content h2::before {
    display: none;
  }
}

/* ================================================
   POST FEATURED IMAGE
   ================================================ */
.post-featured-image {
  margin: 2rem 0 3rem 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(39, 137, 206, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-featured-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(39, 137, 206, 0.16);
}

.post-featured-image img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
  display: block;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  transition: transform 0.4s ease;
}

.post-featured-image img:hover {
  transform: scale(1.02);
}

@media (max-width: 768px) {
  .post-featured-image {
    margin: 1.5rem 0 2.5rem 0;
    border-radius: 8px;
  }

  .post-featured-image img {
    max-height: 250px;
  }
}

@media (max-width: 576px) {
  .post-featured-image {
    margin: 1rem 0 2rem 0;
    border-radius: 6px;
  }

  .post-featured-image img {
    max-height: 200px;
  }
}