/* ============================================================
 * Information Market — style marki
 *
 * Struktura pliku:
 *   1. Zmienne i baza (:root, body)
 *   2. Strona główna (kafelki, slider, flagi językowe)
 *   3. Podstrony — navbar, hero, treść artykułu, social
 *   4. Stopka
 *   5. Moduł IMH Hero (wspólny szkielet dla `imsa-hero-z-*`)
 *   6. Drobne overrides (.article-tile-custom, polityka prywatności)
 *
 * Konwencja:
 *   - Wszystkie zmienne marki w :root jako --im-*
 *   - Klasy modułowe scoped do swoich modułów (.imsa-kontakt, .imsa-akcjonariusze
 *     itd.) — żyją w plikach modułów, nie tutaj
 *   - Dark mode globalny w `index.php` (style FAB + override navbar/footer/article)
 *     — moduły dodają własne override'y dark mode pod swoim scope
 * ============================================================ */

/* ============================================================
 * 1. ZMIENNE I BAZA
 * ============================================================ */
:root {
    --im-mblue:  #0080c0;
    --im-dblue:  #0d5b8c;
    --im-msteel: #6c757d;
    --im-dsteel: #40484e;
    --im-hover:  #66c5f1;
    --im-text:   #ffffff;
    --im-bg:     #f4f6f8;

    --im-radius:    0;
    --im-shadow:    0 4px 12px rgba(13, 91, 140, 0.10);
    --im-shadow-h:  0 10px 26px rgba(13, 91, 140, 0.22);
    --im-transition: transform .35s ease, box-shadow .35s ease, background-color .35s ease;

    /* Wysokości kafelków desktop */
    --im-tile-lg: 150px;   /* O nas, Nasze marki, Aktualności + slider */
    --im-tile-sm: 100px;   /* Z życia firmy, Kontakt, Dla akcjonariuszy */
}

body.brand-informationmarket {
    font-family: 'Rubik', system-ui, -apple-system, sans-serif;
    background: var(--im-bg);
    color: #2d3748;
}
.rubik { font-family: 'Rubik', sans-serif; }


/* ============================================================
 * 2. STRONA GŁÓWNA — kafelki
 * ============================================================ */
body.brand-informationmarket.page-home { background: var(--im-bg); }

/* Nieco węższy kontener kafli (desktop) */
.im-home-container {
    max-width: 920px;
}

/* ----- Pasek z flagami ----- */
.im-lang-bar {
    gap: .35rem;
}
.im-lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: background-color .2s ease, transform .2s ease;
    line-height: 0;
    text-decoration: none;
}
.im-lang-flag img {
    width: 26px;
    height: auto;
    display: block;
}
.im-lang-flag:hover {
    background-color: rgba(13, 91, 140, 0.08);
    transform: translateY(-1px);
}

/* ----- Kafelki — wspólne ----- */
.im-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
    color: var(--im-text);
    font-weight: 600;
    overflow: hidden;
    box-shadow: var(--im-shadow);
    transition: var(--im-transition);
    width: 100%;
    margin: 0;
    padding: 1rem;
}
.im-tile:hover, .im-tile:focus {
    color: var(--im-text);
    transform: translateY(-3px);
    box-shadow: var(--im-shadow-h);
    background-color: var(--im-hover) !important;
}
.im-tile:focus-visible {
    outline: 3px solid rgba(102, 197, 241, .4);
    outline-offset: 2px;
}

/* ----- Wysokości kafelków na desktop ----- */
@media (min-width: 768px) {
    .im-tile-lg { height: var(--im-tile-lg); }
    .im-tile-sm { height: var(--im-tile-sm); }
}

/* ----- Kolory kafelków ----- */
.card-mblue  { background-color: var(--im-mblue); }
.card-dblue  { background-color: var(--im-dblue); }
.card-msteel { background-color: var(--im-msteel); }
.card-dsteel { background-color: var(--im-dsteel); }

/* ----- Etykiety kafelków ----- */
.im-tile-h2 {
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.2;
    color: #fff;
}
.im-tile-md {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}
.im-tile-sm-label {
    font-size: .9rem;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
}

@media (min-width: 768px) {
    .im-tile-h2 { font-size: 1.9rem; }
    .im-tile-md { font-size: 1.05rem; }
    .im-tile-sm-label { font-size: .95rem; }
}

/* ----- Slider w kafelku ----- */
.im-tile-slider {
    padding: 0 !important;
    background-color: #1a1a1a;
}
.im-tile-slider .carousel-inner,
.im-tile-slider .carousel-item {
    height: 100%;
    border-radius: 0;
}
.im-tile-slider .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.im-tile-slider:hover {
    transform: translateY(-3px);
    background-color: #1a1a1a !important;
}

