/* ═══════════════════════════════════════════════════
   Telerehabilitace.cz – homepage stylesheet
   Font: Poppins (all text – aligns with PéčeOnline.cz)
═══════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────
   Variables
───────────────────────────────────────────────── */
:root {
    --teal:          #4BBDBD;
    --teal-dark:     #3AAAAA;
    --navy:          #1A2B5E;
    --navy-dark:     #131e47;
    --coral:         #E07070;
    --light-blue-bg: #D6EEF3;
    --text-dark:     #1A2B3C;
    --text-body:     #444F5B;
}

/* ─────────────────────────────────────────────────
   Base
───────────────────────────────────────────────── */
body {
    font-family: 'Poppins', sans-serif;
    color: var(--navy);
    font-size: 16px;
}

main { flex: 1 0 auto; }

h2 { font-size: 45px; }
h3 { font-size: 36px; }

@media (max-width: 1199px) {
    body { font-size: 14px; }
    h2   { font-size: 35px; }
    h3   { font-size: 28px; }
}
@media (max-width: 992px) {
    h2 { font-size: 25px; }
    h3 { font-size: 20px; }
}

/* ─────────────────────────────────────────────────
   Utilities
───────────────────────────────────────────────── */
.text-teal        { color: var(--teal)  !important; }
.text-logo-accent { color: #F8606A !important; }
.text-coral { color: var(--coral) !important; }

.link-teal {
    color: var(--teal);
    text-decoration: underline;
    text-underline-offset: 2px;
}
.link-teal:hover { color: var(--teal-dark); }

.text-body-lg {
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--navy);
    max-width: 760px;
}

/* ─────────────────────────────────────────────────
   Buttons
───────────────────────────────────────────────── */
.btn-navy {
    background-color: var(--navy);
    color: #fff;
    font-weight: 600;
    border: 1px solid var(--navy);
    border-radius: 20px;
    padding: 8px 40px;
    transition: background-color .2s;
}
.btn-navy:hover,
.btn-navy:focus {
    background-color: var(--teal);
    border-color: var(--teal);
    color: #fff;
}

/* ─────────────────────────────────────────────────
   Navbar
───────────────────────────────────────────────── */
.site-navbar {
    box-shadow: 0 1px 8px rgba(0,0,0,.08);
    min-height: 94px;
    padding: 1.5rem 0;
}

.logo-icon {
    width: 41px;
    height: 51px;
    flex-shrink: 0;
    margin-right: 15px; /* gap: 356 − 300 − 41 = 15px */
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 36px;
    line-height: 56px;
    letter-spacing: 0;
    color: var(--navy);
    white-space: nowrap;
}

@media (max-width: 430px) {
    .logo-icon {
        width: 30px;
        height: 38px;
        margin-right: 10px;
    }
    .logo-text {
        font-size: 26px;
        line-height: 1.4;
    }
}

.navbar-nav .nav-link {
    position: relative;
    color: var(--navy);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.2;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 144px;
    height: 30px;
    border-radius: 15px;
    padding: 0 .75rem;
    transition: color .15s;
}
.navbar-nav .nav-link:hover { color: var(--navy); }

/* Animated underline – PéčeOnline paradigm */
.navbar-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 0%;
    background-color: var(--teal);
    height: 2px;
    border-radius: 2px;
    transition: width .3s ease;
}
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after { width: 90%; }
.navbar-nav .nav-link.active { color: var(--navy); }
/* No underline for login button */
.navbar-nav .btn::after { display: none !important; }

/* Avatar icon – 21×21px, no min-width, no underline pseudo-element */
.navbar-icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 21px;
    height: 21px;
    color: var(--navy);
    text-decoration: none;
    flex-shrink: 0;
}
.navbar-icon-link::after { display: none !important; }
.navbar-icon-link:hover { color: var(--teal); }

