/* 
Theme Name: wpCodex
Theme URI: https://www.wpcodex.com/
Author: wpCodex
Description: Simple theme with header, footer, right sidebar, and dropdown menu.
Version: 1.0
*/

/* ===== General Reset ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f4f4f4;
  overflow-x: hidden; /* prevent horizontal scroll */
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
}

/* ===== Header ===== */
.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 20px;
  display: flex;
  justify-content: center; /* center logo & toggle horizontally */
  align-items: center;
  position: relative;
  gap: 40px;
}

.site-logo {
  max-width: 200px;
  flex-shrink: 0;
}

.site-logo img, div {
    max-width: 100%;
    height: auto;
    display: block;
}



.menu-toggle {
  font-size: 28px;
  background: transparent;
  border: none;
  color: #333;
  cursor: pointer;
  user-select: none;
  position: absolute;
  right: 20px;
  top: 15px;
  z-index: 10000;
  display: none; /* hidden on desktop */
}

/* ===== Main Navigation ===== */
.main-navigation {
  position: relative;
  width: 100%;
  border-top: 2px solid #0073aa;
  border-bottom: 2px solid #0073aa;
  background: #005f8c;
  box-shadow: none;
  display: flex;
  justify-content: center;
  z-index: 9999;
  padding: 10px;
}

.main-navigation ul {
  display: flex;
  justify-content: center;
  gap: 10px;
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative; /* to position dropdowns correctly */
  width: auto;
}

