/* ═══════════════════════════════════════════════════════════════════════════
   Reptipedia — The Community Reptile & Exotic Pet Encyclopedia
   Complete Stylesheet for SingleArticle & Archive Pages
   High Specificity Overrides for GeneratePress Parent Theme
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Design Tokens (CSS Variables) ────────────────────────────────────── */
:root {
    --rp-green-900: #1b5e20;
    --rp-green-800: #2e7d32;
    --rp-green-700: #388e3c;
    --rp-green-600: #43a047;
    --rp-green-500: #4caf50;
    --rp-green-100: #e8f5e9;
    --rp-green-50:  #f1f8e9;

    --rp-text:      #222;
    --rp-text-muted: #666;
    --rp-bg:        #f6f6f6;
    --rp-white:     #fff;
    --rp-border:    #ddd;
    --rp-border-light: #e8e8e8;

    --rp-link:      #0645ad;
    --rp-link-hover: #0b0080;
    --rp-link-visited: #663366;

    --rp-danger:    #c62828;
    --rp-warning:   #e65100;
    --rp-success:   #2e7d32;
    --rp-info:      #1565c0;

    --rp-tier-admin:   #d32f2f;
    --rp-tier-expert:  #f57c00;
    --rp-tier-trusted: #1976d2;
    --rp-tier-community: #388e3c;

    --rp-radius:    8px;
    --rp-radius-sm: 4px;
    --rp-radius-lg: 12px;
    --rp-shadow:    0 2px 8px rgba(0,0,0,0.08);
    --rp-shadow-lg: 0 4px 16px rgba(0,0,0,0.12);

    --rp-max-width: 1200px;
    --rp-content-width: 820px;
    --rp-sidebar-width: 320px;

    --rp-transition: all 0.2s ease-in-out;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SITE HEADER — Reptipedia Custom Header with Logo & Navigation
   ═══════════════════════════════════════════════════════════════════════════ */

.reptipedia-site-header {
    background: #fff;
    border-bottom: 3px solid #2e7d32;
    padding: 0;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.reptipedia-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 24px;
    gap: 16px;
    flex-wrap: wrap;
}

.reptipedia-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: #2e7d32 !important;
    flex-shrink: 0;
    transition: var(--rp-transition);
}

.reptipedia-logo:hover {
    opacity: 0.85;
}

.reptipedia-logo-icon {
    width: 44px;
    height: 44px;
    background: #2e7d32;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    flex-shrink: 0;
    line-height: 1;
}

.reptipedia-logo-text {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.reptipedia-logo-title {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #2e7d32;
    letter-spacing: -0.5px;
    line-height: 1.2;
    margin: 0;
}

.reptipedia-logo-subtitle {
    display: block;
    font-size: 11px;
    color: #666;
    line-height: 1.2;
    margin: 0;
}

.reptipedia-header-nav {
    display: flex;
    gap: 24px;
    margin: 0;
    padding: 0;
    flex: 1;
    justify-content: center;
}

.reptipedia-header-nav a {
    color: #222 !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 4px;
    transition: var(--rp-transition);
}

.reptipedia-header-nav a:hover {
    background: #f0f0f0;
    color: #2e7d32 !important;
}

.reptipedia-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.reptipedia-search-form {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f5f5f5;
    border-radius: 4px;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
}

.reptipedia-search-form input[type="search"],
.reptipedia-search-form input[type="text"] {
    border: none !important;
    background: transparent !important;
    padding: 8px 12px !important;
    font-size: 14px !important;
    color: #222 !important;
    min-width: 150px;
}

.reptipedia-search-form input[type="search"]:focus,
.reptipedia-search-form input[type="text"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

.reptipedia-user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 4px;
}

.reptipedia-user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2e7d32;
    color: #fff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
}

.reptipedia-user-name {
    font-size: 13px;
    color: #222;
    font-weight: 500;
}

.reptipedia-login-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #2e7d32 !important;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    transition: var(--rp-transition);
}

.reptipedia-login-btn:hover {
    background: #1b5e20 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SITE FOOTER — Reptipedia Custom Footer with Links & Credits
   ═══════════════════════════════════════════════════════════════════════════ */

.reptipedia-site-footer {
    background: #1b5e20;
    color: #fff;
    padding: 40px 24px 20px;
    margin-top: 40px;
}

.reptipedia-footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.reptipedia-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}

.reptipedia-footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reptipedia-footer-col h4 {
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #fff;
}

.reptipedia-footer-col p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
}

.reptipedia-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.reptipedia-footer-col li {
    margin: 0;
    padding: 0;
}

.reptipedia-footer-col a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: var(--rp-transition);
}

.reptipedia-footer-col a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

.reptipedia-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    text-align: center;
}

