/*
Theme Name: Astra Bloomberg
Theme URI: https://blog.suppremo.in
Description: Professional finance blog child theme for Astra.
Author: Suppremo
Template: astra
Version: 1.2.0
Text Domain: astra-bloomberg
*/

:root {
  --bbg-bg: #f5f8fc;
  --bbg-surface: #ffffff;
  --bbg-surface-soft: #f2f6fb;
  --bbg-border: #dbe5ef;
  --bbg-text: #132231;
  --bbg-muted: #5e7388;
  --bbg-accent: #0b5cab;
  --bbg-accent-soft: #2d77bf;
  --bbg-highlight: #ebf4fe;
}

body {
  background: linear-gradient(180deg, #f8fbff 0%, #f1f6fc 100%);
  color: var(--bbg-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: var(--bbg-accent);
}

a:hover {
  color: #084f95;
}

.bbg-shell {
  max-width: 1250px;
  margin: 0 auto;
  padding: 22px 16px 38px;
}

.bbg-market-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}

.bbg-strip-item {
  background: var(--bbg-surface);
  border: 1px solid var(--bbg-border);
  border-radius: 10px;
  padding: 10px 12px;
  box-shadow: 0 4px 14px rgba(20, 49, 77, 0.06);
}

.bbg-strip-label {
  color: var(--bbg-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.7px;
}

.bbg-strip-value {
  margin-top: 4px;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  color: #10273d;
}

.bbg-strip-change {
  margin-top: 4px;
  font-size: 12px;
  color: #14743b;
}

.bbg-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  gap: 18px;
}

.bbg-main,
.bbg-side-card,
.bbg-card,
.bbg-list-item,
.bbg-single,
.bbg-sidebar {
  background: var(--bbg-surface);
  border: 1px solid var(--bbg-border);
  border-radius: 12px;
}

.bbg-main,
.bbg-card,
.bbg-list-item,
.bbg-related-item {
  position: relative;
  overflow: hidden;
}

.bbg-main,
.bbg-card,
.bbg-list-item {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bbg-main:hover,
.bbg-card:hover,
.bbg-list-item:hover,
.bbg-related-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 42, 66, 0.12);
}

.bbg-post-link {
  position: absolute;
  inset: 0;
  z-index: 7;
}

.bbg-post-link:focus-visible {
  outline: 3px solid #74abdf;
  outline-offset: -3px;
}

.bbg-main-media img,
.bbg-card img,
.bbg-related-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.bbg-main-media {
  aspect-ratio: 16/8;
  background: #edf4fb;
}

.bbg-main-content,
.bbg-card-content,
.bbg-list-item > div,
.bbg-single-header,
.bbg-single-content {
  position: relative;
  z-index: 5;
}

.bbg-main-content {
  padding: 18px;
}

.bbg-kicker {
  display: inline-block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.85px;
  color: #0f66b8;
  margin-bottom: 10px;
  font-weight: 600;
}

.bbg-main-title,
.bbg-card-title,
.bbg-single h1 {
  margin: 0;
  line-height: 1.2;
  color: #0f2538;
}

.bbg-main-title {
  font-size: clamp(29px, 3.3vw, 43px);
}

.bbg-meta {
  margin-top: 9px;
  color: var(--bbg-muted);
  font-size: 12px;
}

.bbg-main-excerpt {
  margin-top: 12px;
  color: #334f67;
  font-size: 16px;
  line-height: 1.65;
}

.bbg-side-column {
  display: grid;
  gap: 12px;
}

.bbg-side-card,
.bbg-sidebar {
  padding: 14px;
  box-shadow: 0 4px 14px rgba(20, 49, 77, 0.06);
}

.bbg-side-title {
  margin: 0 0 10px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  color: #35536f;
  font-weight: 700;
}

.bbg-mini-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.bbg-mini-list li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5edf5;
}

.bbg-mini-list a {
  color: #1b3a57;
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
}

