@font-face {
  font-family: "OpenSans-Light";
  src: url("/static/fonts/OpenSans-Light.woff") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "OpenSans-Regulat";
  src: url("/static/fonts/OpenSans-Regular.woff") format("woff2");
  font-display: swap;
}

/* Ensure parent allows centering */
.entry-content:has(.sponsored-listings-container),
.entry-content .sponsored-listings-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.entry-content .sponsored-listings-container {
    display: block;
}

.sponsored-listings-container {
    background-color: #ffffff;
    border-radius: 4px;
    padding: 20px;
    max-width: 930px;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
    display: block;
    margin: 15px auto;
    font-family: OpenSans-Light, Arial, sans-serif;
    text-align: center;
}

.sponsored-listings-header {
    font-size: 16px;
    font-weight: 400;
    color: #7a7272;
    margin-bottom: 16px;
    padding-bottom: 12px;
    font-family: OpenSans-Regular, Arial, sans-serif;
    text-align: left;
    text-transform: capitalize;
}

.sponsored-listings-header .query-term {
    font-weight: 600;
    color: #3c4043;
}

.sponsored-ads-wrapper {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sponsored-ad-item {
    background-color: rgb(246, 246, 246);
    border-radius: 4px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease;
    min-height: 80px;
    margin-bottom: 30px;
}

.sponsored-ad-item:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.ad-number-indicator {
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.number-triangle {
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 6px solid #5f6368;
    position: absolute;
    left: -6px;
    top: 50%;
    transform: translateY(-50%);
}

.number-text {
    background-color: #000000;
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
    padding: 8px 12px;
    min-width: 32px;
    text-align: center;
    line-height: 1;
}

.ad-content-wrapper {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.ad-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: center;
}

.ad-title {
    font-size: 30px;
    font-weight: 600;
    color: #3c4043;
    text-decoration: none;
    line-height: 1.4;
    display: block;
    margin-bottom: 2px;
}

.ad-title:hover {
    text-decoration: underline;
    color: inherit;
}

.ad-url {
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 2px;
}

.ad-url a {
    color: #545454;
    text-decoration: none;
}


.ad-description {
    font-size: 12px;
    color: #545454;
    line-height: 2;
    margin-top: 2px;
    font-family: OpenSans-Regular, Arial, sans-serif;
}

.ad-description .sitelink-separator {
    margin: 0 4px;
}

.ad-description .sitelink-link {
    color: #1a0dab;
    text-decoration: none;
}

.ad-description .sitelink-link:hover {
    text-decoration: underline;
}

.ad-cta-wrapper {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    align-self: center;
}

.ad-cta-button {
    background-color: #000000;
    color: #ffffff;
    font-size: 13px;
    font-weight: bold;
    padding: 12px 20px;
    text-decoration: none;
    border-radius: 3px;
    white-space: nowrap;
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.ad-cta-button:hover {
    background-color: #333333;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-shadow-wrapper {
    display: none;
}

.container {
    padding-left: 0;
    padding-right: 0;
}

html, body {
  height: 100%;
}

body.s-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.s-page .bg-white-500.text-black-50 {
  margin-top: auto; /* pushes footer to bottom */
}


/* Responsive styles */
@media (max-width: 768px) {
    .sponsored-listings-container {
        padding: 0 12px 0 12px;
        margin: 10px 0;
    }

    .sponsored-ad-item {
        flex-direction: column;
        padding: 20px 12px 20px 12px;
    }

    .ad-number-indicator {
        align-self: flex-start;
    }

    .ad-content-wrapper {
        flex-direction: column;
        width: 100%;
        min-height: 400px;
    }

    .ad-cta-wrapper {
        width: 100%;
        justify-content: flex-start;
    }

    .ad-cta-button {
        width: 100%;
        text-align: center;
    }

    .ad-title {
        font-size: 35px;
    }

    body {
        display: flex;
        flex-direction: column;
    }

    .article-div-ao {
        order: 1;
    }

    .navik-header {
        order: 2;
    }

    .bg-white-500.text-black-50 {
        order: 3;
    }
}

/* Hide search form on mobile */
@media (max-width: 767px) {
    .navik-menu form.px-md-4,
    nav.navik-menu form.px-md-4 {
        display: none !important;
    }
}

@media (max-width: 768px) {
  /* your existing flex page setup */
  html, body { height: 100%; }

  body.s-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  body.s-page .article-div-ao { order: 1; }

  /* THIS is the key: remove fixed/sticky */
  body.s-page .navik-header {
    order: 2;
    position: static !important;   /* or relative */
    top: auto !important;
    bottom: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100%;
    margin-top: 50px;              /* your padding above */
  }

  /* optional: Navik sometimes adds a shadow spacer */
  body.s-page .navik-header .header-shadow-wrapper {
    display: none !important;
  }

  body.s-page .bg-white-500.text-black-50 {
    order: 3;
    margin-top: auto;              /* pins footer to bottom */
  }
}
