/* ===========================
   BACKUP POWER GUIDE / OWLNO
   News-style theme
   =========================== */

:root {
  --red: #d0021b;
  --dark: #111111;
  --mid: #333333;
  --light: #666666;
  --border: #e0e0e0;
  --bg: #f5f5f5;
  --white: #ffffff;
  --accent: #1a73e8;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'Source Sans 3', Arial, sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--dark);
  font-size: 16px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }

/* ===== TOPBAR ===== */
.topbar {
  background: var(--dark);
  color: #aaa;
  font-size: 12px;
  padding: 6px 0;
  border-bottom: 2px solid var(--red);
}
.topbar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-links a { color: #aaa; margin-left: 16px; font-size: 12px; }
.topbar-links a:hover { color: #fff; }

/* ===== HEADER ===== */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.site-logo { display: flex; flex-direction: column; }
.logo-main {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  color: var(--dark);
  letter-spacing: -1px;
  line-height: 1;
}
.logo-tagline {
  font-size: 11px;
  color: var(--light);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-top: 2px;
}
.header-right { display: flex; align-items: center; gap: 16px; }
.newsletter-prompt { font-size: 13px; color: var(--light); }
.btn-subscribe {
  display: inline-block;
  background: var(--red);
  color: var(--white) !important;
  padding: 8px 18px;
  border-radius: 3px;
  font-size: 13px;
  font-weight: 600;
  margin-left: 8px;
  transition: background 0.2s;
}
.btn-subscribe:hover { background: #a00015; }

/* ===== NAVIGATION ===== */
.main-nav {
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}
.nav-list { display: flex; list-style: none; }
.nav-item > a {
  display: block;
  padding: 14px 14px;
  color: #eee;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-item > a:hover,
.nav-item:hover > a { color: var(--white); background: var(--red); }
.nav-item { position: relative; }

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border-top: 3px solid var(--red);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 200px;
  list-style: none;
  z-index: 999;
}
.nav-item:hover .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 10px 16px;
  color: var(--mid);
  font-size: 14px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s, color 0.15s, padding 0.15s;
}
.dropdown li:last-child a { border-bottom: none; }
.dropdown li a:hover { background: var(--bg); color: var(--red); padding-left: 20px; }

/* ===== SOCIAL SIDEBAR ===== */
.social-sidebar {
  position: fixed;
  right: -52px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  transition: right 0.3s;
}
.social-sidebar.open { right: 0; }
.social-sidebar-toggle {
  position: absolute;
  left: -32px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--dark);
  color: var(--white);
  border: none;
  width: 32px;
  height: 48px;
  cursor: pointer;
  border-radius: 4px 0 0 4px;
  font-size: 12px;
}
.social-sidebar-content {
  display: flex;
  flex-direction: column;
  background: var(--dark);
  border-radius: 4px 0 0 4px;
}
.social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 48px;
  color: var(--white) !important;
  font-size: 14px;
  font-weight: bold;
  transition: background 0.2s;
}
.social-link.facebook:hover { background: #1877f2; }
.social-link.twitter:hover { background: #000; }
.social-link.instagram:hover { background: #e1306c; }
.social-link.youtube:hover { background: #ff0000; }
.social-link.rss:hover { background: #f26522; }

/* ===== MAIN ===== */
.site-main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== CAROUSEL ===== */
.hero-carousel {
  position: relative;
  overflow: hidden;
  height: 520px;
  margin: 0 -20px 32px;
  background: var(--dark);
}
.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.carousel-slide {
  min-width: 100%;
  width: 100%;
  height: 100%;
  flex-shrink: 0;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
}
.carousel-content {
  padding: 48px 48px 56px;
  max-width: 860px;
  width: 100%;
}
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 52px;
  height: 52px;
  font-size: 20px;
  cursor: pointer;
  z-index: 3;
  transition: background 0.2s;
  border-radius: 2px;
}
.carousel-btn:hover { background: var(--red); }
.carousel-btn.prev { left: 20px; }
.carousel-btn.next { right: 20px; }
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 3;
}
.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: background 0.2s, transform 0.2s;
}
.carousel-dot.active { background: white; transform: scale(1.3); }

/* Hero text */
.hero-category {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  padding: 3px 8px;
  margin-bottom: 12px;
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 14px;
}
.hero-title a { color: var(--white); }
.hero-title a:hover { color: #ddd; }
.hero-excerpt { font-size: 17px; color: rgba(255,255,255,0.8); margin-bottom: 10px; line-height: 1.5; }
.hero-meta { font-size: 13px; color: rgba(255,255,255,0.55); }

/* ===== CONTENT WRAP ===== */
.content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  margin-top: 0;
}

/* ===== SECTION HEADERS ===== */
.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--dark);
}
.section-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  white-space: nowrap;
}
.section-line { flex: 1; height: 1px; background: var(--border); }
.section-more { font-size: 13px; color: var(--red); font-weight: 600; white-space: nowrap; }