.bbg-mini-list a:hover {
  color: #0a5eb1;
}

.bbg-latest-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bbg-card-media {
  aspect-ratio: 16/10;
  background: #ebf3fb;
}

.bbg-card-content {
  padding: 12px;
}

.bbg-card-title {
  font-size: 20px;
}

.bbg-card-excerpt {
  margin-top: 8px;
  color: #45617a;
  font-size: 14px;
  line-height: 1.55;
}

.bbg-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.bbg-list-item {
  padding: 12px 14px;
}

.bbg-list-item h3 {
  margin: 0;
  color: #15324b;
  font-size: 16px;
}

.bbg-list-item time {
  color: var(--bbg-muted);
  font-size: 12px;
}

.bbg-single-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr);
  gap: 18px;
}

.bbg-single {
  overflow: hidden;
}

.bbg-single-header {
  padding: 20px;
}

.bbg-single-thumb {
  aspect-ratio: 16/7;
  background: #ebf3fb;
}

.bbg-single-content {
  padding: 24px;
  color: #203b54;
  line-height: 1.9;
  font-size: 18px;
}

.bbg-single-content h2,
.bbg-single-content h3,
.bbg-single-content h4 {
  color: #0e2437;
  margin-top: 1.6em;
}

.bbg-single-content p {
  margin: 0 0 1.2em;
}

.bbg-single-content ul,
.bbg-single-content ol {
  padding-left: 22px;
  margin: 0 0 1.2em;
}

.bbg-related {
  margin-top: 18px;
}

.bbg-related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.bbg-related-item {
  background: var(--bbg-surface);
  border: 1px solid var(--bbg-border);
  border-radius: 12px;
}

.bbg-related-item .bbg-card-media {
  aspect-ratio: 16/9;
}

.bbg-related-item .bbg-card-content {
  padding: 10px;
  position: relative;
  z-index: 5;
}

.bbg-related-item .bbg-card-title {
  font-size: 14px;
}

.bbg-pagination {
  margin-top: 24px;
}

.bbg-pagination .page-numbers {
  display: inline-block;
  border: 1px solid var(--bbg-border);
  background: var(--bbg-surface);
  color: #2f4e6b;
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 6px;
  text-decoration: none;
}

.bbg-pagination .page-numbers.current,
.bbg-pagination .page-numbers:hover {
  background: var(--bbg-highlight);
  color: #10497f;
}

.widget-title {
  font-size: 13px;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #35536f;
}

.widget {
  margin-bottom: 20px;
}

.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget ul li + li {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5edf5;
}

.widget a {
  text-decoration: none;
  color: #1b3a57;
}

/* Astra chrome overrides */
.ast-primary-header-bar,
.ast-desktop .main-header-menu,
.ast-mobile-header-wrap,
.site-primary-footer-wrap[data-section="section-primary-footer-builder"] {
  background: #ffffff !important;
  border-color: #dbe5ef !important;
}

.ast-builder-menu-1 .menu-item > .menu-link,
.ast-site-identity .site-title a,
.ast-site-identity .site-description,
.ast-mobile-header-wrap .ast-builder-menu-mobile .menu-link,
.ast-mobile-header-wrap .ast-builder-menu-mobile .ast-menu-toggle {
  color: #1f3f5d !important;
}

.ast-builder-menu-1 .menu-item > .menu-link:hover,
.ast-builder-menu-1 .menu-item.current-menu-item > .menu-link {
  color: #0d63b7 !important;
}

.site-content,
.ast-separate-container #content .ast-container,
.ast-container,
.ast-separate-container .ast-article-single,
.ast-separate-container .ast-article-post {
  background: transparent !important;
}

input[type="search"],
input[type="text"],
input[type="email"],
textarea {
  background: #f7fbff;
  border: 1px solid #ccdae8;
  color: #17324a;
}

.search-form .search-submit,
button,
input[type="submit"] {
  background: #0e67bc;
  color: #fff;
  border-radius: 8px;
}

