/*
Theme Name: Nemokami Atsakymai
Theme URI: https://nemokamiatsakymai.lt
Author: Autonominis AI
Description: Futuristinė, tamsi tema Programmatic SEO projektui. Dark mode, neoniniai akcentai ir glassmorphism efektas.
Version: 1.0.0
*/

:root {
    --bg-color: #0b0f19; /* Deeper Dark */
    --text-color: #cbd5e1; /* Plus Jakarta Sans looks great with slightly muted text */
    --accent-color: #3b82f6; /* Electric Blue */
    --accent-glow: rgba(59, 130, 246, 0.4);
    --secondary-accent: #00e5ff; /* Neon Cyan (pakeista iš violetinės) */
    --glass-bg: rgba(17, 24, 39, 0.75);
    --glass-border: rgba(255, 255, 255, 0.08);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-body);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Glassmorphism Classes */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
    width: 100%;
}

header {
    padding: 1rem 0;
    text-align: center;
}

header h1 a {
    display: inline-block;
    transition: transform 0.3s ease;
}

header h1 a:hover {
    transform: scale(1.05);
}

.site-logo {
    max-height: 300px;
    width: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 0 15px var(--accent-glow));
}

.mini-header .site-logo {
    max-height: 120px;
}

/* Search Area */
.search-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0 3rem;
    text-align: center;
}

body.home .search-hero {
    margin-top: -2rem;
    padding-top: 0;
}

.search-title {
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-family: var(--font-heading);
    font-weight: 800;
    margin-bottom: 2rem;
    background: linear-gradient(to right, var(--accent-color), var(--secondary-accent));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.search-box {
    width: 100%;
    max-width: 800px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 1.5rem 170px 1.5rem 2rem;
    font-size: 1.5rem;
    background: var(--glass-bg);
    border: 2px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-color);
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.search-input:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 30px var(--accent-glow);
}

.search-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-accent));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 40px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    box-shadow: 0 0 20px var(--accent-glow);
    transform: translateY(-50%) scale(1.05);
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    margin-top: 10px;
    padding-top: 10px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    display: none;
    text-align: left;
}

.autocomplete-dropdown.active {
    display: block;
}

.autocomplete-item {
    padding: 1rem 2rem;
    cursor: pointer;
    color: var(--text-color);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.autocomplete-item i {
    color: var(--accent-color);
    font-size: 0.9em;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* Grid Layout for Answers */
.answers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.answers-carousel {
    position: relative;
    margin-top: 4rem;
    padding: 0 2.8rem;
}

.answers-carousel .answers-grid {
    margin-top: 0;
}

.answers-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    color: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease, background 0.2s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.answers-arrow:hover:not(:disabled) {
    transform: translateY(-50%) scale(1.06);
    background: rgba(59, 130, 246, 0.22);
    box-shadow: 0 0 18px var(--accent-glow);
}

.answers-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.answers-arrow-prev {
    left: -0.45rem;
}

.answers-arrow-next {
    right: -0.45rem;
}

.answers-carousel.is-loading .answers-grid {
    opacity: 0.55;
}

.cards-fade-in {
    animation: cardsFadeIn 0.35s ease;
}

@keyframes cardsFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mini Header & Search on Single View */
.mini-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.mini-search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.mini-input {
    font-size: 1rem;
    padding: 0.8rem 110px 0.8rem 1.2rem;
    border-radius: 30px;
}

.mini-btn {
    padding: 0.6rem 1.2rem;
    font-size: 1rem;
}

.mobile-ask-fab {
    position: fixed;
    left: 12px;
    bottom: 14px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(7, 13, 22, 0.88);
    color: #ffffff;
    border-radius: 999px;
    padding: 0.7rem 1rem;
    font-weight: 700;
    font-size: 0.92rem;
    letter-spacing: 0.01em;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.38);
    z-index: 99990;
    display: none;
}

.answer-card {
    padding: 2rem;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.answer-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    box-shadow: 0 10px 40px var(--accent-glow);
}

.answer-card h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.answer-card p {
    color: #94a3b8;
    flex-grow: 1;
}

/* Single Post Specific Styling */
.single-post-content {
    padding: 2.5rem;
    margin-top: 0;
    font-size: 1.05rem; /* Slightly smaller base font */
}

.featured-image-wrapper {
    position: relative;
    margin: 1.5rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
}

.glass-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: inline-block;
}

