/* Custom styles for consistent image sizing */

/* Featured post images on homepage */
.featured-post-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
}

/* Card images in categories and tags */
.card-img-top {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: center;
}

/* Post detail page images */
.article-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  object-position: center;
}

/* Author profile images */
.author-profile img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  object-position: center;
}

/* Sidebar images */
.sidebar-image {
  width: 100%;
  height: 150px;
  object-fit: cover;
  object-position: center;
}

/* Hero section images */
.hero-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .featured-post-image {
    height: 150px;
  }

  .card-img-top {
    height: 140px;
  }

  .hero-image {
    height: 200px;
  }

  .author-profile img {
    width: 80px;
    height: 80px;
  }
}

/* Ensure all images maintain aspect ratio */
img {
  max-width: 100%;
  height: auto;
}

/* Override for author avatar to maintain specific size */
.author-avatar {
  max-width: none !important;
  width: 90px !important;
  height: auto !important;
}

/* Add subtle border and shadow to images */
.card-img-top,
.featured-post-image,
.article-image img {
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Hover effects for interactive images */
.card-img-top:hover,
.featured-post-image:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease-in-out;
}

/* Fix for article-title: disable the first-letter effect */
.article-title:first-letter {
  float: none !important;
  font-size: inherit !important;
  line-height: inherit !important;
  margin: 0 !important;
  vertical-align: baseline !important;
}

/* Fix for btn-outline-primary hover: ensure good contrast */
.btn-outline-primary:hover {
  color: #ffffff !important;
  background-color: oklch(0.541 0.281 293.009) !important;
  border-color: oklch(0.541 0.281 293.009) !important;
}

.btn-outline-primary:focus,
.btn-outline-primary.focus {
  color: #ffffff !important;
  background-color: oklch(0.541 0.281 293.009) !important;
  border-color: oklch(0.541 0.281 293.009) !important;
  box-shadow: 0 0 0 0.2rem rgba(99, 102, 241, 0.5) !important;
}

.btn-outline-primary:not(:disabled):not(.disabled):active,
.btn-outline-primary:not(:disabled):not(.disabled).active,
.show > .btn-outline-primary.dropdown-toggle {
  color: #ffffff !important;
  background-color: oklch(0.541 0.281 293.009) !important;
  border-color: oklch(0.541 0.281 293.009) !important;
}

/* Article Footer Styling */
.article-footer {
  border-top: 2px solid #e9ecef;
  padding-top: 2rem;
  margin-top: 3rem;
}

.article-footer .spanborder {
  border-bottom: none;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

.article-footer .social-share .btn {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.article-footer .btn-twitter {
  background-color: #000000;
  border-color: #000000;
  color: white;
}

.article-footer .btn-twitter:hover {
  background-color: #333333;
  border-color: #333333;
  color: white;
}

.article-footer .btn-linkedin {
  background-color: #0077b5;
  border-color: #0077b5;
  color: white;
}

.article-footer .btn-linkedin:hover {
  background-color: #005885;
  border-color: #005885;
  color: white;
}

.article-footer .btn-facebook {
  background-color: #1877f2;
  border-color: #1877f2;
  color: white;
}

.article-footer .btn-facebook:hover {
  background-color: #166fe5;
  border-color: #166fe5;
  color: white;
}

.article-footer .btn-copy {
  background-color: #6c757d;
  border-color: #6c757d;
  color: white;
}

.article-footer .btn-copy:hover {
  background-color: #5a6268;
  border-color: #5a6268;
  color: white;
}

/* Custom X.com Logo CSS */
.logo-x-css {
  display: inline-block;
  /* Proporción más ancha para X más estilizada */
  width: 19px;
  height: 12px; /* Reducida de 16px a 12px */
  position: relative;
  /* Oculta los extremos de las barras que se salen */
  overflow: hidden;
}

.logo-x-css::before,
.logo-x-css::after {
  content: '';
  position: absolute;
  background-color: currentColor;

  /* Barras más largas que el contenedor para cubrir esquinas */
  width: 130%;
  height: 4px; /* Aumentada de 2.8px a 4px para más grosor */

  /* Centramos las barras más largas */
  left: -15%;
  top: 50%;

  transform-origin: center;
  border-radius: 3px;
}

.logo-x-css::before {
  /* Ángulo menor a 45° para "aplanar" la X */
  transform: translateY(-50%) rotate(40deg);
}

.logo-x-css::after {
  transform: translateY(-50%) rotate(-40deg);
}

/* Stylized version for larger displays */
.logo-x-css-stylized {
  display: inline-block;
  /* Proporción más ancha para X más estilizada */
  width: 24px;
  height: 16px; /* Reducida de 20px a 16px */
  position: relative;
  /* Oculta los extremos de las barras que se salen */
  overflow: hidden;
}

.logo-x-css-stylized::before,
.logo-x-css-stylized::after {
  content: '';
  position: absolute;
  background-color: currentColor;

  /* Barras más largas que el contenedor para cubrir esquinas */
  width: 130%;
  height: 5px; /* Aumentada de 3.5px a 5px para más grosor */

  /* Centramos las barras más largas */
  left: -15%;
  top: 50%;

  transform-origin: center;
  border-radius: 4px;
}

.logo-x-css-stylized::before {
  /* Ángulo menor a 45° para "aplanar" la X */
  transform: translateY(-50%) rotate(40deg);
}

.logo-x-css-stylized::after {
  transform: translateY(-50%) rotate(-40deg);
}

/* Article Tags Styling */
.article-tags {
  margin-top: 1rem;
}

.article-tags .badge {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  background: oklch(0.95 0.05 293.009) !important;
  color: oklch(0.541 0.281 293.009) !important;
  border: 1px solid oklch(0.541 0.281 293.009) !important;
}

.article-tags .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  background: oklch(0.541 0.281 293.009) !important;
  color: white !important;
}

/* Article Categories Styling */
.article-categories {
  margin-top: 1rem;
}

.article-categories .badge {
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.8rem;
  border-radius: 1rem;
  text-decoration: none;
  transition: all 0.2s ease;
  background-color: #ffffff !important;
  border: 2px solid oklch(0.541 0.281 293.009) !important;
  color: oklch(0.541 0.281 293.009) !important;
}

.article-categories .badge:hover {
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  background-color: oklch(0.541 0.281 293.009) !important;
  color: #ffffff !important;
}

/* Custom Header and Hero Section Colors */
/* Header/Navbar */
.navbar.bg-white {
  background-color: oklch(0.541 0.281 293.009) !important;
}

.navbar-light {
  background-color: oklch(0.541 0.281 293.009) !important;
}

/* Hero Section/Jumbotron */
.jumbotron.bg-white {
  background-color: oklch(0.541 0.281 293.009) !important;
}

.jumbotron {
  background-color: oklch(0.541 0.281 293.009) !important;
}

/* Ensure text is readable on the new background */
.navbar-light .navbar-brand,
.navbar-light .navbar-nav .nav-link,
.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link:focus,
.navbar-light .navbar-nav .show > .nav-link,
.navbar-light .navbar-nav .active > .nav-link,
.navbar-light .navbar-nav .nav-link.show,
.navbar-light .navbar-nav .nav-link.active {
  color: white !important;
}

.navbar-light .navbar-brand:hover,
.navbar-light .navbar-brand:focus {
  color: white !important;
}

.navbar-light .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3) !important;
}

