/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://rd-studio.com/
 Description:  Дочерняя тема для Hello Elementor
 Author:       RD Studio
 Author URI:   https://rd-studio.com/
 Template:     hello-elementor
 Version:      1.0.0
 License:      GNU General Public License v3 or later
 License URI:  https://www.gnu.org/licenses/gpl-3.0.html
 Text Domain:  hello-elementor-child
 Tags:         flexible-header, custom-colors, custom-menu, custom-logo, featured-images
*/

body {
  margin-top: -1.8em;
  font-family: var(--e-global-typography-text-font-family), sans-serif;
  font-size: var(--e-global-typography-text-font-size);
  font-weight: var(--e-global-typography-text-font-weight);
  line-height: 1.8;
}

main {
  /*padding: 0 15px;*/
}

h1 {
  font-family: var(--e-global-typography-primary-font-family), sans-serif;
  font-size: var(--e-global-typography-primary-font-size);
  font-weight: var(--e-global-typography-primary-font-weight);
}

h2 {
  font-family: var(--e-global-typography-secondary-font-family), sans-serif;
  font-size: var(--e-global-typography-secondary-font-size);
  font-weight: var(--e-global-typography-text-font-weight);
}

h3 {
  font-family: var(--e-global-typography-secondary-font-family), sans-serif;
  font-size: 24px;
  font-weight: var(--e-global-typography-text-font-weight);
}

h4 {
  font-family: var(--e-global-typography-secondary-font-family), sans-serif;
  font-size: 22px;
  font-weight: var(--e-global-typography-text-font-weight);
}

h5 {
  font-family: var(--e-global-typography-secondary-font-family), sans-serif;
  font-size: 20px;
  font-weight: var(--e-global-typography-text-font-weight);
}

h6 {
  font-family: var(--e-global-typography-secondary-font-family), sans-serif;
  font-size: 18px;
}

.lead {
  font-family: var(--e-global-typography-accent-font-family), sans-serif;
  font-size: var(--e-global-typography-accent-font-size);
  font-weight: var(--e-global-typography-accent-font-weight);
}

a {
  color: var(--e-global-color-primary);
}

a:hover {
  color: var(--e-global-color-accent);
}

button,
a.button,
input[type="submit"] {
  display: inline-block;
  padding: 5px 15px;
  color: var(--e-global-color-primary);
  text-decoration: none !important;
  border: 1px solid var(--e-global-color-primary);
  cursor: pointer;
}

button:hover,
a.button:hover,
input[type="submit"]:hover {
  color: var(--e-global-color-accent);
  border-color: var(--e-global-color-accent);
}

/* ====== ТАБЛИЦЫ =========== */
table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.9em;
	border: 1px solid #ddd;
	margin-bottom: 1em;
	
	display: block;
    overflow-x: auto;
    max-width: 100%;
}

