/* ===========================================
   PRE DETSKÝ ŽIVOT – NÁŠ TÍM
   Jedna spoločná sekcia; karty z data/tim.php
   =========================================== */

.team-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(115deg, #fff 0%, #f5f8fc 72%, #edf3fa 100%);
    padding: 105px 0 155px;
}

.team-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
}

.team-eyebrow {
    margin: 0 0 18px;
    color: #b68a28;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .17em;
    line-height: 1.6;
    text-transform: uppercase;
}

.team-hero h1,
.team-section-heading h2,
.team-card h3 {
    font-family: Georgia, "Times New Roman", serif;
    color: var(--navy-deep, #19366f);
}

.team-hero h1 {
    font-size: clamp(52px, 5.5vw, 80px);
    letter-spacing: -.035em;
    line-height: 1.08;
    margin: 0 0 25px;
}

.team-hero h1 span,
.team-section-heading h2 span {
    color: var(--gold, #f1b533);
}

.team-lead {
    margin: 0 auto;
    max-width: 735px;
    color: #344767;
    font-size: clamp(16px, 1.3vw, 19px);
    line-height: 1.85;
}

.team-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 112px;
    display: block;
    pointer-events: none;
    z-index: 1;
}

/* SPOLOČNÁ SEKCIA VŠETKÝCH ČLENOV */
.team-section {
    background: #f4f8fc;
    padding: 75px 0 115px;
}

.team-section-heading {
    text-align: center;
    max-width: 780px;
    margin: 0 auto 48px;
}

.team-section-heading h2 {
    margin: 0 0 18px;
    font-size: clamp(38px, 3.8vw, 58px);
    letter-spacing: -.03em;
    line-height: 1.15;
}

.team-section-heading > p:last-child {
    margin: 0;
    color: #344767;
    font-size: 17px;
    line-height: 1.8;
}

/* DVE KOLÓNY NA PC, JEDNA NA MOBILE */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.team-card {
    min-width: 0;
    display: grid;
    grid-template-columns: 112px minmax(0, 1fr);
    align-items: center;
    gap: 25px;
    padding: 27px;
    background: #ffffff;
    border: 1px solid #e8edf5;
    border-radius: 24px;
    box-shadow: 0 12px 42px rgba(28, 63, 122, .055);
    transition: transform .25s ease, box-shadow .25s ease;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 48px rgba(28, 63, 122, .10);
}

/* Pri nepárnom počte členov posledná karta ostane vycentrovaná. */
.team-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    width: calc((100% - 24px) / 2);
    justify-self: center;
}

.team-portrait {
    width: 112px;
    height: 122px;
    border-radius: 25px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(145deg, #fff8e7 0%, #e9f1fb 100%);
    border: 2px solid rgba(241, 181, 51, .55);
    overflow: hidden;
}

.team-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-initials {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -.06em;
    color: var(--navy-deep, #19366f);
}

.team-person-details { min-width: 0; }


/* Doplňujúci text pri členovi tímu */

.team-person-details .team-person-note {
    margin: 7px 0 0;
    color: #66758e;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
}


.team-card h3 {
    font-size: clamp(22px, 2vw, 29px);
    line-height: 1.23;
    margin: 0 0 14px;
    overflow-wrap: break-word;
}

.team-card p {
    margin: 0;
    color: #9c761d;
    font-size: 15px;
    line-height: 1.6;
    font-weight: 700;
}

@media (max-width: 1050px) {
    .team-card {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 18px;
        padding: 21px;
    }

    .team-portrait {
        width: 88px;
        height: 104px;
        border-radius: 21px;
    }

    .team-initials { font-size: 32px; }
}

@media (max-width: 760px) {
    .team-hero { padding: 62px 0 105px; }
    .team-wave { height: 70px; }
    .team-section { padding: 55px 0 80px; }
    .team-section-heading { margin-bottom: 32px; }
    .team-section-heading > p:last-child { font-size: 16px; }
    .team-grid { grid-template-columns: 1fr; gap: 16px; }
    .team-card {
        grid-template-columns: 90px minmax(0, 1fr);
        padding: 20px;
    }
    .team-portrait { width: 90px; height: 100px; }
    .team-card:last-child:nth-child(odd) {
        grid-column: auto;
        width: 100%;
    }
}

@media (max-width: 420px) {
    .team-eyebrow { font-size: 11px; }
    .team-card {
        grid-template-columns: 77px minmax(0, 1fr);
        gap: 14px;
        padding: 16px;
    }
    .team-portrait {
        width: 77px;
        height: 89px;
        border-radius: 18px;
    }
    .team-initials { font-size: 29px; }
    .team-card h3 { font-size: 21px; }
    .team-card p { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .team-card { transition: none; }
    .team-card:hover { transform: none; }
}
