/* =========================================================
   AKADEMIA RUCHU
   Cassiopeia / user.css
   Motyw: medyczny / rehabilitacyjny / NFZ-inspired
   ========================================================= */


/* =========================================================
   1. ZMIENNE KOLORÓW
   ========================================================= */

:root {
    --site-primary: #005b96;
    --site-primary-dark: #003f6b;
    --site-primary-light: #eef6fa;

    --site-secondary: #2f7d9f;

    --site-background: #ffffff;
    --site-background-soft: #f4f8fa;

    --site-text: #26343d;
    --site-text-light: #5b6770;

    --site-border: #d7e3ea;

    --site-white: #ffffff;

    --site-shadow: 0 2px 8px rgba(0, 60, 100, 0.08);
    --site-shadow-hover: 0 5px 16px rgba(0, 60, 100, 0.15);
}


/* =========================================================
   2. PODSTAWOWE STYLOWANIE STRONY
   ========================================================= */

html {
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;

    background: var(--site-background);
    color: var(--site-text);

    overflow-x: hidden;

    line-height: 1.6;
}


/* =========================================================
   3. GŁÓWNY UKŁAD CASSIOPEIA
   ========================================================= */

.header,
.site-grid,
section {
    max-width: 100%;
    box-sizing: border-box;
}

.container-component,
.container-main,
.grid-child {
    box-sizing: border-box;
}


/* =========================================================
   4. LINKI
   ========================================================= */

a {
    color: var(--site-primary);
}

a:hover {
    color: var(--site-primary-dark);
}


/* =========================================================
   5. NAGŁÓWEK
   ========================================================= */

header.header {
    width: 100%;
    max-width: 100%;

    background: var(--site-white);
    color: var(--site-text);

    border-bottom: 1px solid var(--site-border);
}


/* =========================================================
   6. BRAND / LOGO
   ========================================================= */

.navbar-brand {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;

    padding: 12px 0;

    line-height: 1.1;
}

.navbar-brand .brand-logo {
    display: inline-block;

    color: var(--site-primary);

    text-decoration: none;

    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 700;

    letter-spacing: -0.02em;
    line-height: 1.15;
}

.navbar-brand .brand-logo:hover {
    color: var(--site-primary-dark);
    text-decoration: none;
}

.navbar-brand .site-description {
    margin-top: 4px;

    color: var(--site-text-light);

    font-size: clamp(0.85rem, 1.5vw, 1.05rem);
    font-weight: 400;

    letter-spacing: 0.02em;
}

/* =========================================================
   7. GŁÓWNE MENU
   DESKTOP >= 992px
   SMARTFON < 992px
   ========================================================= */

.container-below-top {
    position: relative;
    z-index: 1000;
}

.container-below-top .navbar {
    position: relative;
    z-index: 1000;
    background: #ffffff;
    border-bottom: 1px solid var(--site-border);
}

.container-below-top .navbar-collapse {
    position: relative;
    z-index: 1000;
}

.container-below-top .mod-menu {
    align-items: center;
    margin: 0;
    padding: 0;
}

.container-below-top .mod-menu > li {
    position: relative;
}


/* =========================================================
   LINKI GŁÓWNEGO MENU
   ========================================================= */

.container-below-top .mod-menu > li > a {
    display: block;

    padding: 0.75rem 1rem;

    color: #174a6e;
    background: transparent;

    font-weight: 500;
    text-decoration: none;

    transition:
        color 0.2s ease,
        background-color 0.2s ease;
}

.container-below-top .mod-menu > li > a:hover,
.container-below-top .mod-menu > li > a:focus,
.container-below-top .mod-menu > li.current > a {
    color: var(--site-primary);
    background: var(--site-primary-light);
}


/* =========================================================
   DESKTOP
   >= 992px
   ========================================================= */

