/*
Theme Name: Cybersec Writeups
Theme URI: https://example.com/cybersec-minimal
Author: Khukuririmal
Author URI: https://cybersecwriteups.com
Description: A clean, dark, cybersecurity-focused blogging theme with syntax-friendly styling.
Version: 1.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cybersec-minimal
Tags: blog, two-columns, right-sidebar, custom-logo, dark, responsive-layout
*/

/* Basic Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #050810;
  color: #e5e7eb;
  line-height: 1.6;
  overflow-x: hidden;
  width: 100%;
}

/* Layout */
.site-header {
  background: radial-gradient(circle at top left, #10b981 0, #020617 50%);
  padding: 1.5rem 1.25rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.site-title a {
  color: #ecfeff;
  text-decoration: none;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.site-description {
  font-size: 0.8rem;
  color: #9ca3af;
}

/* Navigation */
.main-navigation {
  position: relative;
}

.main-navigation ul,
.main-navigation .nav-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1rem;
}

.main-navigation a {
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.95rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  word-break: keep-all;
  display: inline-block;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a,
.main-navigation .current-category-ancestor > a,
.main-navigation .current-category-parent > a {
  background: rgba(15, 118, 110, 0.18);
  color: #a5f3fc;
  box-shadow: 0 0 18px rgba(34, 197, 94, 0.35);
}

/* Mobile Menu Toggle Button */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.4);
  border-radius: 0.5rem;
  padding: 0.5rem;
  cursor: pointer;
  color: #e5e7eb;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  width: 44px;
  height: 44px;
  transition: all 0.2s ease;
}

.menu-toggle:hover {
  background: rgba(15, 118, 110, 0.18);
  border-color: rgba(45, 212, 191, 0.75);
}

.menu-toggle-icon {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
}

.menu-toggle-icon span {
  display: block;
  height: 2px;
  width: 100%;
  background-color: #e5e7eb;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] .menu-toggle-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* Content layout */
.site-content {
  max-width: 1440px;
  margin: 1.75rem auto 2.5rem;
  padding: 0 1rem;
  display: grid;
  grid-template-columns: minmax(0, 2.6fr) minmax(0, 1.1fr);
  gap: 2rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Header and Navigation */
  .site-header {
    padding: 1rem 1rem;
  }

  .site-header-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .site-title a {
    font-size: 1.1rem;
  }

  .site-description {
    font-size: 0.75rem;
  }

  .menu-toggle {
    display: flex;
    order: 2;
    margin-left: auto;
  }

  .main-navigation {
    order: 3;
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .main-navigation.toggled {
    max-height: 500px;
    margin-top: 1rem;
  }

  .main-navigation ul,
  .main-navigation .nav-menu {
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem 0;
  }

  .main-navigation a {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    width: 100%;
    text-align: left;
  }

  /* Content Layout */
  .site-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem !important;
    margin: 1rem auto 1.5rem;
  }

  /* Hero Section */
  .hero {
    padding: 2rem 1.5rem !important;
    margin-bottom: 1.5rem;
    border-radius: 1rem;
  }

  .hero-kicker {
    font-size: 0.7rem;
  }

  .hero-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
  }

  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1rem;
  }

  .hero-meta {
    flex-direction: column;
    gap: 0.5rem;
  }

  .hero-pill {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }

  /* Post Cards */
  .post-card {
    padding: 1.25rem 1.25rem;
    margin-bottom: 1rem;
  }

  .post-card-title {
    font-size: 1rem;
  }

  .post-card-meta {
    font-size: 0.75rem;
  }

  .post-card-excerpt {
    font-size: 0.85rem;
  }

  /* Single Post */
  .entry-title {
    font-size: 1.3rem;
  }

  .entry-content {
    font-size: 0.95rem;
  }

  .entry-content h2 {
    font-size: 1.2rem;
  }

  .entry-content h3 {
    font-size: 1.1rem;
  }

  .entry-content h4 {
    font-size: 1rem;
  }

  .entry-content pre,
  .entry-content code {
    font-size: 0.8rem;
    padding: 0.75rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Mobile table responsiveness - wrap in scrollable container */
  .entry-content {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Ensure all content is constrained */
  .entry-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Make tables scrollable horizontally on mobile */
  .entry-content table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: max-content;
    min-width: 100%;
    max-width: none;
    margin: 1rem 0;
  }

  .entry-content table thead,
  .entry-content table tbody,
  .entry-content table tr {
    display: table;
    width: 100%;
  }

  .entry-content table th,
  .entry-content table td {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  /* Allow tables to overflow, but constrain other elements */
  .entry-content * {
    max-width: 100%;
    box-sizing: border-box;
  }

  .entry-content table,
  .entry-content table * {
    max-width: none;
  }

  /* Responsive images on mobile */
  .entry-content img {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Responsive iframes and embeds on mobile */
  .entry-content iframe,
  .entry-content embed,
  .entry-content object,
  .entry-content video {
    max-width: 100% !important;
    height: auto !important;
  }

  /* Sidebar */
  .sidebar-box {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
  }

  .sidebar-title {
    font-size: 0.85rem;
  }

  .widget ul li {
    font-size: 0.85rem;
  }

  /* Footer */
  .site-footer {
    padding: 1.25rem 1rem 1.5rem;
    font-size: 0.75rem;
  }

  .site-footer-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }

  /* Buttons */
  .button,
  .wp-block-button__link {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    min-height: 44px;
    min-width: 44px;
  }

  /* Pagination */
  .pagination {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .pagination a,
  .pagination span {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .site-header {
    padding: 0.75rem 0.75rem;
  }

  .site-title a {
    font-size: 1rem;
  }

  .hero {
    padding: 1.5rem 1rem !important;
  }

  .hero-title {
    font-size: 1.3rem;
  }

  .post-card {
    padding: 1rem 1rem;
  }

  .site-content {
    padding: 0 0.75rem !important;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .site-content {
    grid-template-columns: 1fr;
  }

  .main-navigation ul,
  .main-navigation .nav-menu {
    gap: 0.75rem;
  }

  .main-navigation a {
    font-size: 0.9rem;
    padding: 0.3rem 0.65rem;
  }
}

/* Hero on front page */
.hero {
  background: radial-gradient(circle at top left, rgba(16, 185, 129, 0.12), transparent 55%),
              radial-gradient(circle at top right, rgba(96, 165, 250, 0.12), transparent 55%);
  border: 1px solid rgba(15, 23, 42, 0.9);
  padding: 2.75rem 3rem;
  border-radius: 1.5rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at bottom right, rgba(37, 99, 235, 0.15), transparent 60%);
  opacity: 0.8;
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #6ee7b7;
  margin-bottom: 0.75rem;
}

.hero-title {
  font-size: clamp(1.9rem, 3vw, 2.4rem);
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.hero-subtitle {
  color: #9ca3af;
  font-size: 0.95rem;
  max-width: 46rem;
  margin-bottom: 1.2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #9ca3af;
}

.hero-pill {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.4);
  padding: 0.35rem 0.8rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.hero-pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.7);
}

/* Posts list */
.post-card {
  background-color: rgba(15, 23, 42, 0.9);
  border-radius: 1rem;
  padding: 1.45rem 1.5rem;
  margin-bottom: 1.35rem;
  border: 1px solid rgba(30, 64, 175, 0.6);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.9);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border 0.16s ease;
}

.post-card:hover {
  transform: translateY(-3px);
  border-color: rgba(45, 212, 191, 0.75);
  box-shadow: 0 22px 45px rgba(6, 78, 59, 0.55);
}

.post-card-title {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.post-card-title a {
  color: #e5e7eb;
  text-decoration: none;
}

.post-card-title a:hover {
  color: #a5f3fc;
}

.post-card-meta {
  font-size: 0.77rem;
  color: #9ca3af;
  margin-bottom: 0.65rem;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: #cbd5f5;
  margin-bottom: 0.9rem;
}

.post-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.25rem;
}

.post-tag {
  font-size: 0.7rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #7dd3fc;
}

/* Buttons / links */
.button,
.wp-block-button__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(34, 197, 94, 0.8);
  background: linear-gradient(135deg, #22c55e, #0ea5e9);
  color: #0b1120;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 12px 35px rgba(16, 185, 129, 0.45);
  transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease;
}

.button:hover,
.wp-block-button__link:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 18px 42px rgba(14, 165, 233, 0.55);
}

.button-outline {
  background: transparent;
  color: #a5f3fc;
  border-color: rgba(148, 163, 184, 0.6);
  box-shadow: none;
}

.button-outline:hover {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(56, 189, 248, 0.95);
}

/* Sidebar */
.sidebar-box {
  background-color: rgba(15, 23, 42, 0.95);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(30, 64, 175, 0.8);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.95);
  margin-bottom: 1.25rem;
}

