/*
Theme Name: Elcar
Author: Tanveen Sorkar
Author URI: https://www.facebook.com/iamtanveensorkar.tanvir
Description: Elcar is a modern, responsive Bootstrap-based WordPress theme ideal for blogs, portfolios, or business websites.
Version: 1.1.1
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blog, news, translation-ready
Text Domain: elcar
Copyright (C) 2025 Tanveen Sorkar. Elcar WordPress theme is licensed under the GPL. 

== Third Party Resources ==

Bootstrap
- Source: https://getbootstrap.com/
- License: MIT

Magnific Popup
- Source: https://github.com/dimsemenov/Magnific-Popup
- License: MIT

Font Awesome
- Source: https://fontawesome.com/
- License: SIL OFL 1.1 / MIT / CC BY 4.0
*/
.alignright {
  float: right;
  margin: 1em;
}

.alignleft {
  float: left;
  margin: 1em;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  background: #f9f9f9;
  padding: 5px;
}

.wp-caption-text {
  font-size: 0.9em;
}

.gallery-caption {
  font-style: italic;
}

.bypostauthor {
  font-weight: bold;
}

.screen-reader-text {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.container .pagination {
  display: flex;
  justify-content: center;
  margin: 30px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.container .pagination ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 8px;
}

.container .pagination ul li {
  display: inline-block;
}

.container .pagination ul li a,
.container .pagination ul li span {
  display: block;
  padding: 8px 14px;
  color: #555;
  background: #f5f5f5;
  border-radius: 5px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.container .pagination ul li a:hover {
  background-color: #0073aa;
  color: #fff;
}

.container .pagination ul li .current {
  background-color: #0073aa;
  color: #fff;
  pointer-events: none;
  box-shadow: none;
}

.container .pagination ul li .dots {
  cursor: default;
  color: #999;
  background: transparent;
  box-shadow: none;
}

.blog-title {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
  white-space: normal;
}

.blog-title a {
  display: inline-block;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.post-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  word-break: break-word;
}

.comments-title {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  word-break: break-word;
}

.entry-content a,
.comment-content a,
.widget a {
  text-decoration: underline;
  color: #0073aa;
}

.entry-content a:hover {
  text-decoration: none;
  color: #005177;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 15px;
  z-index: 1000;
}

.skip-link:focus {
  top: 0;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

/* Desktop Navigation */
.main-navigation li:focus-within>ul,
.main-navigation li:hover>ul {
  display: block;
}

.main-menu.desktop-menu {
  display: flex;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu li a {
  text-decoration: none;
  color: #FFFFFF;
  font-weight: 600;
  padding: 10px 5px;
  display: inline-block;
}

.main-menu li a:hover,
.main-menu li a:focus {
  color: #FFFFFF;
}

.nav {
  background: none;
	color: #FFFFFF;
}

.site-title:focus,
.site-title a:focus {
  outline: 2px solid #0073aa;
  outline-offset: 2px;
}

nav ul li ul li a:hover {
  background-color: #FFFFFF;
}

.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #FFFFFF;
  min-width: 150px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.main-navigation ul ul li {
  display: block;
  padding: 5px 15px;
}

.main-navigation ul ul li a {
  display: block;
  color: #333;
  text-decoration: none;
}

.main-navigation ul ul li a:hover {
  background: #FFFFFF;
}

#primary-menu .menu-item-has-children.open > .sub-menu {
  display: block;
}

body {
  overflow-x: hidden;
}

.menu-item-has-children {
  position: relative;
}

.menu-item-has-children > .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 9999;
  min-width: 180px; 
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children.focus > .sub-menu {
  display: block;
}

.sub-menu .menu-item-has-children > .sub-menu {
  top: 0;
  left: 100%; 
}

.menu-item a:hover {
  color: #fff;
}
/* Base Navigation */
.main-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 20px;
}

.main-menu li a {
  text-decoration: none;
  color: #FFFFFF;
  font-weight: 600;
  padding: 10px 15px;
  display: block;
}

/* Hamburger Button */
#mobile-menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: #FFFFFF;
  cursor: pointer;
}

/* Mobile Menu */
@media (max-width: 768px) {
  #mobile-menu-toggle {
    display: block;
    z-index: 9999;
  }

  .main-menu {
    flex-direction: column;
    position: absolute;
    top: 20%;
    left: 0;
    right: 0;
    background: #fff;
    display: none;
    padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 9998;
  }

  .main-menu.active {
    display: flex;
  }

  .main-menu li a {
    padding: 10px;
    color: #000;
  }
}

@media (min-width: 769px) {
  .main-menu {
    display: flex !important;
    position: static;
    flex-direction: row;
    box-shadow: none;
  }
}
@media (max-width: 768px) {
  .main-navigation {
    transition: all 0.3s ease;
  }
}
@media (max-width: 768px) {
  #primary-menu {
    display: none;
    flex-direction: column;
    background: #fff;
    position: absolute;
    top: 150px;
    left: 0;
    right: 0;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    z-index: 9999;
  }

  #primary-menu.active {
    display: flex;
  }
}
