/* ════════════════════════════════════════════════════════════════════
   info.css — Breed information page styles
   ────────────────────────────────────────────────────────────────────
   Loaded ALONGSIDE main style.css and category.css.
   - main style.css → tokens, base utils, .breadcrumb-nav, .section-header
   - category.css   → .cat-magazine-* (shared with category page)
   - info.css       → hero, stats, content sections, sticky sidebar, CTA
   ════════════════════════════════════════════════════════════════════ */


/* ════════════════════════════════════════════════════════════════════
   1. HERO — Compact (matches bycat.twig style)
   ════════════════════════════════════════════════════════════════════ */
.info-hero {
    position: relative;
    padding: 50px 0 60px;
    overflow: hidden;
    isolation: isolate;
    color: #fff;
}
.info-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}
.info-hero-overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(15, 74, 114, 0.62) 0%, rgba(15, 74, 114, 0.82) 100%),
        radial-gradient(ellipse 600px 300px at 30% 30%, rgba(29, 111, 164, 0.35) 0%, transparent 60%);
    z-index: 1;
    pointer-events: none;
}
.info-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 760px;
    margin: 0 auto;
}
.info-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.26);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    margin-bottom: 14px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.info-hero-title {
    font-family: var(--font-secondary);
    font-size: clamp(1.7rem, 3.5vw, 2.4rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin: 0 0 10px;
    text-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    letter-spacing: -0.5px;
}
.info-hero-desc {
    font-size: clamp(0.9rem, 1.2vw, 1rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.92);
    max-width: 640px;
    margin: 0 auto;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    font-weight: 400;
}


/* ════════════════════════════════════════════════════════════════════
   2. STATS OVERVIEW — compact 4 quick fact cards (much smaller now)
   ════════════════════════════════════════════════════════════════════ */
.info-stats {
    padding: 22px 0 16px;
    margin-top: -22px;
    position: relative;
    z-index: 3;
}
.info-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.info-stat-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(29, 111, 164, 0.18);
    transition: all var(--transition-base);
    isolation: isolate;
    min-height: 64px;
}
.info-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(29, 111, 164, 0.28);
}

/* Color variants */
.info-stat-card-life {
    background: linear-gradient(135deg, var(--accent-coral), #d05050);
    box-shadow: 0 4px 14px rgba(231, 116, 102, 0.22);
}
.info-stat-card-weight {
    background: linear-gradient(135deg, var(--earth-sage), var(--earth-olive));
    box-shadow: 0 4px 14px rgba(124, 148, 115, 0.22);
}
.info-stat-card-height {
    background: linear-gradient(135deg, var(--accent-orange), #c8651e);
    box-shadow: 0 4px 14px rgba(224, 123, 60, 0.22);
}
.info-stat-card-size {
    background: linear-gradient(135deg, var(--accent-amber), #d18a2c);
    box-shadow: 0 4px 14px rgba(240, 173, 78, 0.22);
}

.info-stat-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #fff;
    font-size: 1.2rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.info-stat-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}
.info-stat-value {
    font-family: var(--font-secondary);
    font-size: 1.05rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -0.3px;
    word-break: break-word;
}
.info-stat-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.92);
    font-weight: 500;
    line-height: 1.3;
}

/* Decorative wave at the bottom */
.info-stat-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    width: 100%;
    height: 12px;
    pointer-events: none;
    opacity: 0.12;
}
.info-stat-wave path {
    fill: #fff;
}


/* ════════════════════════════════════════════════════════════════════
   3. MAIN CONTENT — Article column + sticky sidebar
   ════════════════════════════════════════════════════════════════════ */
.info-main {
    padding: 28px 0 50px;
    background: var(--bg-section);
}

/* CRITICAL: Bootstrap rows align children stretch by default, which
   forces the sidebar column to fill the full row height. That breaks
   position:sticky inside it on some browsers. Force flex-start.
   Also, ensure no overflow:hidden on parents (would break sticky). */
.info-main .row {
    align-items: flex-start;
}


/* ════════════════════════════════════════════════════════════════════
   4. ARTICLE SECTIONS — content blocks with header + readmore body
   ════════════════════════════════════════════════════════════════════ */
.info-section {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 22px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}
.info-section:hover {
    box-shadow: var(--shadow-md);
}
.info-section:last-child {
    margin-bottom: 0;
}

