/*
Theme Name: LBR Blog Theme
Theme URI: https://localbusinessranks.com
Author: Local Business Ranks
Author URI: https://localbusinessranks.com
Description: Custom WordPress theme for Local Business Ranks with modern dark design and glow effects
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: lbr-theme
*/

/* ===== CSS Variables ===== */
:root {
  --lbr-accent: #00A550;
  --lbr-accent-rgb: 0, 165, 80;
  --lbr-bg: #0b0b0b;
  --lbr-bg-dark: #000000;
  --lbr-text: #e9f0f6;
  --lbr-text-muted: #b8c0cc;
  --lbr-border: #222;
  --lbr-border-light: #2a2a2a;
  --lbr-container-w: 1100px;
  --lbr-header-offset: 84px;
  --lbr-glow-sm: 0 0 20px rgba(var(--lbr-accent-rgb), 0.3);
  --lbr-glow-md: 0 0 40px rgba(var(--lbr-accent-rgb), 0.4);
  --lbr-glow-lg: 0 0 60px rgba(var(--lbr-accent-rgb), 0.5);
}

/* ===== Global Resets & Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--lbr-bg) !important;
  color: var(--lbr-text) !important;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ===== Global Background with Glow Effect ===== */
body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 50% 50%,
    rgba(var(--lbr-accent-rgb), 0.08) 0%,
    transparent 50%
  );
  pointer-events: none;
  z-index: 0;
  animation: pulse 15s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* ===== WordPress Core Alignments ===== */
.alignnone {
  margin: 0;
}

.aligncenter {
  display: block;
  margin: 0 auto;
}

.alignleft {
  float: left;
  margin: 0 20px 20px 0;
}

.alignright {
  float: right;
  margin: 0 0 20px 20px;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  color: #fff;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(32px, 5vw, 48px);
}

h2 {
  font-size: clamp(28px, 4vw, 38px);
}

h3 {
  font-size: clamp(24px, 3vw, 32px);
}

h4 {
  font-size: clamp(20px, 2.5vw, 26px);
}

p {
  margin-bottom: 1.2em;
  color: var(--lbr-text);
}

a {
  color: var(--lbr-accent);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  opacity: 0.8;
}

/* ===== Utility Classes ===== */
.container {
  max-width: var(--lbr-container-w);
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.glow-accent {
  box-shadow: var(--lbr-glow-sm);
}

.glow-accent-md {
  box-shadow: var(--lbr-glow-md);
}

.glow-accent-lg {
  box-shadow: var(--lbr-glow-lg);
}

/* ===== Card Components with Glow ===== */
.lbr-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lbr-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.lbr-card::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 20px;
  z-index: -1;
  background: radial-gradient(
    60% 60% at 50% 50%,
    rgba(var(--lbr-accent-rgb), 0.18) 0%,
    rgba(var(--lbr-accent-rgb), 0.08) 55%,
    transparent 75%
  );
  filter: blur(16px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lbr-card:hover::before {
  opacity: 1;
}

.lbr-card:hover {
  transform: translateY(-4px);
  border-color: var(--lbr-border-light);
  box-shadow: var(--lbr-glow-sm);
}

/* ===== Buttons ===== */
.lbr-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--lbr-accent);
  color: #000;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  font-size: 16px;
}

.lbr-btn:hover {
  background: #00bb5c;
  box-shadow: var(--lbr-glow-md);
  transform: translateY(-2px);
  color: #000;
  opacity: 1;
}

.lbr-btn--outline {
  background: transparent;
  border: 2px solid var(--lbr-accent);
  color: var(--lbr-accent);
}

.lbr-btn--outline:hover {
  background: var(--lbr-accent);
  color: #000;
}

/* ===== Forms ===== */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="search"],
textarea,
select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lbr-border-light);
  border-radius: 8px;
  color: var(--lbr-text);
  font-size: 16px;
  transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--lbr-accent);
  box-shadow: var(--lbr-glow-sm);
}

