/* Ad Styles for Corpify */

/* General ad container */
.ad-container {
    margin: 20px 0;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    overflow: hidden;
    clear: both;
    text-align: center;
}

/* Sponsor content styling - clean and integrated */
.sponsor-content {
    margin: 30px 0;
    padding: 20px 0;
    position: relative;
    clear: both;
    border-top: 1px solid #eaeaea;
    border-bottom: 1px solid #eaeaea;
    text-align: center;
}

.sponsor-label {
    text-align: center;
    margin-bottom: 12px;
}

.sponsor-label span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #767676;
    background-color: #f8f9fa;
    padding: 3px 8px;
    border-radius: 3px;
    font-weight: 500;
}

.sponsor-ad-container {
    max-width: 100%;
    overflow: hidden;
    margin: 0 auto;
    min-height: 100px; /* Ensure there's space for the ad to load */
}

/* In-article ad specific styles */
.ad-in-article {
    margin: 30px 0;
    padding: 15px;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

/* Sidebar ad specific styles */
.sidebar-ad {
    margin-bottom: 20px;
}

.sticky-sidebar-ad {
    position: sticky;
    top: 100px;
}

/* Ad label styles */
.ad-label {
    text-align: center;
    margin-bottom: 5px;
}

.ad-label small {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
}

/* Ensure ads don't overflow their containers */
.adsbygoogle {
    max-width: 100%;
    overflow: hidden;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .sponsor-content {
        margin: 20px 0;
        padding: 15px 0;
    }
}

/* Sticky side ads */
.sticky-ad {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    display: none;
}

.sticky-ad-left {
    left: 10px;
}

.sticky-ad-right {
    right: 10px;
}

.sticky-ad-container {
    background-color: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.sticky-ad-content {
    text-align: center;
}

/* Only show sticky ads on large screens */
@media (min-width: 1400px) {
    .sticky-ad {
        display: block;
    }
}

/* Ad blocker message */
.ad-blocker-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    border-left: 5px solid #f5c6cb;
}

.ad-blocker-message h4 {
    margin-top: 0;
    color: #721c24;
}

.ad-blocker-message p {
    margin-bottom: 10px;
}

/* Ensure ads don't break layout */
ins.adsbygoogle {
    background-color: transparent;
}

/* Professional Ad Styling */
.professional-ad-banner {
  padding: 2rem 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 12px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  margin: 3rem 0;
  position: relative;
}

.professional-ad-banner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #004080, #2ec4b6);
  border-radius: 0 0 3px 3px;
}

.professional-ad-banner small {
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: #6c757d;
}

/* Blog Ad Separator Styling */
.blog-ad-separator {
  margin: 3rem 0;
  padding: 2rem;
  background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
  border-radius: 16px;
  border-left: 4px solid #004080;
  position: relative;
}

.blog-ad-separator::before {
  content: "Advertisement";
  position: absolute;
  top: -8px;
  left: 20px;
  background: #fff;
  padding: 4px 12px;
  font-size: 0.7rem;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.blog-ad-separator small {
  font-weight: 600;
  color: #495057;
}

.thin-ad-container {
  max-height: 100px;
  overflow: hidden;
  border: 1px solid #dee2e6;
  border-radius: 12px;
}
/* Ensure all explicitly placed AdSense units are displayed */
ins.adsbygoogle {
  display: block !important;
}

/* Hide any auto-inserted ads that are unfilled or done */
/* ins.adsbygoogle[data-ad-status="unfilled"],
ins.adsbygoogle[data-adsbygoogle-status="done"] {
  display: none !important;
} *//*
 * Ad Section Styling
 * Enhances the appearance of ad sections throughout the site
 */

.ad-section {
  background-color: #f8f9fa;
  border-top: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.sponsor-banner {
  background-color: #ffffff;
  border-radius: 10px;
  padding: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  /* max-width: 350px; Removed to allow full width */
  margin: 0 auto;
}

.sponsor-banner:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-3px);
}

.sponsor-label {
  position: relative;
  display: inline-block;
}

.sponsor-label small {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
  color: #6c757d;
}