/* Header */
.info-section-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 22px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    position: relative;
    overflow: hidden;
}
.info-section-header::before {
    content: '';
    position: absolute;
    top: -40px;
    left: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    pointer-events: none;
}
.info-section-header h2 {
    font-family: var(--font-secondary);
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    font-weight: 800;
    color: #fff;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}
.info-section-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.22);
}
.info-section-icon img {
    width: 28px;
    height: 28px;
    filter: brightness(0) invert(1);
    object-fit: contain;
}

/* Body */
.info-section-body {
    padding: 22px;
    font-size: 0.95rem;
    line-height: 1.85;
    color: var(--gray-700);
}
.info-section-body p {
    margin: 0 0 14px;
}
.info-section-body p:last-child {
    margin-bottom: 0;
}
.info-section-body h3,
.info-section-body h4 {
    color: var(--gray-900);
    font-family: var(--font-secondary);
    margin: 22px 0 12px;
}
.info-section-body h3 { font-size: 1.15rem; font-weight: 800; }
.info-section-body h4 { font-size: 1rem; font-weight: 700; }
.info-section-body ul,
.info-section-body ol {
    padding-right: 22px;
    margin: 0 0 14px;
}
.info-section-body li {
    margin-bottom: 6px;
}
.info-section-body a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.info-section-body a:hover {
    color: var(--primary-dark);
}
.info-section-body strong {
    color: var(--gray-900);
}


/* ════════════════════════════════════════════════════════════════════
   5. CSS-only "Read More" — FIXED: max-height: none in expanded state
   ════════════════════════════════════════════════════════════════════ */
.info-readmore {
    position: relative;
}

/* Default (collapsed): clamp content + show fade overlay */
.info-readmore-content {
    max-height: 280px;
    overflow: hidden;
    position: relative;
}

/* Gradient fade at the bottom (only collapsed) */
.info-readmore:not(.is-expanded) .info-readmore-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, #fff 90%);
    pointer-events: none;
}

/* Read-more button */
.info-readmore-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    padding: 10px 22px;
    border: 1px solid var(--primary-100);
    border-radius: var(--radius-full);
    background: var(--primary-50);
    color: var(--primary-dark);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: inherit;
}
.info-readmore-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.info-readmore-btn i {
    font-size: 1.05rem;
    transition: transform var(--transition-fast);
}

/* EXPANDED — completely remove the height clamp, no transition needed.
   Using `none` here is critical: section content can be very long
   (5000px is not enough for some breeds), and animating max-height
   is jarring anyway. Click-to-expand = instant and clean. */
.info-readmore.is-expanded .info-readmore-content {
    max-height: none;
    overflow: visible;
}
.info-readmore.is-expanded .info-readmore-btn i {
    transform: rotate(180deg);
}


/* ════════════════════════════════════════════════════════════════════
   6. SIDEBAR — sticky on desktop, normal flow on mobile
   ════════════════════════════════════════════════════════════════════ */
/* The sidebar column itself — we put position:sticky on the .info-sidebar
   inside it (not on the column), so the column can grow naturally.
   IMPORTANT: do NOT set max-height on .info-sidebar — that hides widgets
   when the sidebar is taller than the viewport. */
.info-sidebar {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

@media (min-width: 992px) {
    .info-sidebar {
        position: sticky;
        top: 90px;
        /* No max-height / overflow — let it scroll with the page.
           If sidebar is taller than viewport, user just scrolls past it. */
    }
}

/* CTA — view listings of this breed (PROMINENT) */
.info-sidebar-cta {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--accent-orange), #c8651e);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(224, 123, 60, 0.32);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    isolation: isolate;
    border: 2px solid rgba(255, 255, 255, 0.25);
}
.info-sidebar-cta::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 70%);
    z-index: -1;
}
.info-sidebar-cta::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 255, 255, 0.1) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-base);
}
.info-sidebar-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(224, 123, 60, 0.45);
}
.info-sidebar-cta:hover::after {
    opacity: 1;
}
.info-sidebar-cta > i:first-child {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
.info-sidebar-cta-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.info-sidebar-cta-title {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    color: #fff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.info-sidebar-cta-sub {
    font-size: 0.78rem;
    opacity: 0.95;
    color: #fff;
}
.info-sidebar-cta-arrow {
    font-size: 1.5rem;
    transition: transform var(--transition-fast);
}
.info-sidebar-cta:hover .info-sidebar-cta-arrow {
    transform: translateX(-4px);
}

/* Sidebar widget (info, videos, etc.) */
.info-sidebar-widget {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    /* Make sure widget is visible even if sticky parent is constrained */
    display: block;
}
.info-sidebar-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}
.info-sidebar-widget-header i {
    color: var(--primary);
    font-size: 1.2rem;
}
.info-sidebar-widget-header h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--gray-900);
    margin: 0;
    flex: 1;
}
.info-sidebar-widget-body {
    padding: 14px 18px;
}