/* Navbar "Přihlášení" button – Figma: 245×44px, radius 22px, 20px/600 */
.navbar-login-btn {
    width: 245px;
    height: 44px;
    border-radius: 22px !important;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ═══════════════════════════════════════════════════
   LAYOUT SYSTEM
   ─────────────────────────────────────────────────
   Each full-width section has a centred .section-body
   (max-width 1320px). Decorative elements (.deco-*)
   are position:absolute on the section, so they appear
   in the left/right margin areas outside the body.

   Breakpoints:
   ≥1920px  content 1320px + equal side margins
   1320–1919px  margins shrink; content stays 1320px
   900–1319px   content fills width; 2 columns scale down
   ≤899px   1 column layout
═══════════════════════════════════════════════════ */

/* Shared inner container — clamps content to 1320px and
   adds padding so it never touches the viewport edge. */
.section-body {
    max-width: 1320px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* ─────────────────────────────────────────────────
   Section / feature headings
───────────────────────────────────────────────── */
.section-white      { background: #fff; }
.section-light-blue { background: var(--light-blue-bg); }

.section-heading {
    font-weight: 700;
    font-size: clamp(1.4rem, 2vw, 1.65rem);
    color: var(--navy);
}

.feature-heading {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--teal);
    margin-bottom: .6rem;
}

.text-body-lg {
    font-size: clamp(.95rem, 1.2vw, 1.05rem);
    line-height: 1.75;
    color: var(--navy);
}

/* ─────────────────────────────────────────────────
   Decorative margin elements (hearts, lines, bigicon)
   Absolutely positioned on their parent section so
   they sit in the gutter outside .section-body.
   Hidden when viewport ≤ the body width (≤1319px).
───────────────────────────────────────────────── */
.deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
@media (max-width: 1319px) {
    .deco { display: none; }
}

/* ─────────────────────────────────────────────────
   HERO SECTION
───────────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(to right, #5688BB 0%, #6DCCCE 100%);
    position: relative;
    overflow: visible;
}

/* Hero inner layout — 2 columns via .section-body */
.hero-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 1.25rem 4%;
    align-items: start;
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2rem) clamp(2.5rem, 4vw, 4.5rem);
}

