/**
 * Posts archive / articles grid.
 *
 * @package hello-elementor-child
 */

.hec-posts,
.hec-posts-archive {
    width: 100%;
}

/* Top controls */
.hec-posts-controls {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin: 0 0 24px;
}

.hec-posts-controls__select {
    appearance: none;
    -webkit-appearance: none;
    min-width: 200px;
    min-height: 48px;
    padding: 0 44px 0 20px;
    border: 1px solid transparent;
    border-radius: 9999px;
    background-color: #ffffff;
    background-image:
        linear-gradient(45deg, transparent 50%, #212121 50%),
        linear-gradient(135deg, #212121 50%, transparent 50%);
    background-position:
        calc(100% - 24px) 50%,
        calc(100% - 18px) 50%;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    color: #212121;
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.hec-posts-controls__select:hover,
.hec-posts-controls__select:focus {
    border-color: var(--color-border-light, #e8e4dc);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

/* Grid */
.hec-posts-grid {
    display: grid;
    grid-template-columns: repeat(var(--hec-posts-cols, 4), minmax(0, 1fr));
    gap: 24px;
}

.hec-post-card {
    min-width: 0;
    background: var(--color-white, #ffffff);
    border: 0;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.hec-post-card:hover {
    box-shadow: var(--shadow-lg, 0 10px 15px rgba(0, 0, 0, 0.08));
    transform: translateY(-2px);
}

.hec-post-card__link {
    display: flex;
    flex-direction: column;
    min-height: 100%;
    color: inherit;
    text-decoration: none !important;
}

.hec-post-card__image {
    position: relative;
    width: 100%;
    margin: 0;
    padding-top: 50%;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
    background: var(--color-bg-light, #F6F1EA);
}

.hec-post-card__img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hec-post-card:hover .hec-post-card__img {
    transform: scale(1.03);
}

.hec-post-card__placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #212121;
    font-size: 14px;
    opacity: 0.8;
}

.hec-post-card__body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 18px 16px 14px;
}

.hec-post-card__title {
    margin: 0 0 26px;
    color: var(--color-title-card-doctor, #212121);
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 500;
    line-height: 1.22;
}

.hec-post-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: auto;
}

.hec-post-card__date {
    color: #6f6f6f;
    font-family: var(--font-primary);
    font-size: 13px;
    font-weight: 400;
    line-height: 1.2;
}

.hec-post-card__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    min-width: 28px;
    border-radius: 9999px;
    background: var(--color-accent-light, #E2E868);
    color: var(--color-primary-dark, #212B10);
    transition: all 0.2s ease;
}

.hec-post-card:hover .hec-post-card__arrow {
    background: var(--color-primary, #4E5B31);
    color: var(--color-white, #ffffff);
}

/* Empty state */
.hec-posts-empty {
    margin: 24px 0;
    color: #6f6f6f;
    text-align: center;
}

/* ============================================
   POSTS CAROUSEL
   ============================================ */

.hec-posts {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hec-posts__track {
    display: grid;
    grid-template-columns: repeat(var(--hec-posts-cols, 4), 1fr);
    gap: 24px;
}

.hec-posts--carousel .hec-posts__track {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.hec-posts--carousel .hec-posts__track::-webkit-scrollbar {
    display: none;
}

.hec-posts--carousel .hec-post-card {
    flex: 0 0 calc((100% - 72px) / 4);
    scroll-snap-align: start;
}

/* Bottom row: progress line + arrows */
.hec-posts--carousel .hec-posts__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 2px 10px 0;
    margin-top: 20px;
}

.hec-posts--carousel .hec-posts__progress {
    position: relative;
    flex: 1;
    height: 2px;
    background: #eee9dd;
    overflow: hidden;
}

.hec-posts--carousel .hec-posts__progress-bar {
    display: block;
    width: 8%;
    height: 100%;
    background: #c9c0ad;
    transition: width 0.2s ease;
}

.hec-posts__nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.hec-posts--carousel .hec-posts__bottom .hec-posts__nav {
    margin-top: 0;
    flex-shrink: 0;
}

/* ============================================
   POSTS CAROUSEL ARROWS
   стрелки карусели [hec_posts carousel="true"]
   ============================================ */
   
   
   
   /* ============================================
   POSTS CAROUSEL ARROWS — LIKE REVIEWS, NORMAL ARROW
   ============================================ */

/* ============================================
   POSTS CAROUSEL ARROWS — LIKE REVIEWS, CENTERED CSS ARROW
   ============================================ */

.hec-posts--carousel .hec-posts__prev,
.hec-posts--carousel .hec-posts__next {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 0 !important;
    border-radius: 9999px !important;
    border: 1px solid var(--color-border-light, #e8e4dc) !important;
    background: var(--color-bg-light, #F6F1EA) !important;
    color: transparent !important;
    display: grid !important;
    place-items: center !important;
    cursor: pointer !important;
    line-height: 1 !important;
    box-shadow: none !important;
    position: relative !important;
    overflow: visible !important;
    font-size: 0 !important;
    transition: all 0.2s ease !important;
}

.hec-posts--carousel .hec-posts__prev svg,
.hec-posts--carousel .hec-posts__next svg,
.hec-posts--carousel .hec-posts__prev .dashicons,
.hec-posts--carousel .hec-posts__next .dashicons {
    display: none !important;
}

.hec-posts--carousel .hec-posts__prev::before,
.hec-posts--carousel .hec-posts__next::before {
    content: "" !important;
    position: absolute !important;
    left: 50% !important;
    top: 50% !important;
    width: 7px !important;
    height: 7px !important;
    margin: 0 !important;
    border-top: 1.8px solid var(--color-primary, #505E2C) !important;
    border-right: 1.8px solid var(--color-primary, #505E2C) !important;
    transform-origin: center center !important;
}

.hec-posts--carousel .hec-posts__prev::before {
    transform: translate(-38%, -50%) rotate(-135deg) !important;
}

.hec-posts--carousel .hec-posts__next::before {
    transform: translate(-62%, -50%) rotate(45deg) !important;
}

.hec-posts--carousel .hec-posts__prev:hover,
.hec-posts--carousel .hec-posts__next:hover {
    background: var(--color-primary, #505E2C) !important;
    border-color: var(--color-primary, #505E2C) !important;
}

.hec-posts--carousel .hec-posts__prev:hover::before,
.hec-posts--carousel .hec-posts__next:hover::before {
    border-color: var(--color-white, #ffffff) !important;
}

.hec-posts--carousel .hec-posts__prev:disabled,
.hec-posts--carousel .hec-posts__next:disabled {
    opacity: 0.35 !important;
    cursor: not-allowed !important;
    background: var(--color-bg-light, #F6F1EA) !important;
    border-color: var(--color-border-light, #e8e4dc) !important;
}

.hec-posts--carousel .hec-posts__prev:disabled::before,
.hec-posts--carousel .hec-posts__next:disabled::before {
    border-color: var(--color-primary, #505E2C) !important;
}


/* ============================================
   POSTS ARCHIVE PAGINATION
   пагинация [hec_posts_archive]
   как у докторов
   ============================================ */

.hec-posts-pagination {
    margin-top: 36px;
    margin-bottom: 20px;
}

.hec-posts-pagination ul.page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.hec-posts-pagination ul.page-numbers li {
    margin: 0;
    padding: 0;
    list-style: none;
}

.hec-posts-pagination ul.page-numbers li a,
.hec-posts-pagination ul.page-numbers li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #e8e4dc;
    border-radius: 9999px;
    background: #ffffff;
    color: #505E2C;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    transition: all 0.2s ease;
}

.hec-posts-pagination ul.page-numbers li a:hover,
.hec-posts-pagination ul.page-numbers li span.current {
    background: #505E2C;
    border-color: #505E2C;
    color: #ffffff;
    text-decoration: none;
}

.hec-posts-pagination ul.page-numbers li span.dots {
    border-color: transparent;
    background: transparent;
    color: #505E2C;
}

/* Fix posts pagination prev/next arrows */
.hec-posts-pagination ul.page-numbers li a.prev,
.hec-posts-pagination ul.page-numbers li a.next,
.hec-posts-pagination ul.page-numbers li span.prev,
.hec-posts-pagination ul.page-numbers li span.next {
    width: 42px;
    min-width: 42px;
    max-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 9999px;
    box-sizing: border-box;
    overflow: hidden;
}

.hec-posts-pagination ul.page-numbers li a.prev span,
.hec-posts-pagination ul.page-numbers li a.next span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
}


/* ============================================
   BLOG HOME PAGE
   home.php — WordPress posts page
   ============================================ */

.hec-blog-page {
    background: var(--color-bg-light, #f7f4ef);
    padding: 0 0 var(--space-16, 64px);
}

.hec-blog-page__inner {
    max-width: var(--container-width, 1280px);
    width: 100%;
    margin: 0 auto;
    padding: var(--space-6, 24px) var(--container-padding, 0px) 0;
}

.hec-blog-page__breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--space-2, 8px);
    margin-bottom: var(--space-4, 16px);
    color: var(--color-accent, #505E2C);
    font-family: var(--font-primary);
    font-size: var(--text-sm, 14px);
    font-weight: var(--font-normal, 400);
    line-height: var(--leading-normal, 1.5);
}

.hec-blog-page__breadcrumbs a {
    color: var(--color-accent, #505E2C);
    text-decoration: none;
}

.hec-blog-page__breadcrumbs a:hover {
    text-decoration: underline;
}

.hec-blog-page__header {
    margin-bottom: var(--space-8, 32px);
}

.hec-blog-page__title {
    margin: 0;
    color: var(--color-title-card-doctor, #212121);
    font-family: var(--font-heading);
    font-size: var(--text-6xl, 60px);
    font-weight: var(--font-semibold, 600);
    line-height: var(--leading-tight, 1.25);
    letter-spacing: -0.03em;
}

.hec-blog-page__content {
    width: 100%;
}

.hec-blog-page .hec-posts-archive {
    margin-top: 0;
}

.hec-blog-page .hec-posts-controls {
    margin-bottom: var(--space-8, 32px);
}


/* Fix Hello Elementor site-main width on blog page */
body:not([class*="elementor-page-"]) .site-main.hec-blog-page {
    max-width: none;
    width: 100%;
}

.hec-blog-page__inner {
    max-width: var(--container-width, 1280px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}


/* Blog archive title */
.hec-blog-page__title {
  color: #133b3a !important;
}

@media (max-width: 1320px) {
    .hec-blog-page__inner {
        padding-left: var(--space-6, 24px);
        padding-right: var(--space-6, 24px);
    }
}

@media (max-width: 768px) {
    .hec-blog-page {
        padding-bottom: var(--space-12, 48px);
    }

    .hec-blog-page__inner {
        padding: var(--space-5, 20px) var(--container-padding-mobile, 20px) 0;
    }

    .hec-blog-page__breadcrumbs {
        margin-bottom: var(--space-4, 16px);
        font-size: var(--text-xs, 12px);
    }

    .hec-blog-page__header {
        margin-bottom: var(--space-6, 24px);
    }

    .hec-blog-page__title {
        font-size: var(--text-4xl, 36px);
        line-height: var(--leading-tight, 1.25);
    }
}



@media (max-width: 1024px) {
    .hec-posts--carousel .hec-post-card {
        flex: 0 0 calc((100% - 48px) / 3);
    }
}

@media (max-width: 768px) {
    .hec-posts__track {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .hec-posts--carousel .hec-post-card {
        flex: 0 0 calc((100% - 16px) / 2);
    }
}

@media (max-width: 480px) {
    .hec-posts__track {
        grid-template-columns: 1fr;
    }

    .hec-posts--carousel .hec-post-card {
        flex: 0 0 82%;
    }

    .hec-posts--carousel .hec-posts__track {
        gap: 16px;
        padding-left: 20px;
        padding-right: 20px;
        scroll-padding-left: 20px;
    }
}


/* Category archive page */
.hec-category-page {
  background: var(--color-bg-light, #f7f4ef);
}

.hec-category-page__inner {
  padding-top: 48px;
}

.hec-category-page__breadcrumbs,
.hec-category-page__breadcrumbs a,
.hec-category-page__breadcrumbs span {
  color: #133b3a !important;
}

.hec-category-page__title {
  color: #133b3a !important;
  margin-bottom: 32px;
}

.hec-category-page__description {
  max-width: 760px;
  margin: -12px 0 32px;
  color: #4f5d56;
  font-size: 18px;
  line-height: 1.6;
}

/* Fix dropdown text descenders like g/y */
.hec-posts-controls__select {
  line-height: 1.4 !important;
  padding-top: 2px;
  padding-bottom: 2px;
}

@media (max-width: 768px) {
  .hec-category-page__inner {
    padding-top: 32px;
  }

  .hec-category-page__title {
    margin-bottom: 24px;
  }

  .hec-category-page__description {
    font-size: 16px;
  }
}

@media (max-width: 1024px) {
    .hec-posts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hec-posts-controls {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 20px;
    }

    .hec-posts-controls__select {
        min-width: 100%;
        width: 100%;
    }

    .hec-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .hec-post-card__title {
        font-size: 16px;
    }
}

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



