/*
Theme Name: INCACT
Theme URI: https://www.incact.cz/
Description: Téma pro Internetové noviny o kaktusech a sukulentech. Věrná náhrada původní Joomla šablony jamba3 podle schváleného návrhu 3.
Author: Fortion / CSbot
Version: 1.0
Requires at least: 6.0
Tested up to: 7.1
Text Domain: incact
Tags: two-columns, left-sidebar, custom-menu
*/

/* Vlastní styly tématu jsou v assets/css/. Tenhle soubor je jen hlavička
   a doplňky, které v původní šabloně neexistovaly (WP specifické prvky). */

/* --- WordPress prvky, pro které jamba3 neměl styly --- */
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden; clip: rect(1px,1px,1px,1px); white-space: nowrap;
}
.wp-caption { max-width: 100%; }
.wp-caption-text, .gallery-caption { font-size: 12px; color: #555; text-align: center; margin: 4px 0 0; }
.alignleft  { float: left;  margin: 5px 15px 10px 0; }
.alignright { float: right; margin: 5px 0 10px 15px; }
.aligncenter{ display: block; margin: 5px auto; }
.sticky, .bypostauthor { }
img { max-width: 100%; height: auto; }

/* stránkování výpisů */
.incact-pagination { clear: both; padding: 14px 0; text-align: center; }
.incact-pagination .page-numbers {
	display: inline-block; padding: 4px 10px; margin: 0 2px;
	border: 1px solid #ccc; background: #f9f9f9; text-decoration: none;
}
.incact-pagination .page-numbers.current { background: #DFF0D8; font-weight: bold; }

/* --- rotující banner v hlavičce --- */
#incact-banner { position: relative; line-height: 0; }
#incact-banner .incact-slide { display: block; opacity: 0; transition: opacity .8s ease; }
#incact-banner .incact-slide:not(:first-child) { position: absolute; top: 0; left: 0; width: 100%; }
#incact-banner .incact-slide.je-videt { opacity: 1; }
#incact-banner img { display: block; width: 100%; height: auto; }
@media (prefers-reduced-motion: reduce) { #incact-banner .incact-slide { transition: none; } }

/* --- hledání v sidebaru --- */
.incact-hledani { display: flex; gap: 4px; margin: 0 0 10px; }
.incact-hledani input[type="search"] { flex: 1 1 auto; min-width: 0; padding: 5px 7px; border: 1px solid #ccc; }
.incact-hledani button { padding: 5px 10px; border: 1px solid #ccc; background: #f1f1f1; cursor: pointer; }
.incact-hledani button:hover { background: #e6e6e6; }

/* --- překladač --- */
.incact-translate { margin: 0 0 12px; }
.incact-translate a.flag { text-decoration: none; }
.incact-translate a.flag img { height: 24px; opacity: .8; vertical-align: middle; border: 0; }
.incact-translate a.flag:hover img { opacity: 1; }
#google_translate_element2 { display: none !important; }

/* --- Seznam čísel --- */
.incact-seznam ul[hidden] { display: none; }
.incact-seznam > li > a { cursor: pointer; }
.incact-seznam li.current > a, .incact-seznam li.active > a { font-weight: bold; }

/* --- bannery v sidebaru --- */
.incact-bannery p { margin: 0 0 10px; text-align: center; }
.incact-bannery img { max-width: 100%; height: auto; }
.incact-issn { font-size: 12px; line-height: 1.4; }

/* --- předchozí/další článek --- */
.incact-vedle { display: flex; justify-content: space-between; gap: 16px; margin: 16px 0 0; font-size: 13px; }
.incact-vedle .next { margin-left: auto; text-align: right; }

/* --- komentáře --- */
.jcomments { margin-top: 22px; }
.jc-nadpis { font-size: 16px; margin: 0 0 10px; }
.jc-list { list-style: none; margin: 0; padding: 0; }
.jc-comment { border: 1px solid #ccc; background: #fff; padding: 10px 12px; margin: 0 0 10px; }
.jc-head { font-size: 12px; color: #666; margin: 0 0 6px; display: flex; gap: 10px; }
.jc-author { font-weight: bold; color: #3C763D; }
.jc-body p:last-child { margin-bottom: 0; }
.jc-moderace { font-size: 12px; color: #999; }
.jc-zavreno { font-size: 13px; color: #777; }
#comments .comment-form label { display: block; font-size: 13px; margin-bottom: 3px; }
#comments .comment-form input[type="text"],
#comments .comment-form input[type="email"],
#comments .comment-form input[type="url"],
#comments .comment-form textarea { width: 100%; max-width: 520px; padding: 5px 7px; border: 1px solid #ccc; box-sizing: border-box; }
#comments .form-submit input { padding: 6px 14px; border: 1px solid #ccc; background: #f1f1f1; cursor: pointer; }

/* --- galerie z Joomly --- */
.gallery { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.gallery-item { margin: 0 !important; }
.gallery-columns-4 .gallery-item { width: calc((100% - 24px) / 4); }
.gallery img { border: 1px solid #ccc; padding: 3px; background: #fff; }

/* --- profil autora --- */
.incact-profil-autora { overflow: hidden; }
.incact-profil-autora .item-image { max-width: 200px; }
.incact-foto-autora { max-width: 100%; height: auto; }
.incact-medailonek { margin-bottom: .6em; }
.incact-pocet { font-size: 13px; color: #555; margin: .4em 0 0; }
.incact-web { font-size: 13px; margin: .2em 0; }

/* --- seznam autorů (shortcode [incact_autori]) --- */
.incact-autori { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.incact-autori.sloupcu-2 .incact-autor { flex: 0 0 calc((100% - 10px) / 2); }
.incact-autori.sloupcu-3 .incact-autor { flex: 0 0 calc((100% - 20px) / 3); }
.incact-autori.sloupcu-4 .incact-autor { flex: 0 0 calc((100% - 30px) / 4); }
.incact-autor {
	display: flex; align-items: center; gap: 9px;
	box-sizing: border-box; padding: 7px 9px;
	background: #fff; border: 1px solid #ccc; min-width: 0;
}
.incact-autor-odkaz { display: flex; align-items: center; gap: 9px; text-decoration: none; min-width: 0; flex: 1 1 auto; }
.incact-autor-foto { flex: 0 0 46px; line-height: 0; }
.incact-autor-foto img, .incact-bez-foto {
	width: 46px; height: 46px; object-fit: cover; display: block;
	border: 1px solid #ccc; background: #f1f1f1;
}
.incact-autor-jmeno { font-weight: bold; font-size: 13px; line-height: 1.25; overflow-wrap: anywhere; }
.incact-autor-pocet {
	flex: 0 0 auto; font-size: 12px; color: #555;
	background: #DFF0D8; border-radius: 10px; padding: 1px 8px;
}
.incact-autori.bez-fotek .incact-autor { padding: 5px 9px; }
@media (max-width: 760px) {
	.incact-autori .incact-autor { flex: 0 0 100% !important; }
}

/* --- výpis posledních komentářů (shortcode [incact_komentare]) --- */
.incact-komentare { list-style: none; margin: 14px 0; padding: 0; }
.incact-komentar { background: #fff; border: 1px solid #ccc; padding: 9px 11px; margin: 0 0 8px; }
.incact-k-hlava { display: flex; gap: 10px; font-size: 12px; color: #666; margin-bottom: 3px; }
.incact-k-autor { font-weight: bold; color: #3C763D; }
.incact-k-clanek { font-size: 12px; margin-bottom: 5px; }
.incact-k-text { font-size: 13px; line-height: 1.45; }

/* --- box autora pod článkem (převzato z původního Author Info Box) --- */
#author_infobox {
	background-color: #EFEFEF;
	color: #000;
	border: 1px solid grey;
	border-radius: 5px;
	margin: 5px 0;
	padding: 10px;
	overflow: hidden;
	clear: both;
}
#author_infobox .author_infobox_image_authorlist { float: left; margin: 5px 10px 5px 5px; }
#author_infobox .author_infobox_image_authorlist img { width: 100px; height: auto; }
#author_infobox .author_infobox_name { margin-bottom: 8px; }
#author_infobox .author_infobox_articles_list { width: 100%; }
#author_infobox .author_infobox_articles_list ul { margin: 0; padding: 0; }
#author_infobox .author_infobox_articles_list ul li { list-style: inside; }
#author_infobox .author_infobox_articles_links { font-weight: bold; }
#author_infobox span.bold { font-weight: bold; }

/* --- tapeta s vodoznakem INCACT.CZ ---
   V originále byl tenhle styl až v těle stránky, ne v hlavičce. */
body {
	background-image: url(assets/img/incact4.jpg);
	background-attachment: scroll;
	background-position: left top;
	background-repeat: repeat;
	background-color: transparent;
}

/* ikony u „Číst dál" / „Přidat komentář" — převzaté z com_jcomments (tpl/test) */
.jcomments-links { margin-top: 10px; clear: both; text-align: left; }
.comments-link,
.readmore-link {
	padding: 0 5px 5px 14px;
	background-image: url(assets/img/jc_blog.gif);
	background-repeat: no-repeat;
}
.comments-link { background-position: 0 -27px; }
.readmore-link { background-position: 0 2px; }

/* ------------------------------------------------- titulek pod fotkou
 * V Joomle se titulky psaly ručně jako odstavec se stylem
 * „verdana, 8 pt, na střed". WordPress na to má vlastní pole u obrázku,
 * které ale žádný vzhled nemá — tady dostane ten původní.
 *
 * Barva: vínová #800000. Není z šablony, ale ze zvyklosti redakce — z 554
 * článků s ručně psaným titulkem jich 537 používá právě tuhle barvu.
 */
figcaption,
.wp-element-caption,
.wp-caption-text,
.gallery-caption {
	font-family: verdana, geneva, sans-serif;
	font-size: 8pt;
	text-align: center;
	color: #800000;
	margin: 4px 0 0;
	line-height: 1.35;
}
.wp-block-image figcaption { margin-bottom: 1em; }
/* kurzíva jen tam, kde si ji redakce vyznačí — typicky jméno rostliny */
figcaption em, figcaption i,
.wp-element-caption em, .wp-element-caption i,
.wp-caption-text em, .wp-caption-text i,
p.is-style-incact-titulek em, p.is-style-incact-titulek i { font-style: italic; }

/* ------------------------------------------------------------ nadpisy
 * Původní šablona jamba3 měla velikosti nadpisů popřeházené:
 * H3 (1.3em) byl větší než H2 (1.2em) a H4 byl stejný jako H2.
 * Tady jsou srovnané tak, aby každý další nadpis byl menší.
 */
#maincontent h1 { font-size: 1.5em; }
#maincontent h2 { font-size: 1.3em; }
#maincontent h3 { font-size: 1.2em; }
#maincontent h4 { font-size: 1.15em; }
#maincontent h5 { font-size: 1.1em; }
#maincontent h6 { font-size: 1em; }
/* nadpis článku a nadpisy modulů si drží vlastní velikost */
#maincontent .page-header h1,
#maincontent .page-header h2,
#maincontent h3.moduleh3 { font-size: inherit; }

/* styl odstavce „Titulek pod fotkou" — stejný vzhled jako vlastní titulek obrázku */
p.is-style-incact-titulek {
	font-family: verdana, geneva, sans-serif;
	font-size: 8pt;
	text-align: center;
	color: #800000;
	line-height: 1.35;
	margin: 4px 0 1em;
}
