/* Optimized styles for better performance and responsiveness */

/* Grid system improvements */
.equal-height-cards {
  display: flex;
  flex-wrap: wrap;
}

.grid-item {
  display: flex;
  margin-bottom: 30px;
}

.grid-item article {
  width: 100%;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item article:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Image optimizations */
.post-image-container {
  overflow: hidden;
  position: relative;
  padding-top: 66.67%; /* 3:2 aspect ratio */
}

.post-image-container img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-image-container:hover img {
  transform: scale(1.05);
}

/* Category cloud styling */
.category-cloud {
  display: inline-block;
  margin-right: 5px;
  margin-bottom: 5px;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  background: linear-gradient(45deg, #ff6b6b, #ff8e8e);
  color: white;
  transition: all 0.3s ease;

/* Professional Wave Footer */
.bg-footer {
  position: relative;
  background-color: #1a1a1a;
  color: white;
  padding-top: 70px;
}

.bg-footer::before {
  content: "";
  position: absolute;
  top: -50px;
  left: 0;
  width: 100%;
  height: 50px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath d='M321.39,56.44c58-10.79,114.16-30.13,172-41.86,82.39-16.72,168.19-17.73,250.45-.39C823.78,31,906.67,72,985.66,92.83c70.05,18.48,146.53,26.09,214.34,3V0H0V27.35A600.21,600.21,0,0,0,321.39,56.44Z' fill='%231a1a1a'%3E%3C/path%3E%3C/svg%3E");
  background-size: cover;
}

.footer-content {
  position: relative;
  z-index: 10;
}

.footer-title {
  color: #fff;
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  font-weight: 600;
}

.footer-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 50px;
  height: 2px;
  background-color: #FF6F61;
}

.footer-text {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.8;
}

.footer-icon {
  color: white;
  font-size: 18px;
  transition: color 0.3s;
}

.footer-icon:hover {
  color: #FF6F61;
}

.footer-logo {
  max-width: 150px;
  margin-bottom: 20px;
}

.social-icons li {
  margin-right: 15px;
}

}

.category-cloud:hover {
  background: linear-gradient(45deg, #ff8e8e, #ff6b6b);
  transform: translateY(-2px);
  text-decoration: none;
  color: white;
}

/* Pagination styling */
.pagination {
  margin-top: 50px;
}

.pagination .page-link {
  border-radius: 30px;
  margin: 0 5px;
  color: #555;
  border: 1px solid #ddd;
  transition: all 0.3s ease;
}

/* Featured section optimizations */
.featured-section {
  margin-top: 20px;
  margin-bottom: 40px;
}

/* Space for ad above featured */
.featured-section .ad-container {
  margin-bottom: 30px;
}

.featured-image-container {
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
  aspect-ratio: 3/2;
  height: 100%;
  border-radius: 4px;
}

.featured-card {
  opacity: 1;
  transform: translateY(0);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  height: 100%;
  margin: 0;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.featured-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.featured-card img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  transition: transform 0.5s ease;
}

.featured-card:hover img {
  transform: scale(1.05);
}

.featured-overlay {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(to bottom, rgba(0,0,0,0.2), rgba(0,0,0,0.7));
  transition: background 0.3s ease;
}

/* Professional Wave Footer Styles */
.footer-wave {
  width: 100%;
  line-height: 0;
  margin-bottom: -5px;
  transform: translateY(1px);
}

.footer-wave svg {
  display: block;
  width: 100%;
  height: auto;
}

.bg-footer {
  background-color: #8E1C33;
  color: #ffffff;
  position: relative;
  margin-top: 3rem;
}

.footer-main {
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.footer-logo-container {
  background-color: #ffffff;
  padding: 10px;
  border-radius: 5px;
  display: inline-block;
  margin-bottom: 15px;
}

.footer-logo {
  max-height: 60px;
  width: auto;
}

.footer-brand-name {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 15px;
  font-size: 1.5rem;
}

.footer-title {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 20px;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links li a, .footer-contact li a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links li a:hover, .footer-contact li a:hover {
  color: #ffffff;
  padding-left: 5px;
}

.footer-social-icons {
  margin-top: 20px;
}

.social-icon {
  display: inline-block;
  width: 36px;
  height: 36px;
  line-height: 36px;
  text-align: center;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #ffffff;
  margin-right: 8px;
  transition: all 0.3s ease;
}

.social-icon:hover {
  background-color: #ffffff;
  color: #8E1C33;
}

.footer-newsletter {
  margin-top: 20px;
}

.subscribe-btn {
  background-color: #FFD700;
  color: #000000;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: 4px;
  transition: all 0.3s ease;
  border: none;
}

.subscribe-btn:hover {
  background-color: #ffffff;
  color: #8E1C33;
}

.copyright-section {
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
  .footer-logo-container {
    margin: 0 auto 15px;
    display: block;
    text-align: center;
  }
  
  .footer-brand-name,
  .footer-social-icons {
    text-align: center;
  }
  
  .footer-title {
    margin-top: 20px;
  }
}


.featured-card:hover .featured-overlay {
  background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.8));
}

.featured-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
}

.featured-category {
  background-color: transparent;
  color: white;
  font-weight: bold;
  letter-spacing: 1px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: inline-block;
}

.featured-title {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
}

.featured-title a {
  color: white;
  text-decoration: none;
}

.read-more-btn {
  margin-top: auto;
}

.read-more-btn .btn {
  border: 2px solid white;
  border-radius: 0;
  padding: 0.4rem 1.2rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 500;
}

.featured-card.fade-animation {
  animation: fadeIn 0.8s forwards;
}

.featured-card.slide-left-animation {
  animation: slideFromRight 0.8s forwards;
}

.featured-card.slide-right-animation {
  animation: slideFromLeft 0.8s forwards;
}

.featured-card.slide-up-animation {
  animation: slideFromBottom 0.8s forwards;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideFromRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideFromBottom {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Lazy loading optimization */
.lazy-load {
  transition: opacity 0.5s ease;
  opacity: 0;
}

.lazy-load.loaded {
  opacity: 1;
}

.pagination .page-item.active .page-link {
  background-color: #ff6b6b;
  border-color: #ff6b6b;
}

.pagination .page-link:hover {
  background-color: #f8f9fa;
  color: #ff6b6b;
}

/* Iframe container */
.iframe-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
}

.iframe-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsive design improvements */
@media (max-width: 767px) {
  .grid-item {
    width: 100%;
  }

  h4.title-border {
    font-size: 1.5rem;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .grid-item {
    width: 50%;
  }
}

/* SEO improvements - hide content that's dynamically loaded */
.hidden-seo-content {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}