/* ==========================================================================
   Talentoro Blog Theme — Aligned to test.talentoro.com portal
   ========================================================================== */

/* --- Design Tokens (matched to portal) --- */
:root {
  --primary: #0f57f9;
  --primary-darker: color-mix(in srgb, var(--primary), #000 15%);
  --primary-darkest: #002162;
  --primary-lighter: color-mix(in srgb, var(--primary), #fff 85%);
  --primary-lightest: #f5f8ff;
  --secondary: #2d3e50;
  --secondary-lighter: color-mix(in srgb, var(--secondary), #fff 85%);
  --tertiary: #ffc72e;
  --tertiary-light: rgba(255, 199, 46, 0.1);
  --surface: #f5f5f5;
  --surface-darker: color-mix(in srgb, var(--surface), #000 15%);
  --danger: #ed3d2f;
  --success: #2dd881;
  --text: #2d3e50;
  --muted: #64666c;
  --light-text: #64666c;
  --background: #fff;
  --border: #e5e5e5;
  --placeholder: #b1b1b1;
  --radius: 8px;
  --shadow: 0 .125rem .25rem rgba(0, 0, 0, .075);
  --container: 1280px;
}

/* --- Reset & Base --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 14px; }
@media (max-width: 960px) { html { font-size: 13px; } }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  color: var(--text);
  background: var(--background);
  line-height: 1.5;
  font-size: 1rem;
  font-weight: 400;
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--primary); }
b, strong { font-weight: 700; }

.container {
  width: min(calc(100% - 48px), var(--container));
  margin: 0 auto;
}
.site-main { overflow: clip; }

/* ==========================================================================
   HEADER — matches portal navbar
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo — SVG brand mark (matches portal) */
.brand-mark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark:hover { opacity: 0.85; }
.brand-logo {
  width: 140px;
  height: auto;
}
.footer-brand-mark .brand-logo {
  width: 130px;
}
/* Hide old text-based brand elements if any remain */
.brand-text,
.brand-ring { display: none; }

/* Navigation */
.main-navigation ul,
.menu-fallback,
.footer-menu-fallback {
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-navigation ul,
.menu-fallback {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--text);
  font-weight: 500;
  font-size: 0.95rem;
}
.main-navigation a,
.menu-fallback a {
  transition: color 0.15s;
  padding: 4px 0;
}
.main-navigation a:hover,
.menu-fallback a:hover {
  color: var(--primary);
}
.main-navigation a.current-section,
.menu-fallback a.current-section {
  color: var(--primary);
  font-weight: 600;
}

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.header-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text);
  transition: color 0.15s;
  white-space: nowrap;
}
.header-link:hover { color: var(--primary); }
.header-link svg { flex-shrink: 0; }
.header-link.for-companies {
  color: var(--text);
}
.header-link.for-companies:hover {
  color: var(--primary);
}

/* Buttons — aligned to portal */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 6px 24px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 87, 249, 0.15);
}
.button-primary:hover {
  background: var(--primary-darker);
  color: #fff;
}
.button-outline {
  border-color: var(--primary);
  color: var(--primary);
  background: #fff;
}
.button-outline:hover {
  background: var(--primary-lightest);
  color: var(--primary);
}
.button-ghost {
  background: var(--primary-lightest);
  color: var(--primary);
}
.button-ghost:hover {
  background: var(--primary-lighter);
}

/* Mobile menu */
.menu-toggle,
.mobile-menu { display: none; }

@media (max-width: 860px) {
  .main-navigation,
  .header-link.for-companies,
  .header-actions .button-outline,
  .header-actions .button-primary { display: none; }
  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
    font-size: 1.1rem;
    cursor: pointer;
  }
  .mobile-menu {
    display: none;
    border-top: 1px solid var(--border);
    padding: 16px 24px 24px;
    background: #fff;
  }
  .mobile-menu.is-open { display: block; }
  .mobile-menu ul,
  .mobile-menu .menu-fallback {
    display: grid;
    gap: 14px;
  }
  .mobile-divider {
    height: 1px;
    background: var(--border);
    list-style: none;
    margin: 4px 0;
  }
}

/* ==========================================================================
   BLOG CONTENT AREA
   ========================================================================== */

