/* ==========================================================
   SP37 SZCZECIN
   Kompletny styl strony głównej
   Cassiopeia / Joomla
   ========================================================== */


/* ==========================================================
   1. LEWA KOLUMNA – MODUŁY
   E-plan, Librus, Aplikacja Librus, Kronika itd.
   ========================================================== */

.container-sidebar-left > .sidebar-left {
    flex: 0 0 auto !important;
    height: auto !important;
    min-height: 0 !important;
    align-self: start !important;
}

.sidebar-left.sp37-kafelek {
    display: block !important;

    background: #f3f7fb !important;
    border: 1px solid #cbd9e8 !important;
    border-radius: 18px !important;

    padding: 10px !important;
    margin-bottom: 14px !important;

    height: auto !important;
    min-height: 0 !important;

    overflow: hidden;
    text-align: center;

    box-shadow: 0 5px 16px rgba(17, 62, 105, 0.10) !important;

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

.sidebar-left.sp37-kafelek:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(17, 62, 105, 0.16) !important;
}

.sidebar-left.sp37-kafelek > .card-body,
.sidebar-left.sp37-kafelek .card-body,
.sidebar-left.sp37-kafelek .mod-custom {
    display: block !important;

    flex: none !important;

    height: auto !important;
    min-height: 0 !important;

    padding: 0 !important;
    margin: 0 !important;
}

.sidebar-left.sp37-kafelek p {
    margin: 0 !important;
    padding: 0 !important;
}

.sidebar-left.sp37-kafelek img {
    display: block;

    width: 100%;
    max-width: 100%;
    height: auto;

    margin: 0 auto;

    border-radius: 12px;
}

.sidebar-left.sp37-kafelek a {
    color: #15548a;
    font-weight: 600;
    text-decoration: none;
}

.sidebar-left.sp37-kafelek a:hover {
    color: #0b3f70;
    text-decoration: underline;
}


/* ==========================================================
   2. STRONA GŁÓWNA – KARTY AKTUALNOŚCI
   ========================================================== */

/*
   Nie zmieniamy tutaj mechanizmu .masonry-2.
   Pozostawiamy układ kolumn Cassiopei.
*/

body.itemid-131 .blog-featured .blog-item {
    display: block !important;

    width: 100% !important;

    height: auto !important;
    min-height: 0 !important;

    background: #ffffff !important;

    border: 1px solid #dce5ef !important;
    border-radius: 18px !important;

    padding: 18px !important;
    margin-bottom: 18px !important;

    box-shadow: 0 6px 20px rgba(20, 55, 90, 0.09) !important;

    overflow: hidden;

    break-inside: avoid !important;
    page-break-inside: avoid !important;
    -webkit-column-break-inside: avoid !important;
}


/* ==========================================================
   3. ZAWARTOŚĆ KART
   ========================================================== */

body.itemid-131 .blog-featured .blog-item .item-content {
    display: block !important;

    height: auto !important;
    min-height: 0 !important;

    margin: 0 !important;
}


/* ==========================================================
   4. ZDJĘCIA – NATURALNE PROPORCJE, BEZ PRZYCINANIA
   ========================================================== */

body.itemid-131 .blog-featured .blog-item figure.item-image {
    display: block !important;

    width: 100% !important;

    height: auto !important;
    max-height: none !important;

    aspect-ratio: auto !important;

    margin: 0 0 16px 0 !important;

    overflow: visible !important;

    background: transparent !important;

    border-radius: 14px !important;
}

body.itemid-131 .blog-featured .blog-item figure.item-image img {
    display: block !important;

    width: 100% !important;
    max-width: 100% !important;

    height: auto !important;
    max-height: none !important;

    object-fit: contain !important;
    object-position: center center !important;

    margin: 0 auto !important;

    border-radius: 12px !important;
}


/* ==========================================================
   5. TYTUŁY AKTUALNOŚCI
   ========================================================== */

body.itemid-131 .blog-featured .blog-item h2,
body.itemid-131 .blog-featured .blog-item .item-title {
    font-size: clamp(1.35rem, 1.8vw, 1.9rem) !important;
    line-height: 1.2 !important;

    margin-top: 10px !important;
    margin-bottom: 10px !important;
}

body.itemid-131 .blog-featured .blog-item h2 a,
body.itemid-131 .blog-featured .blog-item .item-title a {
    color: #174f87 !important;
    text-decoration: none !important;
}

body.itemid-131 .blog-featured .blog-item h2 a:hover,
body.itemid-131 .blog-featured .blog-item .item-title a:hover {
    color: #0c3964 !important;
    text-decoration: underline !important;
}


/* ==========================================================
   6. AUTOR, DATA, ODSŁONY
   ========================================================== */

body.itemid-131 .blog-featured .article-info {
    color: #64748b !important;

    font-size: 0.92rem !important;
    line-height: 1.45 !important;

    margin-top: 6px !important;
    margin-bottom: 8px !important;
}