/* Image Info Button & Panel */
.image-info-container {
    position: absolute;
    bottom: 25px;
    right: 25px;
    display: flex;
    align-items: center;
    z-index: 10;
}

.image-info-icon {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.1rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    z-index: 2;
}

.image-info-icon:hover {
    background: var(--accent-color);
    transform: scale(1.1);
}

.image-alt-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: #cbd5e1;
    padding: 8px 15px;
    border-radius: 30px 0 0 30px;
    font-size: 0.85rem;
    position: absolute;
    right: 15px; /* behind the icon */
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1;
}

.image-alt-panel.active {
    opacity: 1;
    transform: translateX(-25px); /* Slide out to the left of the icon */
    pointer-events: auto;
}

.single-post-content h1 {
    font-size: 2.5rem; /* Reduced from 3rem */
    margin-bottom: 0.5rem;
    color: var(--accent-color);
    line-height: 1.2;
}

.entry-meta {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
    color: #94a3b8;
    font-size: 0.9rem; /* Reduced from 0.95rem */
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.category-meta a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.category-meta a:hover {
    color: var(--secondary-accent);
    text-shadow: 0 0 8px var(--accent-glow);
}

.single-post-content h2 {
    font-size: 1.7rem; /* Reduced from 2rem */
    margin-top: 2rem; /* Reduced from 2.5rem */
    margin-bottom: 0.8rem;
    color: #f8fafc;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 0.5rem;
}

.single-post-content h3 {
    font-size: 1.3rem; /* Reduced from 1.5rem */
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
}

.single-post-content p {
    margin-bottom: 1.2rem; /* Reduced from 1.5rem */
    color: #e2e8f0;
    line-height: 1.7; /* Reduced from 1.8 */
    font-size: 1.05rem; /* Reduced from 1.15rem */
}

.single-post-content ul, 
.single-post-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.single-post-content li {
    margin-bottom: 0.8rem;
    color: #cbd5e1;
    font-size: 1.1rem;
    line-height: 1.7;
}

.single-post-content strong {
    color: #fff;
    font-weight: 600;
}

/* Blockquote styling */
.single-post-content blockquote {
    border-left: 4px solid var(--accent-color);
    padding: 1.2rem 1.5rem;
    margin: 2rem 0;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 0 12px 12px 0;
    font-style: italic;
    color: #cbd5e1;
}

.single-post-content blockquote p {
    margin-bottom: 0;
}

/* Social Sharing */
.social-share-container {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
}

.share-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #94a3b8;
}

.social-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 1.2rem;
    text-decoration: none;
    color: white;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    color: white;
}

.fb-btn:hover { background: #1877f2; border-color: #1877f2; }
.tw-btn:hover { background: #000000; border-color: #333; }
.in-btn:hover { background: #0a66c2; border-color: #0a66c2; }
.rd-btn:hover { background: #ff4500; border-color: #ff4500; }
.copy-btn:hover { background: var(--accent-color); border-color: var(--accent-color); }

.copy-toast {
    visibility: hidden;
    min-width: 200px;
    background-color: var(--accent-color);
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    z-index: 1;
    bottom: -50px;
    left: 0;
    font-size: 0.9rem;
    opacity: 0;
    transition: opacity 0.3s, bottom 0.3s;
}

.copy-toast.show {
    visibility: visible;
    opacity: 1;
    bottom: -40px;
}

/* Response AI Loader */
#ai-response-container {
    margin-top: 0;
    width: 100%;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

#ai-response-container:not(:empty) {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.neon-pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 var(--accent-glow); }
    70% { box-shadow: 0 0 20px 20px rgba(59, 130, 246, 0); }
    100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0); }
}

/* Sidebar & Layout Wrapping */
.content-sidebar-wrap {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    align-items: start;
}

.top-rated-list a:hover {
    color: var(--accent-color) !important;
}

/* Responsive */
@media (max-width: 992px) {
    .content-sidebar-wrap {
        grid-template-columns: 1fr;
    }
    
    .sidebar-area {
        margin-top: 2rem;
    }
}

@media (max-width: 768px) {
    .site-logo { max-height: 200px; }
    .mini-header .site-logo { max-height: 80px; }
    
    .search-title { font-size: 2rem; }
    .search-input { font-size: 1.1rem; padding: 1rem 130px 1rem 1.2rem; }
    .search-btn { padding: 0.8rem 1.2rem; font-size: 1rem; }
    
    .single-post-content {
        padding: 1.5rem;
        margin-top: 0.5rem;
    }
    
    .single-post-content h1 {
        font-size: 2rem;
    }
    
    .single-post-content h2 {
        font-size: 1.5rem;
    }
    
    .mini-header {
        flex-direction: column;
        align-items: center;
    }
    
    .mini-search-box {
        width: 100%;
    }
    
    .rating-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .rating-btn {
        width: 100%;
    }

    .answers-carousel {
        margin-top: 3rem;
        padding: 0;
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-areas:
            "grid grid"
            "prev next";
        row-gap: 1rem;
    }

    .answers-carousel .answers-grid {
        grid-area: grid;
    }

    .answers-arrow {
        position: static;
        transform: none;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .answers-arrow:hover:not(:disabled) {
        transform: scale(1.06);
    }

    .answers-arrow-prev {
        grid-area: prev;
        justify-self: end;
        margin-right: 0.4rem;
    }

    .answers-arrow-next {
        grid-area: next;
        justify-self: start;
        margin-left: 0.4rem;
    }

    .mobile-ask-fab {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transform: translateY(14px);
        transition: opacity 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    }

    .mobile-ask-fab.is-visible {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0);
    }

    .mobile-ask-fab:active {
        transform: translateY(1px) scale(0.98);
        box-shadow: 0 7px 16px rgba(0, 0, 0, 0.3);
    }
}

/* Rating Buttons */
.rating-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-color);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.rating-btn i {
    margin-right: 5px;
}