@media (min-width: 992px) {

    /*
     * Navbar desktopowy zawsze widoczny.
     */

    .container-below-top .navbar-collapse {
        display: flex !important;
        height: auto !important;
        visibility: visible !important;
    }


    /*
     * Element posiadający submenu.
     */

    .container-below-top .mod-menu > li.deeper {
        position: relative;
    }


    /*
     * SUBMENU DESKTOP
     *
     * MetisMenu może dodawać .mm-collapse oraz
     * style związane z jego działaniem.
     *
     * Nie ustawiamy display:none ani display:block.
     * Ukrywamy submenu wizualnie i sterujemy nim
     * przez hover rodzica.
     */

    .container-below-top
    .mod-menu > li.deeper > ul.mm-collapse {

        position: absolute;

        top: 100%;
        left: 0;

        z-index: 99999;

        display: block;

        width: max-content;
        min-width: 240px;
        max-width: 360px;

        margin: 0;
        padding: 0.4rem 0;

        background: #ffffff;

        border: 1px solid var(--site-border);
        border-radius: 0 0 6px 6px;

        box-shadow: var(--site-shadow-hover);

        list-style: none;

        opacity: 0;
        visibility: hidden;

        transform: translateY(-4px);

        pointer-events: none;

        transition:
            opacity 0.15s ease,
            visibility 0.15s ease,
            transform 0.15s ease;
    }


    /*
     * OTWARCIE SUBMENU PO NAJECHANIU
     *
     * Hover działa na całym <li>, więc submenu
     * pozostaje aktywne podczas przechodzenia
     * kursorem z "Sprzęt" do jego elementów.
     */

    .container-below-top
    .mod-menu > li.deeper:hover > ul.mm-collapse,

    .container-below-top
    .mod-menu > li.deeper:focus-within > ul.mm-collapse {

        opacity: 1 !important;
        visibility: visible !important;

        transform: translateY(0) !important;

        pointer-events: auto !important;
    }


    /*
     * Elementy submenu.
     */

    .container-below-top
    .mod-menu > li.deeper > ul.mm-collapse > li {

        display: block;

        width: 100%;

        margin: 0;
        padding: 0;

        list-style: none;
    }


    /*
     * Linki submenu.
     */

    .container-below-top
    .mod-menu > li.deeper > ul.mm-collapse > li > a {

        display: block;

        width: 100%;

        box-sizing: border-box;

        padding: 0.65rem 1rem;

        color: #174a6e;
        background: #ffffff;

        font-size: 0.95rem;
        line-height: 1.3;

        text-decoration: none;

        white-space: nowrap;

        transition:
            color 0.2s ease,
            background-color 0.2s ease;
    }

    .container-below-top
    .mod-menu > li.deeper > ul.mm-collapse > li > a:hover,

    .container-below-top
    .mod-menu > li.deeper > ul.mm-collapse > li > a:focus {

        color: var(--site-primary);

        background: var(--site-primary-light);
    }


    /*
     * Na desktopie nie pokazujemy expandera.
     */

    .container-below-top
    .mod-menu > li.deeper > .mm-toggler {

        display: none !important;
    }


    /*
     * Na desktopie nie pokazujemy hamburgera.
     */

    .container-below-top .navbar-toggler {

        display: none !important;
    }
}


/* =========================================================
   SMARTFON
   < 992px
   ========================================================= */

