/* ============================================================
   AMS Predavatelji — kartice + modal
   Visualni jezik se ujema z .ams-card--program (program kartice).
   ============================================================ */

.ams-pred-grid-wrap {
    display: flex;
    flex-direction: column;
    gap: 56px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   TOOLBAR: search + filter chips (oboje centrirano)
   ============================================================ */
.ams-pred-toolbar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    margin-bottom: 8px;
}

.ams-pred-search {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--ams-cream, #FAF7F2);
    border: 1px solid var(--ams-gray-100, #EDE9E3);
    border-radius: 999px;
    padding: 12px 20px;
    transition: border-color 180ms ease, box-shadow 180ms ease;
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
}
.ams-pred-search:focus-within {
    border-color: var(--ams-gray-900, #1A1715);
    box-shadow: 0 0 0 3px rgba(26, 23, 21, 0.06);
}
.ams-pred-search__icon {
    display: inline-flex;
    color: var(--ams-gray-500, #8A847B);
    flex-shrink: 0;
}
.ams-pred-search__input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 15px;
    color: var(--ams-gray-900, #1A1715);
    padding: 0;
    margin: 0;
    width: 100%;
}
.ams-pred-search__input::placeholder {
    color: var(--ams-gray-500, #8A847B);
    opacity: 1;
}

.ams-pred-filter {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
}
button.ams-pred-filter__chip,
.ams-pred-filter__chip {
    /* Override Elementor Kit button styles */
    display: inline-flex;
    align-items: center;
    background: var(--ams-white, #FFFFFF);
    background-color: var(--ams-white, #FFFFFF);
    border: 1px solid var(--ams-gray-300, #C8C2B9);
    color: var(--ams-gray-900, #1A1715);
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 8px 16px;
    border-radius: 999px;
    cursor: pointer;
    line-height: 1.4;
    text-transform: none;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
button.ams-pred-filter__chip:hover,
.ams-pred-filter__chip:hover {
    background: var(--ams-cream, #FAF7F2);
    background-color: var(--ams-cream, #FAF7F2);
    border-color: var(--ams-gray-700, #3D3834);
    color: var(--ams-gray-900, #1A1715);
}
button.ams-pred-filter__chip.is-active,
.ams-pred-filter__chip.is-active {
    background: var(--ams-gray-900, #1A1715);
    background-color: var(--ams-gray-900, #1A1715);
    border-color: var(--ams-gray-900, #1A1715);
    color: var(--ams-white, #FFFFFF);
}

/* Empty-state (no results) — centered */
.ams-pred-empty-state {
    color: var(--ams-gray-500, #8A847B);
    font-style: italic;
    padding: 48px 0;
    margin: 0;
    text-align: center;
    width: 100%;
}

/* [hidden] override — Elementor Kit nastavi display:inline-flex na buttone
   z 0,1,1 specifičnostjo, kar razveljavi browser default `[hidden] {display:none}`.
   Force display:none za vse hidden elemente znotraj plugina. */
.ams-pred-grid-wrap [hidden],
.ams-pred-card[hidden],
.ams-pred-section[hidden],
.ams-pred-section-header[hidden],
.ams-pred-empty-state[hidden] {
    display: none !important;
}

.ams-pred-section {
    display: flex;
    flex-direction: column;
    gap: 24px;
    /* Anchor skok iz menija (#habilitirani / #gostujoci): naslov sekcije ne sme
       zdrsniti pod sticky header. */
    scroll-margin-top: 110px;
}

.ams-pred-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--ams-gray-100, #EDE9E3);
    padding-bottom: 12px;
}

.ams-pred-section-title {
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 28px;
    font-weight: 700;
    color: var(--ams-gray-900, #1A1715);
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin: 0;
}
.ams-pred-section-count {
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ams-gray-500, #8A847B);
    flex-shrink: 0;
}

/* Grid: 4 col desktop, 3 tablet, 2 mobile */
.ams-pred-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}
@media (max-width: 1024px) { .ams-pred-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px)  { .ams-pred-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; } }
@media (max-width: 380px)  { .ams-pred-grid { grid-template-columns: 1fr; } }

/* Card — referenca: Royal Conservatoire / podobne plesne akademije.
   Bela kartica, square foto na vrhu, large UPPERCASE name, role v gray,
   "→ Več o predavatelju" link na dnu. Subtilni border + soft hover.

   POMEMBNO: Elementor Kit (.elementor-kit-4 button) nastavi burgundy
   background + white color na vsa <button> z 0,1,1 specifičnostjo.
   Zato uporabljamo `button.ams-pred-card, .ams-pred-card` selector — tie
   na specifičnost, naš CSS naložen zadnji = zmaga. (memory:
   feedback_elementor_kit_button_override.md) */
button.ams-pred-card,
.ams-pred-card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    background: var(--ams-white, #FFFFFF);
    background-color: var(--ams-white, #FFFFFF);
    color: var(--ams-gray-900, #1A1715);
    border: 1px solid var(--ams-gray-100, #EDE9E3);
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    padding: 0;
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0;
    line-height: inherit;
    /* Override <button> default white-space:nowrap (UA/Elementor Kit) — sicer
       dolgi nazivi (IZR. PROF. DR. SVEBOR SEČAK) padejo izven kartice. */
    white-space: normal;
    transition: transform 200ms ease, box-shadow 200ms ease, border-color 200ms ease;
}
button.ams-pred-card:hover,
button.ams-pred-card:focus-visible,
.ams-pred-card:hover,
.ams-pred-card:focus-visible {
    transform: translateY(-2px);
    border-color: var(--ams-gray-300, #C8C2B9);
    box-shadow: 0 8px 20px rgba(26, 23, 21, 0.08);
    background-color: var(--ams-white, #FFFFFF);
    color: var(--ams-gray-900, #1A1715);
    outline: none;
}

/* Square foto, kot na referenci. Object-position: top center
   da se ne odrežejo glave pri portretih. */
.ams-pred-card__media {
    display: block;
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #1A1715 0%, #67000C 100%);
    position: relative;
}
.ams-pred-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 400ms ease;
    display: block;
}
.ams-pred-card:hover .ams-pred-card__img {
    transform: scale(1.03);
}
.ams-pred-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 72px;
    font-weight: 800;
    color: rgba(245, 224, 230, 0.4);
    letter-spacing: 0;
    text-transform: uppercase;
}

.ams-pred-card__body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px 28px 28px 28px;
    flex: 1;
}
.ams-pred-card__name {
    display: block;
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 20px;
    font-weight: 800;
    color: var(--ams-gray-900, #1A1715);
    line-height: 1.18;
    letter-spacing: 0;
    text-transform: uppercase;
    margin: 0 0 4px 0;
    /* Wrap dolge nazive z multiple titlesi (npr. "izr. prof. dr."), a NIKOLI
       znotraj besede. Mihino pravilo (2026-06-01): ime/priimek se ne deli —
       na desktopu je `hyphens: auto` lomil "SVE-BOR SEČAK". Enako kot mobile. */
    white-space: normal;
    overflow-wrap: normal;
    word-wrap: normal;
    word-break: keep-all;
    hyphens: none;
}

.ams-pred-card__role {
    display: block;
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 400;
    color: var(--ams-gray-700, #3D3834);
    line-height: 1.5;
    letter-spacing: 0;
    margin: 0;
}

/* CTA modra — referenčni screenshot uporablja navy blue za "Find out more"
   link. Tudi mi gremo navy: bolj profesionalno, in burgundy je rezerviran
   za heavy CTA gumbe (Avdicije, Vpis), ne za sekundarne grid-card linke. */
.ams-pred-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: #1E40AF;
    margin-top: auto;
    padding-top: 20px;
    line-height: 1.2;
    transition: gap 180ms ease, color 180ms ease;
}
.ams-pred-card__cta-arrow {
    font-size: 18px;
    line-height: 1;
    transition: transform 180ms ease;
}
/* Hover state JE samo :hover, NE :focus / :focus-visible. Razlog: ko zaprem
   modal, vrnem fokus na trigger card, JS naredi blur(), ampak browser med
   tem lahko rendera kratkotrajno :focus-visible state s "hover" stylingom
   — kar uporabnik vidi kot rdeč/spremenjen text na nekaterih karticah.
   :focus-visible NE sme spreminjati barv content elementov (color shifts);
   uporabljamo samo border + shadow na celotni kartici (zgoraj). */
.ams-pred-card:hover .ams-pred-card__cta {
    color: #1E3A8A;
    gap: 14px;
}
.ams-pred-card:hover .ams-pred-card__cta-arrow {
    transform: translateX(3px);
}
.ams-pred-card:hover .ams-pred-card__cta-text {
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1.5px;
}

/* Reset Elementor Kit button :focus background-color (it sets burgundy on
   :focus). Hard reset za vse possible button states znotraj kartice in
   za kartico samo. */
button.ams-pred-card:focus,
button.ams-pred-card:active,
.ams-pred-card:focus,
.ams-pred-card:active {
    background-color: var(--ams-white, #FFFFFF);
    color: var(--ams-gray-900, #1A1715);
}
.ams-pred-card:focus .ams-pred-card__name,
.ams-pred-card:focus .ams-pred-card__role,
.ams-pred-card:focus .ams-pred-card__cta-text,
.ams-pred-card:active .ams-pred-card__name,
.ams-pred-card:active .ams-pred-card__role,
.ams-pred-card:active .ams-pred-card__cta-text {
    color: inherit;
}

/* Empty state */
.ams-pred-empty {
    color: var(--ams-gray-500, #8A847B);
    font-style: italic;
}

/* ============================================================
   MODAL
   ============================================================ */
.ams-pred-modal[hidden] { display: none; }

.ams-pred-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}
.ams-pred-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(26, 23, 21, 0.66);
    backdrop-filter: blur(2px);
    cursor: pointer;
}
.ams-pred-modal__panel {
    position: relative;
    background: var(--ams-white, #FFFFFF);
    border-radius: 8px;
    max-width: 880px;
    width: 100%;
    max-height: calc(100vh - 48px);
    overflow: auto;
    box-shadow: 0 16px 48px rgba(26, 23, 21, 0.32);
    animation: ams-pred-modal-in 200ms ease-out;
}
@keyframes ams-pred-modal-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ams-pred-modal__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--ams-cream, #FAF7F2);
    color: var(--ams-gray-900, #1A1715);
    font-size: 22px;
    line-height: 1;
    border-radius: 999px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 150ms ease, transform 150ms ease;
    z-index: 1;
}
.ams-pred-modal__close:hover {
    background: var(--ams-burgundy-500, #8B0030);
    color: #fff;
    transform: rotate(90deg);
}

.ams-pred-modal__inner {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 0;
}
@media (max-width: 700px) {
    .ams-pred-modal__inner { grid-template-columns: 1fr; }
}

.ams-pred-modal__media {
    aspect-ratio: 3 / 4;
    background: linear-gradient(135deg, #1A1715 0%, #67000C 100%);
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}
@media (max-width: 700px) {
    .ams-pred-modal__media { aspect-ratio: 16 / 9; }
}

.ams-pred-modal__content {
    padding: 32px 32px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.ams-pred-modal__eyebrow {
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--ams-burgundy-500, #8B0030);
}
.ams-pred-modal__eyebrow:empty { display: none; }

.ams-pred-modal__title {
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 32px;
    font-weight: 800;
    color: var(--ams-gray-900, #1A1715);
    line-height: 1.1;
    letter-spacing: -0.02em;
    margin: 0;
}

.ams-pred-modal__role {
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 15px;
    font-weight: 600;
    color: var(--ams-gray-700, #4F4842);
    margin: 0;
}
.ams-pred-modal__role:empty { display: none; }

.ams-pred-modal__predmeti:empty,
.ams-pred-modal__bio:empty,
.ams-pred-modal__email:empty,
.ams-pred-modal__credit:empty {
    display: none;
}

.ams-pred-modal__predmeti h3,
.ams-pred-modal__bio h3 {
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ams-gray-500, #8A847B);
    margin: 0 0 8px 0;
}
.ams-pred-modal__predmeti ul {
    margin: 0;
    padding-left: 18px;
    list-style-type: '→ ';
    color: var(--ams-gray-700, #4F4842);
    font-size: 14px;
    line-height: 1.55;
}
.ams-pred-modal__predmeti ul li {
    padding-left: 4px;
    margin: 4px 0;
}
.ams-pred-modal__bio p {
    margin: 0;
    color: var(--ams-gray-700, #4F4842);
    font-size: 15px;
    line-height: 1.65;
}
.ams-pred-modal__email a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ams-burgundy-500, #8B0030);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.ams-pred-modal__email a:hover { text-decoration: underline; }
.ams-pred-modal__email a::before { content: '✉'; }

/* Avtor fotografije — zadnja vrstica popupa. margin-top:auto potisne kredit na
   dno, ko je vsebine malo (content je flex column). Ločnica je nevtralna 1px
   črta, ne barvni trak. */
.ams-pred-modal__credit {
    margin: auto 0 0;
    padding-top: 14px;
    border-top: 1px solid rgba(26, 23, 21, 0.08);
    font-family: var(--ams-font-sans, 'Mulish', system-ui, sans-serif);
    font-size: 12px;
    line-height: 1.4;
    color: var(--ams-gray-500, #8A847B);
}

/* Lock body scroll when modal open */
body.ams-pred-modal-open {
    overflow: hidden;
}

/* ============================================================
   MOBILE override — MORA biti na koncu, sicer pravila .ams-pred-card__*
   zgoraj prepišejo media query (specifičnost je enaka, vrstni red zmaga).
   - manjša pisava na karticah
   - imen NE delimo sredi besede (overflow-wrap normal + word-break keep-all)
   - skrijemo "Več o predavatelju" / "More about the lecturer"; ostane puščica
   ============================================================ */
@media (max-width: 700px) {
    .ams-pred-grid-wrap { padding: 0 16px; gap: 40px; }
    .ams-pred-section { gap: 16px; }
    .ams-pred-section-title { font-size: 20px; }
    .ams-pred-section-count { font-size: 11px; }

    .ams-pred-card__body {
        padding: 14px 14px 16px;
        gap: 4px;
    }
    .ams-pred-card__name {
        font-size: 13px;
        line-height: 1.22;
        margin-bottom: 2px;
        /* Beseda ostane cela; raje overflow kot mid-word break. */
        overflow-wrap: normal;
        word-wrap: normal;
        word-break: keep-all;
        hyphens: none;
    }
    .ams-pred-card__role {
        font-size: 12px;
        line-height: 1.35;
    }
    .ams-pred-card__cta {
        font-size: 16px;
        padding-top: 10px;
        gap: 0;
    }
    .ams-pred-card__cta-arrow { font-size: 18px; }
    .ams-pred-card__cta-text  { display: none; }
}

@media (max-width: 380px) {
    .ams-pred-card__name { font-size: 15px; }
    .ams-pred-card__role { font-size: 13px; }
}
