/**
* Theme Name: Kubrick 2024
* Description: Adds support for languages written in a Right To Left (RTL) direction.
* See: https://codex.wordpress.org/Right_to_Left_Language_Support
* @package Kubrick_2024
* @since 1.0.0
*/

body {
  direction: rtl;
  unicode-bidi: embed;
}

.skip-link:focus {
  left: auto;
  right: 5px;
}

/* 1. Accessibility
  ==================================================== */
.skip-link:focus {
  right: 0.313rem;
  padding: 1rem 1.438rem 0.875rem;
}

/* 1. CONTENT
  ==================================================== */
#page-header {
  text-align: right;
}

#page-header .entry-title {
  text-align: right;
}

.featured-category-wrap::before {
  right: calc(-4rem - 0.5rem);
  /* Position the line on the left */
}

.featured-category-wrap::after {
  left: calc(-4rem - 0.5rem);
  right: auto;
  /* Position the line on the right */
}

/* Post thumbnail */
.post-thumbnail figcaption.wp-caption-text {
  right: 0;
  left: 0;
}

.post-meta li:first-child {
  margin-right: 0.875rem;
}

/* Read more */
.readmore-wrapper {
  padding-left: 1rem;
  padding-right: 0;
}

.readmore-wrapper:after {
  border-left: 1px solid var(--kubrick2024-lines);
  left: 0;
}
.readmore-wrapper:after {
  border-left: 1px solid var(--kubrick2024-lines);
  right: 0;
  border-right: none;
}

.readmore-wrapper svg.svg-icon {
  margin-left: 0.438rem;
}

.single .entry-footer .svg-icon {
  margin-left: 0.5rem;
}

.readmore-wrapper svg.svg-icon {
  rotate: 180deg;
}

/* 1. COMMENTS
  ==================================================== */
.comments-title .svg-icon {
  margin-left: 0.375rem;
}

.comment > .comment {
  margin-right: 4%;
}

.comment-meta {
  flex-grow: 1;
  padding-right: 0.75rem;
}

/* 1. Navigation
  ==================================================== */

/* Primary Navigation Styles */

#nav-container {
  border-radius: 0 0 0.5rem 0.5rem;
  padding: 0.688rem 1rem;
}

.nav-menu li ul {
  border-radius: 0 0 0.375rem 0.375rem;
  box-shadow: 0 0.375rem 1rem -0.5rem rgba(0, 0, 0, 0.27);
  right: 50%;
  /* Set left position to 50% of parent item */
  transform: translateX(50%);
  /* Shift horizontally by -50% of own width */
}

.nav-menu li ul ul {
  right: 100%;
  /* Position to the right of the parent submenu */
  transform: translateY(0);
  /* Adjust if necessary */
}

/* Mobile Menu */
.mobile-nav {
  padding-right: 0;
}

.mobile-nav ul {
  padding-right: 0;
}

.mobile-nav ul li a {
  padding-right: 1.5rem;
}

.mobile-nav ul li ul li a {
  padding-right: 2.25rem;
}

.mobile-nav ul li ul li ul li a {
  padding-right: 3rem;
}

/* BACK TO TOP MENU
  ==================================================== */
#backToTop {
  left: 2rem;
}

/* SOCIAL MENU
  ==================================================== */

#social-nav span {
  right: -10000px;
}

/* BLOG & POST NAVIGATION
  ==================================================== */
/* Post Navigation */
.post-navigation .nav-next,
.comment-navigation .nav-next {
  text-align: right;
}

/* MULTI-PAGE NAVIGATION
  ==================================================== */
.multi-page-links a,
.multi-page-links .post-page-numbers {
  margin-left: 0.188rem;
}

/* Typography
  ==================================================== */
/* Lists */
ol,
ul {
  padding-right: 2rem;
}

.list-unstyled {
  padding-right: 0;
  list-style: none;
}

dd {
  margin-right: 0;
}

blockquote::before {
  content: "\201D";
  right: -3rem;
  right: 0;
  left: auto;
}

/* Elements
   ==================================================== */
pre {
  background: var(--kubrick2024-grey-100);
  border: 1px solid var(--kubrick2024-grey-300);
  display: block;
  overflow: auto;
  font-size: 0.875rem;
  max-width: 100%;
  margin: 1.5rem 0;
  padding: 1rem;
  white-space: break-spaces;
  text-align: right;
}

/* Alignment
   ==================================================== */
.text-start {
  text-align: right !important;
}

.text-end {
  text-align: left !important;
}

.text-center {
  text-align: center !important;
}

.alignleft,
.float-start {
  float: right;
  margin: 0.375rem 0 0.5rem 2rem;
}

.alignright,
.float-end {
  float: left;
  margin: 0.375rem 2rem 0.5rem 0;
}

.aligncenter,
.float-center {
  margin: 1rem auto;
}

/* 1. WIDGETS
   ==================================================== */

.widget_nav_menu .sub-menu {
  padding-right: 1rem;
}

/* PLUGINS - Featherlight lightbox
  ==================================================== */