@media (max-width: 991.98px) {

    /*
     * GŁÓWNY PASEK
     */

    .container-below-top .navbar {

        width: 100%;

        background: #174a6b;

        border-bottom: 3px solid #0f3d59;
    }


    /*
     * HAMBURGER
     */

    .container-below-top .navbar-toggler {

        display: flex;

        align-items: center;
        justify-content: center;

        width: 48px;
        height: 48px;

        margin: 8px 12px 8px auto;

        padding: 0;

        color: #ffffff;

        background: #0f3d59;

        border: 1px solid rgba(255, 255, 255, 0.45);

        border-radius: 5px;

        cursor: pointer;
    }

    .container-below-top .navbar-toggler:hover,
    .container-below-top .navbar-toggler:focus {

        color: #ffffff;

        background: #0b3045;

        border-color: rgba(255, 255, 255, 0.65);

        box-shadow: none;

        outline: none;
    }

    .container-below-top .navbar-toggler .icon-menu {

        color: #ffffff;

        font-size: 1.4rem;
    }


    /*
     * MENU PO OTWARCIU HAMBURGERA
     */

    .container-below-top .navbar-collapse {

        width: 100%;

        margin: 0;
        padding: 0;

        background: #174a6b;

        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    .container-below-top .navbar-collapse.show,
    .container-below-top .navbar-collapse.collapsing {

        background: #174a6b;
    }


    /*
     * GŁÓWNA LISTA
     */

    .container-below-top .mod-menu {

        display: block;

        width: 100%;

        margin: 0;

        padding: 8px 0 12px;

        background: #174a6b;

        list-style: none;
    }


    /*
     * ELEMENT GŁÓWNEGO MENU
     */

    .container-below-top .mod-menu > li {

        display: flex;

        flex-wrap: wrap;

        width: 100%;

        margin: 0;
        padding: 0;

        background: #174a6b;

        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }


    /*
     * LINK GŁÓWNY
     */

    .container-below-top .mod-menu > li > a {

        flex: 1 1 auto;

        width: auto;

        min-height: 48px;

        box-sizing: border-box;

        display: flex;

        align-items: center;

        padding: 13px 18px;

        color: #ffffff;

        background: #174a6b;

        font-size: 1rem;

        line-height: 1.3;

        white-space: normal;
    }

    .container-below-top .mod-menu > li > a:hover,
    .container-below-top .mod-menu > li > a:focus,
    .container-below-top .mod-menu > li.current > a {

        color: #ffffff;

        background: #0f3d59;
    }


    /* =====================================================
       PRZYCISK EXPANDERA
       ===================================================== */

    .container-below-top
    .metismenu-item.parent > .mm-toggler {

        display: flex;

        align-items: center;
        justify-content: center;

        flex: 0 0 50px;

        width: 50px;

        min-height: 48px;

        margin: 0;
        padding: 0;

        color: #ffffff;

        background: #174a6b;

        border: 0;

        border-left: 1px solid rgba(255, 255, 255, 0.25);

        cursor: pointer;

        position: relative;
    }

    .container-below-top
    .metismenu-item.parent > .mm-toggler:hover,
    .container-below-top
    .metismenu-item.parent > .mm-toggler:focus {

        color: #ffffff;

        background: #0f3d59;

        outline: none;
    }


    /*
     * WŁASNA STRZAŁKA
     */

    .container-below-top
    .metismenu-item.parent > .mm-toggler::before {

        content: "";

        display: block;

        width: 9px;
        height: 9px;

        border-right: 2px solid #ffffff;
        border-bottom: 2px solid #ffffff;

        transform: rotate(45deg);

        transition: transform 0.2s ease;
    }


    /*
     * STRZAŁKA PO ROZWINIĘCIU
     */

    .container-below-top
    .metismenu-item.parent
    > .mm-toggler[aria-expanded="true"]::before {

        transform: rotate(225deg);
    }


    /* =====================================================
       SUBMENU SMARTFONOWE
       ===================================================== */

    .container-below-top
    .metismenu-item.parent > ul {

        flex: 0 0 100%;

        width: 100%;

        box-sizing: border-box;

        margin: 0;

        padding: 4px 0 6px;

        background: #0f3d59;

        border: 0;

        border-left: 4px solid #2d7da8;

        list-style: none;
    }


    /*
     * MetisMenu steruje otwieraniem i zamykaniem.
     */

    .container-below-top
    .metismenu-item.parent > ul > li {

        display: block;

        width: 100%;

        margin: 0;
        padding: 0;

        background: #0f3d59;
    }


    /*
     * LINKI SUBMENU
     */

    .container-below-top
    .metismenu-item.parent > ul > li > a {

        display: block;

        width: 100%;

        box-sizing: border-box;

        padding: 11px 18px 11px 22px;

        color: #ffffff;

        background: #0f3d59;

        font-size: 0.92rem;

        font-weight: 500;

        line-height: 1.35;

        text-decoration: none;

        white-space: normal;
    }

    .container-below-top
    .metismenu-item.parent > ul > li > a:hover,
    .container-below-top
    .metismenu-item.parent > ul > li > a:focus {

        color: #ffffff;

        background: #174a6b;
    }


    /*
     * AKTYWNY ELEMENT SUBMENU
     */

    .container-below-top
    .metismenu-item.parent
    > ul
    > li.current
    > a {

        color: #ffffff;

        background: #174a6b;

        font-weight: 700;
    }
}

/* =========================================================
   10. NAGŁÓWKI
   ========================================================= */

h1,
h2,
h3,
h4,
h5,
h6 {

    white-space: normal !important;

    word-wrap: break-word;

    overflow-wrap: break-word;

    color: var(--site-primary-dark);
}

/* =========================================================
   11. FORMULARZE / IFRAME
   ========================================================= */

iframe,
form,
input,
textarea,
select {
    max-width: 100%;

    box-sizing: border-box;
}


/* =========================================================
   12. KONTAKT / MAPA
   ========================================================= */

.contact-box,
.map-container {
    margin-left: auto;
    margin-right: auto;

    padding-left: 15px;
    padding-right: 15px;
}


/* Karta kontaktowa */

.contact-box {
    max-width: 400px;

    margin-top: 40px;

    padding: 25px 30px;

    text-align: center;

    background: var(--site-white);

    border: 1px solid var(--site-border);
    border-radius: 8px;

    box-shadow: var(--site-shadow);

    font-family: inherit;

    color: var(--site-text);
}

.contact-box h2 {
    margin-bottom: 5px;

    color: var(--site-primary);

    font-size: 1.6rem;
}

.contact-box p {
    margin: 8px 0;

    font-size: 1rem;
}

.contact-box a {
    color: var(--site-primary);

    text-decoration: none;

    font-weight: 600;
}

.contact-box a:hover {
    color: var(--site-primary-dark);

    text-decoration: underline;
}


/* =========================================================
   13. STOPKA
   ========================================================= */

.container-footer.footer {
    width: 100%;
    margin: 0;
    padding: 0;

    background: #f4f7f9;
    color: #263238;

    border-top: 1px solid #d9e2e7;

    box-sizing: border-box;
}

.container-footer.footer > .grid-child {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 0 24px;

    box-sizing: border-box;
}


/* =========================================================
   KONTAKT + MAPA
   ========================================================= */

.footer-contact {
    width: 100%;
    padding: 45px 0;

    box-sizing: border-box;
}

.footer-contact-inner {
    display: grid;

    grid-template-columns:
        minmax(280px, 1fr)
        minmax(350px, 550px);

    gap: 50px;

    align-items: stretch;

    width: 100%;
}


/* =========================================================
   INFORMACJE KONTAKTOWE
   ========================================================= */

.footer-contact-info {
    min-width: 0;
    padding: 5px 0;
}

.footer-contact-info h2 {
    margin: 0 0 20px;
    padding: 0;

    color: #174a6b;

    font-size: 1.45rem;
    line-height: 1.3;
    font-weight: 600;
}

.footer-contact-info p {
    margin: 0 0 18px;

    color: #455a64;

    font-size: 1rem;
    line-height: 1.7;
}

.footer-contact-info p:last-child {
    margin-bottom: 0;
}

.footer-contact-info a {
    color: #176b9e;

    font-weight: 600;
    text-decoration: none;
}

.footer-contact-info a:hover,
.footer-contact-info a:focus {
    color: #0d4f78;
    text-decoration: underline;
}


/* =========================================================
   MAPA GOOGLE
   ========================================================= */

#mapDiv {
    width: 100%;
    min-width: 0;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid #d2dde3;
    border-radius: 6px;

    box-sizing: border-box;
}

