/* ============================================================
   guides.css — Ranking Kenya Guides Feature
   ============================================================ */

/* ---- Variables (inherit from site) ---- */
:root {
    --guide-primary: #d4af62;
    --guide-dark: #121212;
    --guide-text: #797E88;
    --guide-bg: #F0EFE9;
    --guide-white: #ffffff;
    --guide-border: #e0e0e0;
    --guide-accent: #1e73be;
    --guide-shadow: 0 4px 24px rgba(0,0,0,0.08);
    --guide-radius: 14px;
    --guide-radius-sm: 8px;
}

/* ============================================================
   LISTING PAGE — GUIDE CARDS
   ============================================================ */

.guides-listing-section { padding-top: 80px; padding-bottom: 80px; }

/* Search */
.guides-search-group { max-width: 520px; margin: 0 auto; border-radius: 40px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.guides-search-input { border: none; padding: 14px 22px; font-size: 15px; background: #fff; }
.guides-search-input:focus { outline: none; box-shadow: none; border: none; }
.guides-search-btn { background: var(--guide-primary); color: #fff; border: none; padding: 0 26px; font-size: 18px; transition: background .2s; }
.guides-search-btn:hover { background: #b8962e; }

.guides-search-notice {
    background: #fff8e7; border: 1px solid var(--guide-primary);
    border-radius: var(--guide-radius-sm); padding: 12px 18px;
    font-size: 14px; color: var(--guide-dark);
}
.guides-search-notice a { color: var(--guide-accent); text-decoration: none; }

/* Guide Card */
.guide-card {
    background: var(--guide-white);
    border-radius: var(--guide-radius);
    overflow: hidden;
    box-shadow: var(--guide-shadow);
    transition: transform .3s, box-shadow .3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.guide-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(0,0,0,0.14); }

.guide-card__image-link { display: block; text-decoration: none; }
.guide-card__image { position: relative; overflow: hidden; aspect-ratio: 16/9; }
.guide-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.guide-card:hover .guide-card__image img { transform: scale(1.04); }

.guide-card__overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 60%);
    display: flex; align-items: flex-end; justify-content: center;
    padding-bottom: 16px; opacity: 0; transition: opacity .3s;
}
.guide-card:hover .guide-card__overlay { opacity: 1; }
.guide-card__read { color: #fff; font-weight: 600; font-size: 14px; letter-spacing: .5px; }

.guide-card__body { padding: 22px; flex: 1; display: flex; flex-direction: column; }

.guide-card__meta { font-size: 12px; color: var(--guide-text); margin-bottom: 10px; display: flex; gap: 14px; }

.guide-card__title { font-family: 'Space Grotesk', sans-serif; font-size: 17px; font-weight: 700; line-height: 1.4; color: var(--guide-dark); margin-bottom: 10px; }
.guide-card__title a { color: inherit; text-decoration: none; }
.guide-card__title a:hover { color: var(--guide-primary); }

.guide-card__desc { font-size: 14px; color: var(--guide-text); line-height: 1.6; margin-bottom: 16px; flex: 1; }

/* Author pill on card */
.guide-card__author { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 12px; background: #fafafa; border-radius: 40px; border: 1px solid var(--guide-border); }
.guide-card__author-img { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; border: 2px solid var(--guide-primary); }
.guide-card__author-placeholder { width: 34px; height: 34px; border-radius: 50%; background: var(--guide-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; flex-shrink: 0; }
.guide-card__author-name { display: block; font-size: 13px; font-weight: 600; color: var(--guide-dark); line-height: 1.2; }
.guide-card__author-company { display: block; font-size: 11px; color: var(--guide-text); }

.guide-card__link { font-size: 13px; font-weight: 600; color: var(--guide-accent); text-decoration: none; margin-top: auto; }
.guide-card__link:hover { color: var(--guide-primary); }

/* Pagination */
.guides-pagination .pagination { gap: 6px; }
.guides-pagination .page-link { border-radius: 8px; border: 1px solid var(--guide-border); color: var(--guide-dark); padding: 8px 14px; font-weight: 500; }
.guides-pagination .page-item.active .page-link { background: var(--guide-primary); border-color: var(--guide-primary); color: #fff; }
.guides-pagination .page-link:hover { background: var(--guide-primary); color: #fff; border-color: var(--guide-primary); }

/* ============================================================
   SINGLE GUIDE PAGE
   ============================================================ */

.guide-single-section { padding-top: 60px; padding-bottom: 80px; }

/* Hero image */
.guide-hero-image img { border-radius: var(--guide-radius); box-shadow: var(--guide-shadow); }

/* Meta bar */
.guide-meta-bar { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; padding: 14px 20px; background: #fff; border-radius: var(--guide-radius-sm); box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.guide-meta-item { font-size: 13px; color: var(--guide-text); }
.guide-meta-item i { color: var(--guide-primary); }

/* Guide body prose */
.guide-body.prose-content { font-size: 16px; line-height: 1.85; color: #444; }
.prose-content h1,.prose-content h2,.prose-content h3,.prose-content h4 { font-family: 'Space Grotesk', sans-serif; color: var(--guide-dark); margin-top: 2em; margin-bottom: .6em; font-weight: 700; }
.prose-content h2 { font-size: 1.6rem; border-left: 4px solid var(--guide-primary); padding-left: 14px; }
.prose-content h3 { font-size: 1.25rem; }
.prose-content p { margin-bottom: 1.2em; }
.prose-content a { color: var(--guide-accent); text-decoration: underline; }
.prose-content img { max-width: 100%; border-radius: var(--guide-radius-sm); margin: 1em 0; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.prose-content blockquote { border-left: 4px solid var(--guide-primary); background: #fffbf0; padding: 16px 20px; margin: 1.5em 0; border-radius: 0 8px 8px 0; font-style: italic; color: #555; }
.prose-content ul, .prose-content ol { padding-left: 1.6em; margin-bottom: 1.2em; }
.prose-content li { margin-bottom: .5em; }
.prose-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 14px; box-shadow: 0 2px 10px rgba(0,0,0,.06); border-radius: 8px; overflow: hidden; }
.prose-content table thead { background: var(--guide-primary); color: #fff; }
.prose-content table th { padding: 12px 16px; text-align: left; font-weight: 600; }
.prose-content table td { padding: 11px 16px; border-bottom: 1px solid var(--guide-border); }
.prose-content table tr:last-child td { border-bottom: none; }
.prose-content table tr:nth-child(even) td { background: #fafafa; }
.prose-content code { background: #f4f4f4; padding: 2px 7px; border-radius: 4px; font-size: 13px; color: #c0392b; }
.prose-content pre { background: #1e1e1e; color: #d4d4d4; padding: 20px; border-radius: 8px; overflow-x: auto; margin: 1.5em 0; }

/* Share bar */
.guide-share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 20px; background: #fff; border-radius: var(--guide-radius-sm); border: 1px solid var(--guide-border); }
.guide-share-label { font-weight: 700; color: var(--guide-dark); font-size: 14px; }
.guide-share-btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 18px; border-radius: 30px; font-size: 13px; font-weight: 600; text-decoration: none; transition: transform .2s, opacity .2s; }
.guide-share-btn:hover { transform: translateY(-2px); opacity: .9; }
.guide-share-btn--fb { background: #1877f2; color: #fff; }
.guide-share-btn--tw { background: #1da1f2; color: #fff; }
.guide-share-btn--li { background: #0077b5; color: #fff; }
.guide-share-btn--wa { background: #25d366; color: #fff; }

/* ---- You Might Be Interested In ---- */
.guide-interests { background: #fff; border-radius: var(--guide-radius); padding: 28px; box-shadow: var(--guide-shadow); }
.guide-interests__title { font-family: 'Space Grotesk', sans-serif; font-size: 1.15rem; font-weight: 700; color: var(--guide-dark); margin-bottom: 20px; }
.guide-interests__title i { color: var(--guide-primary); }

/* Grid (≤3 links) */
.interests-grid { display: flex; flex-direction: column; gap: 10px; }
.interest-card {
    display: block; padding: 14px 18px;
    background: linear-gradient(135deg, #fff9ee, #fff);
    border: 1px solid #f0deb0;
    border-radius: var(--guide-radius-sm);
    color: var(--guide-dark); font-weight: 600; font-size: 15px;
    text-decoration: none; transition: background .2s, transform .2s;
}
.interest-card i { color: var(--guide-primary); }
.interest-card:hover { background: var(--guide-primary); color: #fff; transform: translateX(4px); }
.interest-card:hover i { color: #fff; }

/* Slideshow (>3 links) */
.interests-slider { position: relative; overflow: hidden; }
.interests-track { display: flex; gap: 12px; transition: transform .4s ease; }
.interest-slide { min-width: calc(50% - 6px); }
@media (max-width: 600px) { .interest-slide { min-width: 100%; } }

.interests-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; }
.interests-btn { width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--guide-primary); background: #fff; color: var(--guide-primary); font-size: 14px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.interests-btn:hover { background: var(--guide-primary); color: #fff; }
.interests-dots { display: flex; gap: 7px; }
.interests-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--guide-border); cursor: pointer; transition: background .2s; }
.interests-dot.active { background: var(--guide-primary); }

/* ============================================================
   AUTHOR CARD (SIDEBAR — CLIENT / SPONSOR)
   ============================================================ */

.guide-author-card {
    background: var(--guide-white);
    border-radius: var(--guide-radius);
    overflow: hidden;
    box-shadow: 0 6px 30px rgba(0,0,0,.12);
    border: 2px solid var(--guide-primary);
}

.guide-author-card__badge {
    background: linear-gradient(135deg, var(--guide-primary), #b8962e);
    color: #fff;
    text-align: center;
    padding: 10px 20px;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.guide-author-card__body { padding: 24px; }

.guide-author-card__top { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }

.guide-author-card__photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 3px solid var(--guide-primary); flex-shrink: 0; }
.guide-author-card__photo-placeholder { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg, var(--guide-primary), #b8962e); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; flex-shrink: 0; }

.guide-author-card__name { font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; font-weight: 800; color: var(--guide-dark); margin: 0 0 4px; line-height: 1.2; }
.guide-author-card__company { font-size: 13px; color: var(--guide-text); margin: 0; }
.guide-author-card__company i { color: var(--guide-primary); }

.guide-author-card__desc { font-size: 14px; line-height: 1.65; color: #555; margin-bottom: 18px; padding: 14px; background: #fafafa; border-radius: 8px; border-left: 3px solid var(--guide-primary); }

.guide-author-card__contacts { display: flex; flex-direction: column; gap: 10px; }

.guide-author-card__contact-link { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f5f5f5; border-radius: 8px; color: var(--guide-dark); font-size: 14px; text-decoration: none; font-weight: 500; transition: background .2s; }
.guide-author-card__contact-link i { color: var(--guide-primary); width: 16px; }
.guide-author-card__contact-link:hover { background: #ffe8bb; color: var(--guide-dark); }

.guide-author-card__website {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 20px;
    background: linear-gradient(135deg, var(--guide-primary), #b8962e);
    color: #fff; border-radius: 8px; text-decoration: none;
    font-weight: 700; font-size: 15px; transition: opacity .2s, transform .2s;
    margin-top: 4px;
}
.guide-author-card__website:hover { opacity: .9; transform: translateY(-2px); color: #fff; }

/* Related Guides sidebar */
.guide-related { background: #fff; border-radius: var(--guide-radius); padding: 22px; box-shadow: var(--guide-shadow); }
.guide-related__title { font-family: 'Space Grotesk', sans-serif; font-size: 1rem; font-weight: 700; color: var(--guide-dark); margin-bottom: 18px; }
.guide-related__title i { color: var(--guide-primary); }
.guide-related__item { display: flex; gap: 12px; text-decoration: none; padding: 12px 0; border-bottom: 1px solid var(--guide-border); align-items: flex-start; }
.guide-related__item:last-child { border-bottom: none; padding-bottom: 0; }
.guide-related__item:hover h6 { color: var(--guide-primary); }
.guide-related__thumb { width: 70px; height: 55px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }
.guide-related__text h6 { font-size: 13px; font-weight: 600; color: var(--guide-dark); margin: 0 0 4px; line-height: 1.4; transition: color .2s; }
.guide-related__text small { font-size: 11px; color: var(--guide-text); }

/* ============================================================
   ADMIN EDITOR STYLES (guide-admin.css)
   ============================================================ */
.editor-tips { background: #fffbf0; border: 1px solid #f0deb0; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #6d5a1e; }
.CodeMirror, .CodeMirror-scroll { min-height: 400px; }
.EasyMDEContainer { border-radius: 8px; overflow: hidden; }
.editor-toolbar { background: #fafafa; border-radius: 8px 8px 0 0; }

/* Responsive */
@media (max-width: 767px) {
    .guide-author-card { margin-top: 40px; position: static !important; }
    .guide-meta-bar { gap: 10px; }
    .guide-share-bar { gap: 8px; }
    .guide-share-btn { padding: 8px 14px; font-size: 12px; }
}
