/*
Theme Name: Kamaba
Theme URI: https://kraftysprouts.com/kamaba
Author: Krafty Sprouts Media LLC
Author URI: https://kraftysprouts.com
Description: A modern, AI-powered database theme. Kamaba means "explosive intensity" - combining clean design with powerful data visualization.
Version: 3.7.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kamaba
Tags: database, ai, modern, clean, responsive

Kamaba WordPress Theme, Copyright 2026 Krafty Sprouts Media LLC
Kamaba is distributed under the terms of the GNU GPL.

==========================================================================
V5 DESIGN SYSTEM - Clean Minimal CSS
==========================================================================
This stylesheet is intentionally minimal. Most styling is handled by:
- Tailwind CSS (tailwind.min.css) for utility classes
- Inline Tailwind classes in templates

Only essential custom styles that cannot be achieved with Tailwind are here.
==========================================================================
*/

/* ========================================
   CRITICAL: MOBILE OVERFLOW FIX
   ======================================== */

* {
    box-sizing: border-box !important;
}

html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
}

body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ========================================
   V5 TYPOGRAPHY SYSTEM
   Fonts: Libre Baskerville (body & headings), Syne (logo)
   ======================================== */

body {
    font-family: 'Libre Baskerville', Georgia, serif;
    background-color: #fdfdfd;
    color: #0f172a;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Libre Baskerville', Georgia, serif;
}

/* ========================================
   ALPINE.JS CLOAK
   ======================================== */

[x-cloak] {
    display: none !important;
}

/* ========================================
   MOBILE TAP TARGET (V5 Design)
   ======================================== */

.tap-target {
    min-height: 48px;
    display: flex;
    align-items: center;
}

/* ========================================
   CUSTOM UTILITIES (Used in templates)
   ======================================== */

/* Hide scrollbar but allow scroll */
.hide-scroll::-webkit-scrollbar {
    display: none;
}

.hide-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Hero gradient fade (database templates) */
.hero-gradient {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 1) 90%);
}

/* ========================================
   CINEMA SPOTLIGHT EFFECT (Database pages)
   ======================================== */