.navbar-light .navbar-toggler-icon {
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,0.8)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* Hero section text adjustments for better contrast */
.jumbotron h1,
.jumbotron .display-4,
.jumbotron .article-headline {
  color: white !important;
}

.jumbotron p,
.jumbotron small,
.jumbotron .text-muted {
  color: rgba(255, 255, 255, 0.9) !important;
}

.jumbotron .text-danger {
  color: #ff6b6b !important;
}

.jumbotron .btn-outline-success {
  color: oklch(0.541 0.281 293.009) !important;
  border-color: oklch(0.541 0.281 293.009) !important;
}

.jumbotron .btn-outline-success:hover {
  background-color: oklch(0.541 0.281 293.009) !important;
  color: white !important;
}

/* Custom TikTok Icon - Single Music Note */
.tiktok-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  position: relative;
  overflow: visible;
  text-align: center;
  line-height: 18px;
}

.tiktok-icon::before {
  content: '♪';
  font-size: 18px;
  line-height: 1;
  color: currentColor;
  font-family: 'Arial', sans-serif;
  font-weight: 900;
  -webkit-text-stroke: 0.2px currentColor;
  text-shadow: 0 0 0.3px currentColor;
  display: block;
  text-align: center;
}

/* TikTok Icon for Hero Section (Portada) - More Subtle */
.tiktok-icon-hero {
  display: inline-block;
  width: 18px;
  height: 18px;
  position: relative;
  overflow: visible;
  text-align: center;
  line-height: 18px;
}

.tiktok-icon-hero::before {
  content: '♪';
  font-size: 18px;
  line-height: 1;
  color: currentColor;
  font-family: 'Arial', sans-serif;
  font-weight: 900;
  -webkit-text-stroke: 0.1px currentColor;
  text-shadow: none;
  display: block;
  text-align: center;
}

/* Social Share Buttons - Same Style as About Page */
.social-share .btn-outline-primary {
  border-color: oklch(0.541 0.281 293.009) !important;
  color: oklch(0.541 0.281 293.009) !important;
}

.social-share .btn-outline-primary:hover {
  background-color: oklch(0.541 0.281 293.009) !important;
  border-color: oklch(0.541 0.281 293.009) !important;
  color: white !important;
}

.social-share .btn-outline-secondary {
  border-color: oklch(0.6 0.281 293.009) !important;
  color: oklch(0.6 0.281 293.009) !important;
}

.social-share .btn-outline-secondary:hover {
  background-color: oklch(0.6 0.281 293.009) !important;
  border-color: oklch(0.6 0.281 293.009) !important;
  color: white !important;
}

/* Compact Tags Styling */
.tag-mini {
  background: rgba(156, 163, 175, 0.1) !important;
  color: oklch(0.3 0.1 293.009) !important;
  font-size: 0.75rem !important;
  padding: 0.2rem 0.4rem !important;
  border: 1px solid rgba(156, 163, 175, 0.3) !important;
  border-radius: 4px !important;
  text-decoration: none !important;
  transition: all 0.2s ease !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  font-family: 'Arial', 'Helvetica', sans-serif !important;
  margin: 0.1rem 0.15rem !important;
  display: inline-block !important;
}

.tag-mini:hover {
  background: oklch(0.3 0.1 293.009) !important;
  color: white !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  text-decoration: none !important;
}

.tag-mini:focus {
  background: oklch(0.3 0.1 293.009) !important;
  color: white !important;
  text-decoration: none !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(156, 163, 175, 0.2) !important;
}

/* Tag container spacing */
.tags-container {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.2rem !important;
  margin-top: 0.5rem !important;
}