.im-carousel-indicators {
    margin-bottom: .5rem;
}
.im-carousel-indicators button {
    width: 8px !important;
    height: 8px !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255,255,255,.7) !important;
    background-color: rgba(255,255,255,.4) !important;
    margin: 0 4px !important;
    transition: all .2s ease;
}
.im-carousel-indicators .active {
    background-color: rgba(255,255,255,.95) !important;
    transform: scale(1.2);
}

/* ----- Mobile — Windows-tile-style ----- */
@media (max-width: 767px) {
    .im-tile-lg { min-height: 90px; }
    .im-tile-sm { min-height: 90px; }
    .im-tile-slider { min-height: 140px; width: 100%; }
}


/* ============================================================
 * 3. PODSTRONY — navbar, hero, content, social
 * ============================================================ */
body.brand-informationmarket.page-article {
    background: #ffffff;
}

/* ----- Navbar ----- */
.im-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(13, 91, 140, .06);
    padding: .25rem 0;
}
.im-nav { gap: .75rem; }

.im-nav-home {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 40px;
    background: #ffffff;
    color: var(--im-msteel);
    text-decoration: none;
    transition: var(--im-transition);
    flex-shrink: 0;
    border: 1px solid rgba(13, 91, 140, .15);
}
.im-nav-home:hover {
    background: #f4f6f8;
    color: var(--im-dsteel);
    border-color: rgba(13, 91, 140, .25);
    transform: translateY(-1px);
}
.im-nav-home svg {
    width: 26px;
    height: 26px;
}

/* ----- Hamburger (mobile) ----- */
.im-nav-toggle {
    display: none;                /* desktop: ukryty */
    background: #ffffff;
    border: 1px solid rgba(13, 91, 140, .15);
    width: 44px;
    height: 40px;
    padding: 0;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    flex-shrink: 0;
    transition: background-color .2s ease, border-color .2s ease;
    margin-left: auto;            /* hamburger przykleja się do prawej, blisko flag */
}
.im-nav-toggle:hover {
    background: #f4f6f8;
    border-color: rgba(13, 91, 140, .25);
}
.im-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--im-msteel);
    transition: transform .25s ease, opacity .2s ease;
}
.im-nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.im-nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.im-nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.im-nav-buttons {
    flex-grow: 1;
    justify-content: center;
}

.im-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .55rem 1.2rem;
    background: var(--im-mblue);
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    text-decoration: none;
    transition: var(--im-transition);
    box-shadow: 0 2px 6px rgba(0, 128, 192, .15);
    line-height: 1.3;
    white-space: nowrap;
}
.im-nav-btn:hover {
    background: var(--im-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 128, 192, .25);
}
.im-nav-btn.im-nav-active {
    background: var(--im-msteel);
    color: #fff;
    box-shadow: 0 2px 6px rgba(108, 117, 125, .25);
}
.im-nav-btn.im-nav-active:hover {
    background: var(--im-dsteel);
}

.im-nav-flags { gap: .25rem; flex-shrink: 0; }

/* Mobile nav */
@media (max-width: 991px) {
    .im-nav { gap: .5rem; }

    /* Hamburger się pojawia */
    .im-nav-toggle { display: inline-flex; }

    /* Menu domyślnie schowane (collapse), hamburger je odsłania */
    .im-nav-buttons {
        order: 99;
        width: 100%;
        flex-direction: column;
        gap: .35rem !important;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height .3s ease, opacity .25s ease, margin-top .3s ease;
    }
    .im-nav-buttons.is-open {
        max-height: 600px;
        opacity: 1;
        margin-top: .75rem;
    }

    .im-nav-btn {
        width: 100%;
        font-size: .9rem;
        padding: .55rem 1rem;
    }
}

/* ----- Hero (uniwersalny) -----
   UWAGA: override artykułu w `imsa.php` ma własną wersję .im-hero-image
   z gradientem i tytułem w lewym dolnym rogu — tamte reguły wygrywają
   przez wyższą specyficzność i kolejność ładowania. */
