/* Global custom CSS (no Tailwind build) */

/* Container helper (simple) */
.container { width: 100%; }

/* Spacing helpers used in templates */
.mx-auto { margin-left: auto; margin-right: auto; }
.p-4 { padding: 1rem; }
@media (min-width: 640px) { .sm\:p-6 { padding: 1.5rem; } }
@media (min-width: 1024px) { .lg\:p-8 { padding: 2rem; } }

/* Grid helpers for basic layouts */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }
@media (min-width: 640px) { .sm\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Flex helpers used in modal and layouts */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }

/* Sizing helpers for icons */
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.w-20 { width: 5rem; }
.h-20 { height: 5rem; }
.w-full { width: 100%; }
.h-48 { height: 12rem; }
.h-32 { height: 8rem; }

/* Visibility helpers */
.hidden { display: none; }

/* Positioning and z-index */
.fixed { position: fixed; }
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
.z-50 { z-index: 50; }

/* Borders, radius, shadows */
.border { border-width: 1px; border-style: solid; }
.border-transparent { border-color: transparent; }
.rounded { border-radius: 0.25rem; }
.rounded-full { border-radius: 9999px; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-t-xl { border-top-left-radius: 0.75rem; border-top-right-radius: 0.75rem; }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }
.shadow-md { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1); }