.rating-btn.upvote-btn:hover {
    background: rgba(16, 185, 129, 0.2); /* Emerald glow */
    border-color: #10b981;
    color: #10b981;
}

.rating-btn.downvote-btn:hover {
    background: rgba(239, 68, 68, 0.2); /* Red glow */
    border-color: #ef4444;
    color: #ef4444;
}

.report-issue-box {
    margin-top: 1.4rem;
    display: flex;
    justify-content: center;
}

.report-issue-btn {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #ffd4d4;
    padding: 0.7rem 1.15rem;
    border-radius: 30px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.25s ease;
}

.report-issue-btn i {
    margin-right: 6px;
}

.report-issue-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.68);
    transform: translateY(-1px);
}

body.ai-modal-open {
    overflow: hidden;
}

.ai-report-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
}

.ai-report-modal.is-open {
    display: block;
}

.ai-report-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 9, 16, 0.76);
}

.ai-report-dialog {
    position: relative;
    width: min(640px, calc(100% - 20px));
    margin: min(8vh, 60px) auto 0;
    padding: 1.2rem 1.2rem 1rem;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    z-index: 2;
}

.ai-report-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: none;
    color: #cbd5e1;
    font-size: 0.82rem;
    cursor: pointer;
}

.ai-report-dialog h3 {
    margin: 0 0 0.4rem;
    color: var(--accent-color);
}

.ai-report-subtitle {
    margin: 0 0 1rem;
    color: #94a3b8;
    font-size: 0.92rem;
}

.ai-report-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: #d6e0ef;
}

.ai-report-form textarea,
.ai-report-form input {
    width: 100%;
    border: 1px solid var(--glass-border);
    background: rgba(10, 14, 22, 0.52);
    color: #fff;
    border-radius: 10px;
    padding: 0.65rem 0.75rem;
    margin-bottom: 0.8rem;
}

.ai-report-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
}

.ai-report-submit {
    position: static;
    right: auto;
    top: auto;
    transform: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 0.2rem;
    border: 1px solid rgba(59, 130, 246, 0.45);
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: #fff;
    border-radius: 12px;
    padding: 0.72rem 1rem;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.ai-report-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
    filter: brightness(1.05);
}

.ai-report-submit:disabled {
    opacity: 0.75;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.ai-report-feedback {
    margin-bottom: 0.8rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

.ai-report-feedback.is-success {
    background: rgba(16, 185, 129, 0.14);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #8ef0c8;
}

.ai-report-feedback.is-error {
    background: rgba(239, 68, 68, 0.14);
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ffc0c0;
}

/* =========================================
   Footer Styling
   ========================================= */
.site-footer {
    width: 100%;
}

.footer-sections {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-column a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--accent-color);
}

@media (max-width: 768px) {
    .ai-report-dialog {
        margin-top: 12px;
        padding: 1rem 0.9rem 0.9rem;
    }

    .ai-report-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-sections {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
        gap: 2rem;
    }
}
