/*
Theme Name: TooljaTheme
Theme URI: https://toolja.in
Author: Ashok Gaikwad
Author URI: https://toolja.in
Description: A simple theme with top bar, header, sidebar, AdSense, Verdana font, and justified text.
Version: 1.0
*/

/* =========================================
   ðŸ”¥ HEADINGS - DESKTOP
========================================= */
.content h1, .content h2, .content h3 {
  color: #003366;
  margin-top: 30px;
  margin-bottom: 10px;
  line-height: 1.3;
}
.content h1 { font-size: 32px; }
.content h2 { font-size: 28px; }
.content h3 { font-size: 24px; }

/* =========================================
   ðŸ”¥ PAGE TITLES
========================================= */
.page-title, .single-title {
    text-align: center;
    background: #00008B;
    color: white !important;
    padding: 4px 10px; /* smaller padding */
    border-radius: 6px;
    margin: 6px 0 12px 0; /* smaller spacing */
    font-size: 16px !important;  /* force smaller font */
    line-height: 1.2 !important; /* force tight spacing */
}



@media (max-width: 768px) {
  .page-title, .single-title {
    font-size: 14px;
    padding: 10px 15px;
    line-height: 1.2;
  }
}

/* =========================================
   ðŸ”¥ SITE TITLE
========================================= */
.site-title span {
  font-size: 20px;
  color: #ffeb3b;
}
@media (max-width: 768px) {
  .site-title span {
    font-size: 16px;
  }
}

/* =========================================
   âœ… GLOBAL STYLES
========================================= */
body {
  font-family: 'Roboto', sans-serif, Verdana;
  text-align: justify;
  background-color: #f7f7f7;
  margin: 0;
  padding: 0;
}
a {
  color: #003366;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* =========================================
   âœ… MAIN CONTENT
========================================= */
.content-wrapper {
  display: flex;
  max-width: 1000px;
  margin: 0 auto;
  background: white;
  box-shadow: 0 0 5px #ccc;
  flex-wrap: wrap;
  padding-left: 20px;
  padding-right: 20px;
}

.content {
  flex: 3;
  padding: 0px;
}
.content p, .content li {
  line-height: 1.7;
  margin-bottom: 8px;
}
.content img {
  max-width: 100%;
  height: auto;
}

/* =========================================
   âœ… SIDEBAR
========================================= */
.sidebar {
  flex: 1;
  padding: 15px;
  background: #f2f2f2;
  border-left: 1px solid #ddd;
  text-align: left;
}
.sidebar ul {
  list-style-type: disc;
  padding-left: 20px;
  margin: 0;
}
.sidebar li {
  margin-bottom: 8px;
}
.sidebar a {
  color: #333;
  font-size: 15px;
}
.sidebar a:hover {
  text-decoration: underline;
}
.sidebar .widget {
  margin-bottom: 20px;
}
.sidebar .widget-title {
  font-weight: bold;
  font-size: 16px;
  margin-bottom: 10px;
  color: #000;
}
.sidebar h2, .sidebar h3, .sidebar h4 {
  background: #003366;
  color: #fff !important;
  font-weight: bold;
  padding: 8px 10px;
  border-radius: 4px;
  margin-bottom: 10px;
}


/* =========================================
   âœ… FOOTER
========================================= */
footer {
  background: #333;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  font-size: 14px;
}
.footer-widgets {
  background: #444;
  color: #fff;
  padding: 20px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.footer-widgets > * {
  width: 100%;
  max-width: 1000px;
  padding: 0 20px;
}
.footer-widget h4 {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 16px;
  color: #fff;
}
.footer-widget ul {
  list-style: none;
  padding: 0;
}
.footer-widget ul li {
  margin-bottom: 5px;
}
.footer-widget ul li a {
  color: #ccc;
}
.footer-widget ul li a:hover {
  text-decoration: underline;
}
.footer-widgets ul.menu,
.footer-widgets .widget_nav_menu ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
}
.footer-bottom {
  background: #333;
  text-align: center;
  padding: 10px;
  color: #ccc;
  font-size: 14px;
}

/* =========================================
   âœ… HEADER
========================================= */
.header.desktop-header {
  background: #333;
  color: white;
  padding: 10px 0;
}
.header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}
.site-title {
  display: flex;
  align-items: center;
  font-weight: bold;
  font-size: 24px;
  gap: 10px;
}
.site-logo {
  height: 28px;
}

/* =========================================
   âœ… MENU (DESKTOP + MOBILE SAME LOGIC)
========================================= */
.menu-container ul {
  list-style: none;
  display: flex;
  gap: 15px;
}
.menu-container ul li a {
  color: white;
  font-size: 14px;
  padding: 8px 12px;
}
.menu-container ul li.menu-item-has-children > a::after {
  content: "\25BC";
  font-size: 12px;
  margin-left: 5px;
}
.menu-container ul li ul {
  display: none;
  position: absolute;
  background: #555;
  min-width: 160px;
  z-index: 999;
}
.menu-container ul li:hover > ul,
.menu-container ul li ul li:hover > ul {
  display: block;
}
.menu-container ul li ul li ul {
  top: 0;
  left: 100%;
  position: absolute;
}