.im-hero { padding: 1rem 0 2rem; }
.im-hero-image {
    position: relative;
    overflow: hidden;
    box-shadow: var(--im-shadow);
    aspect-ratio: 21 / 7;
    background: var(--im-dblue);
}
.im-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .92;
}
.im-hero-title {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    padding: 1rem;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
@media (min-width: 768px) {
    .im-hero-title { font-size: 3rem; }
}

/* ----- Treść artykułu ----- */
.im-article {
    padding: .5rem 0 2rem;
}
.im-article-container {
    max-width: 1090px;
}
.im-article-body h1,
.im-article-body h2,
.im-article-body h3,
.im-article-body h4 {
    font-family: 'Rubik', sans-serif;
    color: var(--im-dsteel);
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}
.im-article-body h1 { font-size: 1.75rem; }
.im-article-body h2 { font-size: 1.5rem; }
.im-article-body h3 { font-size: 1.25rem; }
.im-article-body p {
    color: #475569;
    line-height: 1.7;
    margin-bottom: 1rem;
}
.im-article-body ul,
.im-article-body ol {
    color: #475569;
    line-height: 1.8;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}
.im-article-body ul li,
.im-article-body ol li {
    margin-bottom: .25rem;
}

/* ----- Layout 2-kolumnowy artykułu — tekst po lewej, grafika po prawej.
        Aktywowany w `imsa.php` gdy pole „Łącze A" (urla) zawiera URL pliku
        graficznego. Na mobile (col-12) obrazek schodzi pod tekst.
        Sticky na desktopie utrzymuje grafikę w widoku przy długim tekście. */
.im-article-split {
    margin: 0;
}
.im-article-side-image {
    margin: 0;
}
.im-article-side-image img {
    width: 100%;
    height: auto;
    display: block;
}
@media (min-width: 992px) {
    /* `sticky` działa tylko gdy rodzic ma sensowną wysokość — col-* ma h-auto,
       ale flex `align-items: stretch` z `.row` daje wystarczający height context.
       `top: 1rem` to bufor pod ewentualny sticky header marki. */
    .im-article-side-image {
        position: sticky;
        top: 1rem;
    }
}

/* CTA buttons (Poznaj nasze Marki, Poznaj zespół itd.) — pisz w artykule
   <a class="btn btn-primary btn-im">Poznaj nasze Marki <span>→</span></a> */
.im-article-body .btn-primary,
.im-article-body .btn-im {
    background-color: var(--im-mblue);
    border: none;
    color: #fff;
    font-weight: 600;
    padding: .55rem 1.2rem;
    transition: var(--im-transition);
    margin: .25rem .5rem .25rem 0;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    text-decoration: none;
}
.im-article-body .btn-primary:hover,
.im-article-body .btn-im:hover {
    background-color: var(--im-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 128, 192, .25);
}

/* ----- Sekcja social ----- */
.im-social-section { padding-bottom: 3rem; }
.im-social-box {
    background: #e9eef7;
    padding: 2rem 1.5rem;
    text-align: center;
}
.im-social-title {
    font-size: 1.05rem;
    color: #475569;
    font-weight: 500;
    margin-bottom: 1.5rem;
}
.im-social-icons {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    align-items: center;
    flex-wrap: wrap;
}
.im-social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--im-msteel);
    transition: color .25s ease, transform .25s ease;
    text-decoration: none;
    line-height: 0;
}
.im-social-link:hover {
    transform: translateY(-3px);
}
.im-social-link[aria-label="Facebook"]:hover { color: #1877f2; }
.im-social-link[aria-label="X"]:hover        { color: #000000; }
.im-social-link[aria-label="YouTube"]:hover  { color: #ff0000; }

@media (max-width: 575px) {
    .im-social-icons { gap: 1.5rem; }
    .im-social-link svg { width: 44px; height: 44px; }
}


/* ============================================================
 * 4. STOPKA
 * ============================================================ */
.im-page-footer {
    background: #ffffff;
    border-top: 1px solid rgba(13, 91, 140, .08);
    color: #6b7280;
}

.im-home-footer {
    border-top: 1px solid rgba(13, 91, 140, .08);
    color: #6b7280;
}
.im-footer-logo {
    height: 60px;
    width: auto;
    display: block;
}
@media (max-width: 575px) {
    .im-footer-logo { text-align: center !important; display: inline; margin: 1rem 0; }
    div.accordion-collapse > div > p > a > img { width: 100%; height: auto; }
}
.im-footer-link {
    color: #6b7280;
    text-decoration: none;
    transition: color .2s ease;
}
.im-footer-link:hover {
    color: var(--im-mblue);
    text-decoration: underline;
}
.im-footer-sep {
    color: #cbd5e0;
    margin: 0 .35rem;
}


/* ============================================================
 * 5. MODUŁ „IMH Hero" — wspólny szkielet dla imsa-hero-z-*
 *    (NSP, Raport, Consulting). Każdy moduł korzysta z tej samej
 *    klasy `section.imh`. Wariant `.imh--dark` lub `html.dark-mode`
 *    włącza tryb ciemny.
 * ============================================================ */
section.imh {
    background: var(--im-bg);
    border: 1px solid rgba(0, 0, 0, .06);
    overflow: hidden;
}
section.imh .imh__bar       { height: 3px; background: var(--im-mblue); }
section.imh .imh__eyebrow   { color: var(--im-mblue); }
section.imh .imh__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--im-mblue);
    display: inline-block;
    vertical-align: middle;
    animation: imh-pulse 2.6s ease-in-out infinite;
}
@keyframes imh-pulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: .35; }
}
section.imh .imh__cover-img {
    width: 150px;
    height: auto;
    display: block;
}
@media (max-width: 575px) {
    section.imh .imh__cover-img { width: 90px; }
}