.reptipedia-footer-bottom p {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.reptipedia-footer-bottom a {
    color: rgba(255, 255, 255, 0.8) !important;
    text-decoration: none !important;
}

.reptipedia-footer-bottom a:hover {
    color: #fff !important;
    text-decoration: underline !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTAINER & LAYOUT OVERRIDES — Force full-width on article pages
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .site-content,
body.single-species_profile .site-content,
body.post-type-archive-care_guide .site-content,
body.post-type-archive-species_profile .site-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

body.single-care_guide .content-area,
body.single-species_profile .content-area,
body.post-type-archive-care_guide .content-area,
body.post-type-archive-species_profile .content-area {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

body.single-care_guide .inside-article,
body.single-species_profile .inside-article,
body.post-type-archive-care_guide .inside-article,
body.post-type-archive-species_profile .inside-article {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.single-care_guide .entry-content,
body.single-species_profile .entry-content,
body.post-type-archive-care_guide .entry-content,
body.post-type-archive-species_profile .entry-content {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
}

body.single-care_guide #page,
body.single-species_profile #page,
body.post-type-archive-care_guide #page,
body.post-type-archive-species_profile #page {
    max-width: 100% !important;
    width: 100% !important;
}

body.single-care_guide .site,
body.single-species_profile .site,
body.post-type-archive-care_guide .site,
body.post-type-archive-species_profile .site {
    overflow-x: hidden;
    max-width: 100% !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE CONTAINER — Constrain content to readable width with sidebar
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-container,
body.single-species_profile .reptipedia-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 24px !important;
    width: 100% !important;
}

body.post-type-archive-care_guide .reptipedia-container,
body.post-type-archive-species_profile .reptipedia-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 24px !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE LAYOUT — Two-column grid (content + sidebar)
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-article-layout,
body.single-species_profile .reptipedia-article-layout {
    display: grid !important;
    grid-template-columns: 1fr 300px !important;
    gap: 24px !important;
    align-items: start !important;
    width: 100% !important;
}

body.single-care_guide .reptipedia-article-main,
body.single-species_profile .reptipedia-article-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
    width: 100% !important;
}

body.single-care_guide .reptipedia-article-sidebar,
body.single-species_profile .reptipedia-article-sidebar {
    display: flex !important;
    flex-direction: column !important;
    gap: 16px !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BREADCRUMBS — Navigation trail
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-breadcrumbs,
body.single-species_profile .reptipedia-breadcrumbs {
    display: flex;
    gap: 8px;
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

body.single-care_guide .reptipedia-breadcrumbs a,
body.single-species_profile .reptipedia-breadcrumbs a {
    color: #0645ad !important;
    text-decoration: none !important;
}

body.single-care_guide .reptipedia-breadcrumbs a:hover,
body.single-species_profile .reptipedia-breadcrumbs a:hover {
    text-decoration: underline !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE HEADER — Title, metadata, difficulty badges
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-article-header,
body.single-species_profile .reptipedia-article-header {
    margin-bottom: 20px;
}

body.single-care_guide .reptipedia-title-row,
body.single-species_profile .reptipedia-title-row {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 12px !important;
    text-align: center !important;
}

body.single-care_guide .reptipedia-hero-thumb,
body.single-species_profile .reptipedia-hero-thumb {
    width: 100% !important;
    max-width: 280px !important;
    height: 140px !important;
    border-radius: 12px !important;
    object-fit: cover !important;
    border: 2px solid #e8f5e9 !important;
}

body.single-care_guide .reptipedia-title-row h1,
body.single-species_profile .reptipedia-title-row h1 {
    margin: 0 !important;
}

body.single-care_guide .reptipedia-article-title,
body.single-species_profile .reptipedia-article-title {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px 0;
    color: #222;
}

body.single-care_guide .reptipedia-article-meta,
body.single-species_profile .reptipedia-article-meta {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
    color: #666;
}

body.single-care_guide .reptipedia-meta-item,
body.single-species_profile .reptipedia-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

body.single-care_guide .reptipedia-meta-item strong,
body.single-species_profile .reptipedia-meta-item strong {
    color: #222;
    font-weight: 600;
}

body.single-care_guide .reptipedia-difficulty-badge,
body.single-species_profile .reptipedia-difficulty-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body.single-care_guide .reptipedia-difficulty-badge.beginner,
body.single-species_profile .reptipedia-difficulty-badge.beginner {
    background: #e8f5e9;
    color: #2e7d32;
}

body.single-care_guide .reptipedia-difficulty-badge.intermediate,
body.single-species_profile .reptipedia-difficulty-badge.intermediate {
    background: #fff3e0;
    color: #e65100;
}

body.single-care_guide .reptipedia-difficulty-badge.advanced,
body.single-species_profile .reptipedia-difficulty-badge.advanced {
    background: #fce4ec;
    color: #c2185b;
}

body.single-care_guide .reptipedia-difficulty-badge.expert,
body.single-species_profile .reptipedia-difficulty-badge.expert {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE TAGS — Category/taxonomy display
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-article-tags,
body.single-species_profile .reptipedia-article-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

body.single-care_guide .reptipedia-tag,
body.single-species_profile .reptipedia-tag {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 12px;
    color: #666;
    text-decoration: none !important;
    transition: var(--rp-transition);
}

body.single-care_guide .reptipedia-tag:hover,
body.single-species_profile .reptipedia-tag:hover {
    background: #e8f5e9;
    border-color: #2e7d32;
    color: #2e7d32;
}

/* ═══════════════════════════════════════════════════════════════════════════
   QUICK REFERENCE PANEL — Inline stats grid (basking temp, humidity, UVB, etc)
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-quick-ref,
body.single-species_profile .reptipedia-quick-ref {
    background: #f8fdf8;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

body.single-care_guide .reptipedia-quick-ref-grid,
body.single-species_profile .reptipedia-quick-ref-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

body.single-care_guide .reptipedia-quick-ref-item,
body.single-species_profile .reptipedia-quick-ref-item {
    text-align: center;
}

body.single-care_guide .reptipedia-quick-ref-label,
body.single-species_profile .reptipedia-quick-ref-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    margin-bottom: 4px;
    font-weight: 600;
}

body.single-care_guide .reptipedia-quick-ref-value,
body.single-species_profile .reptipedia-quick-ref-value {
    font-size: 18px;
    font-weight: 700;
    color: #2e7d32;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE BODY — White card with border and shadow
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-article-body,
body.single-species_profile .reptipedia-article-body {
    background: #fff !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 32px !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06) !important;
    margin-bottom: 24px !important;
}

body.single-care_guide .reptipedia-article-body figcaption,
body.single-species_profile .reptipedia-article-body figcaption {
    font-size: 13px !important;
    color: #666 !important;
    text-align: center !important;
    font-style: italic !important;
    margin-top: 8px !important;
    margin-bottom: 16px !important;
}

body.single-care_guide .reptipedia-article-body img,
body.single-species_profile .reptipedia-article-body img {
    border-radius: 6px !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE CONTENT — Typography and element overrides
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-article-content,
body.single-species_profile .reptipedia-article-content {
    font-size: 16px;
    line-height: 1.7;
    color: #222;
}

body.single-care_guide .reptipedia-article-content h2,
body.single-species_profile .reptipedia-article-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2e7d32;
    margin: 28px 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5e9;
    line-height: 1.3;
}

body.single-care_guide .reptipedia-article-content h3,
body.single-species_profile .reptipedia-article-content h3 {
    font-size: 18px;
    font-weight: 700;
    color: #388e3c;
    margin: 20px 0 12px 0;
    line-height: 1.3;
}

body.single-care_guide .reptipedia-article-content h4,
body.single-species_profile .reptipedia-article-content h4 {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 16px 0 8px 0;
    line-height: 1.3;
}

body.single-care_guide .reptipedia-article-content p,
body.single-species_profile .reptipedia-article-content p {
    margin: 0 0 16px 0;
    line-height: 1.7;
}

body.single-care_guide .reptipedia-article-content ul,
body.single-species_profile .reptipedia-article-content ul {
    margin: 0 0 16px 20px;
    padding: 0;
    list-style-type: disc;
}

body.single-care_guide .reptipedia-article-content ol,
body.single-species_profile .reptipedia-article-content ol {
    margin: 0 0 16px 20px;
    padding: 0;
    list-style-type: decimal;
}

body.single-care_guide .reptipedia-article-content li,
body.single-species_profile .reptipedia-article-content li {
    margin-bottom: 8px;
    line-height: 1.6;
}

body.single-care_guide .reptipedia-article-content a,
body.single-species_profile .reptipedia-article-content a {
    color: #0645ad !important;
    text-decoration: underline !important;
    transition: var(--rp-transition);
}

body.single-care_guide .reptipedia-article-content a:hover,
body.single-species_profile .reptipedia-article-content a:hover {
    color: #0b0080 !important;
}

body.single-care_guide .reptipedia-article-content blockquote,
body.single-species_profile .reptipedia-article-content blockquote {
    border-left: 4px solid #2e7d32;
    padding-left: 16px;
    margin: 16px 0;
    font-style: italic;
    color: #555;
}

body.single-care_guide .reptipedia-article-content code,
body.single-species_profile .reptipedia-article-content code {
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #d32f2f;
}

body.single-care_guide .reptipedia-article-content pre,
body.single-species_profile .reptipedia-article-content pre {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    margin: 16px 0;
}

body.single-care_guide .reptipedia-article-content table,
body.single-species_profile .reptipedia-article-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
}

body.single-care_guide .reptipedia-article-content th,
body.single-species_profile .reptipedia-article-content th {
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
    padding: 12px;
    text-align: left;
    font-weight: 600;
    color: #2e7d32;
}

body.single-care_guide .reptipedia-article-content td,
body.single-species_profile .reptipedia-article-content td {
    border: 1px solid #e8e8e8;
    padding: 12px;
}

body.single-care_guide .reptipedia-article-content tr:nth-child(even),
body.single-species_profile .reptipedia-article-content tr:nth-child(even) {
    background: #f9f9f9;
}

body.single-care_guide .reptipedia-article-content img,
body.single-species_profile .reptipedia-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 16px 0;
}

/* In-content images: constrain to sensible size and centre */
body.single-care_guide .reptipedia-article-body .wp-block-image,
body.single-species_profile .reptipedia-article-body .wp-block-image,
body.single-care_guide .reptipedia-content .wp-block-image,
body.single-species_profile .reptipedia-content .wp-block-image {
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

body.single-care_guide .reptipedia-article-body .wp-block-image img,
body.single-species_profile .reptipedia-article-body .wp-block-image img,
body.single-care_guide .reptipedia-content .wp-block-image img,
body.single-species_profile .reptipedia-content .wp-block-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIDEBAR CARDS — General sidebar widget styling
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-sidebar-card,
body.single-species_profile .reptipedia-sidebar-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: var(--rp-shadow);
}

body.single-care_guide .reptipedia-sidebar-header,
body.single-species_profile .reptipedia-sidebar-header {
    background: #2e7d32;
    color: #fff;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

body.single-care_guide .reptipedia-sidebar-body,
body.single-species_profile .reptipedia-sidebar-body {
    padding: 16px;
}

body.single-care_guide .reptipedia-sidebar-card p,
body.single-species_profile .reptipedia-sidebar-card p {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #555;
}

body.single-care_guide .reptipedia-sidebar-list,
body.single-species_profile .reptipedia-sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

body.single-care_guide .reptipedia-sidebar-list li,
body.single-species_profile .reptipedia-sidebar-list li {
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #e8e8e8;
    font-size: 13px;
}

body.single-care_guide .reptipedia-sidebar-list li:last-child,
body.single-species_profile .reptipedia-sidebar-list li:last-child {
    border-bottom: none;
}

body.single-care_guide .reptipedia-sidebar-list a,
body.single-species_profile .reptipedia-sidebar-list a {
    color: #0645ad !important;
    text-decoration: none !important;
    transition: var(--rp-transition);
}

body.single-care_guide .reptipedia-sidebar-list a:hover,
body.single-species_profile .reptipedia-sidebar-list a:hover {
    color: #0b0080 !important;
    text-decoration: underline !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLE OF CONTENTS — Sidebar navigational links
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-toc-list,
body.single-species_profile .reptipedia-toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

body.single-care_guide .reptipedia-toc-list li,
body.single-species_profile .reptipedia-toc-list li {
    padding: 8px 0;
    margin: 0;
    border-bottom: 1px solid #e8e8e8;
    font-size: 13px;
    counter-increment: toc-counter;
}

body.single-care_guide .reptipedia-toc-list li:last-child,
body.single-species_profile .reptipedia-toc-list li:last-child {
    border-bottom: none;
}

body.single-care_guide .reptipedia-toc-list a,
body.single-species_profile .reptipedia-toc-list a {
    color: #0645ad !important;
    text-decoration: none !important;
    transition: var(--rp-transition);
}

body.single-care_guide .reptipedia-toc-list a:hover,
body.single-species_profile .reptipedia-toc-list a:hover {
    color: #0b0080 !important;
    text-decoration: underline !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BUTTONS — Primary, Secondary, Danger, Block variants
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-btn,
body.single-species_profile .reptipedia-btn,
body.post-type-archive-care_guide .reptipedia-btn,
body.post-type-archive-species_profile .reptipedia-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 4px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: var(--rp-transition);
    text-transform: none;
}

body.single-care_guide .reptipedia-btn:hover,
body.single-species_profile .reptipedia-btn:hover,
body.post-type-archive-care_guide .reptipedia-btn:hover,
body.post-type-archive-species_profile .reptipedia-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

body.single-care_guide .reptipedia-btn-primary,
body.single-species_profile .reptipedia-btn-primary,
body.post-type-archive-care_guide .reptipedia-btn-primary,
body.post-type-archive-species_profile .reptipedia-btn-primary {
    background: #2e7d32 !important;
    color: #fff !important;
}

body.single-care_guide .reptipedia-btn-primary:hover,
body.single-species_profile .reptipedia-btn-primary:hover,
body.post-type-archive-care_guide .reptipedia-btn-primary:hover,
body.post-type-archive-species_profile .reptipedia-btn-primary:hover {
    background: #1b5e20 !important;
}

body.single-care_guide .reptipedia-btn-secondary,
body.single-species_profile .reptipedia-btn-secondary,
body.post-type-archive-care_guide .reptipedia-btn-secondary,
body.post-type-archive-species_profile .reptipedia-btn-secondary {
    background: transparent !important;
    color: #2e7d32 !important;
    border: 2px solid #2e7d32 !important;
}

body.single-care_guide .reptipedia-btn-secondary:hover,
body.single-species_profile .reptipedia-btn-secondary:hover,
body.post-type-archive-care_guide .reptipedia-btn-secondary:hover,
body.post-type-archive-species_profile .reptipedia-btn-secondary:hover {
    background: #e8f5e9 !important;
}

body.single-care_guide .reptipedia-btn-danger,
body.single-species_profile .reptipedia-btn-danger,
body.post-type-archive-care_guide .reptipedia-btn-danger,
body.post-type-archive-species_profile .reptipedia-btn-danger {
    background: transparent !important;
    color: #c62828 !important;
    border: 2px solid #c62828 !important;
}

body.single-care_guide .reptipedia-btn-danger:hover,
body.single-species_profile .reptipedia-btn-danger:hover,
body.post-type-archive-care_guide .reptipedia-btn-danger:hover,
body.post-type-archive-species_profile .reptipedia-btn-danger:hover {
    background: #ffebee !important;
}

body.single-care_guide .reptipedia-btn-block,
body.single-species_profile .reptipedia-btn-block,
body.post-type-archive-care_guide .reptipedia-btn-block,
body.post-type-archive-species_profile .reptipedia-btn-block {
    display: flex !important;
    width: 100%;
}

/* ═══════════════════════════════════════════════════════════════════════════
   REFERENCES SECTION — Academic-style citations with tier badges
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-references,
body.single-species_profile .reptipedia-references {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid #e8e8e8;
}

body.single-care_guide .reptipedia-references h2,
body.single-species_profile .reptipedia-references h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2e7d32;
    margin: 0 0 16px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5e9;
}

body.single-care_guide .reptipedia-references ol,
body.single-species_profile .reptipedia-references ol {
    list-style: decimal;
    margin: 0;
    padding-left: 20px;
}

body.single-care_guide .reptipedia-references li,
body.single-species_profile .reptipedia-references li {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 14px;
    color: #222;
}

body.single-care_guide .reptipedia-ref-link,
body.single-species_profile .reptipedia-ref-link {
    color: #0645ad !important;
    text-decoration: none !important;
    font-weight: 500;
    padding: 2px 6px;
    border-radius: 3px;
    transition: var(--rp-transition);
}

body.single-care_guide .reptipedia-ref-link:hover,
body.single-species_profile .reptipedia-ref-link:hover {
    background: #f0f0f0;
    text-decoration: underline !important;
}

body.single-care_guide .reptipedia-ref-tier,
body.single-species_profile .reptipedia-ref-tier {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-left: 8px;
}

body.single-care_guide .reptipedia-ref-tier.tier-1,
body.single-species_profile .reptipedia-ref-tier.tier-1 {
    background: #fce4ec;
    color: #c2185b;
}

body.single-care_guide .reptipedia-ref-tier.tier-2,
body.single-species_profile .reptipedia-ref-tier.tier-2 {
    background: #e3f2fd;
    color: #1565c0;
}

body.single-care_guide .reptipedia-ref-tier.tier-3,
body.single-species_profile .reptipedia-ref-tier.tier-3 {
    background: #f3e5f5;
    color: #7b1fa2;
}

body.single-care_guide .reptipedia-ref-tier.tier-4,
body.single-species_profile .reptipedia-ref-tier.tier-4 {
    background: #fff3e0;
    color: #e65100;
}

body.single-care_guide .reptipedia-ref-tier.tier-5,
body.single-species_profile .reptipedia-ref-tier.tier-5 {
    background: #f1f8e9;
    color: #558b2f;
}

/* ═══════════════════════════════════════════════════════════════════════════
   CONTRIBUTORS SECTION — Author bio with tier badge and stats
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-contributors,
body.single-species_profile .reptipedia-contributors {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 2px solid #e8e8e8;
}

body.single-care_guide .reptipedia-contributors h2,
body.single-species_profile .reptipedia-contributors h2 {
    font-size: 20px;
    font-weight: 700;
    color: #2e7d32;
    margin: 0 0 20px 0;
    padding-bottom: 8px;
    border-bottom: 2px solid #e8f5e9;
}

body.single-care_guide .reptipedia-contributor-card,
body.single-species_profile .reptipedia-contributor-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 16px;
    background: #f9f9f9;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 16px;
}

body.single-care_guide .reptipedia-contributor-avatar,
body.single-species_profile .reptipedia-contributor-avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid #ddd;
}

body.single-care_guide .reptipedia-contributor-info,
body.single-species_profile .reptipedia-contributor-info {
    flex: 1;
}

body.single-care_guide .reptipedia-contributor-info h4,
body.single-species_profile .reptipedia-contributor-info h4 {
    font-size: 15px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px 0;
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

body.single-care_guide .reptipedia-contributor-meta,
body.single-species_profile .reptipedia-contributor-meta {
    font-size: 13px;
    color: #666;
    margin: 0 0 8px 0;
}

body.single-care_guide .reptipedia-contributor-history,
body.single-species_profile .reptipedia-contributor-history {
    font-size: 13px;
    color: #0645ad;
    margin: 0;
}

body.single-care_guide .reptipedia-contributor-history a,
body.single-species_profile .reptipedia-contributor-history a {
    color: #0645ad !important;
    text-decoration: none !important;
}

body.single-care_guide .reptipedia-contributor-history a:hover,
body.single-species_profile .reptipedia-contributor-history a:hover {
    text-decoration: underline !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TIER BADGES — Contributor tier indicators (admin, expert, trusted, community)
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-tier-badge,
body.single-species_profile .reptipedia-tier-badge,
body.post-type-archive-care_guide .reptipedia-tier-badge,
body.post-type-archive-species_profile .reptipedia-tier-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

body.single-care_guide .reptipedia-tier-badge.tier-admin,
body.single-species_profile .reptipedia-tier-badge.tier-admin,
body.post-type-archive-care_guide .reptipedia-tier-badge.tier-admin,
body.post-type-archive-species_profile .reptipedia-tier-badge.tier-admin {
    background: #ffebee;
    color: #d32f2f;
}

body.single-care_guide .reptipedia-tier-badge.tier-expert,
body.single-species_profile .reptipedia-tier-badge.tier-expert,
body.post-type-archive-care_guide .reptipedia-tier-badge.tier-expert,
body.post-type-archive-species_profile .reptipedia-tier-badge.tier-expert {
    background: #fff3e0;
    color: #f57c00;
}

body.single-care_guide .reptipedia-tier-badge.tier-trusted,
body.single-species_profile .reptipedia-tier-badge.tier-trusted,
body.post-type-archive-care_guide .reptipedia-tier-badge.tier-trusted,
body.post-type-archive-species_profile .reptipedia-tier-badge.tier-trusted {
    background: #e3f2fd;
    color: #1976d2;
}

body.single-care_guide .reptipedia-tier-badge.tier-community,
body.single-species_profile .reptipedia-tier-badge.tier-community,
body.post-type-archive-care_guide .reptipedia-tier-badge.tier-community,
body.post-type-archive-species_profile .reptipedia-tier-badge.tier-community {
    background: #e8f5e9;
    color: #388e3c;
}

/* ═══════════════════════════════════════════════════════════════════════════
   AI NOTICE — AI-generated/reviewed status badge
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-ai-notice,
body.single-species_profile .reptipedia-ai-notice {
    padding: 12px 16px;
    background: #fffde7;
    border-left: 4px solid #f57f17;
    border-radius: 0 4px 4px 0;
    margin-top: 12px;
}

body.single-care_guide .reptipedia-ai-label,
body.single-species_profile .reptipedia-ai-label {
    font-size: 12px;
    font-weight: 600;
    color: #f57f17;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

body.single-care_guide .reptipedia-ai-label.reviewed,
body.single-species_profile .reptipedia-ai-label.reviewed {
    color: #2e7d32;
    background: #e8f5e9;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS — Tablet and mobile adjustments
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
    body.single-care_guide .reptipedia-article-layout,
    body.single-species_profile .reptipedia-article-layout {
        grid-template-columns: 1fr 260px !important;
    }

    body.single-care_guide .reptipedia-header-inner,
    body.single-species_profile .reptipedia-header-inner,
    body.post-type-archive-care_guide .reptipedia-header-inner,
    body.post-type-archive-species_profile .reptipedia-header-inner {
        padding: 12px 16px !important;
        gap: 12px !important;
    }

    body.single-care_guide .reptipedia-logo-subtitle,
    body.single-species_profile .reptipedia-logo-subtitle,
    body.post-type-archive-care_guide .reptipedia-logo-subtitle,
    body.post-type-archive-species_profile .reptipedia-logo-subtitle {
        display: none;
    }

    body.single-care_guide .reptipedia-footer-grid,
    body.single-species_profile .reptipedia-footer-grid,
    body.post-type-archive-care_guide .reptipedia-footer-grid,
    body.post-type-archive-species_profile .reptipedia-footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    body.single-care_guide .reptipedia-article-layout,
    body.single-species_profile .reptipedia-article-layout {
        grid-template-columns: 1fr !important;
    }

    body.single-care_guide .reptipedia-article-sidebar,
    body.single-species_profile .reptipedia-article-sidebar {
        display: contents !important;
    }

    /* TOC (1st sidebar card) stays before article */
    body.single-care_guide .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(1),
    body.single-species_profile .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(1) {
        order: -1 !important;
    }

    /* Article body in natural position */
    body.single-care_guide .reptipedia-article-body,
    body.single-species_profile .reptipedia-article-body {
        order: 0 !important;
    }

    /* Contribute (2nd card) pushed after article */
    body.single-care_guide .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(2),
    body.single-species_profile .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(2) {
        order: 1 !important;
    }

    /* Popular (3rd card) pushed after article */
    body.single-care_guide .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(3),
    body.single-species_profile .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(3) {
        order: 2 !important;
    }

    /* Any other sidebar widgets also after article */
    body.single-care_guide .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(n+4),
    body.single-species_profile .reptipedia-article-sidebar .reptipedia-sidebar-card:nth-child(n+4) {
        order: 3 !important;
    }

    body.single-care_guide .reptipedia-header-inner,
    body.single-species_profile .reptipedia-header-inner,
    body.post-type-archive-care_guide .reptipedia-header-inner,
    body.post-type-archive-species_profile .reptipedia-header-inner {
        padding: 12px !important;
        flex-direction: column;
        align-items: flex-start;
    }

    body.single-care_guide .reptipedia-header-nav,
    body.single-species_profile .reptipedia-header-nav,
    body.post-type-archive-care_guide .reptipedia-header-nav,
    body.post-type-archive-species_profile .reptipedia-header-nav {
        justify-content: flex-start;
        width: 100%;
    }

    body.single-care_guide .reptipedia-header-actions,
    body.single-species_profile .reptipedia-header-actions,
    body.post-type-archive-care_guide .reptipedia-header-actions,
    body.post-type-archive-species_profile .reptipedia-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    body.single-care_guide .reptipedia-quick-ref-grid,
    body.single-species_profile .reptipedia-quick-ref-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    body.single-care_guide .reptipedia-article-title,
    body.single-species_profile .reptipedia-article-title {
        font-size: 28px;
    }

    body.single-care_guide .reptipedia-article-content h2,
    body.single-species_profile .reptipedia-article-content h2 {
        font-size: 20px;
    }

    body.single-care_guide .reptipedia-container,
    body.single-species_profile .reptipedia-container,
    body.post-type-archive-care_guide .reptipedia-container,
    body.post-type-archive-species_profile .reptipedia-container {
        padding: 16px !important;
    }

    body.single-care_guide .reptipedia-footer-grid,
    body.single-species_profile .reptipedia-footer-grid,
    body.post-type-archive-care_guide .reptipedia-footer-grid,
    body.post-type-archive-species_profile .reptipedia-footer-grid {
        grid-template-columns: 1fr !important;
    }

    body.single-care_guide .reptipedia-contributor-card,
    body.single-species_profile .reptipedia-contributor-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    body.single-care_guide .reptipedia-contributor-info h4,
    body.single-species_profile .reptipedia-contributor-info h4 {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    body.single-care_guide .reptipedia-quick-ref-grid,
    body.single-species_profile .reptipedia-quick-ref-grid {
        grid-template-columns: 1fr !important;
    }

    body.single-care_guide .reptipedia-quick-ref,
    body.single-species_profile .reptipedia-quick-ref {
        padding: 16px !important;
    }

    body.single-care_guide .reptipedia-article-title,
    body.single-species_profile .reptipedia-article-title {
        font-size: 22px;
    }

    body.single-care_guide .reptipedia-article-meta,
    body.single-species_profile .reptipedia-article-meta {
        flex-direction: column;
        gap: 8px;
    }

    body.single-care_guide .reptipedia-header-nav,
    body.single-species_profile .reptipedia-header-nav,
    body.post-type-archive-care_guide .reptipedia-header-nav,
    body.post-type-archive-species_profile .reptipedia-header-nav {
        gap: 12px;
        flex-wrap: wrap;
    }

    body.single-care_guide .reptipedia-logo,
    body.single-species_profile .reptipedia-logo,
    body.post-type-archive-care_guide .reptipedia-logo,
    body.post-type-archive-species_profile .reptipedia-logo {
        gap: 8px;
    }

    body.single-care_guide .reptipedia-logo-icon,
    body.single-species_profile .reptipedia-logo-icon,
    body.post-type-archive-care_guide .reptipedia-logo-icon,
    body.post-type-archive-species_profile .reptipedia-logo-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    body.single-care_guide .reptipedia-logo-title,
    body.single-species_profile .reptipedia-logo-title,
    body.post-type-archive-care_guide .reptipedia-logo-title,
    body.post-type-archive-species_profile .reptipedia-logo-title {
        font-size: 18px;
    }

    body.single-care_guide .reptipedia-search-form,
    body.single-species_profile .reptipedia-search-form,
    body.post-type-archive-care_guide .reptipedia-search-form,
    body.post-type-archive-species_profile .reptipedia-search-form {
        display: none;
    }

    body.single-care_guide .reptipedia-container,
    body.single-species_profile .reptipedia-container,
    body.post-type-archive-care_guide .reptipedia-container,
    body.post-type-archive-species_profile .reptipedia-container {
        padding: 12px !important;
    }

    body.single-care_guide .reptipedia-sidebar-card,
    body.single-species_profile .reptipedia-sidebar-card {
        margin-bottom: 12px;
    }

    body.single-care_guide .reptipedia-article-content,
    body.single-species_profile .reptipedia-article-content {
        font-size: 15px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   UTILITY CLASSES — Additional helpers
   ═══════════════════════════════════════════════════════════════════════════ */

body.single-care_guide .reptipedia-hidden,
body.single-species_profile .reptipedia-hidden,
body.post-type-archive-care_guide .reptipedia-hidden,
body.post-type-archive-species_profile .reptipedia-hidden {
    display: none !important;
}

body.single-care_guide .reptipedia-text-center,
body.single-species_profile .reptipedia-text-center,
body.post-type-archive-care_guide .reptipedia-text-center,
body.post-type-archive-species_profile .reptipedia-text-center {
    text-align: center !important;
}

body.single-care_guide .reptipedia-text-muted,
body.single-species_profile .reptipedia-text-muted,
body.post-type-archive-care_guide .reptipedia-text-muted,
body.post-type-archive-species_profile .reptipedia-text-muted {
    color: #666 !important;
}

body.single-care_guide .reptipedia-mt-0,
body.single-species_profile .reptipedia-mt-0,
body.post-type-archive-care_guide .reptipedia-mt-0,
body.post-type-archive-species_profile .reptipedia-mt-0 {
    margin-top: 0 !important;
}

body.single-care_guide .reptipedia-mb-0,
body.single-species_profile .reptipedia-mb-0,
body.post-type-archive-care_guide .reptipedia-mb-0,
body.post-type-archive-species_profile .reptipedia-mb-0 {
    margin-bottom: 0 !important;
}

body.single-care_guide .reptipedia-p-0,
body.single-species_profile .reptipedia-p-0,
body.post-type-archive-care_guide .reptipedia-p-0,
body.post-type-archive-species_profile .reptipedia-p-0 {
    padding: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HOMEPAGE — Hero, Cards, Species Grid, Community
   ═══════════════════════════════════════════════════════════════════════════ */

.reptipedia-home {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: #222;
    line-height: 1.6;
}

/* ─── Hero ──────────────────────────────────────────────────────────────── */

.reptipedia-hero {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 40%, #388e3c 100%);
    color: #fff;
    padding: 80px 24px 72px;
    text-align: center;
}

.reptipedia-hero-inner {
    max-width: 720px;
    margin: 0 auto;
}

.reptipedia-hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.9);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-bottom: 20px;
}

.reptipedia-hero-title {
    font-size: 44px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 16px;
    color: #fff;
}

.reptipedia-hero-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    margin: 0 0 32px;
    max-width: 580px;
    margin-left: auto;
    margin-right: auto;
}

.reptipedia-hero-search {
    display: flex;
    max-width: 520px;
    margin: 0 auto 28px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.reptipedia-hero-search-input {
    flex: 1;
    padding: 14px 20px;
    border: none;
    font-size: 16px;
    outline: none;
    color: #222;
    background: #fff;
}

.reptipedia-hero-search-input::placeholder {
    color: #999;
}

.reptipedia-hero-search-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #43a047;
    color: #fff;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.reptipedia-hero-search-btn:hover {
    background: #388e3c;
}

.reptipedia-hero-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.reptipedia-stat-divider {
    opacity: 0.5;
}

/* ─── Section Layout ────────────────────────────────────────────────────── */

.reptipedia-home-section {
    padding: 56px 24px;
}

.reptipedia-home-section-alt {
    background: #f6f6f6;
}

.reptipedia-home-container {
    max-width: 1100px;
    margin: 0 auto;
}

.reptipedia-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.reptipedia-section-header h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    color: #222;
}

.reptipedia-view-all {
    font-size: 15px;
    font-weight: 600;
    color: #2e7d32;
    text-decoration: none;
}

.reptipedia-view-all:hover {
    text-decoration: underline;
}

/* ─── Guide Cards Grid ──────────────────────────────────────────────────── */

.reptipedia-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.reptipedia-guide-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}

.reptipedia-guide-card:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.reptipedia-card-thumb {
    height: 180px;
    background-size: cover;
    background-position: center;
    background-color: #e8f5e9;
}

.reptipedia-card-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.reptipedia-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.reptipedia-card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.reptipedia-card-tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    background: #e8f5e9;
    color: #2e7d32;
}

.reptipedia-card-tag-beginner { background: #e8f5e9; color: #2e7d32; }
.reptipedia-card-tag-intermediate { background: #fff3e0; color: #e65100; }
.reptipedia-card-tag-advanced { background: #fce4ec; color: #c62828; }
.reptipedia-card-tag-expert { background: #f3e5f5; color: #6a1b9a; }

.reptipedia-card-title {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
    color: #222;
}

.reptipedia-card-excerpt {
    font-size: 14px;
    color: #666;
    margin: 0 0 12px;
    flex: 1;
    line-height: 1.5;
}

.reptipedia-card-meta {
    font-size: 12px;
    color: #999;
}

.reptipedia-empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
    background: #f9f9f9;
    border-radius: 12px;
    color: #666;
}

.reptipedia-empty-state p {
    margin: 0 0 16px;
    font-size: 16px;
}

/* ─── Species Grid ──────────────────────────────────────────────────────── */

.reptipedia-species-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.reptipedia-species-card {
    background: #fff;
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    transition: box-shadow 0.2s, transform 0.2s;
    border: 2px solid transparent;
}

.reptipedia-species-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
    border-color: #e8f5e9;
}

.reptipedia-species-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.reptipedia-species-name {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 6px;
    color: #222;
}

.reptipedia-species-desc {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px;
    line-height: 1.4;
}

.reptipedia-species-count {
    font-size: 12px;
    font-weight: 600;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 3px 10px;
    border-radius: 10px;
}

/* ─── Topic Chips ───────────────────────────────────────────────────────── */

.reptipedia-topic-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.reptipedia-topic-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 24px;
    text-decoration: none;
    color: #333;
    font-size: 15px;
    font-weight: 500;
    transition: border-color 0.2s, background 0.2s;
}

.reptipedia-topic-chip:hover {
    border-color: #2e7d32;
    background: #e8f5e9;
    color: #2e7d32;
}

.reptipedia-topic-icon {
    font-size: 18px;
}

/* ─── Community Section ─────────────────────────────────────────────────── */

.reptipedia-home-community {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
    color: #fff;
    text-align: center;
    padding: 64px 24px;
}

.reptipedia-home-community h2 {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.reptipedia-community-subtitle {
    font-size: 17px;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

.reptipedia-community-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 900px;
    margin: 0 auto 36px;
}

.reptipedia-community-card {
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 28px 20px;
    backdrop-filter: blur(4px);
}

.reptipedia-community-icon {
    margin-bottom: 16px;
    color: rgba(255,255,255,0.9);
}

.reptipedia-community-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #fff;
}

.reptipedia-community-card p {
    font-size: 14px;
    color: rgba(255,255,255,0.75);
    margin: 0;
    line-height: 1.5;
}

.reptipedia-community-cta {
    display: flex;
    justify-content: center;
    gap: 16px;
}

.reptipedia-btn-hero {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
}

.reptipedia-btn-hero:active {
    transform: scale(0.98);
}

.reptipedia-btn-hero-primary {
    background: #fff;
    color: #1b5e20;
}

.reptipedia-btn-hero-primary:hover {
    background: #e8f5e9;
}

.reptipedia-btn-hero-secondary {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.3);
}

.reptipedia-btn-hero-secondary:hover {
    background: rgba(255,255,255,0.25);
}

/* ─── Homepage Responsive ───────────────────────────────────────────────── */

@media (max-width: 1024px) {
    .reptipedia-card-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .reptipedia-species-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .reptipedia-hero {
        padding: 56px 20px 48px;
    }

    .reptipedia-hero-title {
        font-size: 30px;
    }

    .reptipedia-hero-subtitle {
        font-size: 16px;
    }

    .reptipedia-hero-search {
        flex-direction: column;
        border-radius: 12px;
    }

    .reptipedia-hero-search-input {
        border-radius: 12px 12px 0 0;
    }

    .reptipedia-hero-search-btn {
        justify-content: center;
        border-radius: 0 0 12px 12px;
    }

    .reptipedia-hero-stats {
        flex-direction: column;
        gap: 4px;
    }

    .reptipedia-stat-divider {
        display: none;
    }

    .reptipedia-card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .reptipedia-guide-card {
        flex-direction: row;
    }

    .reptipedia-card-thumb {
        width: 120px;
        height: auto;
        min-height: 120px;
        flex-shrink: 0;
    }

    .reptipedia-species-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .reptipedia-community-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .reptipedia-home-community h2 {
        font-size: 26px;
    }

    .reptipedia-community-cta {
        flex-direction: column;
        align-items: center;
    }

    .reptipedia-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .reptipedia-home-section {
        padding: 40px 16px;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   3-D ANIMATED BOOK — Reptipedia Encyclopedia
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─── Scene & perspective ──────────────────────────────────────────────── */

.rp-book-scene {
    perspective: 1800px;
    width: 260px;
    height: 340px;
    margin: 0 auto 36px;
    position: relative;
}

.rp-book {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transform: rotateY(-28deg) rotateX(4deg);
    animation: rp-book-intro 1.2s cubic-bezier(0.23, 1, 0.32, 1) forwards,
               rp-book-breathe 6s ease-in-out 8s infinite;
}

/* ─── Covers ───────────────────────────────────────────────────────────── */

.rp-book-cover,
.rp-book-page {
    position: absolute;
    width: 100%;
    height: 100%;
    transform-origin: left center;
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

.rp-book-front {
    background: linear-gradient(145deg, #1a472a 0%, #1b5e20 30%, #2e7d32 70%, #1a472a 100%);
    border-radius: 4px 12px 12px 4px;
    box-shadow:
        inset 0 0 40px rgba(0,0,0,0.35),
        inset 2px 0 0 rgba(255,255,255,0.08),
        4px 4px 20px rgba(0,0,0,0.5);
    z-index: 10;
    animation: rp-cover-open 1.4s cubic-bezier(0.23, 1, 0.32, 1) 2s forwards;
    cursor: pointer;
}

.rp-book-back {
    background: linear-gradient(145deg, #1a472a 0%, #1b5e20 50%, #1a472a 100%);
    border-radius: 4px 12px 12px 4px;
    box-shadow:
        inset 0 0 30px rgba(0,0,0,0.4),
        -2px 4px 16px rgba(0,0,0,0.4);
    z-index: 0;
    transform: rotateY(0deg) translateZ(-8px);
}

/* Spine edge strip */
.rp-cover-spine-edge {
    position: absolute;
    left: 0;
    top: 0;
    width: 14px;
    height: 100%;
    background: linear-gradient(90deg, rgba(0,0,0,0.35) 0%, rgba(0,0,0,0.08) 60%, transparent 100%);
    border-radius: 4px 0 0 4px;
}

/* ─── Front cover content ──────────────────────────────────────────────── */

.rp-cover-inner {
    position: absolute;
    inset: 16px 16px 16px 22px;
    border: 2px solid rgba(212,175,55,0.35);
    border-radius: 4px 8px 8px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px 12px;
    background: linear-gradient(135deg, rgba(212,175,55,0.04) 0%, transparent 50%, rgba(212,175,55,0.04) 100%);
}

.rp-cover-ornament {
    color: rgba(212,175,55,0.50);
    font-size: 16px;
    letter-spacing: 6px;
}

.rp-cover-icon {
    margin: 4px 0;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.rp-cover-title {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 30px;
    font-weight: 700;
    color: rgba(212,175,55,0.9);
    text-shadow: 0 1px 4px rgba(0,0,0,0.4), 0 0 20px rgba(212,175,55,0.15);
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.1;
}

.rp-cover-subtitle {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 11px;
    color: rgba(212,175,55,0.55);
    letter-spacing: 3px;
    text-transform: uppercase;
}

.rp-cover-edition {
    font-size: 9px;
    color: rgba(212,175,55,0.4);
    letter-spacing: 1.5px;
    margin-top: 4px;
}

/* ─── Pages (shared) ───────────────────────────────────────────────────── */

.rp-book-page {
    background: #f5f0e6;
    border-radius: 2px 10px 10px 2px;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.06);
}

.rp-page-front,
.rp-page-back {
    position: absolute;
    inset: 0;
    padding: 24px 20px 20px 26px;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.rp-page-back {
    transform: rotateY(180deg);
}

.rp-page-header {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    font-weight: 700;
    color: #2e3d2f;
    text-align: center;
    margin-bottom: 6px;
}

.rp-page-chapter {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: #8b7d6b;
    text-align: center;
    margin-bottom: 4px;
}

.rp-page-rule {
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #b8a88a, transparent);
    margin: 0 auto 12px;
}

.rp-page-body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 10.5px;
    line-height: 1.65;
    color: #3d3225;
    text-align: justify;
    flex: 1;
}

.rp-page-number {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 10px;
    color: #8b7d6b;
    text-align: center;
    margin-top: auto;
    padding-top: 8px;
}

/* Table of contents */
.rp-page-toc {
    display: flex;
    flex-direction: column;
    gap: 7px;
    padding: 4px 0;
}

.rp-toc-item {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 10.5px;
    color: #3d3225;
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.rp-toc-dots {
    flex: 1;
    border-bottom: 1px dotted #b8a88a;
    margin: 0 2px;
    min-width: 10px;
}

.rp-toc-pg {
    font-size: 10px;
    color: #8b7d6b;
    min-width: 20px;
    text-align: right;
}

/* Sketch illustration page */
.rp-page-sketch {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding-top: 24px;
}

.rp-page-sketch svg {
    width: 160px;
    height: 120px;
}

.rp-page-caption {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 10px;
    color: #8b7d6b;
    text-align: center;
    margin-top: 8px;
}

/* ─── Page stacking & z-index ──────────────────────────────────────────── */

.rp-page-1 {
    z-index: 7;
    transform: translateZ(-2px);
    animation: rp-page1-flip 1.2s cubic-bezier(0.4, 0, 0.2, 1) 4s forwards;
}

.rp-page-2 {
    z-index: 5;
    transform: translateZ(-4px);
    animation: rp-page2-flip 1.2s cubic-bezier(0.4, 0, 0.2, 1) 5.6s forwards;
}

.rp-page-3 {
    z-index: 3;
    transform: translateZ(-6px);
    animation: rp-page3-flip 1.2s cubic-bezier(0.4, 0, 0.2, 1) 7.2s forwards;
}

/* ─── Keyframes ────────────────────────────────────────────────────────── */

/* Book slides in and tilts into resting pose */
@keyframes rp-book-intro {
    0%   { opacity: 0; transform: rotateY(-28deg) rotateX(4deg) scale(0.7) translateY(30px); }
    100% { opacity: 1; transform: rotateY(-28deg) rotateX(4deg) scale(1) translateY(0); }
}

/* Cover opens */
@keyframes rp-cover-open {
    0%   { transform: rotateY(0deg); }
    100% { transform: rotateY(-160deg); }
}

/* Page flips */
@keyframes rp-page1-flip {
    0%   { transform: rotateY(0deg) translateZ(-2px); z-index: 7; }
    50%  { z-index: 12; }
    100% { transform: rotateY(-160deg) translateZ(-2px); z-index: 12; }
}

@keyframes rp-page2-flip {
    0%   { transform: rotateY(0deg) translateZ(-4px); z-index: 5; }
    50%  { z-index: 11; }
    100% { transform: rotateY(-160deg) translateZ(-4px); z-index: 11; }
}

@keyframes rp-page3-flip {
    0%   { transform: rotateY(0deg) translateZ(-6px); z-index: 3; }
    50%  { z-index: 10; }
    100% { transform: rotateY(-160deg) translateZ(-6px); z-index: 10; }
}

/* Gentle breathing / hover after flip sequence */
@keyframes rp-book-breathe {
    0%   { transform: rotateY(-28deg) rotateX(4deg); }
    50%  { transform: rotateY(-24deg) rotateX(2deg) translateY(-4px); }
    100% { transform: rotateY(-28deg) rotateX(4deg); }
}

/* ─── Book page texture ────────────────────────────────────────────────── */

.rp-book-page::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 22px,
            rgba(0,0,0,0.015) 22px,
            rgba(0,0,0,0.015) 23px
        );
    border-radius: 2px 10px 10px 2px;
    pointer-events: none;
    z-index: 1;
}

/* Aged paper edge effect */
.rp-book-page::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 8px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(139,125,107,0.12));
    border-radius: 0 10px 10px 0;
    pointer-events: none;
}

/* ─── Book responsive ──────────────────────────────────────────────────── */

@media (max-width: 768px) {
    .rp-book-scene {
        width: 200px;
        height: 260px;
        margin-bottom: 28px;
    }

    .rp-cover-title {
        font-size: 22px;
    }

    .rp-cover-subtitle {
        font-size: 9px;
    }

    .rp-cover-icon svg {
        width: 48px;
        height: 48px;
    }

    .rp-page-header {
        font-size: 14px;
    }

    .rp-page-body {
        font-size: 9px;
    }

    .rp-toc-item {
        font-size: 9px;
    }
}

@media (max-width: 480px) {
    .rp-book-scene {
        width: 170px;
        height: 220px;
        margin-bottom: 24px;
    }

    .rp-cover-title {
        font-size: 18px;
    }

    .rp-cover-inner {
        inset: 10px 10px 10px 16px;
        padding: 12px 8px;
    }

    .rp-page-toc {
        gap: 4px;
    }
}
