/* ==========================================================================
   RealHub – veřejný web (přihlášení, registrace, obnova hesla, veřejné stránky).
   Samostatný soubor nad Bootstrap 5; prefix rhf-.
   ========================================================================== */
@font-face {
    font-family: "Chillax";
    src: url("../../fonts/Chillax-Variable.woff2") format("woff2"),
         url("../../fonts/Chillax-Variable.woff") format("woff");
    font-weight: 200 700;
    font-display: swap;
    font-style: normal;
}

:root {
    --rh-primary: #6161EC;
    --rh-primary-dark: #4A4AD4;
    --rh-primary-soft: #EEF0FF;
    --rh-dark: #344767;
    --rh-text: #67748e;
    --rh-muted: #8392AB;
    --rh-bg: #f8f9fa;
    --rh-border: #E4E7EE;
    --rh-border-2: #D9DDE7;
    --rh-soft: #F1F3F7;
    --rh-success-text: #3D7A00;
    --rh-success-soft: #EEF9E0;
    --rh-danger: #ea0606;
    --rh-danger-text: #C00505;
    --rh-danger-soft: #FDECEC;
    --rh-radius: 12px;
    --rh-radius-sm: 8px;
}

html { scroll-behavior: smooth; }
body.rhf-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fff;
    color: var(--rh-text);
    font-family: "Chillax", system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 { color: var(--rh-dark); font-weight: 600; line-height: 1.25; }
a { color: var(--rh-primary); text-decoration: none; }
a:hover { color: var(--rh-primary-dark); }
.rhf-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.rh-logo { height: 32px; width: auto; display: block; }
.rh-logo-mark { height: 32px; width: auto; display: block; }