/* ===== WordPress Content Styles ===== */
.wp-block-image img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.wp-block-quote {
  border-left: 4px solid var(--lbr-accent);
  padding: 20px 24px;
  margin: 32px 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  font-style: italic;
  color: var(--lbr-text-muted);
}

.wp-block-code {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lbr-border);
  border-radius: 8px;
  padding: 20px;
  color: var(--lbr-text);
  font-family: 'Courier New', monospace;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  :root {
    --lbr-header-offset: 60px;
  }
  
  body {
    font-size: 14px;
  }
}

/* ===== WordPress Admin Bar Fix ===== */
body.admin-bar {
  --lbr-header-offset: 116px;
}

@media screen and (max-width: 782px) {
  body.admin-bar {
    --lbr-header-offset: 106px;
  }
}

@media screen and (max-width: 600px) {
  body.admin-bar {
    --lbr-header-offset: 60px;
  }
}

/* ===== Blog Listing Styles ===== */
.lbr-blog {
  max-width: var(--lbr-container-w);
  margin: 0 auto;
  padding: calc(var(--lbr-header-offset) + 40px) 20px 60px;
}

.lbr-blog__header {
  text-align: center;
  margin-bottom: 50px;
}

.lbr-blog__kicker {
  color: var(--lbr-accent);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 12px;
  font-weight: 600;
}

