/* ad-styles.css */

/* Core Container with Mesh Gradient and Glow Effect */
.custom-responsive-ad {
  width: 100%;
  max-width: 1200px;
  min-height: 95px;
  padding: 12px 24px;
  box-sizing: border-box;
  
  /* Deep premium dark background with a subtle blue mesh glow */
  background: radial-gradient(circle at 20% 120%, rgba(14, 165, 233, 0.15), transparent 50%),
              radial-gradient(circle at 80% -20%, rgba(37, 99, 235, 0.2), transparent 50%),
              #090d16;
  
  /* Modern sharp border with a very subtle drop shadow */
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 12px;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4), 
              inset 0 1px 1px rgba(255, 255, 255, 0.05);
  
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow: hidden;
  position: relative;
}

/* Prevents collapsing layouts and ensures normal block flow placement */
.ad-test-placement-wrapper {
  display: block;
  clear: both;
  width: 100%;
  padding: 10px 0; /* Creates an external cushion around the banner */
  box-sizing: border-box;
}

/* Flexbox Layout for Desktop/Tablet */
.ad-layout-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  min-height: 70px;
}

/* Brand/Logo Section */
.ad-logo-section {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.ad-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.2));
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 8px;
  color: #38bdf8;
  font-size: 1.1rem;
}

.ad-logo-text {
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #ffffff 40%, #e2e8f0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.ad-logo-text span {
  color: #38bdf8;
}

/* Middle Content Section */
.ad-text-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.ad-main-title {
  margin: 0 0 4px 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1.2;
}

.ad-sub-tagline {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
  color: #94a3b8;
  line-height: 1.4;
}

/* Action/Button Section */
.ad-action-side {
  flex-shrink: 0;
}

/* Premium Vibrant Glowing Button */
.ad-action-btn {
  display: inline-block;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.25s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.ad-action-btn:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6),
              inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.ad-action-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

/* --- Responsive Layout Adjustments --- */

/* Tablet Optimization */
@media (max-width: 820px) {
  .custom-responsive-ad {
    padding: 12px 18px;
  }
  .ad-main-title {
    font-size: 1.15rem;
  }
  .ad-sub-tagline {
    font-size: 0.85rem;
  }
  .ad-logo-text {
    font-size: 1.1rem;
  }
}

/* Mobile Layout Transformation (Turns into a beautiful card) */
@media (max-width: 620px) {
  .ad-layout-wrapper {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 8px 0;
  }
  
  .ad-test-placement-wrapper {
    padding-top: 25px; 
    padding-bottom: 20px;
  }

  .custom-responsive-ad {
    padding: 20px;
    /* ADD THIS LINE: Adjust '80px' to match or exceed your mobile header's height */
    margin-top: 20px; 
    /* Optional: adds space below the ad so it doesn't crowd content below it */
    margin-bottom: 20px;
    /* Forces the browser to respect document flow spacing on mobile */
    position: relative;
    display: block !important;
    clear: both;
  }

  .ad-logo-section {
    flex-direction: column;
    gap: 6px;
  }

  .ad-text-content {
    margin: 4px 0;
  }

  .ad-sub-tagline {
    margin-top: 4px;
  }

  .ad-action-side {
    width: 100%;
  }

  .ad-action-btn {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
  }
}