/* ===== ARTICLE GRID ===== */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}
.category-section { margin-bottom: 40px; }
.articles-section { margin-bottom: 40px; }

/* ===== ARTICLE CARD ===== */
.article-card {
  background: var(--white);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s, transform 0.2s;
  overflow: hidden;
}
.article-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); transform: translateY(-2px); }
.article-thumb {
  display: block;
  height: 180px;
  background-size: cover;
  background-position: center;
  background-color: var(--border);
  transition: transform 0.3s;
}
.article-card:hover .article-thumb { transform: scale(1.03); }
.article-card-body { padding: 14px; }
.article-category {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.article-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 8px;
}
.article-title a:hover { color: var(--red); }
.article-excerpt { font-size: 13px; color: var(--light); line-height: 1.5; margin-bottom: 10px; }
.article-meta { font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: 0.5px; }

/* ===== SIDEBAR ===== */
.sidebar { display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget {
  background: var(--white);
  border: 1px solid var(--border);
  padding: 20px;
}
.sidebar-widget h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--dark);
}
.newsletter-widget p { font-size: 13px; color: var(--light); margin-bottom: 12px; }
.newsletter-widget input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  font-size: 14px;
  margin-bottom: 8px;
  font-family: var(--font-body);
}
.newsletter-widget button,
.sidebar-widget button {
  width: 100%;
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  transition: background 0.2s;
}
.newsletter-widget button:hover { background: #a00015; }
.popular-list { list-style: none; }
.popular-list li { padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; line-height: 1.4; }
.popular-list li:last-child { border-bottom: none; }
.popular-list a:hover { color: var(--red); }

/* ===== POST PAGE ===== */
.post-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  margin-top: 32px;
}
.post-hero-image {
  height: 420px;
  background-size: cover;
  background-position: center;
  background-color: var(--border);
  margin-bottom: 0;
}
.post-article {
  background: var(--white);
  border: 1px solid var(--border);
  overflow: hidden;
}
.post-header { padding: 28px 32px 0; }
.post-category {
  display: inline-block;
  background: var(--red);
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 3px 8px;
  margin-bottom: 12px;
}
.post-title {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 12px;
}
.post-subtitle { font-size: 18px; color: var(--light); margin-bottom: 12px; line-height: 1.5; }
.post-meta { font-size: 13px; color: #999; display: flex; gap: 12px; padding-bottom: 20px; }
.post-body { padding: 0 32px 28px; font-size: 17px; line-height: 1.8; color: var(--mid); }
.post-body h2 { font-family: var(--font-display); font-size: 26px; font-weight: 700; margin: 28px 0 12px; color: var(--dark); }
.post-body h3 { font-size: 20px; font-weight: 700; margin: 20px 0 10px; color: var(--dark); }
.post-body p { margin-bottom: 18px; }
.post-body ul, .post-body ol { margin: 0 0 18px 24px; }
.post-body li { margin-bottom: 8px; }
.post-body a { color: var(--accent); text-decoration: underline; }
.post-body strong { color: var(--dark); }
.post-body blockquote {
  border-left: 4px solid var(--red);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--bg);
  font-style: italic;
  color: var(--light);
}
.ad-container { margin: 0 32px 20px; }
.post-tags { padding: 0 32px 24px; display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--bg); border: 1px solid var(--border); padding: 4px 10px; font-size: 12px; color: var(--light); border-radius: 2px; }