.lbr-blog__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #fff !important;
  margin: 0 0 12px;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.lbr-blog__desc {
  font-size: 18px;
  color: var(--lbr-text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* ===== Featured Post ===== */
.lbr-blog__featured {
  margin-bottom: 60px;
}

.lbr-featured-post {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lbr-border);
  border-radius: 20px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  min-height: 520px;
  text-decoration: none;
}

.lbr-featured-post:hover {
  transform: translateY(-4px);
  border-color: var(--lbr-border-light);
}

.lbr-featured-post__image {
  width: 100%;
  height: 300px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
  position: relative;
}

.lbr-featured-post__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.lbr-featured-post:hover .lbr-featured-post__image img {
  transform: scale(1.05);
}

.lbr-featured-post__content {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lbr-featured-post__meta {
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--lbr-text-muted);
}

.lbr-featured-post__category {
  color: var(--lbr-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lbr-featured-post__title {
  font-size: 28px;
  font-weight: 800;
  color: #fff !important;
  margin: 0 0 12px;
  line-height: 1.3;
}

.lbr-featured-post__excerpt {
  color: #cbd3df;
  margin: 0 0 20px;
  line-height: 1.6;
  flex: 1;
}

.lbr-featured-post__link {
  color: var(--lbr-accent);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: gap 0.2s ease;
}

.lbr-featured-post:hover .lbr-featured-post__link {
  gap: 12px;
}

/* ===== Blog Grid ===== */
.lbr-blog__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
  margin-bottom: 50px;
}

.lbr-blog-card {
  position: relative;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lbr-border);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
}

.lbr-blog-card::before {
  content: "";
  position: absolute;
  inset: -14px;
  border-radius: 20px;
  z-index: -1;
  background: radial-gradient(
    60% 60% at 50% 50%,
    rgba(var(--lbr-accent-rgb), 0.18) 0%,
    rgba(var(--lbr-accent-rgb), 0.08) 55%,
    transparent 75%
  );
  filter: blur(16px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lbr-blog-card:hover::before {
  opacity: 1;
}

.lbr-blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--lbr-border-light);
}

.lbr-blog-card__image {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.lbr-blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.lbr-blog-card:hover .lbr-blog-card__image img {
  transform: scale(1.05);
}

.lbr-blog-card__content {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lbr-blog-card__meta {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--lbr-text-muted);
}

.lbr-blog-card__category {
  color: var(--lbr-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lbr-blog-card__title {
  font-size: 20px;
  font-weight: 800;
  color: #fff !important;
  margin: 0 0 10px;
  line-height: 1.3;
}

.lbr-blog-card__excerpt {
  color: #cbd3df;
  margin: 0 0 16px;
  font-size: 15px;
  line-height: 1.5;
  flex: 1;
}

.lbr-blog-card__link {
  color: var(--lbr-accent);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s ease;
}

.lbr-blog-card:hover .lbr-blog-card__link {
  gap: 10px;
}

/* ===== Pagination ===== */
.lbr-blog__pagination {
  text-align: center;
  margin-top: 50px;
}

.lbr-pagination,
.navigation.pagination {
  display: inline-flex;
  gap: 10px;
  align-items: center;
}

.lbr-pagination a,
.lbr-pagination span,
.navigation.pagination a,
.navigation.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lbr-border-light);
  border-radius: 12px;
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lbr-pagination a:hover,
.navigation.pagination a:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #3a3a3a;
  transform: translateY(-1px);
}

.lbr-pagination .current,
.navigation.pagination .current {
  background: var(--lbr-accent);
  border-color: var(--lbr-accent);
  color: #000;
}

/* ===== Empty State ===== */
.lbr-blog__empty {
  text-align: center;
  padding: 60px 20px;
}

.lbr-blog__empty h2 {
  color: #fff;
  font-size: 24px;
  margin-bottom: 12px;
}

.lbr-blog__empty p {
  color: var(--lbr-text-muted);
  font-size: 16px;
}

/* ===== Single Post Styles ===== */
.lbr-single {
  max-width: 800px;
  margin: 0 auto;
  padding: calc(var(--lbr-header-offset) + 40px) 20px 60px;
}

.lbr-single__header {
  margin-bottom: 40px;
}

.lbr-single__meta {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 20px;
  font-size: 14px;
  color: var(--lbr-text-muted);
}

.lbr-single__category {
  color: var(--lbr-accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

.lbr-single__category:hover {
  opacity: 0.8;
}

.lbr-single__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #fff !important;
  line-height: 1.2;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}

.lbr-single__excerpt {
  font-size: 20px;
  color: var(--lbr-text-muted);
  line-height: 1.6;
  margin-bottom: 30px;
}

.lbr-single__featured {
  width: 100%;
  max-height: 500px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.lbr-single__featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lbr-single__content {
  color: var(--lbr-text);
  font-size: 18px;
  line-height: 1.8;
}

.lbr-single__content p {
  margin-bottom: 24px;
}

.lbr-single__content h2 {
  font-size: 32px;
  font-weight: 800;
  color: #fff !important;
  margin: 48px 0 20px;
  line-height: 1.3;
}

.lbr-single__content h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff !important;
  margin: 36px 0 16px;
  line-height: 1.4;
}

.lbr-single__content h4 {
  font-size: 20px;
  font-weight: 700;
  color: #fff !important;
  margin: 28px 0 12px;
}

.lbr-single__content ul,
.lbr-single__content ol {
  margin-bottom: 24px;
  padding-left: 28px;
}

.lbr-single__content li {
  margin-bottom: 12px;
  line-height: 1.7;
}

.lbr-single__content a {
  color: var(--lbr-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 165, 80, 0.3);
  transition: border-color 0.2s ease;
}

.lbr-single__content a:hover {
  border-bottom-color: var(--lbr-accent);
}

.lbr-single__content blockquote {
  border-left: 4px solid var(--lbr-accent);
  padding: 20px 24px;
  margin: 32px 0;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 8px;
  font-style: italic;
  color: var(--lbr-text-muted);
}

.lbr-single__content img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 32px 0;
}

.lbr-single__content code {
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
  font-size: 16px;
  color: var(--lbr-accent);
}

.lbr-single__content pre {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lbr-border);
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
  overflow-x: auto;
}

.lbr-single__content pre code {
  background: none;
  padding: 0;
  color: var(--lbr-text);
}

.lbr-single__footer {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--lbr-border);
}