.hero-headline {
    grid-column: 1;
    grid-row: 1;
    font-size: clamp(1.65rem, 2.5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.3;
    color: #fff;
    margin: 0;
    /* slightly wider than card: card is ~86% of its column */
    max-width: 95%;
}

.hero-card {
    grid-column: 1;
    grid-row: 2;
    display: flex;
    align-items: flex-start;
    gap: clamp(.75rem, 1.5vw, 1.25rem);
    padding: clamp(1rem, 2vw, 1.5rem);
    background: rgba(255,255,255,.93);
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 15px;
    box-shadow: 0 7px 0 0 #F86072;
    box-sizing: border-box;
    width: 86%;
    position: relative;
    overflow: visible;
}

.hero-card-heart {
    flex-shrink: 0;
    width: clamp(36px, 5vw, 60px);
    height: clamp(36px, 5vw, 60px);
    margin-top: .15rem;
}

.hero-card-text {
    flex: 1;
    min-width: 0;
    font-size: clamp(.85rem, 1.2vw, 1rem);
    font-weight: 400;
    line-height: 1.85;
    color: var(--navy);
    margin: 0;
}

.hero-btn {
    grid-column: 1;
    grid-row: 3;
    align-self: start;
    justify-self: start;
    width: clamp(200px, 27vw, 342px);
    height: clamp(48px, 5vw, 62px);
    border-radius: 22px !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(.9rem, 1.2vw, 1rem);
    padding: 0;
}

/* Photos column – aspect-ratio preserves Figma overlap geometry */
.hero-photos {
    grid-column: 2;
    grid-row: 1 / span 3;
    position: relative;
    width: 100%;
    /* Figma bounding box of both photos: 618 wide × 452 tall */
    aspect-ratio: 618 / 452;
    align-self: start;
}

.hero-photo {
    position: absolute;
    border-radius: 16px;
    box-shadow: 0 10px 34px rgba(0,0,0,.2);
    object-fit: cover;
    height: auto;
}
/* intro1: topmost, 58.9% wide, anchored top-left of cluster */
.hero-photo--intro1 {
    width: 58.9%;
    aspect-ratio: 1 / 1;
    left: 0;
    top: 0;
    z-index: 2;
}
/* intro2: 81.4% wide, offset right 18.6% and down 10.2% */
.hero-photo--intro2 {
    width: 81.4%;
    aspect-ratio: 503 / 406;
    left: 18.6%;
    top: 10.2%;
    z-index: 1;
}

/* Decorative elements – positioned relative to .hero-section,
   outside the .section-body (in the margins).

   The body is max-width:1320px centred, so its left edge is at
   calc(50vw - 660px) and its right edge at calc(50vw + 660px).

   halfheart: right side aligns to body left edge, ~15px overlap */
.hero-deco-halfheart {
    width: clamp(60px, 6vw, 111px);
    height: auto;
    /* sticks left of .hero-card (position:relative), vertically centred */
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
}
/* lines: inside .hero-photos (position:relative) — Figma % coords
   cluster bounding box 618×452; lines--1 at 62.5%/−3%, lines--2 at 20.4%/83.8% */
.hero-deco-lines--1 {
    position: absolute;
    pointer-events: none;
    width: clamp(30px, 3vw, 55px);
    height: auto;
    left: 62.5%;
    top: -3%;
    z-index: 3;
}
.hero-deco-lines--2 {
    position: absolute;
    pointer-events: none;
    width: clamp(30px, 3vw, 55px);
    height: auto;
    left: 20.4%;
    top: 83.8%;
    transform: rotate(175.97deg);
    z-index: 3;
}
.hero-deco-bigicon {
    width: clamp(100px, 12vw, 211px);
    height: auto;
    /* left 20% of bigicon overlaps the right body border (50% + 660px) */
    left: calc(50% + 660px - clamp(20px, 2.4vw, 42.2px));
    bottom: 0;
    opacity: 0.5;
    z-index: 0;
}

/* ≤899px: single column */
@media (max-width: 899px) {
    .hero-body {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    .hero-headline { grid-column: 1; grid-row: 1; max-width: 100%; font-size: 1.5rem; }
    .hero-card     { grid-column: 1; grid-row: 2; width: 100%; }
    .hero-btn      { grid-column: 1; grid-row: 3; width: 100%; max-width: 360px; }
    .hero-photos   {
        grid-column: 1; grid-row: 4;
        max-width: 500px;
        height: 260px;
        aspect-ratio: unset;
    }
    .hero-photo { height: 100%; }
    .hero-photo--intro1 { width: 55%; left: 0; top: 0; }
    .hero-photo--intro2 { width: 74%; left: 26%; top: 0; }
    .hero-deco-lines--1, .hero-deco-lines--2 { display: none; }
}
@media (max-width: 575px) {
    .hero-headline { font-size: 1.3rem; }
    .hero-photos   { height: 200px; }
}

/* ─────────────────────────────────────────────────
   CO NABÍZÍME + JAK FUNGUJE KOMUNIKACE + CVIČEBNÍ PLÁN
───────────────────────────────────────────────── */
.co-nabizime-section {
    background: #fff;
    position: relative;
}

.cnb-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}

/* Left column */
.cnb-left { display: flex; flex-direction: column; gap: 1.5rem; }

.cnb-title-row {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.cnb-heart {
    flex-shrink: 0;
    width: clamp(36px, 4vw, 60px);
    height: auto;
}
.cnb-title {
    font-weight: 700;
    font-size: clamp(1.6rem, 3vw, 2.8rem);
    line-height: 1.2;
    color: #3697CC;
    margin: 0;
}

.cnb-left-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    aspect-ratio: 550 / 388;
}

.cnb-comm-heading {
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 2rem);
    line-height: 1.3;
    color: var(--navy);
    margin: 0;
}

.cnb-comm-content {}
.cnb-item-h {
    font-weight: 600;
    font-size: clamp(1rem, 1.6vw, 1.5rem);
    line-height: 1.3;
    color: #0094A3;
    margin: 1.25rem 0 .5rem;
}
.cnb-item-h:first-child { margin-top: 0; }

.cnb-ilist {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}
.cnb-ilist li {
    font-size: clamp(.875rem, 1.15vw, 1.1rem);
    line-height: 1.75;
    color: var(--navy);
    margin-bottom: .5rem;
}
.cnb-ilist li:last-child { margin-bottom: 0; }

