/* ========================================
   SEO Web Analyst Blog - Custom Theme
   SAFE Custom CSS for SEO Web Analyst Blog
   Overrides Bootstrap 3/5 defaults safely
   Target: entry.php single post view
   ======================================== */

/* ----------------------------------------
   1. Brand colors & global background
   ---------------------------------------- */
/* OLD FOUNDATION */
body {
  background-color: #f5f7fa;  /* Page background */
  color: #333333;             /* Default text color */
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Links */
a {
  color: #1a73e8;
}

a:hover,
a:focus {
  color: #0b56b4;
  text-decoration: none;
}

/* Old navbar color (top bar) */
.navbar {
  background-color: #1a237e !important; /* Top bar color */
}

/* Primary button color set (from old CSS) */
.btn-primary {
  background-color: #283593;  /* Primary button background */
  border-color: #283593;
}

.btn-primary:hover {
  background-color: #3949ab;  /* Primary button hover */
}

/* NOTE: Site header (header.cf) – DO NOT override background
   so the main theme keeps default (often black).
   Uncomment to control from here if you ever want.
*/
/*
header.cf {
  background-color: #000000;    // black default
  border-bottom: 1px solid #222222;
}

header.cf nav ul li a {
  color: #ffffff;
  font-weight: 500;
}
*/

/* ----------------------------------------
   2. Typography: headings & post titles
   ---------------------------------------- */

/* OLD FOUNDATION: all headings navy, Georgia */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Georgia', serif;
  color: #1a237e;  /* Heading color */
  line-height: 1.3;
}

/* BLOG NAME at top (entry.php span.page-header)
   Make this black so it is the "site H1" visually.
*/
.page-header {
  color: #000000;        /* blog name black */
}

/* Admin / other pages old behavior:
   .page-header h2 with navy + underline – keep this.
*/
.page-header h2 {
  color: #1a237e;
  border-bottom: 3px solid #283593; /* Line under page titles */
}

/* Optional: button next to page-header */
.page-header button.btn-info {
  margin-left: 10px;
}

/* MAIN POST TITLE inside the content column:
   You said you use H2 in the body as the title.
   We keep H2 size from browser (big), just nudge weight inside content.
*/
.post-content h2 {
  font-weight: 700;      /* bolder H2 in body */
}

/* We do NOT shrink h2 font-size anywhere, so it keeps
   the "big like H1 but actually H2" feeling from the old CSS.
*/

/* ----------------------------------------
   3. Cards, containers, and layout
   ---------------------------------------- */
/* OLD FOUNDATION + new bits merged */

/* Generic Bootstrap wells/panels/thumbnails */
.well {
  background-color: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
}