/* Index / archive page */
.blog-index {
  padding: 48px 0 72px;
}
.blog-index .section-heading {
  margin-bottom: 40px;
}
.blog-index .section-heading h1 {
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text);
}
.blog-index .section-heading p {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* Post cards grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.post-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.post-card .card-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface);
}
.post-card .card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.post-card .card-body {
  padding: 20px;
}
.post-card .card-category {
  display: inline-block;
  background: var(--primary-lightest);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 50px;
  margin-bottom: 10px;
}
.post-card .card-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px;
  line-height: 1.3;
  color: var(--text);
}
.post-card .card-title a { color: inherit; }
.post-card .card-title a:hover { color: var(--primary); }
.post-card .card-excerpt {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card .card-meta {
  font-size: 0.82rem;
  color: var(--placeholder);
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Single post */
.single-post-header {
  padding: 40px 0 24px;
}
.single-post-header .entry-category {
  display: inline-block;
  background: var(--primary-lightest);
  color: var(--primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
}
.entry-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  margin: 0 0 12px;
  line-height: 1.15;
  color: var(--text);
}
.entry-meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 24px;
}

.entry-content {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 760px;
  margin: 0 auto;
  padding-bottom: 48px;
}
.entry-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2em 0 0.8em;
  color: var(--text);
}
.entry-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 1.8em 0 0.6em;
}
.entry-content p {
  margin: 0 0 1.2em;
}
.entry-content a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.entry-content a:hover {
  color: var(--primary-darker);
}
.entry-content img {
  border-radius: var(--radius);
  margin: 1.5em 0;
}
.entry-content ul,
.entry-content ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}
.entry-content li + li {
  margin-top: 0.4em;
}
.entry-content blockquote {
  border-left: 3px solid var(--primary);
  margin: 1.5em 0;
  padding: 0.8em 1.2em;
  background: var(--primary-lightest);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--secondary);
}

/* Pagination */
.pagination-wrapper {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 32px 0;
}
.pagination-wrapper a,
.pagination-wrapper span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-weight: 500;
  font-size: 0.9rem;
  transition: all 0.15s;
}
.pagination-wrapper a:hover {
  background: var(--primary-lightest);
  border-color: var(--primary);
  color: var(--primary);
}
.pagination-wrapper .current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ==========================================================================
   FOOTER — matches portal
   ========================================================================== */
.site-footer {
  background: var(--surface);
  padding-top: 60px;
  margin-top: 40px;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-brand-mark {
  margin-bottom: 24px;
}
.footer-follow {
  margin: 0 0 10px;
  font-size: 0.95rem;
  color: var(--text);
  font-weight: 600;
}
.social-list {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.social-list a {
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--primary);
  border: 1px solid var(--border);
  font-size: 0.9rem;
  transition: all 0.15s;
}
.social-list a:hover {
  background: var(--primary-lightest);
  border-color: var(--primary);
  color: var(--primary);
}
.social-list a svg {
  display: block;
}
.language-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--border);
  font-size: 0.9rem;
}
.flag-it {
  width: 22px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(90deg, #2fa64a 0 33%, #fff 33% 66%, #e73939 66% 100%);
  box-shadow: 0 0 0 1px rgba(0,0,0,.04) inset;
}
.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.footer-links-grid h3 {
  color: var(--primary);
  margin: 0 0 14px;
  font-size: 1rem;
  font-weight: 600;
}
.footer-links-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-links-grid li + li { margin-top: 10px; }
.footer-links-grid a {
  color: var(--text);
  font-size: 0.92rem;
  transition: color 0.15s;
}
.footer-links-grid a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 18px 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: var(--muted);
  font-size: 0.85rem;
}
.legal-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.legal-links a { color: var(--muted); }
.legal-links a:hover { color: var(--primary); }

@media (max-width: 1100px) {
  .footer-top { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .footer-links-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
  .container { width: min(calc(100% - 32px), var(--container)); }
  .posts-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   WORDPRESS SPECIFIC OVERRIDES
   ========================================================================== */

/* Remove default WP block styles that conflict */
.wp-block-button__link {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  border-radius: var(--radius);
}

/* Navigation menu (if using WP menus) */
.wp-block-navigation a { font-weight: 500; }

/* Ensure content images get rounded corners */
.wp-block-image img,
.entry-content .wp-block-image img {
  border-radius: var(--radius);
}

/* Hide the hero/landing sections on blog index if still present */
.home .hero-section,
.home .features-section,
.home .pricing-section,
.home .cta-section {
  display: none !important;
}
