/*
 Theme Name:   Gemini AI Prompt
 Theme URI:    https://generatepress.com
 Description:  GeneratePress Child Theme featuring Parkinsans, robust mobile spacing, search bar, and optimized layout.
 Author:       Your Name
 Author URI:   https://example.com
 Template:     generatepress
 Version:      1.1.6

*/

/* ==========================================================================
   Global Interface Reset & Variables (Emerald Theme)
   ========================================================================== */
:root {
    --gp-bg-color: #f7f9fc;
    --gp-card-bg: #ffffff;
    --gp-text-main: #111111;
    --gp-text-muted: #3a4250;
    --gp-accent: #05b868;
    --gp-accent-hover: #049c57;
    --gp-border: #edf2f7;
    --gp-shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
    --gp-shadow-md: 0 4px 6px rgba(0,0,0,0.05);
    --gp-font-family: 'Parkinsans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --gp-radius: 8px;
    --gp-footer-bg: #20313f;
}

body {
    background-color: var(--gp-bg-color) !important;
    color: var(--gp-text-main) !important;
    font-family: var(--gp-font-family) !important;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Fix Short Page White Gaps (Overrides GP aggressive mobile blocks) */
html, body { height: 100%; margin: 0; }
body { display: flex !important; flex-direction: column !important; min-height: 100vh !important; }
#page { display: flex !important; flex-direction: column !important; flex-grow: 1 !important; width: 100%; }
.site-content { flex-grow: 1 !important; width: 100%; }
.site-footer { margin-top: auto !important; width: 100%; }

h1, h2, h3, h4, h5, h6, .main-title {
    font-family: var(--gp-font-family) !important;
    font-weight: 700 !important;
    color: var(--gp-text-main);
    letter-spacing: -0.01em;
}

/* Reduced H2 & search titles */
h2 { font-size: 24px !important; }
.site-main .page-title, 
.site-main .archive-title { font-size: 24px !important; }

/* Reduced blog post paragraph size */
.inside-article p { font-size: 16px; }

@media (max-width: 768px) {
    h2 { font-size: 21px !important; }
    .site-main .page-title, 
    .site-main .archive-title { font-size: 21px !important; }
    .inside-article p { font-size: 15px; }
}

a { color: var(--gp-accent); text-decoration: none; transition: color 0.2s ease; }
a:hover, a:focus { color: var(--gp-accent-hover); }

/* ==========================================================================
   Header & Navigation (Custom Category + Expandable Search)
   ========================================================================== */
.site-header { background: #ffffff; box-shadow: var(--gp-shadow-sm); border-bottom: 1px solid var(--gp-border); position: sticky; top: 0; z-index: 100; }
.site-logo { margin-bottom: 0; }
.site-logo img { max-height: 40px; width: auto; } /* Compact Header Force */
.inside-header { padding: 5px 20px !important; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; }
.site-branding-container { display: flex; align-items: center; flex-grow: 1; }

.main-title { font-size: 26px; font-weight: 800; margin: 0; line-height: 1; color: var(--gp-accent) !important; }
.main-title a { color: var(--gp-accent) !important; text-decoration: none; }
.site-description { display: none; }

/* Injected Desktop Categories -> Rendered as .menu-bar-item natively in GP */
.gap-header-categories { display: flex; gap: 15px; margin: 0 15px 0 0; list-style: none; padding: 0; align-items: center; }
.gap-header-categories li a { font-weight: 600; font-size: 14px; color: var(--gp-text-main); }
.gap-header-categories li a:hover { color: var(--gp-accent); }

/* Custom Expandable Search Icon Container -> Rendered as .menu-bar-item natively in GP */
.gap-exp-search { position: relative; display: flex; align-items: center; }
.gap-search-toggle-btn { background: transparent; border: none; cursor: pointer; color: var(--gp-text-main); padding: 5px; outline: none; display: flex; align-items: center; }
.gap-search-toggle-btn:hover { color: var(--gp-accent); }
.gap-search-form-wrap {
    position: absolute; right: 0; top: 100%; margin-top: 15px; background: #fff; padding: 10px; border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1); display: none; width: 250px; max-width: 90vw; border: 1px solid var(--gp-border); z-index: 999;
}
.gap-search-form-wrap.active { display: flex; }
.gap-search-form-wrap form { display: flex; width: 100%; gap: 5px; margin: 0; }
.gap-search-form-wrap input { flex-grow: 1; padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; outline: none; font-family: var(--gp-font-family); min-width: 0; }
.gap-search-form-wrap input:focus { border-color: var(--gp-accent); }
.gap-search-form-wrap button[type="submit"] { background: var(--gp-accent); color: #fff; border: none; padding: 0 10px; border-radius: 4px; font-weight: 600; cursor: pointer; font-size: 13px; flex-shrink: 0; }

@media(max-width: 900px) { .gap-header-categories { display: none !important; } }
@media(max-width: 768px) { 
    .inside-header { padding: 5px 15px !important; } 
    .gap-search-form-wrap { 
        position: fixed; 
        top: 60px; /* Reduced to match compact header */
        left: 15px; 
        right: 15px; 
        width: auto; 
        max-width: none; 
        transform: none; 
        margin-top: 0;
    }
}

/* ==========================================================================
   Content Layout & Cards (Posts, Pages)
   ========================================================================== */
#content { padding-top: 20px; padding-bottom: 0px; }

.inside-article {
    background: var(--gp-card-bg); border-radius: var(--gp-radius); box-shadow: var(--gp-shadow-md);
    margin-bottom: 20px; border: 1px solid var(--gp-border); overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease; display: flex; flex-direction: column;
}
.blog .inside-article:hover, .archive .inside-article:hover { transform: translateY(-3px); box-shadow: 0 10px 15px rgba(0,0,0,0.06); }

/* Force exact tight bottom for Homepage Cards (Fix massive white gap) */
.blog .inside-article, .archive .inside-article { padding: 0 0 15px 0 !important; }
.single .inside-article { padding: 0 0 20px 0 !important; }

.post-image, .featured-image, .page-header-image-single {
    order: -1; margin: 20px 20px 0 20px !important; border-radius: var(--gp-radius); overflow: hidden;
}
.post-image img, .featured-image img, .page-header-image-single img { width: 100%; height: auto; object-fit: cover; display: block; border-radius: var(--gp-radius); }

.entry-header, .entry-content, .entry-summary, .entry-meta { padding: 0 20px; order: 0; }
.comments-link, .tags-links, .cat-links { display: none !important; }

/* Kill excerpts entirely */
.blog .entry-content, .archive .entry-content, .blog .entry-summary, .archive .entry-summary { display: none !important; }

/* Make Meta the true bottom boundary of cards */
.entry-header { margin-top: 15px; margin-bottom: 0px; }
.single .entry-content { margin-bottom: 15px; color: var(--gp-text-muted); display: block !important; }

/* Eliminate phantom gaps generated by GP's implicit article footer */
.blog footer.entry-meta, .archive footer.entry-meta { display: none !important; margin: 0; padding: 0; height: 0; }

.entry-meta {
    margin-top: 15px; margin-bottom: 0px; padding-bottom: 0px; border-bottom: none;
    color: var(--gp-text-muted); font-size: 13px; font-weight: 500; display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
}

.entry-title { font-size: 22px; line-height: 1.3; margin-bottom: 0px; }
.single .entry-title { font-size: 32px; text-align: center; margin-bottom: 10px; }
.entry-title a { color: var(--gp-text-main); }
.entry-title a:hover { color: var(--gp-accent); }
.entry-meta a { color: var(--gp-text-muted); }
.entry-meta a:hover { color: var(--gp-accent); }

/* ==========================================================================
   Author Box (Premium Floating Profile Aesthetic)
   ========================================================================== */
.gap-author-box {
    background: #ffffff; border-radius: var(--gp-radius); box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    padding: 0 30px 30px 30px; margin-top: 80px; margin-bottom: 30px; 
    border-top: 5px solid var(--gp-accent); text-align: center;
    display: flex; flex-direction: column; align-items: center;
}
.gap-author-avatar {
    margin-top: -45px; margin-bottom: 15px; /* Pulls it over the border naturally */
}
.gap-author-avatar img { 
    border-radius: 50%; width: 90px; height: 90px; object-fit: cover; 
    border: 5px solid #fff; box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    display: block;
}
.gap-author-badge { 
    display: inline-block; font-size: 11px; font-weight: 800; color: var(--gp-accent); 
    letter-spacing: 1px; margin-bottom: 8px;
}
.gap-author-info h4 { margin: 0 0 10px 0; font-size: 20px; color: var(--gp-text-main); font-weight: 800; }
.gap-author-info p { margin: 0; font-size: 15px; color: var(--gp-text-muted); line-height: 1.6; max-width: 600px; margin: 0 auto; }

/* ==========================================================================
   Sidebar & Widgets
   ========================================================================== */
.sidebar .widget { background: transparent; padding: 0 15px; box-shadow: none; border: none; margin-bottom: 40px; }
.widget-title, .gap-section-title {
    font-size: 18px; font-weight: 800; color: var(--gp-text-main); text-transform: uppercase;
    border-left: 5px solid var(--gp-accent); padding-left: 12px; margin-bottom: 20px;
}
.sidebar ul { list-style: none; padding-left: 0; margin-left: 0; }
.sidebar li { padding: 10px 0; border-bottom: 1px solid var(--gp-border); font-size: 14px; }
.sidebar li:last-child { border-bottom: none; }
.sidebar li a { color: var(--gp-text-main); font-weight: 500; }
.sidebar li a:hover { color: var(--gp-accent); }
.home .widget_recent_entries, .blog .widget_recent_entries, .archive .widget_recent_entries { display: none !important; }
.widget_recent_entries li { display: flex; align-items: center; gap: 12px; }
.widget_recent_entries li a { font-weight: 700; line-height: 1.4; font-size: 14px; }
.widget_recent_entries li img { width: 65px; height: 65px; border-radius: 8px; object-fit: cover; flex-shrink: 0; }

/* ==========================================================================
   Homepage Category Slider
   ========================================================================== */
.gap-cat-slider-container {
    width: 100%; overflow-x: auto; white-space: nowrap; padding: 5px 15px 15px 15px; margin-bottom: 20px;
    scrollbar-width: thin; scrollbar-color: var(--gp-accent) #f0f0f0;
}
.gap-cat-slider-container::-webkit-scrollbar { height: 6px; }
.gap-cat-slider-container::-webkit-scrollbar-track { background: #f0f0f0; border-radius: 10px; }
.gap-cat-slider-container::-webkit-scrollbar-thumb { background: var(--gp-accent); border-radius: 10px; }
.gap-cat-item {
    display: inline-block; width: 150px; height: 200px; border-radius: var(--gp-radius); overflow: hidden;
    position: relative; margin-right: 12px; background-color: #eee; vertical-align: top; box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.gap-cat-item:last-child { margin-right: 0; }
.gap-cat-item img { width: 100%; height: 100%; object-fit: cover; }
.gap-cat-item .gap-cat-title {
    position: absolute; bottom: 0; left: 0; right: 0; padding: 20px 15px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent); color: #fff; font-weight: 600; font-size: 13px; white-space: normal; line-height: 1.3;
}

/* ==========================================================================
   AI Prompt / Share Shortcode (Vibrant Solid Pills)
   ========================================================================== */
.gemini-ai-prompt-box {
    border: 1px dashed var(--gp-accent); background: #ffffff; border-radius: var(--gp-radius); padding: 35px 30px 25px 30px; margin: 40px 0 30px 0; box-shadow: 0 4px 15px rgba(0,0,0,0.03); text-align: left; position: relative;
}
.gap-prompt-label {
    position: absolute; top: -11px; left: 20px; background: #ffffff; padding: 0 10px; color: var(--gp-accent); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px;
}
.gemini-ai-prompt-text-wrapper { margin-bottom: 25px; }
.gemini-ai-prompt-text { font-size: 14px; color: var(--gp-text-main); margin: 0; line-height: 1.7; font-weight: 500; font-family: var(--gp-font-family); }
.gemini-ai-prompt-actions { display: flex; justify-content: center; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--gp-border); padding-top: 20px; }
@media (max-width: 600px) {
    .gemini-ai-prompt-box { padding: 20px; }
    .gemini-ai-prompt-actions { justify-content: center; }
}

.gap-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 8px 16px; border-radius: 20px; /* PILL SHAPE */
    color: #fff !important; border: none; cursor: pointer; transition: opacity 0.2s ease, transform 0.1s;
    font-weight: 600; font-size: 13px; text-decoration: none; line-height: 1; margin: 5px 0;
}
.gap-btn:hover { opacity: 0.85; transform: scale(1.02); }
.gap-btn svg { width: 16px; height: 16px; display: block; flex-shrink: 0; }

.gap-btn-chatgpt { background: #10a37f; } /* Teal */
.gap-btn-gemini  { background: #4285f4; } /* Blue */
.gap-btn-whatsapp { background: #25D366; } /* Bright Green */
.gap-btn-copy { background: #2d3748; letter-spacing: 0.5px; text-transform: uppercase; } /* Slate Black */
.gap-copied-state { background-color: #038c4f !important; }

/* ==========================================================================
   Footer Overrides & Gap Removal
   ========================================================================== */
/* The Incurable Gap was actually GP's native footer wrapper */
.site-info, .copyright-bar { display: none !important; margin: 0 !important; padding: 0 !important; border: none !important; height: 0 !important; overflow: hidden !important; }

.site-footer { background-color: var(--gp-footer-bg) !important; color: #cbd5e1 !important; margin-top: auto !important; width: 100%; padding: 0; }
.gap-footer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; padding: 50px 20px; max-width: 1200px; margin: 0 auto; font-size: 14px; }
.gap-footer-col h2 { color: #fff; font-size: 16px; margin-bottom: 20px; margin-top: 0; text-transform: uppercase; font-weight: 700; }
.gap-footer-col p { margin-top: 0; line-height: 1.6; }
.gap-footer-col ul { list-style: none; padding: 0; margin: 0; }
.gap-footer-col ul li { margin-bottom: 10px; }
.gap-footer-col a { color: #cbd5e1 !important; }
.gap-footer-col a:hover { color: var(--gp-accent) !important; }
.gap-footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding: 20px 0; text-align: center; font-size: 13px; }

/* Responsive Overrides */
@media (max-width: 768px) {
    .gap-footer-grid { grid-template-columns: 1fr; gap: 30px; padding: 40px 20px; }
    .single .entry-title { font-size: 24px; }
    /* Padding Mobile Cut-off fixes */
    .post-image, .featured-image, .page-header-image-single { margin: 10px 10px 0 10px !important; }
    .entry-header, .entry-content, .entry-meta { padding: 0 15px !important; }
    .inside-article { border-radius: 6px; }
}