#mapDiv iframe {
    display: block;

    width: 100%;
    height: 280px;

    margin: 0;
    padding: 0;

    border: 0;

    box-sizing: border-box;
}


/* =========================================================
   SMARTFON
   ========================================================= */

@media (max-width: 767px) {

    .container-footer.footer > .grid-child {
        padding: 0 15px;
    }

    .footer-contact {
        padding: 30px 0;
    }

    .footer-contact-inner {
        display: flex;
        flex-direction: column;

        gap: 25px;
    }

    .footer-contact-info {
        width: 100%;
        padding: 0;

        text-align: center;
    }

    .footer-contact-info h2 {
        font-size: 1.25rem;
    }

    .footer-contact-info p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    #mapDiv {
        width: 100%;
        height: 300px;

        border-radius: 5px;
    }

    #mapDiv iframe {
        width: 100%;
        height: 300px;
    }
}


/* =========================================================
   14. GALERIA
   ========================================================= */

.gallery {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;

    width: 100%;

    margin: 30px auto;

    box-sizing: border-box;
}


/*
 * Element <a> stanowi ramkę zdjęcia.
 *
 * Każdy element ma identyczną wysokość,
 * dzięki czemu cała galeria jest uporządkowana.
 */

.gallery a {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 100%;
    height: 260px;

    padding: 0;

    overflow: hidden;

    background: #f3f7f9;

    border: 1px solid var(--site-border);

    border-radius: 8px;

    text-decoration: none;

    box-shadow: var(--site-shadow);

    transition:
        box-shadow 0.2s ease,
        transform 0.2s ease;
}