.sidebar-title {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #9ca3af;
  margin: 0 0 0.75rem;
}

.widget ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.widget ul li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.widget a {
  color: #e5e7eb;
  text-decoration: none;
}

.widget a:hover {
  color: #7dd3fc;
}

/* Single post */
.single-post .post-card {
  padding-top: 1.8rem;
}

.entry-title {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.entry-meta {
  font-size: 0.8rem;
  color: #9ca3af;
  margin-bottom: 1.25rem;
}

.entry-content {
  font-size: 0.98rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.entry-content pre,
.entry-content code {
  font-family: 'Fira Code', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  background: #020617;
  border-radius: 0.9rem;
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  overflow-x: auto;
  border: 1px solid rgba(15, 118, 110, 0.55);
  color: #bbf7d0;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 1);
}

.entry-content code {
  padding: 0.15rem 0.35rem;
}

/* Responsive tables */
.entry-content table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  display: table;
  table-layout: auto;
}

.entry-content table th,
.entry-content table td {
  padding: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.3);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Responsive images */
.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Responsive iframes and embeds */
.entry-content iframe,
.entry-content embed,
.entry-content object,
.entry-content video {
  max-width: 100%;
  height: auto;
}

/* Prevent horizontal overflow for most elements */
.entry-content * {
  max-width: 100%;
}

/* Allow tables to be wider than container on mobile for horizontal scroll */
.entry-content table {
  max-width: none;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(15, 23, 42, 1);
  padding: 1.5rem 1.25rem 2rem;
  background: #020617;
  color: #6b7280;
  font-size: 0.8rem;
}

.site-footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

/* Pagination */
.pagination {
  display: flex;
  gap: 0.45rem;
  margin-top: 1.5rem;
}

.pagination a,
.pagination span {
  font-size: 0.85rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
}

.pagination .current {
  border-color: rgba(34, 197, 94, 0.8);
  background: rgba(16, 185, 129, 0.15);
}

/* Utility */
.badge-critical {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  background: rgba(239, 68, 68, 0.1);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.7);
}

