/*
Theme Name: StudyBix Theme
Theme URI: https://studybix.in/
Author: Gautamaditya
Author URI: https://yourwebsite.com/
Description: A fully custom WordPress theme based on a static HTML design.
Version: 1.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: studybix
*/

/*----------------------------------------
  Preload: Hide Content Until Fully Loaded (No Fade)
-----------------------------------------*/
body.preload {
  display: none;
}

/*----------------------------------------
  Keyframe Animations for Blinking Buttons
-----------------------------------------*/
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.btn-blink-1 { animation: blink 1s infinite; }
.btn-blink-2 { animation: blink 1s infinite 0.5s; }

/*----------------------------------------
  Global Reset
-----------------------------------------*/
* { box-sizing: border-box; }
html, body { overflow-x: hidden; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }

.hidden { display: none; }
.transition { transition: all 0.3s ease-in-out; }
.custom-scrollbar::-webkit-scrollbar { width: 2px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f1f1; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #888; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #555; }

/*----------------------------------------
  Header - Fixed and Sticky
-----------------------------------------*/
.sticky-header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 10000;
  background-color: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
}
@media (min-width: 1280px) {
  .sticky-header.shifted { left: 16rem; width: calc(100% - 16rem); }
}
@media (max-width: 1279px) {
  .sticky-header { left: 0; width: 100%; }
}

/*----------------------------------------
  Main Content Container
-----------------------------------------*/
.main-content-container {
  margin-top: 70px;
  transition: margin-left 0.3s ease-in-out;
  display: flex; flex-direction: column;
}
@media (min-width: 1280px) {
  .main-content-container.shifted { margin-left: 16rem; }
}
@media (max-width: 1279px) {
  .main-content-container { margin-left: 0; }
}

/*----------------------------------------
  Dimmed Effect (for Mobile/Tablet Sidebar)
-----------------------------------------*/
.dimmed { opacity: 0.5; transition: opacity 0.3s ease-in-out; }

/*----------------------------------------
  Overlay for Sidebar (Mobile/Tablet)
-----------------------------------------*/
#overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: transparent; z-index: 40;
}
#overlay.show { display: block; }

/*----------------------------------------
  Full-screen Search Overlay
-----------------------------------------*/
#searchOverlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.9); z-index: 11000; display: none;
  flex-direction: column; justify-content: flex-start; padding-top: 1rem;
  overflow-y: auto;
}
#searchOverlay.active { display: flex; }
#searchOverlay .close-btn {
  font-size: 1rem; color: #fff; cursor: pointer; background: none;
  border: 1px solid #fff; border-radius: 0.375rem; padding: 0.5rem 0.75rem;
}
.search-bar-container { position: relative; width: 100%; margin-bottom: 1rem; }
#overlaySearchInput {
  width: 100%; padding: 0.75rem 2.5rem;
  border: 1px solid #e2e8f0; border-radius: 0.375rem; outline: none;
}
.dark-mode #overlaySearchInput {
  background-color: #2d3748; color: #e2e8f0; border: 1px solid #4a5568;
}
.clear-icon {
  position: absolute; left: 0.5rem; top: 50%; transform: translateY(-50%);
  color: #a0aec0; cursor: pointer; font-size: 1rem;
}
.search-action {
  position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
  color: #a0aec0; cursor: pointer; font-size: 1rem;
}
#searchOverlay h3 {
  margin-top: 1rem; font-size: 1.125rem; font-weight: 600; color: #fff;
}
#searchHistory li {
  display: flex; align-items: center; justify-content: space-between;
  color: #fff; margin-top: 0.5rem; padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
#searchHistory li:last-child { border-bottom: none; }
#searchHistory li .remove-icon { font-size: 0.75rem; cursor: pointer; margin-left: 1rem; }
#clearHistoryBtn {
  background: none; border: 1px solid #fff; color: #fff;
  border-radius: 0.375rem; padding: 0.5rem 0.75rem; cursor: pointer;
}
#clearHistoryBtn:hover { background: rgba(255,255,255,0.2); }