.featherlight-image {
  border-radius: 0.5rem 0.5rem 0 0;
}

.featherlight .featherlight-content .caption {
  border-radius: 0 0 0.5rem 0.5rem;
}

/* FORMS
  ==================================================== */

/* Adjustments for disabled state */

button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
input[type="reset"]:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
  box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.125); /* Light to medium grey glow */
}

.menu-item-search button:focus {
  box-shadow: 0 0 0 0.125rem rgba(108, 117, 125, 0.75); /* Light to medium grey glow */
}

/* Style the search input within the input-group */
.input-group input[type="search"] {
  border-radius: 0 0.313rem 0.313rem 0; /* Rounded corners on the left side */
}

/* Style the search button within the input-group */
.input-group button {
  border-radius: 0.313rem 0 0 0.313rem; /* Rounded corners on the right side */
}

/* 1. Search Modal
   ==================================================== */
li.menu-item-search {
  margin-right: 0.5rem;
  display: none;
}

.modal {
  right: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

/* This stops the browser scrollbar being removed */
.modal.show {
  overflow-y: scroll;
  overflow-x: hidden;
}

.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translate(0, -50px);
}

.modal-dialog-scrollable .modal-body {
  overflow-y: auto;
}

.modal-backdrop {
  right: 0;
}

.modal-header {
  border-top-right-radius: calc(0.5rem - 1px);
  border-top-left-radius: calc(0.5rem - 1px);
}

.modal-header .btn-close {
  padding: calc(1rem * 0.5) calc(1 * 0.5);
  margin: calc(-0.5 * 1rem) auto calc(-0.5 * 1rem) calc(-0.5 * 1);
}

.modal-footer {
  flex-shrink: 0;
  justify-content: flex-end;
  border-bottom-left-radius: calc(0.5rem - 1px);
  border-bottom-right-radius: calc(0.5rem - 1px);
}

@media (min-width: 576px) {
  .modal {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  }

  .modal-dialog {
    margin-left: auto;
    margin-right: auto;
  }
}
/* 1. Media Queries
   ==================================================== */

/* Extra small devices (portrait phones, less than 576px) */
/* No media query since this is the default in Bootstrap */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
  .bottom-sidebar-grid-3 .bottom-sidebar-widget:nth-child(3) {
    grid-column: 1 / -1; /* Third widget spans full width */
  }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
  .container {
    flex-direction: row;
    gap: 4rem;
    margin-top: 4.375rem;
  }

  .main-content {
    flex: 1;
  }

  .blog-left-sidebar .main-content,
  .post-left-sidebar .main-content,
  .template-left .main-content {
    order: 2;
  }

  .sidebar {
    flex-basis: 360px;
    /* Adjust width of the sidebar */
  }

  .site-title {
    font-size: 2.75rem;
  }

  .bottom-sidebar-grid-3 {
    grid-template-columns: repeat(3, 1fr); /* 3 columns */
  }

  .bottom-sidebar-grid-3 .bottom-sidebar-widget:nth-child(3) {
    grid-column: auto; /* Reset to default for larger screens */
  }

  /* Gallery 3 columns for medium devices (desktops, 768px and up) */
  .gallery-columns-3.gallery,
  .gallery-columns-4.gallery,
  .gallery-columns-5.gallery,
  .gallery-columns-6.gallery,
  .gallery-columns-7.gallery,
  .gallery-columns-8.gallery,
  .gallery-columns-9.gallery {
    grid-template-columns: repeat(3, 1fr);
  }

  .related-post {
    text-align: auto;
    text-align: right;
  }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
  li.menu-item-search,
  .searchModal-btn {
    display: block;
  }
  /* Post Author Bio */
  .post-author-info {
    flex-direction: row;
    align-items: start;
  }

  .post-author-description {
    text-align: right;
  }

  dl {
    display: grid;
    grid-template-columns: 30% 1fr;
    line-height: 1.2;
  }

  dt {
    padding-left: 1rem;
  }

  /* Resize grouped sidebars */
  .bottom-sidebar-grid-4 {
    grid-template-columns: repeat(4, 1fr);
  }

  /* Gallery 4 columns for large devices (large desktops, 992px and up) */
  .gallery-columns-4.gallery,
  .gallery-columns-5.gallery,
  .gallery-columns-6.gallery,
  .gallery-columns-7.gallery,
  .gallery-columns-8.gallery,
  .gallery-columns-9.gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/*  X-Large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
  .post-navigation .nav-next,
  .comment-navigation .nav-next {
    text-align: left;
  }

  /* Gallery 5, 6, 7, 8, and 9 columns for extra large devices */
  .gallery-columns-5.gallery {
    grid-template-columns: repeat(5, 1fr);
  }
  .gallery-columns-6.gallery {
    grid-template-columns: repeat(6, 1fr);
  }
  .gallery-columns-7.gallery {
    grid-template-columns: repeat(7, 1fr);
  }
  .gallery-columns-8.gallery {
    grid-template-columns: repeat(8, 1fr);
  }
  .gallery-columns-9.gallery {
    grid-template-columns: repeat(9, 1fr);
  }
}