.thumbnail {
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Main container card */
.container {
  background-color: #fff;
  border-radius: 8px;
  padding: 20px;           /* from old CSS */
  padding-bottom: 20px;
}

/* Sidebar block headings (Author, Tags, RSS, Poll, More Posts, Social Boxes) */
.col-md-4 h4,
.col-md-4 h3 {
  color: #1a237e;
  font-weight: 600;
  margin-top: 15px;
}

/* Panel wrappers */
.panel.panel-default {
  border-radius: 6px;
  border-color: #e0e0e0;
}

.panel-body {
  padding: 10px 15px;
}

/* ----------------------------------------
   4. Post content area
   ---------------------------------------- */
/* NEW: better content structure, tables, code, etc. */

.post-content {
  max-width: 100%;
  width: 100%;
  margin: 0 auto 20px;
  box-sizing: border-box;
  line-height: 1.7;
  font-size: 15px;
}

/* Paragraph spacing */
.post-content p {
  margin-bottom: 12px;
}

/* Lists in post */
.post-content ul,
.post-content ol {
  margin-left: 20px;
  margin-bottom: 12px;
}

.post-content li {
  margin-bottom: 5px;
}

/* Tables inside posts – responsive & styled */
.post-content table {
  max-width: 100%;
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  display: block;
  overflow-x: auto;
}

.post-content th,
.post-content td {
  border: 1px solid #d0d7de;
  padding: 8px 10px;
  vertical-align: top;
}

.post-content th {
  background-color: #f1f4fb;
  font-weight: 600;
}

.post-content tr:nth-child(even) {
  background-color: #fafbff;
}

/* Inline code and code blocks in articles */
.post-content code {
  white-space: nowrap;
  overflow-x: auto;
  display: inline-block;
  max-width: 100%;
  background: #f3f4f6;
  padding: 0 3px;
  border-radius: 3px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
}

.post-content pre {
  white-space: pre-wrap;
  overflow-x: auto;
  max-width: 100%;
  width: 100%;
  margin: 0.5rem 0;
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 6px;
  font-family: Consolas, "Courier New", monospace;
}

/* ----------------------------------------
   5. Images, lightbox, and embeds
   ---------------------------------------- */
/* Images inside post body */
.post-content img,
.post-content img.post-image {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto 15px;
  border-radius: 4px;
}

/* Lightbox zoom link around images */
.post-image-zoom {
  display: block;
  cursor: zoom-in;
}

/* Image lift / hover effect (ENABLED by default) */
.post-image-zoom img {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-image-zoom:hover img {
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* OPTIONAL: disable image lift effect
   -----------------------------------
   To turn OFF the effect, REMOVE the comment markers
   around the block below. This cancels zoom + shadow.
*/
/*
.post-image-zoom img,
.post-image-zoom:hover img {
  transform: none;
  box-shadow: none;
  transition: none;
}
*/

/* Iframes (YouTube, embeds) */
iframe.embed-responsive-item,
iframe.embed-responsive-21by9 {
  width: 100%;
  border: none;
  display: block;
  overflow: hidden;
}

/* If you wrap iframes in a video wrapper, you can use: 
.video-embed { aspect-ratio: 16 / 9; width: 100%; }
.video-embed iframe { width: 100%; height: 100%; }
*/

/* ----------------------------------------
   6. Ads: header, footer, sidebar
   ---------------------------------------- */
.ad-header,
.ad-footer {
  margin: 10px 0;
  padding: 0;
}

/* Contextual ad formatting in content */
.contextual-ad {
  max-width: 100%;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
  overflow: hidden;
}

/* Global ad wrapper card */
.global-ad-wrapper {
  border: 1px solid #eeeeee;
  background: #ffffff;
  padding: 5px 10px;
  margin: 0 0 10px 0;
  font-size: 14px;
  line-height: 1.4;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.global-ad-wrapper * {
  margin-block-start: 0 !important;
  margin-block-end: 0 !important;
  box-sizing: border-box;
}

/* Sponsored label */
.sponsored-label {
  font-size: 12px;
  font-weight: bold;
  color: #888888;
  text-transform: uppercase;
}

/* Sidebar ad-rotator container (fixed size) */
.ad-rotator.side-bar {
  width: 300px;
  height: 250px;
  overflow: hidden;
  position: relative;
  margin: 0 auto 15px;
}

/* Each ad slide fills the container */
.ad-rotator.side-bar .ad-slide {
  width: 100%;
  height: 100%;
  display: none;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.ad-rotator.side-bar .ad-slide img,
.ad-rotator.side-bar .ad-slide video,
.ad-rotator.side-bar .ad-slide iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  max-width: 100%;
}

/* ----------------------------------------
   7. Sidebar: author, tags, RSS, more posts
   ---------------------------------------- */
/* Author widget thumbnail */
.col-md-4 .thumbnail {
  width: 100%;
}

/* Author image area */
.t-image {
  float: left;
  margin: 10px;
  width: 155px;
}

/* Default: circle author image */
.img-responsive.border-radius {
  border-radius: 84px;
}

/* OPTIONAL: make all author images square
   --------------------------------------
   To use this, just REMOVE the comment markers below.
*/
/*
.img-responsive.border-radius {
  border-radius: 4px;
}
*/

/* Social icons under author image */
.list-social-icons li a {
  color: #555555;
}

.list-social-icons li a:hover {
  color: #1a73e8;
}

/* Author caption text */
.col-md-4 .thumbnail .caption {
  min-height: 170px;
}

/* Tags labels in sidebar */
.label.label-warning {
  background-color: #ffb300;
}

/* RSS followers header */
.fa-rss {
  color: #ff9800;
}

/* RSS subscribe buttons (.social-btn are already styled inline in entry.php) */
.social-btn {
  display: inline-block;
  padding: 10px 16px;
  margin: 4px;
  font-size: 14px;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  text-decoration: none;
}

/* ----------------------------------------
   8. Poll, more posts, social boxes
   ---------------------------------------- */
#poll h3 {
  font-size: 16px;
  margin-bottom: 10px;
}

#poll .radio {
  min-height: 30px;
}

/* More posts: separate items */
.col-md-4 h4 .fa-list {
  color: #616161;
}

.col-md-4 .panel-body p {
  margin-bottom: 5px;
}

/* Social Boxes (Facebook page iframe) */
.title321 h3 {
  margin-top: 15px;
}

/* ----------------------------------------
   9. Alerts, messages, buttons, misc
   ---------------------------------------- */
.alert {
  border-radius: 6px;
  transition: opacity 0.5s ease;
}

.alert-info {
  background-color: #e3f2fd;
  border-color: #2196f3;
  color: #000000 !important;   /* text inside light blue alert is black */
}

.alert-warning {
  background-color: #fff3e0;
  border-color: #ff9800;
}

.alert-danger {
  background-color: #ffebee;
  border-color: #f44336;
}

/* Make links readable too, donot edit */
.alert-info a,
.alert-info a:visited {
  color: #000000 !important;
  text-decoration: underline;
}

/* Buttons (old + new merged) */
.btn {
  border-radius: 4px;
  padding: 8px 16px;
}

.btn-warning {
  background-color: #ff9800;
  border-color: #ff9800;
}

.btn-danger {
  background-color: #d32f2f;
  border-color: #d32f2f;
}

.btn-success {
  background-color: #2e7d32;
  border-color: #2e7d32;
}

/* Scroll to top button */
.scrollToTop {
  width: 80px;
  height: 80px;
  padding: 10px;
  text-align: center;
  background: whitesmoke;
  font-weight: bold;
  color: #444;
  text-decoration: none;
  position: fixed;
  bottom: 0;
  right: 0;
  display: none;
}

/* Prevent horizontal scroll */
body {
  overflow-x: hidden;
}
/* ----------------------------------------
   10. ADVANCED LAYOUT EXPERIMENTS (COMMENTED)
   ---------------------------------------- */
/*
   These are OPTIONAL tweaks users can try.
   They are commented out by default.
   To use, change selectors if needed and
   remove the comment markers.
*/

/* 
   A. Hide Disqus comments entirely (clean layout).

#disqus_thread,
#disqus_thread + noscript,
#disqus_thread + noscript + a.dsq-brlink {
  display: none !important;
}
*/

/*
   B. Hide author box in sidebar.

.col-md-4 h4 i.fa-pencil,
.col-md-4 h4 i.fa-pencil + span,
.col-md-4 h4:has(.fa-pencil),
.col-md-4 .thumbnail {
  /* This is aggressive; better to use a specific wrapper
     around the author section in entry.php if added. */
/*  display: none !important;
}
*/

/*
   C. Emphasize author box by adding border and background.

.col-md-4 .thumbnail {
  border: 2px solid #283593;
  background-color: #f7f8ff;
}
*/

/*
   D. Change post width for better readability (centered column on large screens).

@media (min-width: 992px) {
  .container > .row > .col-md-8 {
    float: none;
    margin: 0 auto;
  }
  .container > .row > .col-md-4 {
    float: none;
  }
}
*/

/*
   E. Make iframes fully responsive using aspect-ratio
   (if you can wrap them in .video-embed in content).

.video-embed {
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 100%;
}

.video-embed iframe {
  width: 100%;
  height: 100%;
}
*/

/* End of custom-blog.css */