/* Colors (minimal set used) */
.bg-white { background-color: #ffffff; }
.bg-gray-50 { background-color: #f9fafb; }
.bg-black { background-color: #000; }
.text-gray-800 { color: #1f2937; }
.text-gray-700 { color: #374151; }
.text-gray-600 { color: #4b5563; }
.text-gray-500 { color: #6b7280; }
.text-indigo-600 { color: #4f46e5 !important; }
.text-cyan-500 { color: #06b6d4; }
.text-gray-900 { color: #111827; }
.text-white { color: #ffffff !important; }

/* Background + opacity combo used for modal overlay */
.bg-black.bg-opacity-50 { background-color: rgba(0,0,0,0.5); }

/* Typography */
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-lg { font-size: 1.125rem; line-height: 1.75rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-3xl { font-size: 1.875rem; line-height: 2.25rem; }
.text-4xl { font-size: 2.25rem; line-height: 2.5rem; }
.font-semibold { font-weight: 600; }
.font-extrabold { font-weight: 800; }
.leading-relaxed { line-height: 1.625; }
.leading-tight { line-height: 1.25; }
.text-center { text-align: center; }

/* Spacing helpers */
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }
.mb-12 { margin-bottom: 3rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-12 { margin-top: 3rem; }

/* Space between children horizontally */
.space-x-4 > :not([hidden]) ~ :not([hidden]) { margin-left: 1rem; }

/* Buttons */
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.btn { display: inline-block; padding: 0.5rem 1rem; border-radius: 0.375rem; }
.btn-primary:link,
.btn-primary:visited {
  background: #0964A0;
  color: #fff;
}
.btn-primary:hover,
.btn-primary:active,
.btn-primary:focus {
  background: #07507e;
  color: #fff;
}
.btn-outline { border: 1px solid #4f46e5; color: #4f46e5; }
.btn-outline:hover { background: #eef2ff; }

/* Width limit helper */
.max-w-md { max-width: 28rem; }

/* Modal basics */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; align-items: center; justify-content: center; z-index: 50; }
.modal-overlay.active { display: flex; }
.modal-card { background: #fff; border-radius: 0.75rem; padding: 1.5rem; max-width: 28rem; width: 100%; text-align: center; }

/* Thumbnail hover effects used */
.thumbnail-link:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.1); }

/* Remove default link underline/blue within card links */
.thumbnail-link { text-decoration: none; color: inherit; }

/* Latest insights (shared) */
.latest-insights-sidebar { background: #f9f9f9; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.insight-post { display: flex; gap: 12px; margin-bottom: 20px; text-decoration: none; color: inherit; }
.insight-post img { width: 60px; height: 60px; object-fit: cover; border-radius: 4px; }
.insight-post-content { flex: 1; } 

/* Grid/flex additions */
.flex-1 { flex: 1 1 0%; }
.block { display: block; }
.inline-block { display: inline-block; }
.overflow-hidden { overflow: hidden; }
.object-cover { object-fit: cover; }

/* Width helpers for layout */
@media (min-width: 1024px) {
  .lg\:w-1\/3 { width: 33.333333%; }
  .lg\:w-2\/3 { width: 66.666667%; }
  .lg\:flex-row { flex-direction: row; }
}

/* Padding helpers */
.p-6 { padding: 1.5rem; }
.p-8 { padding: 2rem; }

/* Typography responsive helpers */
@media (min-width: 640px) {
  .sm\:text-xl { font-size: 1.25rem; line-height: 1.75rem; }
  .sm\:text-5xl { font-size: 3rem; line-height: 1; }
}
@media (min-width: 1024px) {
  .lg\:text-6xl { font-size: 3.75rem; line-height: 1; }
}

/* Transitions and transforms */
.transition { transition-property: color, background-color, border-color, fill, stroke, opacity, box-shadow, transform, filter; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }
.transition-transform { transition-property: transform; }
.duration-300 { transition-duration: 300ms; }
.duration-200 { transition-duration: 200ms; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); }
.transform { transform: translateZ(0); }
.hover\:scale-105:hover { transform: scale(1.05); }

/* Hover helpers */
.hover\:underline:hover { text-decoration: underline; }
.bg-blue-50 { background-color: #eff6ff; }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.bg-gray-100 { background-color: #f3f4f6; }
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.hover\:bg-indigo-50:hover { background-color: #eef2ff !important; }

/* Button color helpers */
.bg-indigo-600 { background-color: #4f46e5 !important; }
.hover\:bg-indigo-700:hover { background-color: #4338ca !important; }
.border-indigo-600 { border-color: #4f46e5 !important; }

/* Cyan border hover */
.hover\:border-cyan-300:hover { border-color: #67e8f9; }

/* Vertical spacing helper */
.space-y-6 > :not([hidden]) ~ :not([hidden]) { margin-top: 1.5rem; } 

/* Keep header buttons white after visit */
.site-header a.header-btn-demo:link,
.site-header a.header-btn-demo:visited {
  color: #ffffff !important;
} 

/* Header site logo max height */
.site-logo img,
.custom-logo {
  max-height: 80px;
  height: auto;
  width: auto;
} 

/* Sponsors link color (header left of carousel) */
.logo-carousel-link:link,
.logo-carousel-link:visited {
  color: #ffffff !important;
  text-decoration: none;
  display: inline-block;
  transition: opacity 150ms ease, color 150ms ease, text-decoration-color 150ms ease, transform 150ms ease;
  will-change: transform;
}
.logo-carousel-link:hover,
.logo-carousel-link:active,
.logo-carousel-link:focus {
  color: #ffffff !important;
  text-decoration: underline;
  opacity: 0.9;
} 

/* Ensure hover wins over inline styles */
.logo-carousel-header .logo-carousel-link:hover,
.logo-carousel-header .logo-carousel-link:focus {
  text-decoration: underline !important;
  opacity: 0.9;
}

/* Lift the text on hover (either link hover or header hover) */
.logo-carousel-link:hover { transform: translateY(-2px); }
.logo-carousel-header:hover .logo-carousel-link { transform: translateY(-2px); }

/* Optional: slight header darken on hover for visual feedback */
.logo-carousel-header:hover { background: #07507e !important; }

/* Make default Gutenberg separator wide */
.wp-block-separator,
.wp-block-separator.is-style-default,
.wp-block-separator.is-style-dots {
  width: 100% !important;
  max-width: 100% !important;
} 

/* Logo carousel card background */
.logo-carousel-wrapper .sp-lcp-item {
  background-color: #ffffff;
} 

/* Left sponsors block visuals to match carousel */
.logo-carousel-header {
  background-color: #0964A0;
  border-top: 1px solid #07507e;
  border-bottom: 1px solid #07507e;
  border-left: 1px solid #07507e;
  border-right: 1px solid #07507e;
  transition: background-color 200ms ease, transform 200ms ease, box-shadow 200ms ease;
  will-change: transform;
} 

/* Align sponsor block height and edges with carousel */
.logo-carousel-row {
  display: flex;
  align-items: stretch;
}
.logo-carousel-header {
  padding: 8px 12px;
}
.logo-carousel-wrapper {
  flex: 1 1 0%;
  min-width: 0;
  border-right: 1px solid #e5e5e5;
} 

/* === Footer color overrides === */
.site-footer {
  background-color: #3A3A39;
  color: #ffffff;
}
.site-footer .top-footer,
.site-footer .bottom-footer {
  background-color: inherit;
}
.site-footer a {
  color: #e0e0e0;
}
.site-footer a:hover,
.site-footer a:focus {
  color: #ffffff;
}
.site-footer .widget-title,
.site-footer .footer-logo .site-title,
.site-footer .site-info span {
  color: #ffffff;
}
/* Add space under footer column headers */
.site-footer .widget-title { margin-bottom: 12px; }
.site-footer .social-icons a {
  color: #e0e0e0;
}
.site-footer .social-icons a:hover,
.site-footer .social-icons a:focus {
  color: #ffffff;
}

/* ===== Non-invasive homepage post card tweaks (CSS-only) ===== */
/* 1) Hide comments meta everywhere */
.entry-meta .post-comment { display: none !important; }

/* 2) Category badges (works with default the_category() links) */
.entry-cat a {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: none;
  background: #eef2ff;
  color: #1e40af;
  margin-right: 6px;
}

/* Per-category colors by URL substring (adjust slugs/colors as needed) */
.entry-cat a[href*="/category/etf-daily-flow-report/"] { background: #e6f2fb; color: #0964A0; }
.entry-cat a[href*="/category/etf-market-snapshot/"] { background: #fff7ed; color: #9a3412; }
.entry-cat a[href*="/category/sector-analysis/"] { background: #ecfeff; color: #0e7490; }
.entry-cat a[href*="/category/daily-review-and-preview/"] { background: #fef2f2; color: #991b1b; }
.entry-cat a[href*="/category/sponsored-insights/"] { background: #f1f5f9; color: #0f172a; }

/* 3) Category-specific icon squares before titles (CSS-only, no markup changes) */
.post-item-content .entry-title a { position: relative; }

/* Provide left padding when a known category is present */
.post-item-content:has(.entry-cat a[href*="/category/etf-daily-flow-report/"]) .entry-title a,
.post-item-content:has(.entry-cat a[href*="/category/etf-market-snapshot/"]) .entry-title a,
.post-item-content:has(.entry-cat a[href*="/category/sector-analysis/"]) .entry-title a,
.post-item-content:has(.entry-cat a[href*="/category/daily-review-and-preview/"]) .entry-title a,
.post-item-content:has(.entry-cat a[href*="/category/sponsored-insights/"]) .entry-title a { padding-left: 1.15em; }

.post-item-content:has(.entry-cat a[href*="/category/etf-daily-flow-report/"]) .entry-title a::before { background: #0964A0; }
.post-item-content:has(.entry-cat a[href*="/category/etf-market-snapshot/"]) .entry-title a::before { background: #9a3412; }
.post-item-content:has(.entry-cat a[href*="/category/sector-analysis/"]) .entry-title a::before { background: #0e7490; }
.post-item-content:has(.entry-cat a[href*="/category/daily-review-and-preview/"]) .entry-title a::before { background: #991b1b; }
.post-item-content:has(.entry-cat a[href*="/category/sponsored-insights/"]) .entry-title a::before { background: #0f172a; }

/* Icon square */
.post-item-content .entry-title a::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.25em;
  width: 0.75em;
  height: 0.75em;
  border-radius: 2px;
}

/* Footer social: larger icons, keep horizontal */
.site-footer .footer-social-links .menu.social-links {
  display: flex;
  flex-direction: row;
  gap: 12px;
}
.site-footer .footer-social-links .menu.social-links li { list-style: none; }
.site-footer .footer-social-links .menu.social-links a {
  font-size: 22px; /* affects font icon sizes */
  line-height: 1;
}
.site-footer .footer-social-links .menu.social-links a svg {
  width: 22px;
  height: 22px;
}
.site-footer .footer-social-links .menu.social-links a i {
  font-size: 22px; /* Font Awesome or similar */
}

/* Footer menus: remove bullets and reset padding */
.site-footer .footer-nav ul,
.site-footer .footer-links,
.site-footer .footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-footer .footer-links li {
  margin: 0 0 6px 0;
}
.site-footer .footer-links a {
  text-decoration: none;
}
.site-footer .footer-links a:hover,
.site-footer .footer-links a:focus {
  text-decoration: underline;
}

/* Footer responsive: logo full-width then 3 columns below at <=1100px */
@media (max-width: 1100px) {
  .site-footer .top-footer-widgets {
    flex-wrap: wrap !important;
  }
  .site-footer .top-footer-widgets .footer-widget:first-child {
    flex: 0 0 100% !important;
    min-width: 0 !important;
  }
  .site-footer .top-footer-widgets .footer-widget:not(:first-child) {
    /* 3 columns on one line, accounting for two 30px gaps */
    flex: 0 0 calc((100% - 60px) / 3) !important;
    min-width: 0 !important;
  }
}

/* Footer responsive: stack columns on small screens with logo first */
@media (max-width: 640px) {
  .site-footer .top-footer-widgets {
    flex-direction: column !important;
    align-items: stretch !important;
  }
  .site-footer .top-footer-widgets .footer-widget {
    flex: 1 1 100% !important;
    min-width: 0 !important;
  }
  .site-footer .top-footer-widgets .footer-widget + .footer-widget {
    margin-top: 16px;
  }
  .site-footer .footer-logo img {
    max-width: 220px;
    height: auto;
  }
}

/* Page-specific: make title flush with nav on Partner With Us template */
/* Page-specific: make title flush with nav on Market Segments category template */
body.market-segments-template .site-header { margin-bottom: 0 !important; }
body.market-segments-template .site-content { margin-top: 32px !important; }

/* ===== Market Segments: Report list styles (moved from inline) ===== */
.report-item {
  display: block;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  transition: all 200ms ease-in-out;
  text-decoration: none;
}
.report-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #0964A0; /* brand blue */
}
.report-icon {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.report-icon-free { background-color: #e6f2fb; color: #0964A0; }
.report-icon-premium { background-color: #eeeeee; color: #424242; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 9999px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
}
.badge-free { background: #e6f2fb; color: #0964A0; }
.badge-premium { background: #eeeeee; color: #424242; }
.report-item .badge { text-decoration: none; }
.report-item:hover .badge { text-decoration: none; }
/* fine-tune spacing between icon, title, and badge */
.report-item .items-center { column-gap: 18px; }
.report-item .flex-1 { padding-left: 4px; }
.report-item h3 { margin-bottom: 6px; font-size: 0.9375rem; line-height: 1.3; }
/* spacing utility used by report list */
.space-y-3 > :not([hidden]) ~ :not([hidden]) { margin-top: 0.75rem; }

/* ===== Insights grid (author page) ===== */
.insights-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 640px) {
  .insights-grid { grid-template-columns: 1fr; }
}
.insight-card {
  display: block;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px;
  transition: all 200ms ease-in-out;
  text-decoration: none;
  color: inherit;
}
.insight-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  border-color: #0964A0;
}
.insight-card h4 {
  margin: 0 0 6px 0;
  font-size: 1rem;
  line-height: 1.3;
}
.insight-card p { margin: 0; color: #485865; }

/* Thumbnail in insight cards */
.insight-card .thumb {
  width: 100%;
  height: 195px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #f3f4f6;
}
.insight-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Custom bullet style for designated link lists */
.link-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.link-list li {
  position: relative;
  padding-left: 1.25em;
  margin-bottom: 8px;
}
.link-list li:last-child { margin-bottom: 0; }
.link-list li::before {
  content: "➤";
  color: #555;
  position: absolute;
  left: 0;
}

/* Link decoration behavior: no underline until hover/focus */
.link-list li a:link,
.link-list li a:visited {
  text-decoration: none;
}
.link-list li a:hover,
.link-list li a:focus {
  text-decoration: underline;
}

/* Sponsor Channel button (override to ensure hover works) */
.sponsor-section-wrapper .sponsor-channel-button {
  display: inline-block;
  background-color: #f3f4f6;
  color: #374151;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  margin-right: 24px;
  position: relative;
  z-index: 2;
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.sponsor-section-wrapper .sponsor-channel-button:hover {
  transform: translateY(-2px);
  background-color: #e5e7eb !important;
  color: #1f2937 !important;
}