/*
 * KLUCZOWE:
 *
 * object-fit: contain
 *
 * powoduje, że zdjęcie zostaje w całości
 * zachowując swoje proporcje.
 *
 * Nie będzie przycięcia jak przy object-fit: cover.
 */

.gallery a img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: contain;

    object-position: center;

    background: var(--site-white);

    transition: transform 0.25s ease;
}


/* Hover */

.gallery a:hover {
    transform: translateY(-2px);

    box-shadow: var(--site-shadow-hover);
}

.gallery a:hover img {
    transform: scale(1.03);
}


/* =========================================================
   15. GALERIA — TABLET
   ========================================================= */

@media (min-width: 601px) and (max-width: 991px) {

    .gallery {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 15px;
    }

    .gallery a {
        height: 240px;
    }
}


/* =========================================================
   16. GALERIA — TELEFON
   ========================================================= */

@media (max-width: 600px) {

    .gallery {
        grid-template-columns: 1fr;

        gap: 15px;

        margin-top: 20px;
        margin-bottom: 20px;
    }

    .gallery a {
        height: 300px;
    }
}


/* =========================================================
   17. KONTAKT — TELEFON
   ========================================================= */

@media (max-width: 600px) {

    .contact-box {
        padding: 15px;
    }

    .map-container {
        height: 250px;
    }

    footer .footer-content {
        flex-direction: column;

        align-items: center;

        text-align: center;
    }

    footer iframe {
        width: 100%;

        max-width: 100%;

        height: 220px;
    }

    footer .footer-info {
        text-align: center;
    }
}


/* =========================================================
   18. RESPONSYWNE NAGŁÓWKI
   ========================================================= */

@media (max-width: 600px) {

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero h2 {
        font-size: 1.1rem;
    }
}


/* =========================================================
   19. DROBNE ZABEZPIECZENIA UKŁADU
   ========================================================= */

img {
    max-width: 100%;
    height: auto;
}

table {
    max-width: 100%;

    overflow-x: auto;
}

pre,
code {
    max-width: 100%;

    overflow-x: auto;
}

/* =========================================================
   FILMY NA STRONIE GŁÓWNEJ
   ========================================================= */

.video-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    width: 100%;
    margin: 20px 0;
}

.video-gallery video {
    display: block;
    width: 100%;
    max-width: 300px;
    height: 500px;
    margin: 0 auto;
    object-fit: cover;
    border-radius: 8px;
    background: #000;
    box-shadow: var(--site-shadow);
}

@media (max-width: 991.98px) {
    .video-gallery {
        grid-template-columns: 1fr;
    }

    .video-gallery video {
        width: 100%;
        max-width: 300px;
        height: 500px;
    }
}

/* =========================================================
   PROMOCJE — LISTA ARTYKUŁÓW
   ========================================================= */

.mod-articles-items.mod-list > li {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.mod-articles-items.mod-list .mod-articles-item {
    padding: 18px 20px;

    background: #ffffff;

    border: 1px solid var(--site-border);
    border-radius: 6px;

    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);

    box-sizing: border-box;
}

.mod-articles-items.mod-list .mod-articles-title {
    margin: 0;
}

.mod-articles-items.mod-list .mod-articles-link {
    display: block;

    color: #174a6b;

    font-size: 1.05rem;
    font-weight: 600;

    line-height: 1.4;
    text-decoration: none;
}

.mod-articles-items.mod-list .mod-articles-link:hover,
.mod-articles-items.mod-list .mod-articles-link:focus {
    color: var(--site-primary);
    text-decoration: underline;
}