.badge-critical-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #f97373;
  box-shadow: 0 0 12px rgba(248, 113, 113, 0.9);
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
  .main-navigation a,
  .button,
  .wp-block-button__link,
  .pagination a {
    min-height: 44px;
    min-width: 44px;
  }

  .post-card-title a {
    display: block;
    padding: 0.5rem 0;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Image optimization hints */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Ensure site-main doesn't overflow */
.site-main {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
.menu-toggle:focus {
  outline: 2px solid #22c55e;
  outline-offset: 2px;
}


/* ==== FORCE FULL-WIDTH ROOT FIX ==== */

/* Break any hidden container */
body,
#page,
.site,
.site-content,
.site-main,
.site-inner,
.wrap,
.container {
  max-width: none !important;
  width: 100% !important;
}

/* Re-apply controlled width ourselves */
.site-header-inner,
.site-content,
.site-footer-inner {
  max-width: 1440px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Reduce fake side gaps */
.site-content {
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
}

/* Make hero visually dominant */
.hero {
  width: 100%;
  padding: 3rem 3.25rem;
}

/* Google Dorking Page Styles */
.google-dorking-page {
  width: 100%;
  max-width: 100%;
}

.google-dorking-page .page-header {
  text-align: center;
  margin-bottom: 2.5rem;
  padding: 2rem 0;
}

.google-dorking-page .page-header .entry-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.google-dorking-page .page-description {
  color: #9ca3af;
  font-size: 0.95rem;
  max-width: 600px;
  margin: 0 auto;
}

.google-dorking-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.dork-input-container {
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.dork-input-container label {
  display: block;
  color: #e5e7eb;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.dork-input-container label i {
  margin-right: 0.5rem;
  color: #7dd3fc;
}

.dork-input-container input[type="text"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(30, 64, 175, 0.6);
  border-radius: 0.5rem;
  color: #e5e7eb;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  font-family: 'Inter', system-ui, sans-serif;
}

.dork-input-container input[type="text"]:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.75);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.dork-input-container small {
  display: block;
  color: #9ca3af;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.dork-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2rem;
}

.dork-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
}

.dork-item {
  background-color: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(30, 64, 175, 0.6);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-size: 0.9rem;
  text-align: center;
  min-height: 48px;
}

.dork-item:hover {
  transform: translateY(-2px);
  border-color: rgba(56, 189, 248, 0.75);
  background-color: rgba(15, 23, 42, 0.95);
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.25);
}

.dork-item:active {
  transform: translateY(0);
}

.dork-item span {
  width: 100%;
  text-align: center;
}

/* Mobile Responsive Styles for Google Dorking */
@media (max-width: 1024px) {
  .dork-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .google-dorking-page .page-header .entry-title {
    font-size: 1.5rem;
  }

  .google-dorking-page .page-description {
    font-size: 0.85rem;
  }

  .dork-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .dork-item {
    padding: 0.9rem 1rem;
    font-size: 0.85rem;
  }

  .dork-input-container {
    margin-bottom: 2rem;
  }
}

@media (max-width: 480px) {
  .google-dorking-container {
    padding: 0 0.75rem;
  }

  .google-dorking-page .page-header {
    padding: 1.5rem 0;
  }

  .google-dorking-page .page-header .entry-title {
    font-size: 1.3rem;
  }

  .dork-item {
    padding: 0.75rem 0.9rem;
  }
}



