/* blog/css/blog.css - Styly specifické pro blog */

/* Hlavní stránka blogu a detail článku */
.blog-main, .blog-article-main {
    padding-top: 140px; /* Kvůli fixnímu headeru */
    padding-bottom: 6rem;
}

.page-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 1.8rem; /* Větší než .section-title */
    color: #FFFFFF;
}
.page-title::after { /* Můžeme použít stejné podtržení */
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
}

/* Seznam článků na blog/index.php */
.articles-list {
    display: grid;
    gap: 40px;
}

.article-item {
    background-color: #181818;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

.article-item-title a {
    color: var(--accent-color); /* Bílá pro titulky článků */
    font-size: 1.4rem;
    text-decoration: none;
    transition: color 0.3s ease;
}
.article-item-title a:hover {
    color: #FFFFFF; /* Zelená při hoveru */
}

.article-item-meta {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 15px;
}
.article-item-meta span {
    margin-right: 10px;
}

.article-item-excerpt p {
    margin-bottom: 20px;
    color: #B3B3B3;
    flex-grow: 1; /* Aby excerpt vyplnil prostor a tlačítko bylo dole */
}

.btn-small { /* Menší tlačítko pro "Read More" */
    padding: 8px 18px;
    font-size: 0.9rem;
    align-self: flex-start; /* Zarovnání tlačítka doleva v itemu */
}


/* Detail článku na blog/article.php */
.article-full {
    background-color: #1C1C1C; /* Mírně odlišné pozadí pro obsah článku */
    padding: 30px 40px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 900px; /* Omezení šířky pro lepší čitelnost */
    margin: 0 auto;
}

.article-full-header {
    border-bottom: 1px solid #333;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

.article-full-title {
    font-size: 2.4rem; /* Větší titul pro detail článku */
    color: #FFFFFF;
    margin-bottom: 10px;
}

.article-full-meta {
    font-size: 1rem;
    color: #888;
}
.article-full-meta span {
    margin-right: 15px;
}

.article-full-content {
    color: #D0D0D0; /* Mírně světlejší text pro lepší čitelnost obsahu */
    line-height: 1.7;
}

.article-full-content h2,
.article-full-content h3,
.article-full-content h4 {
    color: var(--accent-color); /* Zelené podnadpisy v článku */
    margin-top: 1.5em;
    margin-bottom: 0.5em;
}
.article-full-content h2 { font-size: 1.8rem; }
.article-full-content h3 { font-size: 1.5rem; }

.article-full-content p {
    margin-bottom: 1.2em;
}

.article-full-content ul,
.article-full-content ol {
    margin-left: 20px; /* Odsazení seznamů */
    margin-bottom: 1.2em;
}
.article-full-content li {
    margin-bottom: 0.5em;
}

.article-full-content a {
    text-decoration: underline;
}
.article-full-content a:hover {
    text-decoration: none;
}

.article-full-content blockquote {
    border-left: 4px solid var(--accent-color);
    margin: 1.5em 0;
    padding: 0.5em 20px;
    background-color: #222;
    font-style: italic;
    color: #ccc;
}

.article-full-content code { /* Inline kód */
    background-color: #2a2a2a;
    color: #f0f0f0;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}
.article-full-content pre { /* Bloky kódu */
    background-color: #2a2a2a;
    color: #f0f0f0;
    padding: 15px;
    border-radius: 5px;
    overflow-x: auto; /* Horizontální scroll pro dlouhé řádky kódu */
    margin-bottom: 1.2em;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
    line-height: 1.4;
}
.article-full-content pre code {
    padding: 0;
    background-color: transparent;
    border-radius: 0;
}

.article-navigation {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #333;
    text-align: center; /* Nebo flex pro odkazy vedle sebe */
}

.article-not-found {
    text-align: center;
    padding: 50px 0;
    width: 100%;
    grid-column: 1 / -1;
}
.article-not-found h2 {
    color: #FFFFFF;
    margin-bottom: 20px;
}
.article-not-found span {
    font-size: 3rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    display: block;
}
.article-not-found p {
    color: var(--text-secondary);
}
.article-not-found h1 {
    font-size: 4rem;
    color: #ef4444;
    font-family: var(--font-heading);
    margin-bottom: 1rem;
}
.article-not-found-desc {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}
.blog-tag-pill {
    background: rgba(185, 28, 28, 0.2);
    color: #f87171;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.75rem;
    display: inline-block;
    margin-left: 5px;
}

/* Responzivita pro blog */
@media (max-width: 768px) {
    .page-title { font-size: 2rem; }
    .article-item-title a { font-size: 1.5rem; }
    .article-full-title { font-size: 2rem; }
    .article-full { padding: 20px; }
}

/* Přepínač zobrazení */
.view-toggle-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}

.view-toggle-label {
    color: #B3B3B3;
    font-size: 0.9rem;
}

.view-toggle-buttons {
    display: flex;
    background-color: #181818;
    border-radius: 6px;
    padding: 4px;
    border: 1px solid #333;
}

.view-toggle-btn {
    background: transparent;
    border: none;
    color: #888;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

.view-toggle-btn:hover {
    color: #fff;
}

.view-toggle-btn.active {
    background-color: #2a2a2a;
    color: var(--accent-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Varianta B - Moderní Grid */
.articles-list-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.articles-list-grid .article-item {
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.05);
    background: linear-gradient(145deg, #1e1e1e, #141414);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.articles-list-grid .article-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    border-color: rgba(29, 185, 84, 0.3);
}

.articles-list-grid .article-item-title a {
    font-size: 1.25rem;
    line-height: 1.4;
    display: block;
    margin-bottom: 10px;
}

.articles-list-grid .article-item-meta {
    font-size: 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.articles-list-grid .article-item-meta span {
    margin-right: 0;
    background: rgba(255,255,255,0.05);
    padding: 5px 12px;
    border-radius: 20px;
    color: #ccc;
    display: flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.articles-list-grid .article-item-excerpt p {
    font-size: 0.95rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.articles-list-grid .btn-small {
    width: 100%;
    margin-top: auto;
    text-align: center;
    justify-content: center;
    display: inline-flex;
    background-color: transparent;
    border: 1px solid #333;
    color: #fff;
    border-radius: 4px;
    transition: all 0.2s ease;
}
.articles-list-grid .btn-small:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
}

/* CTA box v detailu článku */
.article-cta {
    margin-top: 3rem;
    padding: 1.75rem 2rem;
    border: 1px solid var(--accent-color, #2ecc71);
    border-left-width: 4px;
    border-radius: 8px;
    background: rgba(46, 204, 113, 0.06);
}
.article-cta-title { 
    margin: 0 0 .5rem; 
    color: #FFFFFF;
}
.article-cta-text { 
    margin: 0 0 1.25rem; 
    color: #CCCCCC;
}
.article-cta-buttons { 
    display: flex; 
    gap: .75rem; 
    flex-wrap: wrap; 
}

.article-update {
  margin: 1.5rem 0 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--accent-color, #2ecc71);
  border-radius: 6px;
  background: rgba(46, 204, 113, 0.07);
}
.article-update h2 { margin-top: 0; font-size: 1.15rem; }
.article-update p:last-child { margin-bottom: 0; }

/* Floating Back Button */
.floating-back-btn {
    position: fixed;
    top: 140px;
    right: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #1c1c1c;
    border: 1px solid #333;
    color: #FFFFFF;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 99;
    transition: all 0.3s ease;
}

.floating-back-btn svg {
    stroke: currentColor;
    transition: transform 0.3s ease;
}

.floating-back-btn:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #000000;
    box-shadow: 0 6px 20px rgba(29, 185, 84, 0.4);
    transform: translateY(-2px);
}

.floating-back-btn:hover svg {
    transform: translateX(-4px);
}

@media (max-width: 1200px) {
    .floating-back-btn {
        position: static;
        display: inline-flex;
        margin-bottom: 25px;
        box-shadow: none;
        padding: 8px 16px;
    }
}

/* Article Share Section */
.article-share {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
}
.article-share-title {
    font-size: 1rem;
    color: #888;
    margin-bottom: 1rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.article-share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #1e1e1e;
    color: #b3b3b3;
    border: 1px solid #333;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
    text-decoration: none !important;
}
.share-btn:hover {
    color: #fff;
    transform: translateY(-3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

/* Brand specific hover colors */
.share-facebook:hover {
    background-color: #1877f2;
    border-color: #1877f2;
}
.share-x:hover {
    background-color: #000000;
    border-color: #333;
}
.share-linkedin:hover {
    background-color: #0077b5;
    border-color: #0077b5;
}
.share-whatsapp:hover {
    background-color: #25d366;
    border-color: #25d366;
}
.share-telegram:hover {
    background-color: #0088cc;
    border-color: #0088cc;
}
.share-instagram:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
    border-color: transparent;
}
.share-email:hover {
    background-color: #7f8c8d;
    border-color: #7f8c8d;
}
.share-copy:hover {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: #000;
}

/* Toast Notification */
.share-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background-color: #222;
    color: #fff;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s;
    opacity: 0;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid var(--accent-color);
    text-align: center;
}
.share-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}