/* Dark mode dla IMH */
html.dark-mode section.imh,
section.imh.imh--dark {
    background: #0d1b2a;
    border-color: rgba(255, 255, 255, .08);
}
html.dark-mode section.imh .imh__bar,
section.imh.imh--dark .imh__bar {
    background: var(--im-hover);
}
html.dark-mode section.imh .imh__eyebrow,
section.imh.imh--dark .imh__eyebrow {
    color: var(--im-hover);
}
html.dark-mode section.imh .imh__dot,
section.imh.imh--dark .imh__dot {
    background: var(--im-hover);
}


/* ============================================================
 * 6. DROBNE OVERRIDES
 * ============================================================ */

/* Ukrycie etykiet pól w artykule (Joomla pola własne) */
body > main > div > article > p > span.field-label,
body > main > div > article > div > p > span.field-label {
    display: none;
}

/* Strzałki w przyciskach (białe) */
img.arrows {
    width: 20px;
    height: 20px;
    filter: invert(100%) sepia(93%) saturate(2%) hue-rotate(253deg) brightness(107%) contrast(100%);
}

/* Obrazki na pełnej szerokości w artykule */
body > main > div > article > p > img {
    width: 100%;
    height: auto;
}

/* Tytuły kafelków artykułów (moduł imsa-box, sekcja .article-tile-custom) —
   nadpisanie domyślnego .custom-title-style z modułu na większy, normalny case */
.article-tile-custom .custom-title-style {
    font-size: 1.65rem !important;
    text-transform: none;
    text-align: center;
}

/* Przyciemnienie fotki w kafelku — globalny filtr, żeby biały/jasny tekst
   był czytelny niezależnie od jasności samego obrazka.
   Wartość 0.65 to kompromis: fotka zostaje rozpoznawalna, ale traci
   około jednej trzeciej jasności — wystarczy dla białego tekstu z istniejącym
   gradientem `.text-shadow-layer` od dołu. */
.article-tile-custom .card-img {
    filter: brightness(0.65);
    transition: filter 0.3s ease;
}
/* Hover (tylko zwykłe kafelki, nie .no-hover) — fotka się rozjaśnia,
   sygnalizując interakcję */
.article-tile-custom:not(.no-hover):hover .card-img {
    filter: brightness(0.80);
}

/* ──────────────────────────────────────────────────────────────
   Globalne anty-rounded — kontruje Bootstrap i wszelkie inline radius.
   Trafia w:
     - przyciski (.btn, .btn-*, <button>) bez względu na klasę
     - obrazki w kafelkach (.card-img, .card-img-top/bottom)
     - nakładkę kafelka (.card-img-overlay)
     - kafelek z modułu imsa-box (.article-tile-custom)
   `!important` jest tu konieczne, bo Bootstrap definiuje swoje radius przez
   zmienne CSS i ładuje się przed style.css.
   ────────────────────────────────────────────────────────────── */
.btn,
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-info,
.btn-light,
.btn-dark,
.btn-outline-primary,
.btn-outline-secondary,
button.btn,
.article-tile-custom,
.article-tile-custom .card-img,
.article-tile-custom .card-img-top,
.article-tile-custom .card-img-bottom,
.article-tile-custom .card-img-overlay,
.card-img-overlay {
    border-radius: 0 !important;
}

/* Kafelki zespołu / „Person tile" — `imsa-box.php` z $moduleTag='details'
   dokleja klasę `.no-hover`. Tu chcemy tekst NA DOLE PO LEWEJ
   (zamiast domyślnego wycentrowania jak na stronie głównej).

   Klucz: nadpisanie Bootstrapowych klas justify-content/align-items
   bezpośrednio na .card-img-overlay wewnątrz `.article-tile-custom.no-hover`. */