/* Info list (English/Russian names) */
.info-sidebar-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.info-sidebar-widget-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px;
    border-bottom: 1px solid var(--gray-100);
}
.info-sidebar-widget-list li:last-child {
    border-bottom: none;
}
.info-sidebar-widget-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    font-weight: 500;
}
.info-sidebar-widget-value {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gray-900);
}


/* ════════════════════════════════════════════════════════════════════
   7. YOUTUBE SHORTS LIST — vertical 9:16 in 2 columns
   ════════════════════════════════════════════════════════════════════ */
.info-shorts-list {
    list-style: none;
    margin: 0;
    padding: 14px 18px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
.info-short-item {
    margin: 0;
    padding: 0;
    list-style: none;
}
.info-short-frame {
    position: relative;
    aspect-ratio: 9 / 16;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-900);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: transform var(--transition-fast);
}
.info-short-frame:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.info-short-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Loading state */
.info-shorts-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    grid-column: 1 / -1;
    padding: 36px 12px;
    color: var(--gray-500);
    font-size: 0.9rem;
}
.info-shorts-loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: infoShortsSpin 0.8s linear infinite;
}
@keyframes infoShortsSpin {
    to { transform: rotate(360deg); }
}


/* ════════════════════════════════════════════════════════════════════
   8. MAGAZINE SECTION — reuses .cat-magazine-* from category.css
   ════════════════════════════════════════════════════════════════════ */
.info-magazine {
    padding: 60px 0;
    background: #fff;
}


/* ════════════════════════════════════════════════════════════════════
   9. RELATED PRODUCTS — full-width section at the bottom
   ════════════════════════════════════════════════════════════════════ */
.info-related {
    padding: 60px 0;
    background: var(--bg-section);
    position: relative;
    overflow: hidden;
}
.info-related::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -80px;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(224, 123, 60, 0.06) 0%, transparent 70%);
    pointer-events: none;
}
.info-related > .container {
    position: relative;
    z-index: 1;
}

/* "View all listings" CTA below the grid */
.info-related-cta-wrap {
    text-align: center;
    margin-top: 32px;
}
.info-related-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-size: 0.98rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--transition-base);
    box-shadow: 0 4px 14px rgba(29, 111, 164, 0.25);
}
.info-related-cta:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(29, 111, 164, 0.4);
}
.info-related-cta i:first-child {
    font-size: 1.2rem;
}
.info-related-cta-arrow {
    font-size: 1.2rem;
    transition: transform var(--transition-fast);
}
.info-related-cta:hover .info-related-cta-arrow {
    transform: translateX(-4px);
}


/* ════════════════════════════════════════════════════════════════════
   10. RESPONSIVE
   ════════════════════════════════════════════════════════════════════ */
@media (max-width: 991.98px) {
    .info-sidebar {
        position: static;
    }
    .info-sidebar-col {
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .info-hero {
        padding: 36px 0 44px;
    }
    .info-stats {
        margin-top: -16px;
        padding: 18px 0 12px;
    }
    .info-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .info-stat-card {
        padding: 12px 14px;
        gap: 10px;
    }
    .info-stat-icon {
        width: 34px;
        height: 34px;
        font-size: 1.05rem;
    }
    .info-stat-value {
        font-size: 0.95rem;
    }
    .info-stat-label {
        font-size: 0.72rem;
    }

    .info-section-header {
        padding: 14px 16px;
        gap: 10px;
    }
    .info-section-icon {
        width: 40px;
        height: 40px;
    }
    .info-section-icon img {
        width: 24px;
        height: 24px;
    }
    .info-section-body {
        padding: 18px;
    }
    .info-readmore-content {
        max-height: 220px;
    }
}

@media (max-width: 480px) {
    .info-stats-grid {
        grid-template-columns: 1fr;
    }
    .info-shorts-list {
        grid-template-columns: 1fr;
        max-width: 280px;
        margin: 0 auto;
    }
    .info-sidebar-cta {
        padding: 14px 16px;
        gap: 10px;
    }
    .info-sidebar-cta > i:first-child {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    .info-sidebar-cta-title {
        font-size: 0.92rem;
    }
}


/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .info-shorts-loading-spinner {
        animation: none;
    }
    .info-stat-card,
    .info-section,
    .info-sidebar-cta,
    .info-related-cta {
        transition: none;
    }
}
