/* Jicsing 2 — Bootstrap 5 kiegészítő stílusok */

/* Source Serif 4 (SIL OFL, assets/fonts/OFL.txt), helyben kiszolgálva */
@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-ext-opsz-normal-ijqlMtp.woff2") format('woff2-variations');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Source Serif 4';
    font-style: normal;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-opsz-normal-wWBFNZs.woff2") format('woff2-variations');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

@font-face {
    font-family: 'Source Serif 4';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-ext-opsz-italic-g4QKdSY.woff2") format('woff2-variations');
    unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF;
}

@font-face {
    font-family: 'Source Serif 4';
    font-style: italic;
    font-weight: 200 900;
    font-display: swap;
    src: url("../fonts/source-serif-4-latin-opsz-italic-wfaUyR2.woff2") format('woff2-variations');
    unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Az oldal arculata: a Bootstrap változóit felülírva minden oldalra érvényes. */
:root {
    --bs-body-font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
    --bs-body-font-size: 1.0625rem;
    --bs-body-line-height: 1.6;
    --bs-body-color: #2b2c2e;
    --bs-body-color-rgb: 43, 44, 46;
    --bs-secondary-color: #66686b;
    --bs-link-color-rgb: 63, 66, 70;
    --bs-link-hover-color-rgb: 22, 23, 26;
    --bs-border-color: #d4d4d3;
    --bs-border-radius: 3px;
    --bs-border-radius-sm: 3px;
    --bs-border-radius-lg: 4px;
}

body {
    padding-top: 6rem;
}

svg {
    color: #3a3b3d;
}

a {
    text-decoration-color: #8c8e91;
    text-underline-offset: 4px;
}

h1, .h1,
h2, .h2,
h3, .h3 {
    font-weight: 300;
}

h4, .h4,
h5, .h5 {
    font-weight: 400;
}

.navbar {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1rem;
}

.btn-primary {
    --bs-btn-bg: #3a3b3d;
    --bs-btn-border-color: #3a3b3d;
    --bs-btn-hover-bg: #26272a;
    --bs-btn-hover-border-color: #26272a;
    --bs-btn-active-bg: #26272a;
    --bs-btn-active-border-color: #26272a;
    --bs-btn-disabled-bg: #3a3b3d;
    --bs-btn-disabled-border-color: #3a3b3d;
    --bs-btn-focus-shadow-rgb: 58, 59, 61;
}

.btn-outline-primary,
.btn-outline-secondary {
    --bs-btn-color: #3f4246;
    --bs-btn-border-color: #c4c4c3;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #3a3b3d;
    --bs-btn-hover-border-color: #3a3b3d;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #3a3b3d;
    --bs-btn-active-border-color: #3a3b3d;
    --bs-btn-focus-shadow-rgb: 58, 59, 61;
}

.form-control:focus,
.form-select:focus {
    border-color: #8c8e91;
    box-shadow: 0 0 0 0.2rem rgba(58, 59, 61, 0.15);
}

.form-check-input:checked {
    background-color: #3a3b3d;
    border-color: #3a3b3d;
}

@media (max-width: 767.98px) {
    body {
        padding-top: 5.5rem;
    }
}

/* Posztok */
.post {
    max-width: 760px;
    margin: 0 auto 2.5rem;
}

.post-list-heading {
    max-width: 760px;
    margin: 0 auto 1.5rem;
}

.post-title a {
    text-decoration: none;
    color: inherit;
}

.post-title a:hover {
    text-decoration: underline;
}

.post-meta {
    color: var(--bs-secondary-color);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.post-info-item .post-info-title {
    font-weight: 600;
    margin-right: 0.35rem;
}

.post-tags {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.post-tags a {
    margin-right: 0.5rem;
}

.post-body img {
    max-width: 100%;
    height: auto;
}

.flex-video {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    margin: 1rem 0;
}

.flex-video iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Kezdőlap */
.home {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.5rem 0.75rem 3.5rem;
}

.home-masthead {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.home-masthead img {
    flex: none;
    width: 96px;
    height: 144px;
}

.home-masthead h1 {
    margin: 0;
    font-size: 3.75rem;
    font-weight: 300;
    line-height: 1.08;
    letter-spacing: -0.01em;
}

.home-subtitle {
    margin: 0.375rem 0 0;
    font-size: 1.4375rem;
    font-style: italic;
    color: #66686b;
}

.home-intro {
    max-width: 720px;
    margin: 2.25rem auto 0;
    font-size: 1.125rem;
    line-height: 1.72;
}

.home-sections {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    column-gap: 2.25rem;
    margin-top: 2.25rem;
    padding: 0.375rem 0;
    border-top: 1px solid #e4e4e3;
    border-bottom: 1px solid #e4e4e3;
}

.home-sections a,
.home-footer a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    text-decoration: none;
}

.home-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 3rem 4rem;
    margin-top: 3.5rem;
}

.home-columns section {
    flex: 1 1 320px;
    min-width: 0;
}

.home-heading {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin: 0 0 1.125rem;
    font-size: 1.875rem;
    font-weight: 300;
    line-height: 1.2;
}

.home-heading svg {
    flex: none;
    fill: #9b9da0;
}

.home .home-heading a {
    color: #2b2c2e;
    text-decoration: none;
}

.home-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.home-list a {
    font-size: 1.125rem;
}

.home-list span {
    display: block;
    margin-top: 2px;
    font-size: 0.96875rem;
    line-height: 1.5;
    color: #66686b;
}

.home-finder {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        'lines title'
        'lines form';
    column-gap: 4rem;
    margin-top: 4rem;
    padding: 2.75rem 3rem;
    background: #f3f3f2;
    border-radius: 4px;
}

.home-finder-title {
    grid-area: title;
    align-self: end;
    margin: 0 0 1.125rem;
    font-size: 1.875rem;
    font-weight: 300;
    line-height: 1.2;
}

.home-finder-lines {
    grid-area: lines;
    align-self: center;
    text-align: center;
}

.home-finder-lines p {
    margin: 1rem 0 0;
    font-size: 0.96875rem;
    font-style: italic;
    color: #5f6164;
}

.home-finder-form {
    grid-area: form;
    min-width: 0;
}

.finder-fields {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 0.75rem;
}

.finder-code {
    grid-column: 1 / -1;
}

.finder-fields label {
    display: block;
    margin-bottom: 3px;
    font-size: 0.9375rem;
    color: #5f6164;
}

.finder-fields .form-control,
.finder-fields .form-select {
    min-height: 44px;
    border-color: #d4d4d3;
    border-radius: 3px;
    font-size: inherit;
    font-family: inherit;
    color: #2b2c2e;
}

.btn.home-finder-button {
    --bs-btn-font-size: 1.03125rem;
    min-height: 46px;
    margin-top: 1.25rem;
    padding: 0 1.75rem;
}

.home-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    column-gap: 1.75rem;
    margin-top: 3.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e4e4e3;
    font-size: 1rem;
    color: #66686b;
}

.home-footer span {
    font-style: italic;
}

@media (max-width: 767.98px) {
    .home {
        padding: 0 0.5rem 2rem;
    }

    .home-masthead {
        justify-content: flex-start;
        gap: 1.25rem;
    }

    .home-masthead img {
        width: 64px;
        height: 96px;
    }

    .home-masthead h1 {
        font-size: 2.625rem;
    }

    .home-subtitle {
        margin-top: 0.25rem;
        font-size: 1.1875rem;
    }

    .home-intro {
        margin-top: 1.5rem;
        font-size: 1.0625rem;
        line-height: 1.68;
    }

    .home-sections {
        column-gap: 1.5rem;
        margin-top: 1.75rem;
    }

    .home-columns {
        gap: 2.5rem;
        margin-top: 2.5rem;
    }

    .home-heading,
    .home-finder-title {
        font-size: 1.75rem;
    }

    .home-finder {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            'title'
            'lines'
            'form';
        row-gap: 1.75rem;
        margin-top: 2.75rem;
        padding: 2rem 1.5rem;
    }

    .home-finder-title {
        margin: 0;
    }

    .finder-fields {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .btn.home-finder-button {
        width: 100%;
    }

    .home-footer {
        column-gap: 1.25rem;
        margin-top: 2.25rem;
    }
}

/* Hexagram / trigram kereső widget */
.hexagram-search-img {
    display: inline-block;
}

.hexagram-search-img .hs-line {
    cursor: pointer;
    display: block;
    line-height: 0;
    margin-bottom: 2px;
}

.hexagram-search-img button.hs-line {
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
}

/* Hexagram nézet (az eredeti jicsing.css.scss stílusai nyomán) */
.hexagram-view-image {
    float: right;
    margin-left: 20px;
    margin-bottom: 20px;
}

.hexagram-view-image .hexagram-gram {
    margin-right: 12px;
}

.hexagram-view-title {
    font-weight: bold;
    margin-bottom: 2px;
    margin-top: 12px;
}

.hexagram-view-content {
    margin-bottom: 12px;
    margin-left: 20px;
    text-align: justify;
}

.hexagram-view-conent-rovid {
    font-style: italic;
    margin-bottom: 15px;
}

.hexagram-view-conent-hosszu {
    margin-bottom: 5px;
}

.hexagram-view-conent-kommentar {
    margin-top: 5px;
}

.hexagram-view-line {
    margin-bottom: 10px;
    text-align: justify;
}

.hexagram-view-line-name {
    font-size: 16px;
    font-weight: bold;
}

.hexagram-view-line-inner {
    margin-left: 20px;
}

.hexagram-view-line-jump {
    margin-left: 20px;
    font-weight: normal;
    font-size: 12px;
}

.hexagram-view-trigram {
    text-align: center;
    font-size: 11px;
    padding-left: 0.5rem;
}

.uralkodo-vonalak {
    font-size: 11px;
}

.kormanyzo-uralkodo {
    color: #ff0000;
}

.alkoto-uralkodo {
    color: #ff8000;
}

/* Hexagram oldalsó navigáció */
.hexagram-nav {
    position: sticky;
    top: 5rem;
    font-size: 0.9rem;
    border-left: 3px solid #e4e4e3;
    padding-left: 1rem;
}

.hexagram-nav a {
    text-decoration: none;
}

.hexagram-nav table td {
    text-align: center;
    vertical-align: top;
}

.hexagram-nav-img {
    width: 60px;
    height: 60px;
    margin-bottom: 10px;
}

.hexagram-nav-img span {
    display: block;
    line-height: 0;
}

#hexagram-nav-next {
    margin-left: 20px;
}

.hexagram-line-info {
    color: var(--bs-secondary-color);
    margin-top: 5px;
    font-size: 12px;
}

/* Jel / magjel fülek */
.htab-panel > div {
    display: none;
    padding: 1rem 0;
}

.htab-panel > div.active {
    display: block;
}

/* Tanító */
.learn-message {
    font-size: 1.2rem;
    font-weight: 600;
    min-height: 2rem;
}

/* Trigram sorrend táblák (az eredeti jicsing.css.scss nyomán) */
.trigram-panel {
    font-size: 10px;
}

.trigram-panel h2 {
    font-size: 18px;
}

.trigram-panel p,
.trigram-panel blockquote {
    font-size: 14px;
    text-align: justify;
}

table.trigram-order {
    margin: 0 auto 1rem;
}

table.trigram-order td {
    text-align: center;
}

td.trigram-order-right {
    padding-left: 50px;
    padding-right: 20px;
}

td.trigram-order-left {
    padding-left: 20px;
    padding-right: 50px;
}

td.trigram-order-center {
    padding-top: 10px;
    padding-bottom: 10px;
}

.trigram-order-title {
    font-weight: bold;
    font-size: 12px;
}

blockquote {
    border-left: 4px solid #d4d4d3;
    padding-left: 1rem;
    color: var(--bs-secondary-color);
}

@media (max-width: 767.98px) {
    /* Keskeny hasábban a sorkizárás lyukacsos lenne. */
    .hexagram-view-content,
    .hexagram-view-line,
    .trigram-panel p,
    .trigram-panel blockquote {
        text-align: left;
    }

    /* A lebegő kép mellé szorulna a szöveg. */
    .hexagram-view-image {
        float: none;
        width: fit-content;
        margin: 0 auto 1.25rem;
    }
}

/* Űrlap-panel (kapcsolat, belépés): a kezdőlapi hexagram-kereső tónusa */
.form-panel {
    padding: 2rem 2.25rem;
    background: #f3f3f2;
    border-radius: 4px;
}

.form-panel .form-control {
    background-color: #fff;
}

.form-panel .form-label {
    margin-bottom: 0.375rem;
    font-size: 0.9375rem;
    color: #4a4c4f;
}

@media (max-width: 575.98px) {
    .form-panel {
        padding: 1.5rem 1.25rem;
    }
}

/* Kapcsolat */
.contact {
    padding: 1rem 0 3.5rem;
}

.contact-header {
    margin-bottom: 2.25rem;
}

.contact-header h1 {
    margin-bottom: 0.75rem;
    font-size: 2.75rem;
}

.contact-lead {
    margin: 0;
    font-size: 1.1875rem;
    line-height: 1.7;
    color: #4a4c4f;
}

.contact-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.contact-submit .btn {
    padding: 0.5rem 1.5rem;
}

.contact-sent {
    padding: 1rem 0;
}

.contact-sent h2 {
    font-size: 1.75rem;
}

@media (max-width: 767.98px) {
    .contact-header h1 {
        font-size: 2.25rem;
    }
}

/* Belépés */
.login {
    max-width: 460px;
    margin: 0 auto;
    padding: 1rem 0 3.5rem;
}

.login-code-input {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: 0.3em;
    text-align: center;
}

.login-alt {
    margin-top: 1rem;
    font-size: 0.9375rem;
}

.login h1 {
    margin-bottom: 1rem;
}
