/* New school guide cards — shared visual style */
.cutlib-school-cards,
.cutlib-school-guides--bento {
    --sg-cut-blue: #003a58;
    --sg-cut-gold: #caa350;
    --sg-sky-blue: #4fc3f7;
    --sg-white: #ffffff;
}

.sg-card {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 240px;
    height: 100%;
    padding: 22px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: #fff;
    border: 2px solid var(--sg-sky-blue);
    background: var(--sg-white);
    transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
}

.sg-card-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    transition: transform 0.55s ease;
}

.sg-card::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(to top,
        rgba(0, 58, 88, 0.95) 0%,
        rgba(0, 58, 88, 0.55) 55%,
        rgba(0, 58, 88, 0.2) 100%);
    transition: background 0.35s ease;
}

.sg-card-content {
    position: relative;
    z-index: 3;
}

.sg-card > i,
.sg-card > svg.lucide {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    color: var(--sg-cut-gold);
    opacity: 0.95;
    transition: transform 0.35s ease, filter 0.35s ease;
    pointer-events: none;
}

.sg-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.35;
    color: #fff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}

.sg-card p {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.sg-card:hover,
.sg-card:focus {
    border-color: var(--sg-cut-gold);
    box-shadow: 0 16px 32px rgba(79, 195, 247, 0.28), 0 0 0 1px var(--sg-cut-gold);
    transform: translateY(-6px);
    text-decoration: none;
    color: #fff;
}

.sg-card:hover .sg-card-img,
.sg-card:focus .sg-card-img {
    transform: scale(1.08);
}

.sg-card:hover::after,
.sg-card:focus::after {
    background: linear-gradient(to top,
        rgba(0, 58, 88, 0.98) 0%,
        rgba(0, 58, 88, 0.65) 55%,
        rgba(0, 58, 88, 0.3) 100%);
}

.sg-card:hover > i,
.sg-card:hover > svg.lucide,
.sg-card:focus > i,
.sg-card:focus > svg.lucide {
    transform: scale(1.15) rotate(8deg);
    filter: drop-shadow(0 0 10px rgba(202, 163, 80, 0.75));
}

/* Cutlib homepage — keep row3 / faculty-feat structure */
.cutlib-school-cards {
    margin-top: 40px !important;
    margin-left: 15px !important;
    margin-right: 15px !important;
    padding: 24px 18px 36px !important;
    background-color: #f3f5f8;
    clear: both;
    overflow: hidden;
}

.cutlib-school-cards .sg-section-header {
    margin-bottom: 28px;
    padding: 0 10px;
}

.cutlib-school-cards .sg-section-title,
.cutlib-school-cards .fancy-head {
    line-height: 1.4 !important;
    margin: 0 0 14px !important;
    padding: 0 !important;
    text-align: center;
}

.cutlib-school-cards .sg-section-title span,
.cutlib-school-cards .fancy-head span {
    display: inline-block;
    position: relative;
    font-size: 20px;
    padding: 0 12px;
}

.cutlib-school-cards .sg-section-intro {
    margin: 0 auto;
    max-width: 920px;
    padding: 0 12px;
    text-align: center;
    line-height: 1.65;
    color: #546e7a;
    font-size: 15px;
}

.cutlib-school-cards .sg-section-link {
    color: #24b0ed;
    white-space: nowrap;
}

.cutlib-school-cards .sg-cards-row {
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    margin-bottom: 8px;
    clear: both;
}

.cutlib-school-cards .col-md-3 {
    margin-bottom: 20px;
}

/* School guides hub — bento grid */
.cutlib-school-guides--bento {
    padding: 10px 0 30px;
}

.cutlib-school-guides--bento .school-guides-intro {
    text-align: center;
    margin: 0 15px 25px;
}

.cutlib-school-guides--bento .school-guides-intro p {
    margin: 10px 0 0;
    color: #546e7a;
}

.cutlib-school-guides--bento .sg-cards-grid {
    max-width: 1400px;
    margin: 0 auto 30px;
    width: 92%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 991px) {
    .cutlib-school-guides--bento .sg-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .sg-card {
        min-height: 220px;
    }
}

@media (max-width: 767px) {
    .cutlib-school-guides--bento .sg-cards-grid {
        grid-template-columns: 1fr;
    }

    .cutlib-school-cards {
        margin-top: 24px !important;
        margin-left: 8px !important;
        margin-right: 8px !important;
        padding: 20px 10px 28px !important;
    }

    .cutlib-school-cards .sg-section-intro {
        font-size: 14px;
        line-height: 1.55;
    }

    .cutlib-school-cards .sg-section-link {
        white-space: normal;
        display: inline-block;
        margin-top: 6px;
    }

    .cutlib-school-cards .col-md-3,
    .cutlib-school-cards .col-sm-6 {
        width: 100% !important;
        float: none !important;
        display: block !important;
    }

    .cutlib-school-cards .sg-cards-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 16px !important;
    }

    .sg-card {
        min-height: 210px;
    }

    .sg-card h3 {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .sg-card {
        min-height: 200px;
        padding: 18px;
    }

    .sg-card h3 {
        font-size: 0.9rem;
    }

    .sg-card p {
        font-size: 0.78rem;
    }
}