.search-form .search-submit:hover,
button:hover,
input[type="submit"]:hover {
  background: #0b569d;
}

@media (max-width: 980px) {
  .bbg-market-strip,
  .bbg-latest-grid,
  .bbg-related-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bbg-grid,
  .bbg-single-wrap {
    grid-template-columns: 1fr;
  }

  .bbg-single-content {
    font-size: 17px;
  }
}

@media (max-width: 640px) {
  .bbg-market-strip,
  .bbg-latest-grid,
  .bbg-related-grid {
    grid-template-columns: 1fr;
  }

  .bbg-shell {
    padding: 14px 12px 28px;
  }

  .bbg-main-title {
    font-size: 27px;
  }

  .bbg-single-content {
    padding: 16px;
    font-size: 16px;
  }
}

/* Keep full card area clickable */
.bbg-main-content,
.bbg-card-content,
.bbg-list-item > div,
.bbg-related-item .bbg-card-content {
  pointer-events: none;
}

/* Desktop optimization pass */
@media (min-width: 1200px) {
  .bbg-shell {
    max-width: 1440px;
    padding: 26px 26px 48px;
  }

  .bbg-grid {
    grid-template-columns: minmax(0, 2fr) minmax(340px, 0.9fr);
    gap: 24px;
  }

  .bbg-main-content {
    padding: 24px 26px 26px;
  }

  .bbg-main-title {
    font-size: clamp(36px, 3.1vw, 52px);
  }

  .bbg-main-excerpt {
    font-size: 18px;
  }

  .bbg-card-title {
    font-size: 22px;
  }

  .bbg-side-column {
    gap: 16px;
    align-self: start;
    position: sticky;
    top: 24px;
  }

  .bbg-list-item {
    padding: 16px 18px;
  }

  .bbg-list-item h3 {
    font-size: 18px;
  }
}

@media (min-width: 1360px) {
  .bbg-single-wrap {
    grid-template-columns: minmax(0, 2.15fr) minmax(340px, 0.85fr);
    gap: 26px;
  }

  .bbg-single-content {
    font-size: 19px;
    padding: 30px;
  }

  .bbg-related-grid {
    gap: 16px;
  }

  .bbg-related-item .bbg-card-title {
    font-size: 16px;
  }
}

/* Desktop optimization v2 */
@media (min-width: 1200px) {
  .ast-container,
  .site-content > .ast-container,
  .ast-separate-container #content .ast-container {
    max-width: 1500px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .ast-builder-grid-row-container-inner,
  .site-primary-footer-wrap .ast-builder-grid-row-container-inner {
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
  }

  .bbg-shell {
    max-width: 1500px;
    padding: 28px 24px 52px;
  }

  .bbg-market-strip {
    gap: 14px;
  }

  .bbg-latest-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
  }

  .bbg-card-media,
  .bbg-related-item .bbg-card-media {
    aspect-ratio: 16/9;
  }

  .bbg-main-title {
    letter-spacing: -0.02em;
  }

  .bbg-main-excerpt {
    max-width: 72ch;
  }

  .bbg-card-content {
    padding: 14px;
  }

  .bbg-side-card,
  .bbg-sidebar {
    padding: 18px;
  }

  .bbg-list-item {
    min-height: 88px;
    display: flex;
    align-items: center;
  }

  .bbg-list-item h3 {
    font-size: 19px;
    line-height: 1.35;
  }

  .bbg-single-content {
    font-size: 19px;
    line-height: 1.95;
  }
}

@media (min-width: 1536px) {
  .bbg-shell,
  .ast-container,
  .site-content > .ast-container,
  .ast-builder-grid-row-container-inner {
    max-width: 1580px;
  }

  .bbg-grid {
    grid-template-columns: minmax(0, 2.1fr) minmax(360px, 0.85fr);
    gap: 28px;
  }

  .bbg-main-title {
    font-size: clamp(42px, 3vw, 56px);
  }
}
