/*
Theme Name: Rays Blogs
Theme URI: https://blogs.raystechserv.com/
Author: Rays TechServ
Description: A clean, accessible employee blog with a shared corporate layout.
Version: 1.1.2
Requires at least: 6.6
Text Domain: rays-journal
*/

:root {
  --ink: #172947;
  --muted: #5b6980;
  --blue: #0a2472;
  --blue-hover: #1945a3;
  --line: #dce4f1;
  --paper: #f7f9fd;
  --white: #fff;
  --footer: #081b51;
  --footer-muted: #c2d0ec;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.65 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
img, video, iframe { max-width: 100%; }
img, video { height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--blue-hover); }
a, button { transition: color .2s ease, background-color .2s ease, transform .2s ease; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--blue-hover);
  outline-offset: 3px;
}
.container { width: min(1180px, calc(100% - 44px)); margin-inline: auto; }
.screen-reader-text { position: absolute; left: -9999px; }
.screen-reader-text:focus {
  left: 12px;
  top: 12px;
  z-index: 100;
  background: var(--white);
  padding: 10px;
}

/* Header: keep the custom logo and Rays Blogs title, without a duplicate home button. */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); }
.header-inner {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header-logo { display: flex; align-items: center; min-width: 0; }
.header-logo .custom-logo-link, .header-logo .logo-fallback {
  display: inline-flex;
  align-items: center;
  flex: none;
}
.header-logo .custom-logo {
  display: block;
  width: auto;
  max-width: 150px;
  max-height: 58px;
  object-fit: contain;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 850;
}
.header-brand { display: flex; flex-direction: column; align-items: flex-end; min-width: 0; text-align: right; }
.site-title { color: var(--ink); font-size: 1.5rem; font-weight: 800; line-height: 1.15; letter-spacing: -.035em; }

.eyebrow {
  color: var(--blue);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.hero {
  position: relative;
  overflow: hidden;
  padding: 85px 0 66px;
  border-bottom: 1px solid var(--line);
  background: radial-gradient(circle at 80% 10%, #dce8fb 0, transparent 30%),
    linear-gradient(125deg, #edf3fd, #f9fbff 70%);
}
.hero::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -190px;
  width: 510px;
  height: 510px;
  border: 90px solid #e0eaf9;
  border-radius: 50%;
  opacity: .7;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero h1 {
  max-width: 800px;
  margin: 14px 0 20px;
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  line-height: 1.05;
  letter-spacing: -.07em;
}
.hero p { max-width: 650px; margin: 0; color: var(--muted); font-size: 1.14rem; }
.hero-meta { display: flex; align-items: center; gap: 14px; margin-top: 32px; color: var(--blue); font-size: .85rem; font-weight: 700; }
.hero-dot { width: 8px; height: 8px; flex: none; border-radius: 50%; background: var(--blue); }

.posts-section { padding: 72px 0 95px; }
.section-top { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.section-top h2 { margin: 7px 0 0; font-size: 2rem; line-height: 1.1; letter-spacing: -.045em; }
.section-top p { margin: 0; color: var(--muted); font-size: .9rem; }
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.post-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--white);
  box-shadow: 0 10px 24px #0a24720a;
  transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); box-shadow: 0 18px 38px #0a247219; }
.card-media { position: relative; display: block; overflow: hidden; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #e7effc, #d7e4f7); }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.post-card:hover .card-media img { transform: scale(1.04); }
.card-media.no-image::before { content: "R"; position: absolute; right: 22px; bottom: -16px; color: #88a8df; font-size: 7rem; font-weight: 900; line-height: 1; opacity: .5; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 24px 25px 26px; }
.card-date { color: var(--blue); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card-body h3 { margin: 10px 0; font-size: 1.38rem; line-height: 1.24; letter-spacing: -.035em; overflow-wrap: anywhere; }
.card-body p { margin: 0 0 24px; color: var(--muted); font-size: .92rem; line-height: 1.58; overflow-wrap: anywhere; }
.card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 18px; border-top: 1px solid var(--line); font-size: .83rem; font-weight: 700; }
.card-footer .read { color: var(--blue); white-space: nowrap; }
.card-footer .read:hover { color: var(--blue-hover); }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }
.pagination .page-numbers { padding: 9px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); }
.pagination .current { border-color: var(--blue); background: var(--blue); color: var(--white); }
.empty { padding: 70px 24px; border: 1px solid var(--line); border-radius: 16px; background: var(--white); color: var(--muted); text-align: center; }
.empty h3 { margin-bottom: 5px; color: var(--ink); font-size: 1.5rem; }
.empty a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* Article pages and author-supplied Markdown content. */
.article-head { padding: 66px 0 42px; text-align: center; }
.article-head .container { max-width: 900px; }
.article-head h1 { margin: 14px 0 18px; font-size: clamp(2.35rem, 5vw, 4.8rem); line-height: 1.1; letter-spacing: -.06em; overflow-wrap: anywhere; }
.article-back { display: inline-flex; margin-bottom: 26px; color: var(--blue); font-size: .9rem; font-weight: 700; }
.article-back:hover { color: var(--blue-hover); text-decoration: underline; text-underline-offset: 3px; }
.article-meta { margin-top: 24px; color: var(--muted); font-size: .87rem; }
.article-meta strong { color: var(--ink); }
.article-image { max-width: 1100px; margin: 0 auto 38px; padding: 0 22px; }
.article-image img { display: block; width: 100%; max-height: 540px; border-radius: 15px; object-fit: cover; }
.article-content { max-width: 790px; margin: 0 auto 92px; padding: 0 22px; font-size: 1.075rem; line-height: 1.85; overflow-wrap: anywhere; }
.article-content > :first-child { margin-top: 0; }
.article-content h2, .article-content h3 { margin-top: 2em; line-height: 1.25; letter-spacing: -.035em; }
.article-content p { margin: 1.15em 0; }
.article-content a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }
.article-content a:hover { color: var(--blue-hover); }
.article-content ul, .article-content ol { margin: 1.2em 0; padding-left: 1.6em; }
.article-content li { margin: .35em 0; }
.article-content figure { max-width: 100%; margin: 2rem 0; }
.article-content figcaption { margin-top: .5rem; color: var(--muted); font-size: .85rem; text-align: center; }
.article-content img, .article-content video { max-width: 100%; height: auto; border-radius: 10px; }
.article-content blockquote { margin: 2rem 0; padding-left: 24px; border-left: 4px solid var(--blue); color: var(--muted); }
.article-content hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
.article-content pre { max-width: 100%; overflow-x: auto; padding: 1.25em; border-radius: 10px; background: var(--footer); color: #edf3ff; line-height: 1.5; }
.article-content pre code { padding: 0; background: transparent; color: inherit; }
.article-content :not(pre) > code { padding: .15em .4em; border-radius: 5px; background: #e7eefb; font-size: .9em; }
.article-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.article-content th, .article-content td { padding: .5rem .75rem; border: 1px solid var(--line); text-align: left; }
.article-content .wp-block-image img { height: auto; }

.site-footer { padding: 42px 0; background: var(--footer); color: #eff4ff; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: .85rem; }
.footer-note { color: var(--footer-muted); }
.site-footer a { text-decoration: underline; text-underline-offset: 3px; }
.site-footer a:hover { color: #a9c8ff; }

@media (max-width: 900px) {
  .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding: 64px 0; }
}
@media (max-width: 620px) {
  .container { width: min(100% - 28px, 1180px); }
  .header-inner { min-height: 70px; gap: 12px; }
  .header-logo .custom-logo { max-width: 90px; max-height: 45px; }
  .site-title { font-size: 1.2rem; }
  .posts-grid { grid-template-columns: 1fr; }
  .hero { padding: 54px 0; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 4rem); }
  .hero::after { right: -260px; opacity: .45; }
  .posts-section { padding: 49px 0 70px; }
  .section-top { align-items: flex-start; flex-direction: column; gap: 4px; }
  .article-head { padding: 42px 0 28px; }
  .article-head h1 { font-size: clamp(2.2rem, 10vw, 3.5rem); }
  .footer-inner { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 360px) {
  .header-logo .custom-logo { max-width: 74px; }
  .site-title { font-size: 1.05rem; }
  .card-body { padding: 20px; }
  .article-content { font-size: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  a, button, .post-card, .card-media img { transition: none; }
}