/*----------------------------------------
  Global Colors & Base Styles
-----------------------------------------*/
body { background-color: #fff; color: #000; }
header, .main-content, #sidebar, .content-box, footer { background-color: #fff; }

/*----------------------------------------
  Dark Mode Styles - Updated Palette
-----------------------------------------*/
.dark-mode body { background-color: #121212; color: #E0E0E0; }
.dark-mode header,
.dark-mode .main-content,
.dark-mode #sidebar,
.dark-mode .content-box,
.dark-mode footer,
.dark-mode .dropdown-content {
  background-color: #121212; color: #E0E0E0;
}
.dark-mode a { color: #E0E0E0; }
.dark-mode a:hover { color: #FFD700; }  /* Yellow accent for links */
.dark-mode .text-red-500,
.dark-mode .text-red-600 { color: #FFD700; }  /* Replace red with yellow */
.dark-mode header i,
.dark-mode header svg,
.dark-mode header button { opacity: 1; color: #E0E0E0; fill: #E0E0E0; }

/*----------------------------------------
  Language Switcher
-----------------------------------------*/


/*----------------------------------------
  Layout: Sidebar, Main Content & Right Sidebar
-----------------------------------------*/
.layout-container { display: flex; flex-direction: column; min-height: 100vh; }
@media (min-width: 1280px) {
  .content-sidebar-wrapper { display: flex; flex: 1; }
  .main-content { flex: 1; }
  .right-sidebar { width: 16rem; margin-left: 1rem; }
}
@media (max-width: 1279px) {
  .content-sidebar-wrapper { display: flex; flex-direction: column; flex: 1; }
  .right-sidebar { width: 100%; margin-top: 1rem; }
  .sticky-header { left: 0; width: 100%; }
  .main-content-container { margin-left: 0; }
}

/*----------------------------------------
  Left Sidebar
-----------------------------------------*/
#sidebar {
  position: fixed; top: 0; left: 0; width: 16rem; height: 100vh;
  overflow-y: auto; transform: translateX(-100%);
  transition: transform 0.3s ease-in-out;
  z-index: 50;
}
#sidebar.open { transform: translateX(0); }
@media (max-width: 767px) { #sidebar { width: 70%; } }
@media (min-width: 768px) and (max-width: 1279px) { #sidebar { width: 40%; } }
@media (max-width: 1279px) {
  #sidebar { visibility: hidden; }
  #sidebar.open { visibility: visible; }
}

/*----------------------------------------
  Content Box
-----------------------------------------*/
.content-box {
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 6px 20px rgba(0,0,0,0.1);
  padding: 20px;
}
.logo { margin-top: 15px; }

/*----------------------------------------
  Responsive Sticky Footer Navigation (Mobile/Tablet/iPad)
-----------------------------------------*/
nav.mobile {
  position: fixed; bottom: 0; left: 0; right: 0; width: 100%;
  background: #fff; border-top: 1px solid #ccc; z-index: 9999;
  padding: 0.5rem 0; overflow-x: hidden; box-sizing: border-box;
}
nav.mobile ul {
  display: flex; align-items: center; justify-content: space-evenly;
  gap: 1rem; list-style: none; margin: 0; padding: 0;
}
nav.mobile ul li { display: flex; flex-direction: column; align-items: center; }
nav.mobile ul li a {
  display: flex; flex-direction: column; align-items: center;
  text-decoration: none; color: #333; font-size: 0.75rem;
}
nav.mobile ul li a svg {
  display: block; width: 25px; height: 25px; margin-bottom: 4px;
}
@media (min-width: 1025px) { nav.mobile { display: none; } }

/*----------------------------------------
  Prevent Content from Hiding Behind Fixed Nav
-----------------------------------------*/
body { padding-bottom: 60px; }

/*----------------------------------------
  Dark Mode for Mobile Sticky Footer Navigation
-----------------------------------------*/
.dark-mode nav.mobile { background: #121212; border-top-color: #444; }
.dark-mode nav.mobile ul li a { color: #E0E0E0; }
.dark-mode nav.mobile ul li a svg { fill: currentColor; }

/*----------------------------------------
  Custom Styles for Single Ad & Widget Areas
-----------------------------------------*/
.below-header-ad-area { margin-bottom: 15px; text-align: center; background: #f0f0f0; padding: 10px; }
.below-header-widget-area { margin-bottom: 20px; }
.above-footer-ad-area { margin-bottom: 15px; text-align: center; background: #f0f0f0; padding: 10px; }
.above-footer-widget-area { margin-bottom: 20px; }
.single-post-top-ad-area { margin-bottom: 15px; text-align: center; background: #f0f0f0; padding: 10px; }
.single-post-top-widget-area { margin-bottom: 20px; }
.single-post-mid-ad-area { margin: 20px 0; text-align: center; background: #f0f0f0; padding: 10px; }
.single-post-mid-widget-area { margin: 20px 0; }
.single-post-bottom-ad-area { margin-bottom: 15px; text-align: center; background: #f0f0f0; padding: 10px; }
.single-post-bottom-widget-area { margin-bottom: 20px; }

/*----------------------------------------
  Responsive Adjustments for Mobile
-----------------------------------------*/
@media (max-width: 767px) {
  .below-header-widget-area,
  .above-footer-widget-area,
  .single-post-top-widget-area,
  .single-post-mid-widget-area,
  .single-post-bottom-widget-area { width: 100%; }
}

/*----------------------------------------
  Custom Search Container for 404 & Search Pages
-----------------------------------------*/
.search-container {
  background-color: #fff; border: 2px solid #dc3545;
  padding: 20px; border-radius: 5px;
  transition: all 0.3s ease;
  margin: 20px auto; max-width: 500px;
}
.dark-mode .search-container {
  background-color: #121212; border: 2px solid #FFD700;
}
.search-container .search-field {
  width: 100%; padding: 10px; border: none; outline: none;
  background: inherit; color: inherit;
}
.search-submit {
  padding: 10px 20px; margin-top: 10px;
  background-color: #dc3545; color: white;
  border: none; border-radius: 5px;
  cursor: pointer; transition: background-color 0.3s ease;
}
.search-submit:hover { background-color: darkred; }

/*----------------------------------------
  Sidebar Link Colors
-----------------------------------------*/
#sidebar a { opacity: 1 !important; color: #000 !important; }
.dark-mode #sidebar a { opacity: 1 !important; color: #E0E0E0 !important; }

/*----------------------------------------
  Homepage Content Box (Front Page)
-----------------------------------------*/
body.home .content-box {
  box-shadow: none !important;
}






/*
Theme Name: StudyBix Theme
Theme URI: https://studybix.in/
Author: Gautamaditya
Author URI: https://yourwebsite.com/
Description: A fully custom WordPress theme based on a static HTML design.
Version: 1.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: studybix
*/

/*--------------------------------------------------------------
>>> TABLE OF CONTENTS:
----------------------------------------------------------------
1.0 Preload & Animations
2.0 Global Resets & Helpers
3.0 Layout: Header, Main Content, Sidebars
4.0 Overlays: Mobile Sidebar & Search
5.0 Dark Mode
6.0 Components: Content Box, Footer Nav, Widgets
7.0 Search Forms (404 & Search Page)
--------------------------------------------------------------*/


/*--------------------------------------------------------------
1.0 Preload & Animations
--------------------------------------------------------------*/
body.preload {
    display: none;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}
.btn-blink-1 { animation: blink 1s infinite; }
.btn-blink-2 { animation: blink 1s infinite 0.5s; }


/*--------------------------------------------------------------
2.0 Global Resets & Helpers
--------------------------------------------------------------*/
* { box-sizing: border-box; }
html, body { overflow-x: hidden; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; }

.hidden { display: none; }
.transition { transition: all 0.3s ease-in-out; }

.custom-scrollbar::-webkit-scrollbar { width: 2px; }
.custom-scrollbar::-webkit-scrollbar-track { background: #f1f1f1; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: #888; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: #555; }


/*--------------------------------------------------------------
3.0 Layout: Header, Main Content, Sidebars
--------------------------------------------------------------*/
.sticky-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 10000;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: left 0.3s ease-in-out, width 0.3s ease-in-out;
}

.main-content-container {
    margin-top: 70px;
    transition: margin-left 0.3s ease-in-out;
    display: flex; flex-direction: column;
}

#sidebar {
    position: fixed; top: 0; left: 0; width: 16rem; height: 100vh;
    overflow-y: auto; transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    z-index: 50;
}
#sidebar.open { transform: translateX(0); }

.layout-container { display: flex; flex-direction: column; min-height: 100vh; }

/* Desktop Layout (1280px and up) */
@media (min-width: 1280px) {
    .sticky-header.shifted { left: 16rem; width: calc(100% - 16rem); }
    .main-content-container.shifted { margin-left: 16rem; }
    .content-sidebar-wrapper { display: flex; flex: 1; }
    .main-content { flex: 1; }
    .right-sidebar { width: 16rem; margin-left: 1rem; }
}

/* Tablet & Mobile Layout (up to 1279px) */
@media (max-width: 1279px) {
    .sticky-header { left: 0; width: 100%; }
    .main-content-container { margin-left: 0; }
    .content-sidebar-wrapper { display: flex; flex-direction: column; flex: 1; }
    .right-sidebar { width: 100%; margin-top: 1rem; }
    #sidebar { visibility: hidden; }
    #sidebar.open { visibility: visible; }
}

/* Specific Sidebar Widths for Mobile/Tablet */
@media (max-width: 767px) { #sidebar { width: 70%; } }
@media (min-width: 768px) and (max-width: 1279px) { #sidebar { width: 40%; } }


/*--------------------------------------------------------------
4.0 Overlays: Mobile Sidebar & Search
--------------------------------------------------------------*/
/* Dimmed effect for main content */
.dimmed { opacity: 0.5; transition: opacity 0.3s ease-in-out; }

/* Overlay for sidebar on mobile/tablet */
#overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: transparent; z-index: 40;
}
#overlay.show { display: block; }

/* Full-screen search overlay */
#searchOverlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 11000; display: none;
    flex-direction: column; justify-content: flex-start; padding-top: 1rem;
    overflow-y: auto;
}
#searchOverlay.active { display: flex; }
#searchOverlay .close-btn {
    font-size: 1rem; color: #fff; cursor: pointer; background: none;
    border: 1px solid #fff; border-radius: 0.375rem; padding: 0.5rem 0.75rem;
}
.search-bar-container { position: relative; width: 100%; margin-bottom: 1rem; }
#overlaySearchInput {
    width: 100%; padding: 0.75rem 2.5rem;
    border: 1px solid #e2e8f0; border-radius: 0.375rem; outline: none;
}
.clear-icon {
    position: absolute; left: 0.5rem; top: 50%; transform: translateY(-50%);
    color: #a0aec0; cursor: pointer; font-size: 1rem;
}
.search-action {
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    color: #a0aec0; cursor: pointer; font-size: 1rem;
}
#searchOverlay h3 {
    margin-top: 1rem; font-size: 1.125rem; font-weight: 600; color: #fff;
}
#searchHistory li {
    display: flex; align-items: center; justify-content: space-between;
    color: #fff; margin-top: 0.5rem; padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}
#searchHistory li:last-child { border-bottom: none; }
#searchHistory li .remove-icon { font-size: 0.75rem; cursor: pointer; margin-left: 1rem; }
#clearHistoryBtn {
    background: none; border: 1px solid #fff; color: #fff;
    border-radius: 0.375rem; padding: 0.5rem 0.75rem; cursor: pointer;
}
#clearHistoryBtn:hover { background: rgba(255,255,255,0.2); }


/*--------------------------------------------------------------
5.0 Dark Mode
--------------------------------------------------------------*/
.dark-mode body { background-color: #121212; color: #E0E0E0; }
.dark-mode header,
.dark-mode .main-content,
.dark-mode #sidebar,
.dark-mode .content-box,
.dark-mode footer,
.dark-mode .dropdown-content {
    background-color: #121212; color: #E0E0E0;
}
.dark-mode a { color: #E0E0E0; }
.dark-mode a:hover { color: #FFD700; }  /* Yellow accent for links */
.dark-mode .text-red-500,
.dark-mode .text-red-600 { color: #FFD700; }  /* Replace red with yellow */
.dark-mode header i,
.dark-mode header svg,
.dark-mode header button { opacity: 1; color: #E0E0E0; fill: #E0E0E0; }

.dark-mode #overlaySearchInput {
    background-color: #2d3748; color: #e2e8f0; border: 1px solid #4a5568;
}

/* Sidebar Link Specificity Fix */
#sidebar a { color: #000 !important; }
.dark-mode #sidebar a { color: #E0E0E0 !important; }


/*--------------------------------------------------------------
6.0 Components: Content Box, Footer Nav, Widgets
--------------------------------------------------------------*/
.content-box {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 6px 20px rgba(0,0,0,0.1);
    padding: 20px;
}
body.home .content-box {
    box-shadow: none !important;
}

nav.mobile {
    position: fixed; bottom: 0; left: 0; right: 0; width: 100%;
    background: #fff; border-top: 1px solid #ccc; z-index: 9999;
    padding: 0.5rem 0; overflow-x: hidden; box-sizing: border-box;
}
nav.mobile ul {
    display: flex; align-items: center; justify-content: space-evenly;
    gap: 1rem; list-style: none; margin: 0; padding: 0;
}
nav.mobile ul li { display: flex; flex-direction: column; align-items: center; }
nav.mobile ul li a {
    display: flex; flex-direction: column; align-items: center;
    text-decoration: none; color: #333; font-size: 0.75rem;
}
nav.mobile ul li a svg {
    display: block; width: 25px; height: 25px; margin-bottom: 4px;
}
@media (min-width: 1025px) { nav.mobile { display: none; } }
body { padding-bottom: 60px; } /* Prevent content from hiding behind fixed nav */

.dark-mode nav.mobile { background: #121212; border-top-color: #444; }
.dark-mode nav.mobile ul li a { color: #E0E0E0; }
.dark-mode nav.mobile ul li a svg { fill: currentColor; }

/* Ad & Widget Areas */
.below-header-ad-area, .above-footer-ad-area, .single-post-top-ad-area,
.single-post-mid-ad-area, .single-post-bottom-ad-area {
    margin-bottom: 15px; text-align: center; background: #f0f0f0; padding: 10px;
}
.below-header-widget-area, .above-footer-widget-area, .single-post-top-widget-area,
.single-post-mid-widget-area, .single-post-bottom-widget-area {
    margin-bottom: 20px;
}


/*--------------------------------------------------------------
7.0 Search Forms (404 & Search Page)
--------------------------------------------------------------*/
.search-container {
    background-color: #fff; border: 2px solid #dc3545;
    padding: 20px; border-radius: 5px;
    transition: all 0.3s ease;
    margin: 20px auto; max-width: 500px;
}
.search-container .search-field {
    width: 100%; padding: 10px; border: none; outline: none;
    background: inherit; color: inherit;
}
.search-submit {
    padding: 10px 20px; margin-top: 10px;
    background-color: #dc3545; color: white;
    border: none; border-radius: 5px;
    cursor: pointer; transition: background-color 0.3s ease;
}
.search-submit:hover { background-color: darkred; }

.dark-mode .search-container {
    background-color: #121212; border: 2px solid #FFD700;
}