/* Breed page layout (.category-element) */
.category-element {
  width: 100%;
  box-sizing: border-box;
}

.category-element .element-container {
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.category-element .element-title-text {
  margin-top: 0;
  margin-bottom: 14px;
  font-size: 34px;
  font-weight: 400;
  text-align: left;
}

.category-element .element-content-flow {
  width: 100%;
  box-sizing: border-box;
}

.category-element .element-element-image-wrapper {
  width: 500px;
  float: left;
  margin-right: 30px;
  margin-bottom: 15px;
}

.category-element .element-element-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
}

.category-element .element-flowing-text {
  line-height: 140%;
  letter-spacing: 0.05em;
  text-align: justify;
  box-sizing: border-box;
}

.category-element .element-content-flow::after {
  content: "";
  display: table;
  clear: both;
}

.category-element .no-content {
  color: #999;
}

@media screen and (max-width: 600px) {
  .category-element .element-title-text {
    font-size: 20px;
  }

  .category-element .element-element-image-wrapper {
    width: 100%;
    float: none;
    margin: 0 0 20px 0;
  }

  .category-element .element-flowing-text {
    text-align: left;
  }
}

.breed-params-card {
    background: white;
    border-radius: 12px;
    padding: 20px 14px;
    margin: 16px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.breed-params-title {
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.breed-params-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.param-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 13px;
    font-weight: 500;
    background: #f0ede8;
    border-radius: 6px;
    color: #544864;
    cursor: help;
    position: relative;
}

.param-icon {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    opacity: 0.6;
}

.param-icon-white {
    filter: brightness(0) invert(1);
}

.param-badge .tooltip-text {
    visibility: hidden;
    opacity: 0;
    width: max-content;
    max-width: 220px;
    background: #544864;
    color: #fff;
    text-align: center;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    transition: opacity 0.2s ease, visibility 0.2s ease;
    white-space: normal;
    word-wrap: break-word;
    z-index: 10;
    pointer-events: none;
}

.param-badge .tooltip-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #544864;
}

.param-badge:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.param-badge.tooltip-active .tooltip-text {
    visibility: visible;
    opacity: 1;
}

.breed-content-with-image {
    overflow: hidden;
}

.breed-image-wrapper {
    float: right;
    width: 35%;
    max-width: 400px;
    margin-left: 30px;
    margin-bottom: 15px;
    border-radius: 12px;
    overflow: hidden;
}

.breed-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.no-content {
    color: #999;
    font-style: italic;
    padding: 12px 0;
}

.discussions-section {
    margin: 24px 0;
}

.discussions-section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 16px 0;
}

.discussions-empty {
    color: #999;
    padding: 16px 0;
}

@media (max-width: 768px) {
    .breed-image-wrapper {
        float: none;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-bottom: 16px;
    }

    .param-badge .tooltip-text {
        max-width: 160px;
        font-size: 11px;
        padding: 4px 10px;
        bottom: calc(100% + 6px);
    }

    .neighbor-grid {
        grid-template-columns: 1fr !important;
    }

    .neighbor-img {
        aspect-ratio: 5 / 4;
    }
}

.neighbor-breeds {
    margin: 32px 0;
}

.neighbor-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.neighbor-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: white;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s;
}

.neighbor-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.neighbor-img {
    width: 100%;
    aspect-ratio: 5 / 4;
    border-radius: 8px;
    object-fit: cover;
}

.neighbor-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.neighbor-title {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.3;
}

.neighbor-desc {
    font-size: 13px;
    color: #777;
    line-height: 1.4;
}