.main-navigation ul li a {
  text-decoration: none;
   color:#fff;
  font-weight: 600;
  padding: 12px 18px;
  display: block;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

/* General hover for main menu links */
.main-navigation ul li a:hover,
.main-navigation ul li:hover > a {
  background-color: #e6f2ff;
  color: #005f8c;
  border-radius: 4px 4px 0 0;
}

/* Hover and active states excluding menu-item-425 */
.main-navigation ul li:not(#menu-item-2128) a:hover,
.main-navigation ul li:not(#menu-item-2128):hover > a,
.main-navigation ul li:not(#menu-item-2128).current-menu-item > a,
.main-navigation ul li:not(#menu-item-2128).current_page_item > a {
  background-color: #e6f2ff;
  color: #005f8c;
  border-radius: 4px 4px 0 0;
}

/* Hover and active states excluding menu-item-2128 */
.main-navigation ul li:not(#menu-item-2128) a:hover,
.main-navigation ul li:not(#menu-item-2128):hover > a,
.main-navigation ul li:not(#menu-item-2128).current-menu-item > a,
.main-navigation ul li:not(#menu-item-2128).current_page_item > a,
.main-navigation ul li:not(#menu-item-2128).current-menu-ancestor > a,
.main-navigation ul li:not(#menu-item-2128).current-menu-parent > a {
  background-color: #e6f2ff;
  color: #005f8c;
  border-radius: 4px 4px 0 0;
}











/* ===== Dropdown Menus ===== */
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: #005f8c;
  border: 1px solid #ddd;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 8px 10px rgba(0,0,0,0.15);
  flex-direction: column;
  padding: 5px 0;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.main-navigation ul li:hover > ul {
  display: flex;
  opacity: 1;
  pointer-events: auto;
}

.main-navigation ul ul li {
  width: 100%;
}

.main-navigation ul ul li a {
   color: #fff;
  padding: 10px 20px;
  font-weight: 400;
  white-space: nowrap;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.main-navigation ul ul li a:hover {
  background-color: #0073aa;
  color: #fff;
  border-radius: 0 4px 4px 0;
}

.main-navigation ul li.menu-item-has-children > a::after {
  content: "▼";
  font-size: 10px;
  margin-left: 6px;
   color:#fff;
  transition: transform 0.3s ease;
}

.main-navigation ul li.menu-item-has-children:hover > a::after {
  transform: rotate(-180deg);
  color: #005f8c;
}

/* ===== Sidebar Styling ===== */
.site-content {
  display: flex;
  gap: 20px;
  margin: 20px auto;
  max-width: 1200px;
  padding: 0 20px;
}

.content-area {
  flex: 3;
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  max-width: 1200px;
  margin: 0 auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
}

.widget-area {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  min-width: 250px;
}

.widget {
  margin-bottom: 20px;
}

.widget-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 15px;
  padding-bottom: 8px;
  border-bottom: 2px solid #eee;
  color: #333;
}

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

.widget ul li {
  border-bottom: 1px solid #f0f0f0;
  padding: 8px 0;
}

.widget ul li:last-child {
  border-bottom: none;
}

.widget ul li a {
  text-decoration: none;
  color: #555;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: block;
}

.widget ul li a:hover {
  color: #0073aa;
  padding-left: 5px;
}

/* ===== Post Listing Styling ===== */
article.post {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 30px;
  padding: 25px 30px;
  transition: box-shadow 0.3s ease;
  box-shadow: 0 6px 15px rgba(0,0,0,0.1);
}

article.post:hover {
  box-shadow: 0 6px 15px rgba(0,0,0,.3);
}

.entry-header h2.entry-title {
  font-size: 1.6rem;
  margin-bottom: 12px;
  font-weight: 700;
}

.entry-header h2.entry-title a {
  color: #0073aa;
  text-decoration: none;
  transition: color 0.3s ease;
}

.entry-header h2.entry-title a:hover {
  color: #005f8c;
  text-decoration: underline;
}

.entry-summary p {
  line-height: 1.6;
  font-size: 1rem;
  color: #555;
}

.entry-summary p a {
  color: #0073aa;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

.entry-summary p a:hover {
  color: #005f8c;
  text-decoration: underline;
}

/* ===== Pagination Styling ===== */
.pagination {
  text-align: center;
  margin: 40px 0;
}

.pagination .page-numbers {
  display: inline-block;
  margin: 0 6px;
  padding: 8px 14px;
  border: 1px solid #ddd;
  border-radius: 5px;
  color: #0073aa;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.pagination .page-numbers.current {
  background-color: #0073aa;
  color: #fff;
  border-color: #0073aa;
  cursor: default;
}

.pagination .page-numbers:hover:not(.current) {
  background-color: #e6f2ff;
}

/* ===== Responsive Styles ===== */







@media (max-width: 768px) {
  /* Your existing mobile menu styles */
  .menu-toggle {
    display: block;
  }

  .main-navigation {
    flex-direction: column;
    display: none; /* toggle with JS */
    margin-top: 0;
    width: 100vw;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    border-top: 2px solid #0073aa;
    border-bottom: 2px solid #0073aa;
    padding: 10px 0;
  }

  .main-navigation ul {
    flex-direction: column;
    gap: 0;
  }

  .main-navigation ul li {
    width: 100%;
  }

  .main-navigation ul ul {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 20px;
    opacity: 1 !important;
    pointer-events: auto !important;
    display: none; /* hidden by default */
  }

  .main-navigation ul li.menu-item-has-children > a::after {
    content: "▶";
    float: right;
    margin-right: 15px;
    transform: rotate(0);
  }

  .main-navigation ul li.menu-item-has-children.open > ul {
    display: block;
  }

  /* New responsive layout for content and sidebar */
  .content-area,
  .sidebar-area {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 auto !important;
    padding: 0 15px;
    box-sizing: border-box;
  }

  /* Stack sidebar below content */
  .content-sidebar-wrapper {
    display: flex;
    flex-direction: column;
  }

  /* Make images responsive */
  img {
    max-width: 100%;
    height: auto;
    display: block;
  }
  
  
  
  
  .site-content {
    flex-direction: column;
    padding: 0px;
  }
  .content-area,
  .sidebar {
    width: 100% !important;
    margin: 0;
    padding: 10;
  }

  /* Center post thumbnail and make it responsive */
  .post-thumbnail img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
  }

  /* Adjust entry title padding & alignment for small screens */
  .entry-header .entry-title {
    font-size: 1.8em;
    padding: 0 10px;
  }

  .entry-content {
    padding: 0 10px;
  }

  /* Optional: add some margin below post thumbnail */
  .post-thumbnail {
    margin-bottom: 15px;
  }  
  
 
  
}


.form-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
}

.form-textarea {
  width: 100%;
  min-height: 120px;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 16px;
  resize: vertical;
}

.form-submit {
  background-color: #0073aa;
  color: #fff;
  padding: 10px 25px;
  border: none;
  border-radius: 4px;
  font-size: 18px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-submit:hover {
  background-color: #005177;
}

.recaptcha {
  display: block;
  margin: 10px 0;
}



/* ===== Footer ===== */
.site-footer {
  text-align: center;
  padding: 20px 0;
  background-color: #0073aa;
  color: #fff;
}


a {
  color: #1e73be;               /* nice blue tone */
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
  font-weight: 600;
}

a:hover {
  color: #005f8c;               /* darker blue on hover */
  text-decoration: underline;
}

/* Style for inline code */
code {
    background-color: #f5f5f5;  /* Light gray background */
    color: #c7254e;             /* Text color */
    font-family: "Courier New", Courier, monospace; /* Monospace font */
    font-size: 0.95em;          /* Slightly smaller text */
    padding: 2px 4px;           /* Small padding */
    border-radius: 4px;         /* Rounded corners */
}

/* Style for code blocks */
pre code {
    display: block;
    background-color: #2d2d2d;  /* Dark background for blocks */
    color: #f8f8f2;             /* Light text color */
    padding: 15px;
    overflow-x: auto;           /* Horizontal scroll if code is long */
    border-radius: 6px;
    font-size: 0.9em;
    line-height: 1.5em;
}

/* Optional: Add a border for inline code */
code.inline-code {
    border: 1px solid #ddd;
}



/* =======================
   WooCommerce Checkout Page
======================= */

/* Container & layout */
.woocommerce-checkout form.checkout {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

/* Headings */
.woocommerce-checkout h3 {
    font-size: 22px;
    font-weight: 700;
    color: #0073aa;
    margin-bottom: 20px;
}

/* Form labels */
.woocommerce-checkout label {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

/* Input fields */
.woocommerce-checkout input.input-text,
.woocommerce-checkout input[type="email"],
.woocommerce-checkout input[type="tel"],
.woocommerce-checkout input[type="password"],
.woocommerce-checkout select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.woocommerce-checkout input:focus,
.woocommerce-checkout select:focus {
    border-color: #0073aa;
    box-shadow: 0 0 6px rgba(0,115,170,0.3);
    outline: none;
}

/* Place order button */
.woocommerce-checkout .button,
.woocommerce-checkout #place_order {
    background: #0073aa;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 14px 25px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.woocommerce-checkout .button:hover,
.woocommerce-checkout #place_order:hover {
    background: #005f8d;
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.2);
}

/* Checkbox & terms */
.woocommerce-checkout .woocommerce-form__label-for-checkbox {
    font-size: 14px;
    color: #555;
}

.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper {
    margin-bottom: 20px;
}

/* Order review box */
.woocommerce-checkout #order_review {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
    margin-bottom: 30px;
}

/* Payment methods */
.woocommerce-checkout .wc_payment_methods {
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .woocommerce-checkout form.checkout {
        padding: 20px;
    }

    .woocommerce-checkout .button,
    .woocommerce-checkout #place_order {
        width: 100%;
        font-size: 16px;
        padding: 12px 20px;
    }
}

/* =======================
   WooCommerce Add to Cart Button & Quantity Box
======================= */

/* Add to Cart Button */
.woocommerce div.product .single_add_to_cart_button {
    background: #0073aa;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.woocommerce div.product .single_add_to_cart_button:hover {
    background: #005f8d;
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(0,0,0,0.2);
}

.woocommerce div.product .single_add_to_cart_button:active {
    transform: translateY(1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Quantity Input Box */
.woocommerce div.product .quantity input.qty {
    width: 70px;
    padding: 8px 12px;
    font-size: 16px;
    border: 2px solid #0073aa;
    border-radius: 8px;
    text-align: center;
    transition: all 0.3s ease;
}

.woocommerce div.product .quantity input.qty:focus {
    border-color: #005f8d;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
    outline: none;
}

/* Quantity buttons (plus/minus) */
.woocommerce div.product .quantity .plus,
.woocommerce div.product .quantity .minus {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 6px 12px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.woocommerce div.product .quantity .plus:hover,
.woocommerce div.product .quantity .minus:hover {
    background: #005f8d;
}



/* Parent container - only for My Account page */
.woocommerce-account .woocommerce {
    display: flex;           /* Enables flex layout */
    flex-wrap: wrap;         /* Wrap on smaller screens */
    gap: 20px;               /* Space between nav and content */
    max-width: 1000px;       /* Optional: limit total width */
    margin: 0 auto;          /* Center container */
}

/* Navigation box */
.woocommerce-account .woocommerce-MyAccount-navigation {
    flex: 0 0 250px;          /* Fixed width */
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Content box */
.woocommerce-account .woocommerce-MyAccount-content {
    flex: 1;                  /* Take remaining space */
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 25px;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Responsive adjustment */
@media (max-width: 768px) {
    .woocommerce-account .woocommerce {
        flex-direction: column; /* Stack vertically on mobile */
    }

    .woocommerce-account .woocommerce-MyAccount-navigation,
    .woocommerce-account .woocommerce-MyAccount-content {
        flex: 1 1 100%;
    }
}

.footer-links a {
  color: #fff; /* change color as needed */
  text-decoration: none;
	font-weight:normal;
  margin: 0 5px;
}

.footer-links a:hover {
  text-decoration: underline;
}

/* Global Table Styles for WordPress */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: Arial, sans-serif;
  font-size: 14px;
}

table th,
table td {
  border: 1px solid #ddd;
  padding: 12px 15px;
  text-align: center;
}

table th {
  background-color: #0073aa; /* WordPress primary color */
  color: #ffffff;
  font-weight: 600;
}

table tr:nth-child(even) {
  background-color: #f9f9f9;
}

table tr:hover {
  background-color: #f1f1f1;
}

table td {
  vertical-align: middle;
}

table td a {
  color: #0073aa;
  text-decoration: none;
}

table td a:hover {
  text-decoration: underline;
}

/* Responsive tables on mobile */
@media screen and (max-width: 768px) {
  table, thead, tbody, th, td, tr {
    display: block;
  }
  
  table tr {
    margin-bottom: 15px;
  }
  
  table td {
    text-align: right;
    padding-left: 50%;
    position: relative;
  }
  
  table td::before {
    content: attr(data-label);
    position: absolute;
    left: 15px;
    width: 45%;
    text-align: left;
    font-weight: bold;
  }
  
  table th {
    display: none;
  }
}