/* ---- Hlavička ---------------------------------------------------------- */
.rhf-header { border-bottom: 1px solid var(--rh-border); background: #fff; }
.rhf-header .rhf-container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.rhf-header-nav { display: flex; align-items: center; gap: 8px; }
.rhf-header-nav a { font-weight: 600; font-size: .95rem; padding: 10px 14px; border-radius: var(--rh-radius-sm); color: var(--rh-dark); }
.rhf-header-nav a:hover { background: var(--rh-soft); }
.rhf-header-nav a.rhf-btn-primary { color: #fff; }

/* ---- Tlačítka a formuláře ------------------------------------------------ */
.rhf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 46px; padding: 0 20px; border-radius: var(--rh-radius-sm);
    font-weight: 600; font-size: 1rem; border: 1px solid transparent; cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}
.rhf-btn-primary { background: var(--rh-primary); color: #fff; border-color: var(--rh-primary); }
.rhf-btn-primary:hover { background: var(--rh-primary-dark); border-color: var(--rh-primary-dark); color: #fff; }
.rhf-btn-secondary { background: #fff; color: var(--rh-dark); border-color: var(--rh-border-2); }
.rhf-btn-secondary:hover { border-color: var(--rh-primary); color: var(--rh-primary); }
.rhf-btn-block { width: 100%; }
.rhf-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.rhf-field label { font-size: .9rem; font-weight: 500; color: var(--rh-dark); }
.rhf-field .form-control {
    min-height: 48px; padding: 10px 14px; font-size: 1rem;
    border: 1px solid var(--rh-border-2); border-radius: var(--rh-radius-sm); color: var(--rh-dark);
    box-shadow: none;
}
.rhf-field .form-control:focus { border-color: var(--rh-primary); box-shadow: 0 0 0 3px var(--rh-primary-soft); }
.rhf-field .form-control.is-invalid { border-color: var(--rh-danger); background-image: none; }
.rhf-field .invalid-feedback, .rhf-field .help-block { display: block; font-size: .85rem; color: var(--rh-danger-text); }
.rhf-field-hint { font-size: .85rem; color: var(--rh-muted); }
.rhf-form-links { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-size: .9rem; margin: -6px 0 18px; }
.rhf-form-foot { margin-top: 22px; font-size: .95rem; color: var(--rh-text); text-align: center; }
.rhf-alert { border-radius: var(--rh-radius-sm); padding: 12px 16px; font-size: .95rem; margin-bottom: 18px; }
.rhf-alert-success { background: var(--rh-success-soft); color: var(--rh-success-text); }
.rhf-alert-danger { background: var(--rh-danger-soft); color: var(--rh-danger-text); }
.rhf-alert-warning { background: #FFF4CC; color: #7A5200; }
.rhf-alert h4 { font-size: 1rem; margin: 0 0 4px; color: inherit; }

/* ---- Přihlášení / registrace (split layout) ----------------------------- */
.rhf-auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); flex: 1; min-height: calc(100vh - 72px); }
.rhf-auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.rhf-auth-form-inner { width: 100%; max-width: 420px; }
.rhf-auth-form-inner h1 { font-size: 1.85rem; margin: 0 0 8px; }
.rhf-auth-form-inner .rhf-lead { margin: 0 0 28px; color: var(--rh-text); }
.rhf-auth-brand {
    position: relative; overflow: hidden;
    background: linear-gradient(160deg, #6a6af0 0%, var(--rh-primary) 45%, #3f3fc4 100%);
    color: #fff; display: flex; align-items: center; padding: 64px 56px;
}
.rhf-auth-brand::before {
    content: ""; position: absolute; inset: auto -120px -160px auto; width: 460px; height: 460px; border-radius: 50%;
    background: rgba(255, 255, 255, .08);
}
.rhf-auth-brand::after {
    content: ""; position: absolute; top: -140px; left: -80px; width: 320px; height: 320px; border-radius: 50%;
    background: rgba(255, 255, 255, .06);
}
.rhf-auth-brand-inner { position: relative; z-index: 1; max-width: 480px; }
.rhf-auth-brand .rhf-kicker { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; opacity: .85; margin-bottom: 14px; }
.rhf-auth-brand h2 { color: #fff; font-size: 2rem; margin: 0 0 14px; }
.rhf-auth-brand p { font-size: 1.05rem; opacity: .9; margin: 0 0 28px; }
.rhf-auth-brand ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.rhf-auth-brand li { display: flex; gap: 12px; align-items: flex-start; font-size: 1rem; }
.rhf-auth-brand li i { width: 32px; height: 32px; border-radius: 9px; background: rgba(255, 255, 255, .16); display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; font-size: .9rem; }
.rhf-auth-brand .rhf-brand-foot { margin-top: 36px; font-size: .85rem; opacity: .75; }

/* ---- Veřejné stránky ---------------------------------------------------- */
.rhf-main { flex: 1; display: flex; flex-direction: column; }
.rhf-page { padding: 48px 0 64px; background: var(--rh-bg); flex: 1; }
.rhf-page-inner { max-width: 880px; margin: 0 auto; padding: 0 24px; }
.rhf-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.rhf-page-head h1 { font-size: 2rem; margin: 0; }
.rhf-card { background: #fff; border: 1px solid var(--rh-border); border-radius: var(--rh-radius); padding: 32px; }
.rhf-prose { color: var(--rh-text); font-size: 1rem; }
.rhf-prose h2 { font-size: 1.35rem; margin: 1.6em 0 .6em; }
.rhf-prose h3 { font-size: 1.15rem; margin: 1.4em 0 .5em; }
.rhf-prose p { margin: 0 0 1em; }
.rhf-prose img { max-width: 100%; height: auto; border-radius: var(--rh-radius-sm); }
.rhf-prose table { width: 100%; }
.rhf-prose ul, .rhf-prose ol { padding-left: 1.3em; }
.rhf-center { text-align: center; max-width: 560px; margin: 0 auto; padding: 72px 24px; }
.rhf-center .rhf-code { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--rh-primary); background: var(--rh-primary-soft); padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
.rhf-center h1 { font-size: 2rem; margin: 0 0 12px; }
.rhf-center p { margin: 0 0 24px; }
.rhf-center-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

/* ---- Patička ------------------------------------------------------------ */
.rhf-footer { border-top: 1px solid var(--rh-border); background: #fff; padding: 28px 0; font-size: .875rem; color: var(--rh-muted); }
.rhf-footer .rhf-container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.rhf-footer-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.rhf-footer-links a { color: var(--rh-muted); }
.rhf-footer-links a:hover { color: var(--rh-primary); }

/* ---- Responzivita -------------------------------------------------------- */
@media (max-width: 991.98px) {
    .rhf-auth { grid-template-columns: 1fr; min-height: 0; }
    .rhf-auth-brand { order: -1; padding: 28px 24px; }
    .rhf-auth-brand h2 { font-size: 1.4rem; }
    .rhf-auth-brand p { font-size: .95rem; margin-bottom: 16px; }
    .rhf-auth-brand ul { gap: 8px; }
    .rhf-auth-brand li { font-size: .9rem; }
    .rhf-auth-brand .rhf-brand-foot { display: none; }
    .rhf-auth-form { padding: 32px 20px 48px; }
    .rhf-page { padding: 24px 0 40px; }
    .rhf-card { padding: 20px; }
    .rhf-page-head { flex-direction: column; }
    .rhf-page-head h1 { font-size: 1.5rem; }
}
@media (max-width: 575.98px) {
    .rhf-header .rhf-container { height: 60px; padding: 0 16px; }
    .rhf-header-nav a { padding: 8px 10px; font-size: .9rem; }
    .rhf-container { padding: 0 16px; }
    .rhf-footer .rhf-container { flex-direction: column; align-items: flex-start; }
}

/* Obsah z page builderu */
.rhf-prose .content-row { position: relative; }
.rhf-prose .content-row-background { position: absolute; inset: 0; border-radius: var(--rh-radius-sm); z-index: 0; }
.rhf-prose .content-col { position: relative; z-index: 1; }
.rhf-prose .content-widget { margin-bottom: .5rem; }
.rhf-prose .btn { display: inline-flex; align-items: center; min-height: 42px; padding: 0 18px; border-radius: var(--rh-radius-sm); font-weight: 600; background: var(--rh-primary); color: #fff; border: 0; }

/* ---- Hlavička a přihlášení na úzkých mobilech (≥ 320 px) ---------------- */
.rhf-logo { display: inline-flex; align-items: center; flex: 0 0 auto; }
.rhf-logo-mark { display: none; }
.rhf-btn-header { min-height: 40px; white-space: nowrap; }
.rhf-header-nav a { white-space: nowrap; }
@media (max-width: 991.98px) {
    /* Na mobilu nejdřív formulář, výhody až pod ním */
    .rhf-auth-brand { order: 2; }
}
@media (max-width: 399.98px) {
    .rhf-logo-full { display: none; }
    .rhf-logo-mark { display: inline-flex; }
    .rhf-header-nav { gap: 4px; }
    .rhf-header-nav a { padding: 8px; font-size: .88rem; }
    .rhf-btn-header { min-height: 38px; padding: 0 12px !important; }
    .rhf-auth-form-inner h1 { font-size: 1.55rem; }
    .rhf-center h1, .rhf-page-head h1 { font-size: 1.45rem; }
    .rhf-card { padding: 16px; }
}