/* Right column */
.cnb-right { display: flex; flex-direction: column; gap: 1.5rem; }

.cnb-right-heading {
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 2rem);
    line-height: 1.3;
    color: var(--navy);
    margin: 0;
}

.cnb-right-text { display: flex; flex-direction: column; gap: .75rem; }

.cnb-rlist {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}
.cnb-rlist li {
    font-size: clamp(.875rem, 1.15vw, 1.1rem);
    line-height: 1.75;
    color: var(--navy);
    margin-bottom: .5rem;
}
.cnb-rlist li:last-child { margin-bottom: 0; }
.cnb-rlist strong { font-weight: 700; }

.cnb-rp-subh {
    font-weight: 600;
    font-size: clamp(1rem, 1.6vw, 1.5rem);
    line-height: 1.3;
    color: #0094A3;
    margin: .75rem 0 .5rem;
}

.cnb-right-img {
    /* Half-width, centred in the right column */
    display: block;
    width: 50%;
    margin: 0 auto;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
    aspect-ratio: 331 / 497;
}

/* ≤899px: single column */
@media (max-width: 899px) {
    .cnb-body {
        grid-template-columns: 1fr;
    }
}

/* ─────────────────────────────────────────────────
   PRO KOHO JE URČENA
───────────────────────────────────────────────── */
.prokoho-section {
    background: #D7EDF1;
    position: relative;
}

.prokoho-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}

.prokoho-title {
    font-weight: 700;
    font-size: clamp(1.1rem, 2vw, 2rem);
    line-height: 1.3;
    color: var(--navy);
    margin: 0 0 1rem;
}

.prokoho-list {
    list-style: disc;
    padding-left: 1.25rem;
    margin: 0;
}
.prokoho-list li {
    font-size: clamp(.875rem, 1.15vw, 1.1rem);
    line-height: 1.85;
    color: var(--navy);
    margin-bottom: .5rem;
}
.prokoho-list li:last-child { margin-bottom: 0; }

/* Photos cluster: proportional overlay from Figma bounding (572×377) */
.prokoho-photos {
    position: relative;
    width: 100%;
    aspect-ratio: 572 / 377;
}
.prokoho-photo {
    position: absolute;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
}
.prokoho-photo--1 { width: 42%; left:  0%;   top:  4.5%; z-index: 1; }
.prokoho-photo--2 { width: 42%; left: 11.4%; top: 36.3%; z-index: 2; }
.prokoho-photo--3 { width: 42%; left: 39%;   top:  0%;   z-index: 1; }
.prokoho-photo--4 { width: 42%; left: 58%;   top: 27.9%; z-index: 2; }

/* ≤899px: single column */
@media (max-width: 899px) {
    .prokoho-body { grid-template-columns: 1fr; }
    .prokoho-photos { max-width: 420px; }
}

/* ─────────────────────────────────────────────────
   TESTIMONIAL (monitor + panel)
───────────────────────────────────────────────── */
.testimonial-section {
    background: #fff;
    position: relative;
}

.testimonial-body {
    display: grid;
    grid-template-columns: 46% 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: start;
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}

/* wrap: first grid column of testimonial-body; heart pins to its left edge */
.testimonial-monitor-wrap {
    position: relative;
    overflow: visible;
}
.testimonial-heart {
    width: clamp(80px, 12vw, 211px);
    height: auto;
    /* 25% of heart overlaps from left edge of monitor-wrap; 75% is outside */
    left: 0;
    top: 50%;
    transform: translate(-75%, -50%);
}