th, td {
    padding: 0.75em 1em;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

th {
    font-weight: 600;
    border-bottom: 2px solid #222;
	text-align: center;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr:nth-child(odd) {
    background-color: #f7f7f7;
}

tbody tr:hover {
    background-color: #eef4ff;
}

/* ========= NOTICE ========== */
.notice {
    padding: 0.9em 1.2em;
    border-radius: 6px;
    border-left: 4px solid;
    margin: 1.5em 0;
}

.notice-success {
    background-color: #eafaf1;
    border-color: #27ae60;
    color: #1a5c35;
}

.notice-warning {
    background-color: #fef9e7;
    border-color: #f1c40f;
    color: #7d6608;
}

.notice-danger {
    background-color: #fdedec;
    border-color: #e74c3c;
    color: #922b21;
}

/*========= PRE и CODE =============*/
pre {
 /* Основные стили из минимума */
	position: relative;
    
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 14px;
    line-height: 1.6;
	margin: 0;
	padding: 1em;

    tab-size: 4; /* Размер табуляции */
   	white-space: pre-wrap; /* Перенос длинных строк */
    word-wrap: break-word;
	
	width: 100%;
	overflow: auto;
}

.code-block-wrapper {
	position: relative;
	margin: 1.5em 0; 
	background: #f5f5f5;
    border: 1px solid #ddd;
    border-left: 4px solid #0073aa; /* Акцентная полоса слева */
	border-radius: 10px;
    padding: 0;
	max-width: 100%;
}

.code-language-header {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	padding: 0.5em;
	background-color: #e5e5e5;
	
	position: sticky;
	top: 0;
	z-index: 5;
}

button.copy-btn {
	/*position: absolute;
    top: 10px;
    right: 10px;*/

    /*background: rgba(34, 113, 177, 0.7);*/
	background-color: rgba(100, 100, 100, 0.6) !Important;
    color: white !Important;
    border: none !Important;
    border-radius: 3px !Important;
    padding: 5px 12px !Important;
    font-size: 12px !Important;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s;
    z-index: 100;
}

button.copy-btn:hover,
button.copy-btn:focus
{
	color: white !Important;
	/*background: rgba(34, 113, 177, 1);*/
	background-color: rgba(100, 100, 100, 1) !Important;
	border: none !Important;
}

code {
	background-color: #eee;
	padding: 0 5px;
	color: rgb(138, 36, 36);
}

/* ===== СТИЛИ ШАПКИ САЙТА ===== */
.site-name a{
	text-decoration: none;
}
.site-name a span{
	color: var(--e-global-color-accent);
}

/* ===== СТИЛИ АРХИВА БЛОГА ===== */

/* Контейнер */
.archive-page .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Сетка постов */
.archive-content {
  display: flex;
  gap: 40px;
}

.posts-grid {
  flex: 1;
}

.posts-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

@media (max-width: 992px) {
  .archive-content {
    flex-direction: column;
  }

  .posts-wrapper {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .posts-wrapper {
    grid-template-columns: 1fr;
  }

  .archive-header {
    padding: 40px 0;
    margin-bottom: 40px;
  }

  .archive-title {
    font-size: 2rem;
  }
}

/* Карточка поста */
.post-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.post-thumbnail {
  position: relative;
  overflow: hidden;
  /* height: 200px; */
  aspect-ratio: 1.5;
}

.post-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.post-card:hover .post-thumbnail img {
  transform: scale(1.05);
}

.read-more-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px;
  text-align: center;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.post-card:hover .read-more-overlay {
  transform: translateY(0);
}

/* Контент поста */
.post-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.post-categories {
  margin-bottom: 15px;
}

a.category-tag {
  display: inline-block;
  background: #f0f7ff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  margin-right: 8px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

a.category-tag:hover {
  background: var(--e-global-color-primary);
  color: white;
}

.post-title {
  /* font-size: 1.5rem; */
  margin-bottom: 15px;
  line-height: 1.4;
}

/* .post-title a {
  color: var(--e-global-color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.post-title a:hover {
  color: #007cba;
} */

/* Мета-данные */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  color: #666;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.post-meta svg {
  vertical-align: middle;
}

/* Краткое описание */
.post-excerpt {
  margin-bottom: 20px;
  line-height: 1.6;
  color: #555;
  flex-grow: 1;
}

.post-excerpt p {
  margin: 0;
}

/* Футер поста */
.post-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #007cba;
  text-decoration: none;
  font-weight: 600;
  transition: gap 0.3s ease;
}

.read-more-btn:hover {
  gap: 12px;
  color: #005a87;
}

.reading-time {
  font-size: 0.85rem;
  color: #888;
}

.post-date {
  display: flex;
  gap: 5px;
  align-items: center;
}

/* Пагинация */
.archive-pagination {
  text-align: center;
  margin-top: 40px;
}

.nav-links {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 15px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: var(--e-global-color-primary);
  font-weight: 600;
  transition: all 0.3s ease;
}

.page-numbers:hover {
  background: #f8f9fa;
  border-color: var(--e-global-color-primary);
  color: var(--e-global-color-primary);
}

.page-numbers.current {
  background: var(--e-global-color-primary);
  border-color: var(--e-global-color-primary);
  color: white;
}

.page-numbers.dots {
  background: transparent;
  border: none;
  min-width: auto;
}

.page-numbers.prev,
.page-numbers.next {
  min-width: 120px;
}

/* Нет постов */
.no-posts {
  text-align: center;
  padding: 80px 20px;
}

.no-posts svg {
  margin-bottom: 20px;
  color: #ddd;
}

.no-posts h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: #333;
}

.no-posts p {
  color: #666;
  margin-bottom: 25px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* Сайдбар */
.archive-sidebar {
  width: 300px;
}

@media (max-width: 992px) {
  .archive-sidebar {
    width: 100%;
    margin-top: 40px;
  }
}

/* Виджеты в сайдбаре */
.archive-sidebar .widget {
  background: white;
  padding: 25px;
  border-radius: 12px;
  margin-bottom: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.archive-sidebar .widget-title {
  font-size: 1.3rem;
  margin-bottom: 20px;
  color: #1a1a1a;
  padding-bottom: 10px;
  border-bottom: 2px solid #f0f0f0;
}

/* Специальные стили для разных архивов */
.category-archive .archive-header {
  background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.tag-archive .archive-header {
  background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.author-archive .archive-header {
  background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
}

.date-archive .archive-header {
  background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
}

/* === Comments === */
.comments-area {
  margin: 20px 0;
  padding: 5px 15px;
  border: 1px solid var(--e-global-color-secondary);
}

.comments-area
  input:not([type="submit"]):not([type="button"]):not([type="reset"]):not(
    [type="cancel"]
  ),
.comments-area textarea {
  width: 100%;
  border: 1px solid var(--e-global-color-secondary);
  padding: 5px 10px;
}

.comments-area input[type="submit"],
.comments-area button,
.comments-area .button {
  display: block;
  margin: 0 auto;
}

/* ========= Страница контакты ============= */

#contacts-section a {
  text-decoration: none;
}

#contacts-section input:not([type="submit"]),
#contacts-section textarea {
  width: 100%;
  padding: 0.5em;
}

.intl-tel-input.separate-dial-code.allow-dropdown.iti-sdc-4 input[type="text"] {
  padding-left: 92px !important;
}


/*  ************* ROYAL ELEMENTOR POST GRID ************** */
.wpr-grid-image-wrap {
	position: relative;
  	width: 100%; /* или любая нужная ширина */
  	aspect-ratio: 16 / 9; /* задает соотношение сторон */
 	overflow: hidden; /* обрезает всё, что выходит за пределы */
  	background: #f0f0f0; /* цвет фона на случай, если картинка не загрузится */
}

.wpr-grid-image-wrap img {
  	position: absolute;
  	top: 0;
  	left: 0;
  	width: 100%;
  	height: 100%;
  	object-fit: cover; /* ключевое свойство - заполняет всю площадь, сохраняя пропорции */
}