.lbr-single__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 40px;
}

.lbr-single__tag {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lbr-border-light);
  border-radius: 20px;
  color: var(--lbr-text-muted);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.2s ease;
}

.lbr-single__tag:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #3a3a3a;
  color: var(--lbr-accent);
}

.lbr-single__navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 40px;
}

.lbr-single__nav-link {
  display: block;
  padding: 20px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--lbr-border);
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.lbr-single__nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--lbr-border-light);
  transform: translateY(-2px);
}

.lbr-single__nav-label {
  display: block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lbr-text-muted);
  margin-bottom: 8px;
}

.lbr-single__nav-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
}

.lbr-single__nav-link--next {
  text-align: right;
}

.lbr-single__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--lbr-border-light);
  border-radius: 8px;
  color: var(--lbr-text);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.lbr-single__back:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: #3a3a3a;
  transform: translateY(-1px);
}

/* ===== Page Styles ===== */
.lbr-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: calc(var(--lbr-header-offset) + 40px) 20px 60px;
}

.lbr-page__header {
  text-align: center;
  margin-bottom: 40px;
}

.lbr-page__title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #fff !important;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lbr-page__featured {
  width: 100%;
  max-height: 500px;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 40px;
  background: linear-gradient(135deg, #1a1a1a 0%, #0d0d0d 100%);
}

.lbr-page__featured img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lbr-page__content {
  color: var(--lbr-text);
  font-size: 18px;
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
}

.lbr-page__content p {
  margin-bottom: 24px;
}

.lbr-page__content h2 {
  font-size: 32px;
  font-weight: 800;
  color: #fff !important;
  margin: 48px 0 20px;
  line-height: 1.3;
}

.lbr-page__content h3 {
  font-size: 24px;
  font-weight: 700;
  color: #fff !important;
  margin: 36px 0 16px;
  line-height: 1.4;
}

/* ===== Front Page ===== */
.lbr-frontpage {
  min-height: 60vh;
}

/* ===== 404 Page ===== */
.lbr-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--lbr-header-offset) + 40px) 20px 60px;
}

.lbr-404__content {
  text-align: center;
  max-width: 600px;
}

.lbr-404__title {
  font-size: clamp(80px, 15vw, 140px);
  font-weight: 900;
  color: var(--lbr-accent);
  line-height: 1;
  margin-bottom: 20px;
  text-shadow: var(--lbr-glow-lg);
}

.lbr-404__subtitle {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 16px;
}

.lbr-404__text {
  font-size: 18px;
  color: var(--lbr-text-muted);
  margin-bottom: 32px;
  line-height: 1.6;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
  .lbr-blog,
  .lbr-single,
  .lbr-page {
    padding-top: calc(var(--lbr-header-offset) + 20px);
  }
  
  .lbr-blog__header {
    margin-bottom: 30px;
  }
  
  .lbr-blog__grid {
    grid-template-columns: 1fr;
  }
  
  .lbr-featured-post {
    min-height: auto;
  }
  
  .lbr-featured-post__image {
    height: 220px;
  }
  
  .lbr-featured-post__content {
    padding: 20px;
  }
  
  .lbr-featured-post__title {
    font-size: 22px;
  }
  
  .lbr-single__title,
  .lbr-page__title {
    font-size: 28px;
  }
  
  .lbr-single__excerpt {
    font-size: 18px;
  }
  
  .lbr-single__content,
  .lbr-page__content {
    font-size: 16px;
  }
  
  .lbr-single__content h2,
  .lbr-page__content h2 {
    font-size: 24px;
  }
  
  .lbr-single__content h3,
  .lbr-page__content h3 {
    font-size: 20px;
  }
  
  .lbr-single__navigation {
    grid-template-columns: 1fr;
  }
  
  .lbr-single__nav-link--next {
    text-align: left;
  }
}