.cinema-spotlight {
    position: relative;
    display: inline-block;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.cinema-spotlight::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0%;
    height: 0%;
    background: radial-gradient(ellipse at center,
            rgba(255, 255, 255, 0.4) 0%,
            rgba(255, 255, 255, 0.2) 30%,
            rgba(255, 223, 0, 0.15) 50%,
            rgba(255, 223, 0, 0.05) 70%,
            transparent 100%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: -1;
    border-radius: 50%;
    filter: blur(20px);
}

.cinema-spotlight:hover::before {
    width: 150%;
    height: 200%;
    opacity: 1;
    animation: spotlight-pulse 2s ease-in-out infinite;
}

.cinema-spotlight:hover {
    text-shadow:
        0 0 20px rgba(255, 255, 255, 0.3),
        0 0 40px rgba(255, 223, 0, 0.2),
        0 0 60px rgba(255, 223, 0, 0.1);
    transform: scale(1.02);
}

@keyframes spotlight-pulse {

    0%,
    100% {
        filter: blur(20px) brightness(1);
    }

    50% {
        filter: blur(25px) brightness(1.1);
    }
}

/* ========================================
   NOVASHARE SOCIAL SHARING PLUGIN
   (Only if using NovaShare - can be removed if not)
   ======================================== */

.novashare-inline {
    border-top: 2px solid #000 !important;
    border-bottom: 2px solid #000 !important;
    background: transparent !important;
    margin: 2rem 0 !important;
    padding: 1.5rem 0 !important;
}

.novashare-inline .novashare-buttons {
    display: flex !important;
    justify-content: center !important;
    gap: 0.75rem !important;
}

.novashare-inline .novashare-button {
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font-family: 'Hanken Grotesk', sans-serif !important;
    font-weight: 700 !important;
    font-size: 0.875rem !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 0.75rem 1.5rem !important;
    transition: all 0.2s ease !important;
}

.novashare-inline .novashare-button:hover {
    background: #000 !important;
    color: #fff !important;
    transform: translateY(-2px) !important;
}

.novashare-floating {
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    background: #fff !important;
}

.novashare-floating .novashare-button {
    border-bottom: 1px solid #e5e7eb !important;
    background: transparent !important;
}

.novashare-floating .novashare-button:hover {
    background: #f3f4f6 !important;
}

.novashare-total {
    font-family: 'Hanken Grotesk', sans-serif !important;
    font-weight: 700 !important;
    color: #000 !important;
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    background: #f3f4f6 !important;
}

.novashare-ctt {
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    background: #f9fafb !important;
    padding: 2rem !important;
    margin: 2rem 0 !important;
}

.novashare-ctt-text {
    font-family: 'Libre Baskerville', serif !important;
    font-style: italic !important;
    font-size: 1.125rem !important;
    color: #000 !important;
    line-height: 1.6 !important;
}

.novashare-ctt-btn {
    border: 2px solid #000 !important;
    border-radius: 0 !important;
    background: #fff !important;
    color: #000 !important;
    font-family: 'Hanken Grotesk', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    padding: 0.75rem 1.5rem !important;
}

.novashare-ctt-btn:hover {
    background: #000 !important;
    color: #fff !important;
}

/* ========================================
   HEADER MENU & LOGO - BLACK TEXT (NOT BLUE)
   ======================================== */

/* Ensure header menu links are black, not blue */
header nav a,
header nav ul li a,
header .font-logo {
    color: #0f172a !important;
    /* text-gray-900 */
}

/* Logo link should be black */
header a.font-logo {
    color: #0f172a !important;
    /* text-gray-900 */
}

/* Hover states use brand color */
header nav a:hover,
header a.font-logo:hover {
    color: #4b4edd !important;
    /* text-brand */
}

/* ========================================
   FOOTER MENU LINKS - WHITE TEXT (NOT BLUE)
   ======================================== */

/* Force footer menu links to be white, not blue */
footer nav a,
footer nav ul li a,
footer a:not(.font-logo) {
    color: #ffffff !important;
    /* text-white */
}

/* Footer menu links hover to brand color */
footer nav a:hover,
footer nav ul li a:hover {
    color: #4b4edd !important;
    /* text-brand */
}


/* ========================================
   WIDGET POST TITLES - ENSURE VISIBILITY
   ======================================== */

/* Ensure widget post titles are always visible (not just on hover) */
.widget a h4,
.widget .group h4,
.widget [class*="widget"] a h4 {
    color: #0f172a !important;
    /* text-gray-900 - force visible */
}

.widget a:hover h4,
.widget .group:hover h4 {
    color: #4b4edd !important;
    /* text-brand on hover */
}

/* ========================================
   JETPACK TOP POSTS WIDGET STYLING
   Match theme aesthetics for Jetpack's official widget
   ======================================== */

/* Jetpack Top Posts Widget - Match Theme Aesthetics */
.widget_top-posts {
    /* Remove default Jetpack styling */
}

/* Override all Jetpack default spacing and layout */
.widget_top-posts * {
    box-sizing: border-box;
}

.widget_top-posts .widgets-list-layout li>a>* {
    margin: 0 !important;
}

.widget_top-posts .widgets-list-layout {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* space-y-4 - match theme widget */
}

/* Override Jetpack's default spacing - ensure tight layout */
.widget_top-posts .widgets-list-layout li>a {
    margin: 0 !important;
    padding: 0 !important;
    gap: 0.75rem !important;
    /* gap-3 - match theme widget exactly */
}

/* Ensure image wrapper doesn't add extra space */
.widget_top-posts .widgets-list-layout li>a>img {
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
}

.widget_top-posts .widgets-list-layout li {
    margin: 0;
    padding: 0;
}

.widget_top-posts .widgets-list-layout li>a {
    display: flex;
    gap: 0.75rem;
    /* gap-3 - match theme widget */
    align-items: flex-start;
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

.widget_top-posts .widgets-list-layout li>a:hover {
    color: #4b4edd;
    /* text-brand */
}

/* Thumbnail container - force square aspect ratio */
.widget_top-posts .widgets-list-layout li>a>img.widgets-list-layout-blavatar,
.widget_top-posts .widgets-list-layout-blavatar {
    width: 4rem !important;
    /* w-16 */
    height: 4rem !important;
    /* h-16 - force square */
    min-width: 4rem;
    min-height: 4rem;
    max-width: 4rem;
    max-height: 4rem;
    object-fit: cover !important;
    /* Crop to fit square */
    object-position: center;
    border: 2px solid #d1d5db !important;
    /* border-gray-300 */
    flex-shrink: 0;
    border-radius: 0;
    /* Match theme's no-rounded aesthetic */
    aspect-ratio: 1 / 1;
    /* Force square */
}

@media (min-width: 768px) {

    .widget_top-posts .widgets-list-layout li>a>img.widgets-list-layout-blavatar,
    .widget_top-posts .widgets-list-layout-blavatar {
        width: 5rem !important;
        /* md:w-20 */
        height: 5rem !important;
        /* md:h-20 - force square */
        min-width: 5rem;
        min-height: 5rem;
        max-width: 5rem;
        max-height: 5rem;
    }
}

/* Title styling to match theme - reduce spacing */
.widget_top-posts .widgets-list-layout-links {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
}

.widget_top-posts .widgets-list-layout-links a {
    font-family: 'Libre Baskerville', serif !important;
    /* font-serif */
    font-weight: 700 !important;
    /* font-bold */
    font-size: 0.875rem !important;
    /* text-sm */
    line-height: 1.25 !important;
    /* leading-tight */
    color: #0f172a !important;
    /* text-gray-900 */
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.2s ease;
    margin: 0;
    padding: 0;
}

@media (min-width: 768px) {
    .widget_top-posts .widgets-list-layout-links a {
        font-size: 1rem;
        /* md:text-base */
    }
}

.widget_top-posts .widgets-list-layout-links a:hover {
    color: #4b4edd;
    /* text-brand */
}

/* Remove Jetpack's default stats/views display if present */
.widget_top-posts .post-stats,
.widget_top-posts .post-views {
    display: none;
}

/* Grid layout styling (if using grid display) */
.widget_top-posts .widgets-grid-layout {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.widget_top-posts .widgets-grid-layout img {
    width: 100%;
    height: auto;
    border: 2px solid #d1d5db;
    border-radius: 0;
}

/* ========================================
   STICKY SIDEBAR
   ========================================
   Ported from Codesupply Newsblock theme
   @since 3.1.6
   ======================================== */

/* Sticky Sidebar Area */
@media (min-width: 1020px) {

    /* Stick to Top Method */
    .kamaba-sticky-sidebar-enabled.kamaba-stick-to-top .sidebar-area {
        display: flex;
        flex-direction: column;
    }

    .kamaba-sticky-sidebar-enabled.kamaba-stick-to-top .kamaba-sidebar-sticky {
        position: relative;
        position: sticky;
        top: 0;
        flex: initial;
        transition: 0.4s;
    }

    /* Stick to Bottom Method */
    .kamaba-sticky-sidebar-enabled.kamaba-stick-to-bottom .sidebar-area {
        display: flex;
        flex-direction: column;
    }

    .kamaba-sticky-sidebar-enabled.kamaba-stick-to-bottom .kamaba-sidebar-sticky {
        position: relative;
        position: sticky;
        bottom: 2rem;
        margin-top: auto;
        flex: 0 0 auto;
    }

    /* Stick Last Widget Method */
    .kamaba-sticky-sidebar-enabled.kamaba-stick-last .kamaba-sidebar-sticky {
        display: flex;
        flex-direction: column;
        height: 100%;
    }

    .kamaba-sticky-sidebar-enabled.kamaba-stick-last .kamaba-sidebar-sticky .widget:last-child {
        position: relative;
        position: sticky;
        top: 3rem;
        transition: 0.4s;
    }
}

/* Firefox-specific fix for bottom positioning */
@-moz-document url-prefix() {
    @media (min-width: 1020px) {
        .kamaba-sticky-sidebar-enabled.kamaba-stick-to-bottom .kamaba-sidebar-sticky {
            top: 0;
            bottom: initial;
            margin-top: initial;
            flex: initial;
            transition: 0.4s;
        }
    }
}

/* ========================================
   STICKY ADS WIDGET (Database Sidebars)
   ========================================
   Makes ads widget area sticky at bottom of sidebar
   @since 3.3.4
   ======================================== */

@media (min-width: 1020px) {

    /* Make sidebar content container flex for sticky ads positioning */
    .kamaba-sidebar-wrapper>.space-y-8 {
        display: flex;
        flex-direction: column;
        min-height: calc(100vh - 200px);
        /* Ensure container is tall enough */
    }

    /* Sticky ads widget - sticks to bottom of viewport */
    .kamaba-sticky-ads-widget {
        position: sticky;
        bottom: 2rem;
        margin-top: auto;
        align-self: flex-end;
        width: 100%;
        transition: 0.4s;
        z-index: 10;
    }

    /* Override space-y-8 margin-top on ads widget (we use margin-top: auto instead) */
    .kamaba-sidebar-wrapper>.space-y-8>.kamaba-sticky-ads-widget {
        margin-top: auto !important;
    }
}
