/* style_index.css — index pages
 * Canonical source: templates/css/style_index.css — edit here, not in site/css/ (build overwrites it there).
 */
/* Prevent Chrome Android forced dark mode */
:root { color-scheme: light; }

body
{
	background-color: #101010;
	margin-left: 36;
	margin-top: 0;
	font-family: Tahoma,Verdana;
}
.skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000;
	padding: 8px 12px;
	color: #fff !important;
	background: #111;
	transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline: 2px solid #fff; outline-offset: 2px; }
#main-content:focus { outline: none; }
.sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

a:link
{
	color: #00ffff;
	text-decoration: none;
}
a:visited
{
	color: #ffff48;
	text-decoration: none;
}
a:active
{
	color: red;
	text-decoration: none;
}
a:hover
{
	color: #15ff8a;
	text-decoration: none;
}

.idx-icon
{
	text-align: center;
	vertical-align: middle;
}

.idx-ninja
{
	position: relative;
}

.idx-ninja-credit
{
	position: absolute;
	right: 2px;
	bottom: 0;
	max-width: 92%;
	padding: 1px 5px 0;
	background: transparent;
	color: #333 !important;
	font-size: 7px;
	line-height: 1.3;
	text-align: right;
	text-decoration: none;
	opacity: 0.7;
	transition: opacity 0.15s ease, color 0.15s ease;
}
.idx-ninja-credit:hover
{
	opacity: 1;
	color: #888 !important;
}

.idx-inner
{
	margin-top: 24px;
}
.idx-nav-link { display: grid; grid-template-columns: 38px auto; align-items: end; }
.idx-inner-he .idx-nav-link { grid-template-columns: auto 38px; }
.idx-nav-link > span:not(.idx-icon) { display: block; color: inherit; }
.idx-nav-link .idx-icon { align-self: center; }
.idx-nav-link .idx-icon-letter { align-self: end; }

.lang-letter
{
	font-size: 22px;
	font-weight: bold;
	color: #EAD3A6;
	-webkit-text-stroke: 1px #8B5A2B;
	text-stroke: 1px #8B5A2B;
	display: inline-block;
	filter: none;
	transition: filter 0.15s ease;
}
.lang-letter:hover,
a:hover .lang-letter
{
	filter: sepia(0.5) saturate(3) hue-rotate(-20deg) brightness(1.1);
}
.idx-icon-letter
{
	vertical-align: bottom;
}

.feather-icon
{
	width: 34px;
	height: 34px;
	vertical-align: middle;
	filter: none;
	transition: filter 0.15s ease;
}
.feather-icon:hover,
a:hover .feather-icon
{
	filter: sepia(0.5) saturate(3) hue-rotate(-20deg) brightness(1.1);
}

.scroll-icon
{
	width: 34px;
	height: 34px;
	vertical-align: middle;
	filter: none;
	transition: filter 0.15s ease;
}
.scroll-icon:hover,
a:hover .scroll-icon
{
	filter: sepia(0.5) saturate(3) hue-rotate(-20deg) brightness(1.1);
}

/* Icon + link text act as one hover unit. */
.idx-nav-link:hover .feather-icon,
.idx-nav-link:hover .scroll-icon,
.idx-nav-link:hover .lang-letter
{
	filter: sepia(0.5) saturate(3) hue-rotate(-20deg) brightness(1.1);
}

.q1
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	color: #ff0000;
	padding-left: 38px;
	position: relative;
}

.q1_E
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	color: #ff0000;
	padding-left: 38px;
	position: relative;
}

.content_Link
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	position: relative;
	vertical-align: bottom;
}

.link_EN
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	color: #00ffff;
	position: relative;
	padding-top: 10px;
	vertical-align: bottom;
}

.link_HE
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	color: #00ff00;
	position: relative;
	padding-top: 10px;
	vertical-align: bottom;
}