.article-tile-custom.no-hover .card-img-overlay {
    justify-content: flex-end !important;   /* tekst na dół (oś pionowa) */
    align-items: flex-start !important;     /* tekst do lewej (oś pozioma) */
    text-align: left;
}
.article-tile-custom.no-hover .custom-title-style {
    text-align: left;
}
.article-tile-custom.no-hover .article-meta {
    text-align: left;
    width: 100%;
}
/* Gradient pod tekst — w team-tile czytelność jest ważniejsza,
   więc lekko mocniejszy spod dolnej krawędzi */
.article-tile-custom.no-hover .text-shadow-layer {
    height: 60%;
}

/* Strona „Polityka prywatności" (com_content single article bez templatki marki) */
body > div.com-content-article.item-page {
    width: auto;
    margin: 0 15px;
}
@media (min-width: 960px) {
    body > div.com-content-article.item-page {
        width: 900px;
        margin: 0 auto;
    }
}


/* ============================================================
 * 7. MODUŁY INFORMACYJNE — wspólne komponenty
 *    Wyciągnięte z `imsa-kontakt.php` i `imsa-akcjonariusze.php`.
 *
 *    Klasy żyją bez scope'a (są globalne), żeby dało się ich używać
 *    również w przyszłych modułach. Override marginesów h1…h6/p/ul
 *    pozostaje scope'owany do .imsa-kontakt i .imsa-akcjonariusze —
 *    nie chcemy zerować marginesów wszędzie.
 *
 *    Konwencja:
 *      .im-section-head — pasek nagłówka sekcji (ikona + tytuł)
 *      .im-block        — wiersz danych (label + value + opcjonalnie button kopiuj)
 *      .im-label/.im-value/.im-row — wewnętrzne elementy bloku
 *      .im-copy         — niebieski przycisk „Kopiuj"
 *      .im-form-*       — pola, label, lead, select, required-note
 *      .im-form-heading — mini-nagłówek formularza w obrębie sekcji
 *      .im-required     — gwiazdka przy wymaganym polu
 *      .im-rodo*        — akordeon klauzuli RODO (informacyjny)
 *      .im-submit-wrap  — wrapper centrujący button
 *      .im-btn-submit   — główny przycisk akcji formularza
 * ============================================================ */

/* ---- Override marginesów wewnątrz modułów (Joomla `.im-article-body`
        narzuca margin-top/bottom na h1…h4 — w modułach nie chcemy tego) ---- */
:is(.imsa-kontakt, .imsa-akcjonariusze) :is(h1, h2, h3, h4, h5, h6, p, ul) {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* ---- Nagłówek sekcji: ikona w kolorze brandu + tytuł Rubikiem ---- */
.im-section-head {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem !important;
}
.im-section-icon {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--im-mblue);
}
.im-section-icon svg {
    width: 22px;
    height: 22px;
    display: block;
}
.im-section-title {
    font-family: 'Rubik', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--im-dsteel);
}

/* ---- Blok danych: etykieta + wartość + opcjonalny button po prawej ---- */
.im-block {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(13, 91, 140, 0.10);
}
.im-block:first-of-type {
    padding-top: 0;
}
.im-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.im-label {
    display: block;
    font-family: 'Rubik', sans-serif;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--im-msteel);
    margin-bottom: 0.35rem !important;
}
.im-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.im-value {
    flex: 1 1 180px;
    min-width: 0;
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    color: var(--im-dsteel);
    word-break: break-word;
}
/* Wariant zmniejszony — dla informacji dodatkowych (np. sąd rejestrowy) */
.im-value.is-small {
    font-size: 0.85rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.6;
}
.im-value a {
    color: var(--im-mblue);
    text-decoration: none;
    transition: color .2s ease;
}
.im-value a:hover {
    color: var(--im-hover);
    text-decoration: underline;
}

