/*
Theme Name: ServersRack
Theme URI: https://serversrack.com
Author: ServersRack
Description: Official ServersRack blog theme.
Version: 1.1
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #0C1022;
  --bg-card: #131929;
  --red: #E5342A;
  --red-hover: #CC2D24;
  --white: #FFFFFF;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --border: rgba(255,255,255,0.08);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--gray-400); font-family: var(--font); font-size: 15px; line-height: 1.7; -webkit-font-smoothing: antialiased; }

a { color: inherit; text-decoration: none; }

/* ── Navbar ── */
.sr-nav { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: 1px solid var(--border); }
.sr-nav-inner { max-width: 1280px; width: 100%; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 16px; height: 60px; }
.sr-logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--white); white-space: nowrap; flex-shrink: 0; }
.sr-nav-links { display: flex; align-items: center; gap: 2px; }
.sr-nav-links a { color: var(--gray-400); font-size: 13.5px; font-weight: 500; transition: color .2s; padding: 6px 10px; border-radius: 6px; white-space: nowrap; }
.sr-nav-links a:hover { color: var(--white); }
.sr-nav-active { color: var(--white) !important; }
.sr-nav-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; margin-left: auto; }
.sr-btn-ghost { color: var(--gray-300); font-size: 13.5px; font-weight: 500; transition: color .2s; white-space: nowrap; }
.sr-btn-ghost:hover { color: var(--white); }
.sr-btn-red { background: var(--red); color: var(--white); font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 6px; transition: background .2s; white-space: nowrap; }
.sr-btn-red:hover { background: var(--red-hover); }

/* Why us? pulsing button */
.sr-why-us { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; border: 1.5px solid rgba(229,52,42,0.6); color: #E5342A; font-size: 13.5px; font-weight: 700; background: rgba(229,52,42,0.1); white-space: nowrap; transition: all .2s; animation: whyus-pulse 2.4s ease-in-out infinite; flex-shrink: 0; }
.sr-why-us:hover { background: rgba(229,52,42,0.2); border-color: #E5342A; }
@keyframes whyus-pulse {
  0%, 100% { box-shadow: none; }
  50% { box-shadow: 0 0 16px rgba(229,52,42,0.6), 0 0 32px rgba(229,52,42,0.25); }
}

/* Hamburger button */
.sr-hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; background: none; border: none; cursor: pointer; padding: 4px; flex-shrink: 0; margin-left: auto; }
.sr-hamburger span { display: block; width: 100%; height: 2px; background: #9CA3AF; border-radius: 2px; transition: all .22s; }
.sr-ham-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: var(--white); }
.sr-ham-open span:nth-child(2) { opacity: 0; }
.sr-ham-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: var(--white); }

/* Mobile menu */
.sr-mobile-menu { display: none; background: var(--bg); }
.sr-mobile-menu.sr-mobile-open { display: block; }
.sr-mobile-links { display: flex; flex-direction: column; padding: 4px 20px 0; }
.sr-mobile-links a { display: flex; align-items: center; gap: 8px; padding: 13px 4px; font-size: 14px; font-weight: 500; color: var(--gray-300); border-bottom: 1px solid rgba(255,255,255,0.05); transition: color .2s; }
.sr-mobile-links a:last-child { border-bottom: none; }
.sr-mobile-links a:hover { color: var(--white); }
.sr-mobile-why { color: #E5342A !important; font-weight: 700 !important; }
.sr-mobile-actions { display: flex; flex-direction: column; gap: 8px; padding: 12px 20px 18px; border-top: 1px solid rgba(255,255,255,0.06); margin-top: 4px; }
.sr-mobile-actions .sr-btn-ghost { padding: 10px 4px; }
.sr-mobile-actions .sr-btn-red { text-align: center; padding: 11px 18px; font-size: 14px; }

/* ── Layout ── */
.sr-main { min-height: calc(100vh - 60px - 280px); padding: 64px 0 80px; }
.sr-container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }
.sr-single-wrap { max-width: 760px; }

/* ── Page header ── */
.sr-page-header { text-align: center; margin-bottom: 56px; }
.sr-label { display: inline-block; color: var(--red); font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; border: 1px solid rgba(229,52,42,.35); background: rgba(229,52,42,.08); padding: 5px 14px; border-radius: 100px; margin-bottom: 16px; }
.sr-page-header h1 { color: var(--white); font-size: clamp(32px,5vw,52px); font-weight: 900; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 14px; }
.sr-page-header p { color: var(--gray-500); font-size: 16px; max-width: 520px; margin: 0 auto; }