/* Shared search-form solution (same as grid.css, used on every other page type) */
.search-form { display: flex; align-items: center; gap: 0; margin-bottom: 0; }
.search-input-wrap { position: relative; display: block; flex: 0 0 150px; width: 150px; height: 21px; }
.search-input {
    width: 150px; height: 21px; box-sizing: border-box;
	font-size: 14px; padding: 1px 2px; border: 1px solid #999;
}
.google-mark { position: absolute; top: 0; left: 2px; z-index: 1; display: flex; align-items: center; height: 21px; font: 700 14px Georgia, "Times New Roman", serif; line-height: 1; white-space: nowrap; pointer-events: none; }
.google-mark .google-blue { color: #4285f4; }
.google-mark .google-red { color: #ea4335; }
.google-mark .google-yellow { color: #fbbc05; }
.google-mark .google-green { color: #34a853; }
.search-input:focus + .google-mark,
.search-form.has-query .google-mark { display: none; }
.search-btn { height: 21px; box-sizing: border-box; font-size: 13px; padding: 1px 5px; cursor: pointer; border: 1px solid #999; border-left: none; background: #f0f0f0; }
.search-input:focus-visible,
.search-btn:focus-visible { outline: 2px solid #666; outline-offset: 1px; }

/* Search block + social-share icons: same line, opposite ends */
.idx-search-line { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.social-share { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 6px; }
.social-share a { display: inline-flex; opacity: 0.85; transition: opacity 0.15s; }
.social-share a:hover,
.social-share a:focus-visible { opacity: 1; }
.social-share a:focus-visible { outline: 2px solid #666; outline-offset: 1px; }
.idx-nav-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/*----- Hebrew Support -- */

.q1_H
{
	font-size: 18px;
	font-family: David Transparent,Tahoma,Verdana;
	font-style: italic;
	color: #ff0000;
	padding-right: 30px;
	position: relative;
	text-align: right;
}

.content_Link_H
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	position: relative;
	vertical-align: bottom;
	text-align: right;
}

.link_EN_H
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	color: #00ffff;
	position: relative;
	padding-top: 10px;
	vertical-align: bottom;
	text-align: right;
}

.link_HE_H
{
	font-size: 18px;
	font-family: Tahoma,Verdana;
	font-style: italic;
	color: #00ff00;
	position: relative;
	padding-top: 10px;
	vertical-align: bottom;
	text-align: right;
}

/*----- Image Support -- */

.char_in
{
	font-family: Matura MT Script Capitals;
	font-size: 30px;
	font-weight: bold;
	color: #FE5800;
}

.char_out
{
	font-family: Matura MT Script Capitals;
	font-size: 30px;
	font-weight: bold;
	color: #CD9C1F; /*C9893C*/
}

.char_HE_in
{
	font-family: Matura MT Script Capitals;
	font-size: 28px;
	font-weight: bold;
	color: #FE5800 important;
}

.char_HE_out
{
	font-family: Matura MT Script Capitals;
	font-size: 28px;
	font-weight: bold;
	color: #CD9C1F important; /*C9893C*/
}
/* -- Scroll to top button --- */
#topBtn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 36px;
    height: 36px;
    background: #555;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    cursor: pointer;
    display: none;
    z-index: 999;
    opacity: 0.7;
}
#topBtn:hover { opacity: 1; }

/* bare "|" separator between the two rights-link anchors has no color of its
   own otherwise — inherits default text color (black), invisible against the
   dark body background; match it to the red "Copyright" text above it */
.idx-copyright {
    color: #ff0000;
}

.idx-copyright .rights-link {
    font-size: 11px;
    opacity: 0.7;
}

.idx-logo a,
.idx-logo img {
    display: block;
    margin: 0 auto;
}
/* Text-based "basad1.jpg" replacement — same width as logo.gif, fused with it (no gap/border) */
.basad-text,
a:link .basad-text,
a:visited .basad-text,
a:hover .basad-text,
a:active .basad-text {
    display: block;
    box-sizing: border-box;
    width: 41px;
    overflow: hidden;
    white-space: nowrap;
    margin: 0 auto;
    background: #fff;
    color: #000;
    font-family: FrankRuehl, David, Tahoma, Verdana, sans-serif;
    font-size: 19px;
    line-height: 16px;
    padding-right: 7px;
    text-align: right;
}

/* Colorful rainbow divider — replaces the plain <hr>, same gradient technique
   as grid.css's .separator-line/.separator-line-wide (bg_stars pages) */
.idx-separator-line {
    display: inline-block;
    vertical-align: middle;
    width: 600px;
    max-width: 90%;
    height: 3px;
    background: linear-gradient(to right,
        #000020 0%, #000a7a 5%, #0026cb 10%, #0058fc 15%, #0094ff 20%,
        #00d3ce 25%, #01fb85 30%, #00ff35 35%, #00f406 40%, #00cf00 45%,
        #009b00 50%, #116100 55%, #572500 60%, #b10000 65%, #fb0000 70%,
        #ff0000 75%, #ff2100 80%, #ff9600 85%, #ffed00 90%, #ffff39 95%, #fffffe 100%);
}

/* ── Mobile layout (≤768px) ──────────────────────── */
@media (max-width: 768px) {
    body { margin: 0 !important; padding: 6px !important; }
    img  { max-width: 100%; height: auto; }
    .idx-separator-line { width: 100% !important; max-width: 100% !important; }

    /* Outer table → grid; trs become transparent so tds bubble up */
    #idx-outer { display: grid !important; grid-template-columns: 1fr auto !important; width: 100% !important; }
    #idx-outer > tbody              { display: contents !important; }
    #idx-outer > tbody > tr        { display: contents !important; }

    /* LEFT/RIGHT td transparent → idx-quote div + idx-inner table become direct grid items */
    .idx-left { display: contents !important; }

	 /* Quote+logo share row 1; links/search/separator overlay the hero in row 2.
		 Copyright stays in row 3 so it cannot cover the Author/Texts links. */
    .idx-quote     { grid-column: 1; grid-row: 1; align-self: start; }
    .idx-logo      { grid-column: 2; grid-row: 1; width: auto !important; height: auto !important; align-self: start; padding-left: 8px; text-align: center; }
    .idx-ninja     {
        grid-column: 1 / 3; grid-row: 2; height: auto !important; text-align: center; z-index: 0;
        /* bleed past body's 6px padding so the image reaches almost edge-to-edge */
        width: calc(100% + 12px); margin-left: -6px; margin-right: -6px;
    }

    @media (max-width: 360px) {
        .idx-hr { transform: translateY(12px); }
        .idx-copyright { margin-top: 18px; }
    }
    .idx-ninja img { width: 100%; height: auto; } /* stretch to fill the bleed width, not just its natural size */
    .idx-spacer    { display: none !important; }

    .idx-inner, .idx-hr, .idx-search, .idx-copyright {
        grid-column: 1 / 3; grid-row: 2; width: 100%;
        align-self: start; position: relative; z-index: 2;
        pointer-events: none; /* only real links/inputs inside re-enable clicks */
    }
    .idx-inner a, .idx-hr a, .idx-search a, .idx-search input, .idx-search button, .idx-copyright a {
        pointer-events: auto;
    }
    .idx-inner     { top: 4%; }
    .idx-search    { top: 85%; } /* search-form + social-share now share one row (was 2 separate rows on HE) */
    .idx-hr        { top: 100%; } /* right at the image's bottom edge, not overlapping the artwork */
    .idx-copyright { grid-row: 3; top: 0; }

    /* Hide icons; flatten inner links table into a vertical list; shadow for legibility over the image */
    .idx-inner .idx-icon { display: none !important; }  /* higher specificity than .idx-inner td */
    .idx-nav-link, .idx-inner-he .idx-nav-link { display: block; }
    .idx-inner          { display: block !important; margin-top: 4px; } /* was 24px — nudges "Автор" up, closer to the quote */
    .idx-inner tr       { display: block !important; width: 100% !important; }
    .idx-inner td       { display: block !important; width: auto !important; height: auto !important; }
    .idx-inner tr:nth-of-type(2) .content_Link, .idx-inner tr:nth-of-type(2) .content_Link_H {
        padding-top: 10px; /* matches link_EN/link_HE's own padding-top, so Тексты-English gap === Автор-Тексты gap */
    }
    .idx-inner a, .idx-copyright, .idx-copyright a { text-shadow: 0 1px 3px #000, 0 0 6px #000; }
}