/* ---- Przycisk „Kopiuj" — solidne niebieskie tło, biały tekst ---- */
.im-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.95rem;
    background-color: var(--im-mblue);
    color: #ffffff;
    border: none;
    font-family: 'Rubik', sans-serif;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.3;
    text-decoration: none;
    transition: background-color .25s ease;
}
.im-copy:hover {
    background-color: var(--im-hover);
    color: #ffffff;
}
.im-copy:focus-visible {
    outline: 3px solid rgba(102, 197, 241, .4);
    outline-offset: 2px;
}
.im-copy.is-copied {
    background-color: #10b981;
}
.im-copy.is-error {
    background-color: #ef4444;
}
.im-copy[disabled] {
    cursor: default;
}
.im-copy svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* ---- Formularz: lead, label, gwiazdka, kontrolki, required-note ---- */
.im-form-lead {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6b7280;
    margin-bottom: 1.5rem !important;
}
.im-form-label {
    display: block;
    margin-bottom: 0.35rem !important;
    font-family: 'Rubik', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--im-dsteel);
}
/* Gwiazdka przy wymaganym polu */
.im-required {
    color: var(--im-mblue);
    font-weight: 700;
    margin-left: 0.2rem;
}
.im-form-control,
.im-form-select {
    display: block;
    width: 100%;
    padding: 0.7rem 0.95rem;
    background-color: #ffffff;
    border: 1px solid rgba(13, 91, 140, 0.20);
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem;
    color: var(--im-dsteel);
    transition: border-color .25s ease, box-shadow .25s ease;
}
.im-form-control::placeholder {
    color: #94a3b8;
}
.im-form-control:hover,
.im-form-select:hover {
    border-color: rgba(0, 128, 192, 0.45);
}
.im-form-control:focus,
.im-form-select:focus {
    outline: none;
    border-color: var(--im-mblue);
    box-shadow: 0 0 0 4px rgba(0, 128, 192, 0.12);
}
.im-form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%2340484e'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}
textarea.im-form-control {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}
/* Adnotacja „* pola obowiązkowe" — pod RODO, nad buttonem */
.im-form-required-note {
    margin-top: 0.85rem !important;
    text-align: center;
    font-size: 0.75rem;
    color: var(--im-msteel);
}
/* Mini-nagłówek formularza (ikona koperty + tytuł), używany w kontakcie
   żeby oddzielić formularz wewnątrz sekcji „Dane kontaktowe" */
.im-form-heading {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.5rem !important;
    color: var(--im-dsteel);
    font-family: 'Rubik', sans-serif;
    font-size: 1rem;
    font-weight: 700;
}
.im-form-heading svg {
    width: 18px;
    height: 18px;
    color: var(--im-mblue);
    flex: 0 0 auto;
    display: block;
}

/* ---- Akordeon RODO (tylko informacyjny, bez checkboxa akceptacji) ---- */
.im-rodo {
    margin: 1.25rem 0 0;
    border: 1px solid rgba(13, 91, 140, 0.15);
    overflow: hidden;
}
.im-rodo-toggle {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    color: var(--im-dsteel);
    font-family: 'Rubik', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background-color .2s ease;
}
.im-rodo-toggle:hover {
    background-color: rgba(0, 128, 192, 0.05);
}
.im-rodo-toggle .im-rodo-shield {
    color: var(--im-mblue);
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    display: block;
}
.im-rodo-toggle .im-rodo-caret {
    margin-left: auto;
    transition: transform .25s ease;
    width: 14px;
    height: 14px;
    display: block;
}
.im-rodo-toggle[aria-expanded="true"] .im-rodo-caret {
    transform: rotate(180deg);
}
.im-rodo-body {
    padding: 1rem;
    border-top: 1px solid rgba(13, 91, 140, 0.15);
    font-size: 0.85rem;
    line-height: 1.6;
    color: #6b7280;
}
.im-rodo-body p {
    margin-bottom: 0.6rem !important;
}
.im-rodo-body p:last-child {
    margin-bottom: 0 !important;
}
.im-rodo-body ul {
    padding-left: 1.25rem !important;
    margin: 0.5rem 0 !important;
}
.im-rodo-body li {
    margin-bottom: 0.35rem;
}
.im-rodo-body strong {
    color: var(--im-dsteel);
}
.im-rodo-body a {
    color: var(--im-mblue);
    text-decoration: underline;
}

/* ---- Submit — wycentrowany ---- */
.im-submit-wrap {
    margin-top: 1.5rem;
    text-align: center;
}
.im-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background-color: var(--im-mblue);
    color: #ffffff;
    border: none;
    font-family: 'Rubik', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .25s ease;
}
.im-btn-submit:hover {
    background-color: var(--im-hover);
    color: #ffffff;
}
.im-btn-submit:focus-visible {
    outline: 3px solid rgba(102, 197, 241, .4);
    outline-offset: 2px;
}
.im-btn-submit svg {
    width: 16px;
    height: 16px;
    display: block;
}