body.itemid-131 .blog-featured .article-info dd {
    margin-bottom: 3px !important;
}


/* ==========================================================
   7. TAG „Z ŻYCIA SZKOŁY”
   ========================================================== */

body.itemid-131 .blog-featured ul.tags {
    display: block !important;

    margin: 8px 0 5px 0 !important;
    padding: 0 !important;
}

body.itemid-131 .blog-featured ul.tags li {
    margin: 0 !important;
    padding: 0 !important;
}

body.itemid-131 .blog-featured ul.tags li a.btn {
    display: inline-block !important;

    background: #edf4fb !important;
    color: #174f87 !important;

    border: 1px solid #d4e2f0 !important;
    border-radius: 20px !important;

    padding: 4px 10px !important;

    font-size: 0.78rem !important;
    line-height: 1.2 !important;
    font-weight: 600 !important;

    box-shadow: none !important;

    transform: none !important;

    text-decoration: none !important;
}

body.itemid-131 .blog-featured ul.tags li a.btn:hover {
    background: #e2eef9 !important;
    color: #0c3964 !important;
}


/* ==========================================================
   8. CZYTAJ WIĘCEJ
   ========================================================== */

body.itemid-131 .blog-featured .readmore {
    display: block !important;

    margin: 7px 0 0 0 !important;
    padding: 0 !important;
}

body.itemid-131 .blog-featured .readmore a {
    display: inline-flex !important;

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

    width: auto !important;
    min-width: 0 !important;

    background: #174f87 !important;
    color: #ffffff !important;

    border: none !important;
    border-radius: 10px !important;

    padding: 9px 16px !important;

    font-size: 0 !important;
    line-height: 1 !important;
    font-weight: 600 !important;

    text-decoration: none !important;

    box-shadow: none !important;

    transition:
        background 0.2s ease,
        transform 0.2s ease;
}

body.itemid-131 .blog-featured .readmore a::before {
    content: "Czytaj więcej";

    color: #ffffff;

    font-size: 0.92rem;
    line-height: 1.2;
    font-weight: 600;
}

body.itemid-131 .blog-featured .readmore a:hover {
    background: #0c3964 !important;
    transform: translateY(-1px);
}


/* ==========================================================
   9. TELEFON
   ========================================================== */

@media (max-width: 767.98px) {

    /*
       Na telefonie zawsze jedna kolumna.
    */

    body.itemid-131 .blog-featured .blog-items.masonry-2 {
        column-count: 1 !important;
        column-gap: 0 !important;
    }

    body.itemid-131 .blog-featured .blog-item {
        display: block !important;

        width: 100% !important;

        height: auto !important;
        min-height: 0 !important;

        padding: 16px !important;
        margin-bottom: 20px !important;

        border-radius: 16px !important;
    }

    body.itemid-131 .blog-featured .blog-item .item-content {
        display: block !important;

        height: auto !important;
        min-height: 0 !important;
    }

    body.itemid-131 .blog-featured .blog-item figure.item-image {
        margin-bottom: 14px !important;
    }

    body.itemid-131 .blog-featured .blog-item h2,
    body.itemid-131 .blog-featured .blog-item .item-title {
        font-size: 1.55rem !important;
        line-height: 1.2 !important;

        margin-top: 12px !important;
        margin-bottom: 10px !important;
    }

    body.itemid-131 .blog-featured .article-info {
        font-size: 0.93rem !important;
    }

    body.itemid-131 .blog-featured .readmore {
        margin-top: 8px !important;
        margin-bottom: 0 !important;
    }

    /*
       Bardziej zwarte kafelki boczne na telefonie.
    */

    .sidebar-left.sp37-kafelek {
        padding: 10px !important;
        margin-bottom: 14px !important;

        border-radius: 16px !important;

        box-shadow: 0 4px 14px rgba(17, 62, 105, 0.09) !important;
    }
}
/* =========================================================
   SP37 – ZEGAR SZKOLNY PREMIUM 2
   ========================================================= */

#sp37-school-clock {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    overflow: hidden;

    padding: 18px 16px 16px;

    background:
        radial-gradient(circle at 90% 12%,
            rgba(255,255,255,.18) 0 55px,
            transparent 56px),
        radial-gradient(circle at 8% 95%,
            rgba(255,255,255,.08) 0 70px,
            transparent 71px),
        linear-gradient(145deg,
            #073b68 0%,
            #0d5b99 48%,
            #1682c4 100%);

    border: 1px solid rgba(255,255,255,.22);
    border-radius: 22px;

    color: #ffffff;
    text-align: center;

    box-shadow:
        0 12px 30px rgba(8, 45, 79, .24),
        inset 0 1px 0 rgba(255,255,255,.16);

    font-family: inherit;
}

/* subtelny napis w tle */
#sp37-school-clock::after {
    content: "SP37";
    position: absolute;
    right: -4px;
    bottom: -20px;

    font-size: 5.3rem;
    font-weight: 900;
    line-height: 1;

    color: rgba(255,255,255,.055);

    pointer-events: none;
    transform: rotate(-7deg);
}