/* ── Post grid ── */
.sr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap: 24px; }
.sr-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.sr-card:hover { border-color: rgba(255,255,255,.15); transform: translateY(-2px); }
.sr-card-img { display: block; aspect-ratio: 16/9; overflow: hidden; }
.sr-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.sr-card:hover .sr-card-img img { transform: scale(1.03); }
.sr-card-body { padding: 24px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.sr-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 11px; color: var(--gray-500); }
.sr-card-cat a { color: var(--red); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; }
.sr-card h2 { font-size: 18px; font-weight: 700; color: var(--white); line-height: 1.35; letter-spacing: -.01em; }
.sr-card h2 a:hover { color: var(--red); }
.sr-card p { color: var(--gray-500); font-size: 13px; line-height: 1.65; flex: 1; }
.sr-read-more { color: var(--red); font-size: 13px; font-weight: 600; margin-top: auto; transition: opacity .2s; }
.sr-read-more:hover { opacity: .8; }

/* ── Single post ── */
.sr-breadcrumb { margin-bottom: 32px; }
.sr-breadcrumb a { color: var(--gray-500); font-size: 13px; transition: color .2s; }
.sr-breadcrumb a:hover { color: var(--red); }
.sr-single-header { margin-bottom: 40px; }
.sr-single-header h1 { color: var(--white); font-size: clamp(26px,4vw,44px); font-weight: 900; letter-spacing: -.03em; line-height: 1.15; margin: 16px 0 24px; }
.sr-single-thumb { border-radius: 12px; overflow: hidden; margin-top: 32px; }
.sr-single-thumb img { width: 100%; height: auto; display: block; }
.sr-content { color: var(--gray-400); font-size: 16px; line-height: 1.8; }
.sr-content h1,.sr-content h2,.sr-content h3,.sr-content h4 { color: var(--white); font-weight: 700; letter-spacing: -.02em; margin: 2em 0 .75em; line-height: 1.3; }
.sr-content h2 { font-size: 1.5em; }
.sr-content h3 { font-size: 1.25em; }
.sr-content p { margin: 0 0 1.4em; }
.sr-content a { color: var(--red); text-decoration: underline; text-underline-offset: 3px; }
.sr-content ul,.sr-content ol { margin: 0 0 1.4em 1.5em; }
.sr-content li { margin-bottom: .4em; }
.sr-content img { max-width: 100%; border-radius: 8px; margin: 1.5em 0; }
.sr-content blockquote { border-left: 3px solid var(--red); margin: 2em 0; padding: .75em 1.25em; color: var(--gray-300); font-style: italic; background: rgba(229,52,42,.06); border-radius: 0 8px 8px 0; }
.sr-content pre { background: #0a0f1e; border: 1px solid var(--border); border-radius: 8px; padding: 20px; overflow-x: auto; font-size: 13px; margin: 1.5em 0; }
.sr-content code { background: rgba(255,255,255,.06); padding: 2px 6px; border-radius: 4px; font-size: .9em; }
.sr-content pre code { background: none; padding: 0; }
.sr-post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); font-size: 13px; }
.sr-post-nav a { color: var(--gray-400); transition: color .2s; max-width: 45%; }
.sr-post-nav a:hover { color: var(--white); }

/* ── Pagination ── */
.sr-pagination { margin-top: 48px; }
.sr-pagination .nav-links { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.sr-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--gray-400); border: 1px solid var(--border); transition: all .2s; }
.sr-pagination .page-numbers:hover { border-color: var(--red); color: var(--red); }
.sr-pagination .page-numbers.current { background: var(--red); color: var(--white); border-color: var(--red); }

/* ── Footer ── */
.sr-footer { background: var(--bg); border-top: 1px solid var(--border); padding: 56px 0 0; }
.sr-footer-inner { max-width: 1200px; margin: 0 auto; padding: 0 24px 48px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.sr-footer-brand .sr-logo { margin-bottom: 14px; }
.sr-footer-brand p { color: var(--gray-500); font-size: 13px; line-height: 1.65; max-width: 280px; }
.sr-footer-cols { display: grid; grid-template-columns: repeat(3,1fr); gap: 32px; }
.sr-footer-cols h4 { color: var(--white); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; margin-bottom: 14px; }
.sr-footer-cols a { display: block; color: var(--gray-500); font-size: 13px; margin-bottom: 8px; transition: color .2s; }
.sr-footer-cols a:hover { color: var(--white); }
.sr-footer-bottom { border-top: 1px solid var(--border); padding: 18px 24px; max-width: 1200px; margin: 0 auto; font-size: 12px; color: var(--gray-500); }

/* ── 404 ── */
.sr-404 { text-align: center; padding: 80px 0; }
.sr-404 h1 { color: var(--red); font-size: 96px; font-weight: 900; line-height: 1; margin-bottom: 16px; }
.sr-404 p { color: var(--gray-500); font-size: 16px; margin-bottom: 32px; }

/* ── Empty ── */
.sr-empty { text-align: center; padding: 64px 0; color: var(--gray-500); }

/* ── Mobile ── */
@media (max-width: 768px) {
  .sr-nav-links { display: none; }
  .sr-why-us { display: none; }
  .sr-nav-right { display: none; }
  .sr-hamburger { display: flex; }
  .sr-grid { grid-template-columns: 1fr; }
  .sr-footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .sr-footer-cols { grid-template-columns: repeat(2,1fr); }
}