/* ===== COMMENTS ===== */
.comments-section {
  padding: 28px 32px;
  border-top: 1px solid var(--border);
}
.comments-section h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 3px solid var(--dark);
}

/* ===== RELATED POSTS ===== */
.related-posts { margin-top: 32px; }
.related-posts h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 3px solid var(--dark);
}
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--dark);
  color: #aaa;
  margin-top: 64px;
  padding: 48px 0 0;
}
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.footer-newsletter {
  text-align: center;
  padding-bottom: 40px;
  border-bottom: 1px solid #333;
  margin-bottom: 40px;
}
.footer-newsletter h3 { font-family: var(--font-display); font-size: 28px; color: var(--white); margin-bottom: 8px; }
.footer-newsletter p { font-size: 15px; margin-bottom: 20px; }
.newsletter-form { display: flex; max-width: 480px; margin: 0 auto; gap: 8px; }
.newsletter-form input { flex: 1; padding: 12px 16px; border: none; font-size: 15px; font-family: var(--font-body); }
.newsletter-form button {
  background: var(--red);
  color: var(--white);
  border: none;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: background 0.2s;
  width: auto;
}
.newsletter-form button:hover { background: #a00015; }
.footer-categories { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; margin-bottom: 40px; }
.footer-col h4 { color: var(--white); font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { font-size: 13px; color: #888; transition: color 0.2s; }
.footer-col a:hover { color: var(--white); }
.footer-bottom { border-top: 1px solid #333; padding: 20px 0; text-align: center; font-size: 12px; color: #666; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-categories { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .content-wrap, .post-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .articles-grid, .category-grid, .related-grid { grid-template-columns: 1fr; }
  .hero-carousel { height: 380px; }
  .hero-title { font-size: 26px; }
  .carousel-content { padding: 24px 24px 40px; }
  .nav-list { overflow-x: auto; }
  .nav-item > a { padding: 12px 10px; font-size: 11px; }
  .post-title { font-size: 26px; }
  .post-header, .post-body, .ad-container, .post-tags, .comments-section { padding-left: 16px; padding-right: 16px; }
  .newsletter-form { flex-direction: column; }
  .footer-categories { grid-template-columns: repeat(2, 1fr); }
  .logo-main { font-size: 24px; }
  .header-right { display: none; }
}

/* ===== INFO BAR (weather/datetime) ===== */
.info-bar {
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
  padding: 5px 0;
  font-size: 12px;
}
.info-bar-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.info-bar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #ccc;
}
.info-datetime { color: #aaa; }
.info-divider { color: #444; }
.info-weather {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #ccc;
}
#weatherIcon { font-size: 14px; }
#weatherTemp { font-weight: 600; color: #fff; }
#weatherDesc { color: #aaa; }
#weatherCity { color: #888; font-size: 11px; }
.info-bar-right { display: flex; gap: 16px; }
.info-bar-right a { color: #888; font-size: 12px; transition: color 0.2s; }
.info-bar-right a:hover { color: #fff; }

/* ===== MARKETS TICKER ===== */
.markets-ticker {
  width: 100%;
  background: #131722;
}
.markets-ticker .tradingview-widget-container { width: 100%; }

/* ===== POST IMAGE CREDIT ===== */
.post-image-credit { font-size: 11px; color: #bbb; font-style: italic; }

@media (max-width: 768px) {
  .info-bar-right { display: none; }
  #weatherCity { display: none; }
  .info-datetime { font-size: 11px; }
}