.sponsor-label:before,
.sponsor-label:after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background-color: rgba(108, 117, 125, 0.3);
}

.sponsor-label:before {
  left: -40px;
}

.sponsor-label:after {
  right: -40px;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
  .sponsor-banner {
    padding: 15px;
  }
  
  .sponsor-label:before,
  .sponsor-label:after {
    width: 20px;
  }
  
  .sponsor-label:before {
    left: -25px;
  }
  
  .sponsor-label:after {
    right: -25px;
  }
}
/* 
 * Corpify Ad Optimizations
 * CSS optimizations for better ad viewability and performance
 */

/* Ensure ads don't cause layout shifts */
.ad-container {
  min-height: 90px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 2rem auto;
  overflow: hidden;
}

/* Prevent ads from causing content jumps */
.ad-container iframe {
  max-width: 100%;
}

/* Optimize ad visibility */
.ad-container.ad-in-content {
  margin: 2rem 0;
  clear: both;
}

/* Sticky sidebar ads */
.ad-sidebar.ad-sticky {
  position: sticky;
  top: 100px;
  z-index: 100;
}

/* Optimize mobile ad display */
@media (max-width: 767.98px) {
  .ad-container {
    margin: 1.5rem auto;
  }
  
  .ad-container.ad-header,
  .ad-container.ad-footer {
    min-height: 50px;
  }
  
  .ad-container.ad-in-content {
    min-height: 250px;
  }
}

/* Lazy loading for ads */
.ad-lazy {
  opacity: 0;
  transition: opacity 0.5s ease;
}

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

/* Ad viewability improvements */
.ad-viewable {
  transition: all 0.3s ease;
}

/* Ad container hover effects */
.ad-container:hover {
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Ad labels for better transparency */
.ad-label {
  position: absolute;
  top: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-size: 10px;
  padding: 2px 5px;
  border-bottom-left-radius: 4px;
  z-index: 10;
}

/* Optimize ad grid layout */
.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

/* Ensure ads don't overflow their containers */
.ad-container img,
.ad-container iframe,
.ad-container ins {
  max-width: 100%;
}

/* Optimize for Core Web Vitals */
.ad-container {
  content-visibility: auto;
  contain-intrinsic-size: auto 250px;
}

/* Prevent layout shifts from ads */
.ad-container.ad-header,
.ad-container.ad-footer {
  contain-intrinsic-size: auto 90px;
}

.ad-container.ad-sidebar {
  contain-intrinsic-size: auto 250px;
}

/* Optimize ad loading performance */
.ad-container {
  will-change: opacity;
}

/* Ensure ads don't cause accessibility issues */
.ad-container:focus-within {
  outline: 2px solid #0d6efd;
}

/* Optimize for print */
@media print {
  .ad-container {
    display: none !important;
  }
}

/* Optimize for dark mode */
@media (prefers-color-scheme: dark) {
  .ad-container {
    background-color: #343a40;
  }
  
  .ad-placeholder {
    background: linear-gradient(135deg, #343a40, #212529);
    color: #adb5bd;
  }
}

/* Optimize for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .ad-container {
    transition: none;
  }
  
  .ad-lazy {
    transition: none;
  }
}

/* Optimize for high contrast */
@media (forced-colors: active) {
  .ad-container {
    border: 1px solid CanvasText;
  }
}

/* Ensure ads are properly spaced in content */
p + .ad-container,
h2 + .ad-container,
h3 + .ad-container {
  margin-top: 1.5rem;
}

.ad-container + p,
.ad-container + h2,
.ad-container + h3 {
  margin-top: 1.5rem;
}

/* Optimize for better ad viewability */
.content-area .ad-container.ad-in-content {
  margin-left: auto;
  margin-right: auto;
}

/* Ensure ads don't disrupt reading flow */
.blog-post-content .ad-container {
  margin: 2rem auto;
}

/* Optimize sidebar ad placement */
.sidebar .ad-container {
  margin: 0 0 2rem 0;
}

/* Ensure ads don't cause horizontal scrolling */
.ad-container {
  max-width: 100%;
  overflow-x: hidden;
}