/* ---- Status komunikat po wysłaniu formularza ----
   Wyświetlany przez JS po fetch (success/error). Sukces — zielony,
   błąd — czerwony. Ukryty przez `hidden` atrybut HTML. */
.im-form-status {
    margin-bottom: 1.25rem;
    padding: 0.85rem 1.1rem;
    border-left: 4px solid transparent;
    background-color: #f4f6f8;
    font-family: 'Rubik', sans-serif;
    font-size: 0.92rem;
    line-height: 1.5;
    color: var(--im-dsteel);
}
.im-form-status.is-success {
    background-color: rgba(16, 185, 129, 0.08);
    border-left-color: #10b981;
    color: #047857;
}
.im-form-status.is-error {
    background-color: rgba(239, 68, 68, 0.08);
    border-left-color: #ef4444;
    color: #b91c1c;
}

/* Podświetlenie pola, które zwróciło błąd walidacji z serwera */
.im-form-control.is-invalid,
.im-form-select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.12);
}

/* Button w stanie wysyłania — wyszarzony, nieklikalny */
.im-btn-submit:disabled,
.im-btn-submit[disabled] {
    opacity: 0.7;
    cursor: wait;
}

/* ---- Dark mode dla wszystkich powyższych komponentów ---- */
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) {
    color: #cbd5e1;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-block {
    border-bottom-color: rgba(255, 255, 255, 0.10);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-section-title,
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-value {
    color: #e2e8f0;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-label,
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-required-note {
    color: #94a3b8;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-section-icon {
    color: var(--im-hover);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-value a {
    color: var(--im-hover);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-copy {
    background-color: var(--im-hover);
    color: #0d1b2a;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-copy:hover {
    background-color: #ffffff;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-label {
    color: #cbd5e1;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-control,
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-select {
    background-color: #0a1622;
    border-color: rgba(255, 255, 255, 0.15);
    color: #e2e8f0;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-control::placeholder {
    color: #64748b;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-control:focus,
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-select:focus {
    border-color: var(--im-hover);
    box-shadow: 0 0 0 4px rgba(102, 197, 241, 0.20);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 16 16' fill='%23cbd5e1'%3E%3Cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708'/%3E%3C/svg%3E");
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-rodo {
    border-color: rgba(255, 255, 255, 0.12);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-rodo-toggle {
    color: #e2e8f0;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-rodo-toggle:hover {
    background-color: rgba(102, 197, 241, 0.08);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-rodo-toggle .im-rodo-shield {
    color: var(--im-hover);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-rodo-body {
    border-top-color: rgba(255, 255, 255, 0.12);
    color: #94a3b8;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-rodo-body strong {
    color: #e2e8f0;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-rodo-body a {
    color: var(--im-hover);
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-btn-submit {
    background-color: var(--im-hover);
    color: #0d1b2a;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-btn-submit:hover {
    background-color: #ffffff;
    color: #0d1b2a;
}
/* Status komunikat w dark mode */
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-status {
    background-color: #0a1622;
    color: #cbd5e1;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-status.is-success {
    background-color: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-status.is-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-control.is-invalid,
html.dark-mode :is(.imsa-kontakt, .imsa-akcjonariusze) .im-form-select.is-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.20);
}


/* ============================================================
 * 8. MODUŁ „Kontakt" — style unikatowe
 *    Wyciągnięte z `imsa-kontakt.php`. Wszystkie reguły scope'owane
 *    do `.imsa-kontakt`, nie wyciekają na inne moduły.
 *
 *    Selektory:
 *      .imsa-kontakt        — wrapper (font, margin-bottom)
 *      .imk-section         — wewnętrzny padding
 *      .imk-media           — obrazek/mapa 235px (200px na mobile)
 *      .imk-subsection      — odstęp telefony↔formularz (2.5rem)
 *      .imk-contact-item    — box telefon/fax z borderem
 *      .imk-contact-icon    — kółko piktogramu (50% radius — semantycznie ikona)
 *      .imk-contact-body    — układ tekst obok kółka
 * ============================================================ */
.imsa-kontakt {
    color: #475569;
    font-family: 'Rubik', system-ui, -apple-system, sans-serif;
    /* Odstęp pod modułem — żeby formularz nie zlewał się z treścią poniżej */
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.imk-section {
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}

/* Pasek grafik i mapa — jednakowa wysokość */
.imk-media {
    width: 100%;
    height: 235px;
    object-fit: cover;
    display: block;
    border: 0;
}
@media (max-width: 575.98px) {
    .imk-media {
        height: 200px;
    }
}

/* Odstęp między telefonami a formularzem w karcie „Dane kontaktowe" */
.imk-subsection + .imk-subsection {
    margin-top: 2.5rem;
}

/* Box telefon/fax — border, piktogram w niebieskim kółku po lewej */
.imk-contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(13, 91, 140, 0.20);
    background: transparent;
    transition: border-color .25s ease;
}
.imk-contact-item:hover {
    border-color: var(--im-mblue);
}
/* Niebieskie kółko z białym piktogramem (jedyne 50% radius w module —
   semantycznie to ikona, nie box) */
.imk-contact-icon {
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--im-mblue);
    color: #ffffff;
    border-radius: 50%;
}
.imk-contact-icon svg {
    width: 24px;
    height: 24px;
    display: block;
}
.imk-contact-body {
    flex: 1;
    min-width: 0;
}
.imk-contact-body .im-label {
    margin-bottom: 0.1rem !important;
}
.imk-contact-body .im-value {
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 575.98px) {
    .imk-contact-icon {
        flex: 0 0 46px;
        width: 46px;
        height: 46px;
    }
    .imk-contact-icon svg {
        width: 20px;
        height: 20px;
    }
}

/* Dark mode — unikatowe dla .imsa-kontakt
   (wspólne komponenty mają dark scope'owane w sekcji 7) */
html.dark-mode .imsa-kontakt .imk-contact-item {
    border-color: rgba(255, 255, 255, 0.15);
}
html.dark-mode .imsa-kontakt .imk-contact-item:hover {
    border-color: var(--im-hover);
}
html.dark-mode .imsa-kontakt .imk-contact-icon {
    background-color: var(--im-hover);
    color: #0d1b2a;
}


/* ============================================================
 * 9. MODUŁ „Dla akcjonariuszy" — style unikatowe
 *    Wyciągnięte z `imsa-akcjonariusze.php`. Reguły scope'owane
 *    do `.imsa-akcjonariusze`.
 *
 *    Selektory:
 *      .imsa-akcjonariusze  — wrapper (font, margin-bottom)
 *      .ima-section         — wewnętrzny padding
 *      .ima-subsection      — odstęp między sub-sekcjami (2rem)
 *      .ima-news-list/item  — kontener listy aktualności
 *      .ima-news-link       — link wokół całego newsa
 *      .ima-news-title      — tytuł newsa (uppercase, 0.82rem)
 *      .ima-news-meta       — data z ikoną kalendarza
 *      .ima-news-empty      — placeholder „brak aktualności"
 * ============================================================ */
.imsa-akcjonariusze {
    color: #475569;
    font-family: 'Rubik', system-ui, -apple-system, sans-serif;
    margin-bottom: clamp(2rem, 4vw, 3.5rem);
}
.ima-section {
    padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}
.ima-subsection + .ima-subsection {
    margin-top: 2rem;
}

/* Lista newsów — czyste linki z ikoną kalendarza przy dacie */
.ima-news-list {
    list-style: none;
    padding: 0 !important;
}
.ima-news-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(13, 91, 140, 0.10);
}
.ima-news-item:first-child {
    padding-top: 0;
}
.ima-news-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}
.ima-news-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: color .2s ease;
}
.ima-news-title {
    font-family: 'Rubik', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    line-height: 1.4;
    color: var(--im-dsteel);
    transition: color .2s ease;
    margin-bottom: 0.3rem !important;
}
.ima-news-link:hover .ima-news-title {
    color: var(--im-mblue);
}
.ima-news-meta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    color: var(--im-msteel);
}
.ima-news-meta svg {
    width: 12px;
    height: 12px;
    flex: 0 0 auto;
    display: block;
    color: var(--im-mblue);
}
.ima-news-meta strong {
    color: var(--im-dsteel);
    font-weight: 600;
}
.ima-news-empty {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--im-msteel);
    font-style: italic;
}

/* Dark mode — unikatowe dla .imsa-akcjonariusze */
html.dark-mode .imsa-akcjonariusze .ima-news-item {
    border-bottom-color: rgba(255, 255, 255, 0.10);
}
html.dark-mode .imsa-akcjonariusze .ima-news-title,
html.dark-mode .imsa-akcjonariusze .ima-news-meta strong {
    color: #e2e8f0;
}
html.dark-mode .imsa-akcjonariusze .ima-news-meta {
    color: #94a3b8;
}
html.dark-mode .imsa-akcjonariusze .ima-news-meta svg {
    color: var(--im-hover);
}
html.dark-mode .imsa-akcjonariusze .ima-news-link:hover .ima-news-title {
    color: var(--im-hover);
}