.testimonial-monitor {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

/* Panel: flex row (circle photo | quote text) */
.testimonial-panel {
    background: #F3DEDB;
    border-radius: 14px;
    box-shadow: 0 7px 0 0 #1E3D6B;
    padding: clamp(1rem, 2.5vw, 2rem);
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(.75rem, 2vw, 1.5rem);
}

.testimonial-team-photo {
    flex-shrink: 0;
    width: clamp(60px, 11vw, 180px);
    height: clamp(60px, 11vw, 180px);
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-quote {
    flex: 1;
    min-width: 0;
}
.testimonial-quote blockquote {
    font-family: 'Krona One', serif;
    font-weight: 400;
    font-size: clamp(.75rem, 1.1vw, .94rem);
    line-height: 1.65;
    color: var(--navy);
    padding: 0;
    margin: 0 0 .75rem;
    border: none;
}
.testimonial-author {
    font-family: 'Krona One', serif;
    font-weight: 400;
    font-size: clamp(.75rem, 1vw, .94rem);
    line-height: 1.5;
    color: var(--navy);
    margin: 0;
}

/* ≤899px: single column */
@media (max-width: 899px) {
    .testimonial-body { grid-template-columns: 1fr; }
    .testimonial-monitor { max-width: 500px; }
}
@media (max-width: 599px) {
    .testimonial-panel { flex-direction: column; }
    .testimonial-team-photo { width: 80px; height: 80px; }
}

/* ─────────────────────────────────────────────────
   PROJEKT VYVÍJÍ
───────────────────────────────────────────────── */
.projekt-vyviji-section .section-body {
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}

/* ─────────────────────────────────────────────────
   EU SPOLUFINANCOVÁNÍ
───────────────────────────────────────────────── */
.eu-section {
    background: var(--light-blue-bg);
    position: relative;
}

.eu-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    align-items: center;
    padding: clamp(2rem, 4vw, 4rem) clamp(1.5rem, 3vw, 2rem);
}

.eu-photo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.eu-photo {
    width: clamp(140px, 16vw, 279px);
    height: clamp(140px, 16vw, 279px);
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.eu-right-block {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    justify-content: center;
}

.eu-text {
    font-size: clamp(.875rem, 1.15vw, 1rem);
    line-height: 1.85;
    color: var(--navy);
    margin: 0;
}

.eu-logos {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    align-items: center;
}
.eu-logo-eu  { width: clamp(160px, 20vw, 356px); height: auto; }
.eu-logo-fbmi { width: clamp(120px, 15vw, 220px); height: auto; }

/* ≤899px: single column */
@media (max-width: 899px) {
    .eu-body { grid-template-columns: 1fr; justify-items: center; }
    .eu-right-block { align-items: flex-start; width: 100%; }
}

/* ─────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────── */
.footer-section {
    background: #1E3D6B;
    position: relative;
}

.footer-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 3vw, 3rem);
    padding: clamp(2rem, 4vw, 3rem) clamp(1.5rem, 3vw, 2rem);
    align-items: start;
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    line-height: 1.4;
    color: #fff;
    text-decoration: none;
}
.footer-accent { color: #F8606A; }

.footer-heart {
    width: clamp(18px, 1.5vw, 26px);
    height: auto;
    flex-shrink: 0;
}

.footer-contacts {
    font-size: clamp(.8rem, 1vw, .875rem);
    line-height: 1.6;
    color: rgba(255,255,255,.75);
}
.footer-contacts p { margin: 0 0 .5rem; }
.footer-contacts p:last-child { margin-bottom: 0; }
.footer-contact-link { color: rgba(255,255,255,.75); text-decoration: none; }
.footer-contact-link:hover { color: var(--teal); }

.footer-legal-block {
    font-size: clamp(.75rem, .9vw, .875rem);
    line-height: 1.6;
    color: rgba(255,255,255,.75);
}
.footer-legal-block p { margin: 0 0 .5rem; }
.footer-legal-block p:last-child { margin-bottom: 0; }

/* ≤899px: single column footer */
@media (max-width: 899px) {
    .footer-body { grid-template-columns: 1fr; }
}

/* ─────────────────────────────────────────────────
   Leftover placeholder / utility classes (kept for
   any other template slots that may reference them)
───────────────────────────────────────────────── */
.img-placeholder {
    background: #C8E4E8;
    border-radius: 12px;
    text-align: center;
}
.ph-label {
    color: #5a8a90;
    font-size: .72rem;
    font-style: italic;
    line-height: 1.4;
    pointer-events: none;
}
.video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-width: 460px;
    background: #2C4C6C;
    border-radius: 12px;
}