#sp37-school-clock > * {
    position: relative;
    z-index: 2;
}


/* =========================================================
   NAGŁÓWEK
   ========================================================= */

#sp37-school-clock .sp37-clock-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 8px 13px;
    margin-bottom: 14px;

    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.20);
    border-radius: 999px;

    color: #ffffff;

    font-size: .90rem;
    font-weight: 700;
    line-height: 1.2;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.12),
        0 4px 12px rgba(0,0,0,.08);

    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

#sp37-school-clock .sp37-clock-label::before {
    content: "🔔";
    font-size: 1.05rem;
}


/* =========================================================
   GODZINA
   ========================================================= */

#sp37-school-clock .sp37-clock-time {
    margin: 2px 0 14px;

    color: #ffffff;

    font-size: clamp(2.15rem, 4vw, 2.85rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: 1px;

    text-shadow:
        0 3px 10px rgba(0,0,0,.20);
}


/* =========================================================
   STATUS: TRWA LEKCJA / PRZERWA
   ========================================================= */

#sp37-school-clock .sp37-clock-status {
    display: inline-block;

    margin-bottom: 13px;
    padding: 7px 14px;

    background:
        linear-gradient(180deg, #ffe080 0%, #ffbd38 100%);

    border: 1px solid rgba(255,255,255,.34);
    border-radius: 999px;

    color: #103d66;

    font-size: .96rem;
    font-weight: 800;
    line-height: 1.2;

    box-shadow:
        0 5px 14px rgba(0,0,0,.14),
        inset 0 1px 0 rgba(255,255,255,.45);
}


/* =========================================================
   GODZINY LEKCJI
   ========================================================= */

#sp37-school-clock .sp37-clock-details {
    margin-bottom: 10px;
    padding: 10px 12px;

    background: rgba(255,255,255,.11);

    border: 1px solid rgba(255,255,255,.15);
    border-radius: 14px;

    color: rgba(255,255,255,.98);

    font-size: .96rem;
    font-weight: 700;
    line-height: 1.35;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.09);
}


/* =========================================================
   ODLICZANIE
   ========================================================= */

#sp37-school-clock .sp37-clock-countdown {
    position: relative;

    margin-bottom: 12px;
    padding: 11px 12px 11px 15px;

    background: rgba(3, 35, 63, .30);

    border: 1px solid rgba(255,255,255,.10);
    border-left: 4px solid #ffd25d;
    border-radius: 13px;

    color: #fff8df;

    font-size: .95rem;
    font-weight: 700;
    line-height: 1.4;

    text-align: left;

    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.05);
}


/* =========================================================
   PASEK POSTĘPU
   ========================================================= */

#sp37-school-clock .sp37-progress-wrap {
    display: block;

    width: 100%;
    height: 9px;

    overflow: hidden;

    background: rgba(255,255,255,.18);

    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;

    box-shadow:
        inset 0 2px 3px rgba(0,0,0,.10);
}

#sp37-school-clock .sp37-progress-bar {
    width: 0;
    height: 100%;

    border-radius: 999px;

    background:
        linear-gradient(
            90deg,
            #ffe17a 0%,
            #ffc13d 55%,
            #ff9d18 100%
        );

    box-shadow:
        0 0 10px rgba(255, 201, 69, .50);

    transition: width .8s linear;
}


/* =========================================================
   DELIKATNY EFEKT PO NAJECHANIU NA KOMPUTERZE
   ========================================================= */

@media (hover: hover) {

    #sp37-school-clock {
        transition:
            transform .20s ease,
            box-shadow .20s ease;
    }

    #sp37-school-clock:hover {
        transform: translateY(-2px);

        box-shadow:
            0 16px 34px rgba(8, 45, 79, .29),
            inset 0 1px 0 rgba(255,255,255,.16);
    }
}


/* =========================================================
   TELEFON
   ========================================================= */

@media (max-width: 768px) {

    #sp37-school-clock {
        padding: 17px 15px 15px;
        border-radius: 20px;
    }

    #sp37-school-clock .sp37-clock-label {
        font-size: .88rem;
    }

    #sp37-school-clock .sp37-clock-time {
        font-size: 2.35rem;
    }

    #sp37-school-clock .sp37-clock-status {
        font-size: .95rem;
    }

    #sp37-school-clock .sp37-clock-details,
    #sp37-school-clock .sp37-clock-countdown {
        font-size: .93rem;
    }
}


/* =========================================================
   BARDZO WĄSKI EKRAN
   ========================================================= */

@media (max-width: 390px) {

    #sp37-school-clock {
        padding: 15px 13px;
    }

    #sp37-school-clock .sp37-clock-time {
        font-size: 2.05rem;
    }

    #sp37-school-clock .sp37-clock-label {
        padding: 7px 10px;
    }
}