/* =========================================
   âœ… PAGINATION, SEARCH, ADSENSE
========================================= */
.pagination {
  text-align: center;
  margin-top: 20px;
}
.pagination .page-numbers {
  display: inline-block;
  margin: 0 5px;
  padding: 6px 10px;
  background: #eee;
}
.pagination .current {
  background: #333;
  color: #fff;
}
.adsense-box {
  text-align: center;
  margin: 10px auto;
}
.search-icon {
  font-size: 24px;
  color: white;
  cursor: pointer;
  margin-left: 10px;
}
.header-search-form {
  display: none;
  position: absolute;
  top: 60px;
  right: calc((100% - 1000px)/2 + 20px);
  width: 280px;
  background: #333;
  padding: 10px 20px;
  border-radius: 4px;
  z-index: 1000;
}
.header-search-form.active {
  display: block;
}
.header-search-form input[type="search"] {
  width: 100%;
  padding: 10px;
  border-radius: 4px;
}

/* =========================================
   âœ… RESPONSIVE: MOBILE MENU
========================================= */
@media (max-width: 768px) {
  .content-wrapper { flex-direction: column; }
  .sidebar { display: none; }

  .menu-container {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #333;
    position: static;
    z-index: 9999;
  }
  .menu-container.active { display: flex; }

  .menu-container ul {
    flex-direction: column;
    width: 100%;
  }
  .menu-container ul li {
    width: 100%;
    border-top: 1px solid #444;
    position: relative;
  }
  .menu-container ul li a {
    padding: 12px 20px;
    background: #444;
    color: #fff;
    display: block;
  }
  .menu-container ul li a:hover { background: #555; }

  /* âœ… Updated for mobile: nested menus open inline under parent */
  .menu-container ul li ul {
    display: none;
    position: static;
    background: #555;
  }
  .menu-container ul li:hover > ul {
    display: block;
  }
  .menu-container ul li ul li a {
    padding-left: 30px;
    background: #555;
  }
  .menu-container ul li ul li ul {
    display: none;
    position: static;
    background: #666;
  }
  .menu-container ul li ul li:hover > ul {
    display: block;
  }
  .menu-container ul li ul li ul li a {
    padding-left: 45px;
    background: #666;
  }

  .site-title {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }
  .mobile-menu-toggle {
    display: block;
    font-size: 24px;
    padding: 8px 10px;
  }
  .header-search-form {
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
  }
}


/* =========================================
   âœ… PREVENT OVERFLOW, CLEAN TABLES & MEDIA
========================================= */
html, body { max-width: 100%; overflow-x: hidden; }
img, iframe, video { max-width: 100%; height: auto; }
table { display: block; overflow-x: auto; }
pre, code { white-space: pre-wrap; overflow-x: auto; }

/* =========================================
   âœ… GLOBAL HEADINGS RESET
========================================= */
h1, h2, h3, h4, h5, h6 { font-weight: bold !important; line-height: 1.3 !important; }
@media (min-width: 769px) {
  h1 { font-size: 26px !important; margin-top: 30px !important; }
  h2 { font-size: 24px !important; margin-top: 26px !important; }
  h3 { font-size: 20px !important; margin-top: 22px !important; }
}
@media (max-width: 768px) {
  h1 { font-size: 20px !important; margin-top: 24px !important; }
  h2 { font-size: 18px !important; margin-top: 20px !important; }
  h3 { font-size: 16px !important; margin-top: 16px !important; }
}



/* Center images with aligncenter class */
.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}



/* =========================================
   PAGE BUTTON STYLE
========================================= */
.buy-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}

.buy-buttons .my-button {
  display: inline-block;
  background: #007acc; /* bright blue */
  color: #fff;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: 6px;
  border: 1px solid #005fa3;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.buy-buttons .my-button:hover {
  background: #005fa3;
  border-color: #004b80;
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}



/* ✅ Break long words in content to prevent overflow */
.content, .content-wrapper, p, li, td, th {
  word-wrap: break-word;
  overflow-wrap: anywhere;
}


@media (max-width: 768px) {
  .content * {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .content img.aligncenter {
    margin-left: auto !important;
    margin-right: auto !important;
    display: block;
  }
}



/* =========================================
   ✅ RESPONSIVE: MOBILE FIXES FOR SMALL SCREENS
   Ensures content stays inside screen on devices <768px
========================================= */
@media (max-width: 768px) {
  .content-wrapper {
    width: 95%;           /* make wrapper slightly narrower */
    max-width: 95%;
    margin: 0 auto;       /* center it */
    padding-left: 10px;   /* small left padding */
    padding-right: 10px;  /* small right padding */
    box-sizing: border-box; /* include padding in width */
  }

  .content, .content * {
    box-sizing: border-box; /* ensures width includes padding */
    max-width: 100%;         /* prevent overflowing */
    overflow-wrap: break-word; /* breaks long words */
    word-wrap: break-word;     /* compatibility */
  }
}

/* =========================================
   ✅ FORCE BREAK LONG WORDS IN CONTENT
   Applies even outside media query to break words early
========================================= */
.content, p, li {
  word-break: break-word;
}



/* =========================================
   ✅  FOR MOBILE V- TABNLE 100%
========================================= */
@media (max-width: 768px) {
  table {
    width: 100% !important; /* force full width on mobile */
  }
}


/* ✅ Force right-side spacing for archive, category, and search on desktop */
@media screen and (min-width: 768px) {
  body.archive .site-content,
  body.search .site-content,
  body.category .site-content,
  body.blog .site-content {
    padding-left: 20px;
    padding-right: 20px;
  }

  body.archive .content,
  body.search .content,
  body.category .content,
  body.blog .content {
    padding-left: 20px;
    padding-right: 20px;
  }
}




/* ✅ Force white color for all footer links */
footer a {
  color: #ffffff !important;
  text-decoration: none;
}

/* ✅ On hover, change footer link color */
footer a:hover {
  color: #FFEB3B !important; /* Light yellow, you can change it */
  text-decoration: underline; /* Optional */
}




