/*
Theme Name: Poltekkes Gizi 2026
Theme URI: https://gizi.poltekkesternate.ac.id/
Description: Child theme Jurusan Gizi Poltekkes Kemenkes Ternate.
Author: Team IT Poltekkes Ternate
Template: poltekkes-unit-2026
Version: 1.0.0
Text Domain: poltekkes-unit-2026-gizi
*/

/* Penyesuaian desain khusus Jurusan Gizi ditambahkan bertahap. */

/* GIZI_CHILD_PATCH_V1_START */
.gizi-site-footer .gizi-footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.gizi-site-footer .gizi-footer-links li {
    margin-bottom: 0.5rem;
}

.gizi-site-footer .gizi-footer-links a {
    color: inherit;
    text-decoration: none;
}

.gizi-site-footer .gizi-footer-links a:hover,
.gizi-site-footer .gizi-footer-links a:focus-visible {
    text-decoration: underline;
}

/* Submenu tingkat ketiga untuk navigasi desktop. */
@media (min-width: 992px) {
    .labt-primary-nav .sub-menu li {
        position: relative;
    }

    .labt-primary-nav .sub-menu .sub-menu {
        position: absolute;
        top: 0;
        left: 100%;
        z-index: 100;
        display: none;
    }

    .labt-primary-nav .sub-menu li:hover > .sub-menu,
    .labt-primary-nav .sub-menu li:focus-within > .sub-menu {
        display: block;
    }
}
/* GIZI_CHILD_PATCH_V1_END */

/* === GIZI_NAV_RESPONSIVE_V2_START ===
   Override navigation conflicts inherited from the
   generic master theme, without changing the parent.
*/

/* Desktop navigation: three-level submenu */
@media (min-width: 1081px) {
    .labt-primary-nav .labt-menu li {
        position: relative;
    }

    .labt-primary-nav .labt-menu .sub-menu .sub-menu {
        position: absolute;
        top: 0;
        left: 100%;
        margin: 0;
        display: none;
        z-index: 1000;
    }

    .labt-primary-nav .labt-menu .sub-menu li:hover > .sub-menu,
    .labt-primary-nav .labt-menu .sub-menu li:focus-within > .sub-menu {
        display: block;
    }

    .labt-primary-nav .labt-menu li:focus-within > .sub-menu {
        display: block;
    }
}

/* Tablet and mobile navigation */
@media (max-width: 1080px) {
    .labt-site-header .labt-menu-toggle {
        display: block !important;
        margin-left: auto;
        flex-shrink: 0;
    }

    .labt-site-header #labt-primary-nav {
        display: none !important;
        position: absolute;
        top: 100%;
        left: 14px;
        right: 14px;
        width: auto;
        max-height: 75vh;
        overflow-x: hidden;
        overflow-y: auto;
        z-index: 1000;
        margin-left: 0 !important;
        flex: none !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .labt-site-header #labt-primary-nav.is-open {
        display: block !important;
    }

    .labt-site-header #labt-primary-nav .labt-menu {
        display: block !important;
    }

    .labt-site-header #labt-primary-nav .labt-menu li {
        display: block;
        width: 100%;
    }

    .labt-site-header #labt-primary-nav .labt-menu .sub-menu,
    .labt-site-header #labt-primary-nav .labt-menu .sub-menu .sub-menu {
        position: static !important;
        display: block !important;
        width: auto;
        margin-left: 12px;
        padding-left: 8px;
        border: 0;
        box-shadow: none;
        background: transparent;
    }

    .labt-site-header #labt-primary-nav a {
        white-space: normal;
        overflow-wrap: anywhere;
    }
}
/* === GIZI_NAV_RESPONSIVE_V2_END === */

/* GIZI_SUBMENU_HOVER_GAP_FIX_V1_START */
/* Desktop only: remove pointer gap below top-level menu. */
@media (min-width: 1081px) {
    .labt-primary-nav .labt-menu > li {
        position: relative;
    }

    .labt-primary-nav .labt-menu > li > .sub-menu {
        top: calc(100% - 1px);
        margin-top: 0;
    }

    .labt-primary-nav .labt-menu li:hover > .sub-menu,
    .labt-primary-nav .labt-menu li:focus-within > .sub-menu {
        display: block;
    }

    .labt-primary-nav .labt-menu .sub-menu li > .sub-menu {
        top: 0;
        left: 100%;
        margin: 0;
    }
}
/* GIZI_SUBMENU_HOVER_GAP_FIX_V1_END */

/* GIZI_SUBMENU_HOVER_BRIDGE_V2_START */
@media (min-width: 1081px) {

    /* Stabilize the first dropdown boundary. */
    .labt-primary-nav .labt-menu > li > .sub-menu {
        top: 100%;
        margin-top: 0;
    }

    /* Expand the hoverable region around nested dropdowns. */
    .labt-primary-nav .labt-menu .sub-menu li {
        position: relative;
    }

    .labt-primary-nav .labt-menu .sub-menu li > .sub-menu {
        top: 0;
        left: calc(100% - 2px);
        margin: 0;
    }

    /* Transparent bridge for diagonal cursor movement. */
    .labt-primary-nav .labt-menu .sub-menu li > .sub-menu::before {
        content: "";
        position: absolute;
        top: 0;
        right: 100%;
        width: 12px;
        height: 100%;
        background: transparent;
    }

    .labt-primary-nav .labt-menu li:hover > .sub-menu,
    .labt-primary-nav .labt-menu li:focus-within > .sub-menu {
        display: block;
    }
}
/* GIZI_SUBMENU_HOVER_BRIDGE_V2_END */

/* GIZI_SUBMENU_POSITION_V3_START */
@media (min-width: 1081px) {
    /* Overlap parent menu slightly to eliminate hover gap. */
    .labt-primary-nav .labt-menu > li > .sub-menu {
        top: calc(100% - 6px);
        margin-top: 0;
    }

    /* Keep nested dropdowns connected to their parent. */
    .labt-primary-nav .labt-menu .sub-menu li > .sub-menu {
        top: 0;
        left: calc(100% - 6px);
        margin: 0;
    }

    .labt-primary-nav .labt-menu li:hover > .sub-menu,
    .labt-primary-nav .labt-menu li:focus-within > .sub-menu {
        display: block;
    }
}
/* GIZI_SUBMENU_POSITION_V3_END */

/* GIZI_NEWS_HOME_V1_START */
.gizi-news-home {
    padding: 64px 0;
    background: #f6f9f9;
}
.gizi-news-heading {
    margin-bottom: 28px;
}
.gizi-news-heading h2 {
    font-size: clamp(24px, 3vw, 34px);
    margin-bottom: 10px;
    color: #12383b;
}
.gizi-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.gizi-news-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,.07);
}
.gizi-news-image {
    display: flex;
    aspect-ratio: 16 / 10;
    background: #e1eeee;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.gizi-news-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gizi-news-placeholder {
    color: #12645f;
    font-weight: 600;
}
.gizi-news-body {
    padding: 22px;
}
.gizi-news-body time {
    font-size: 13px;
    color: #66777b;
}
.gizi-news-body h3 {
    margin: 10px 0;
    font-size: 19px;
}
.gizi-news-body h3 a {
    color: #173c40;
    text-decoration: none;
}
.gizi-news-body p {
    line-height: 1.7;
}
.gizi-news-readmore {
    display: inline-block;
    margin-top: 10px;
    color: #08766f;
    font-weight: 600;
}
.gizi-news-empty {
    padding: 30px;
    background: #fff;
    border-radius: 10px;
}
@media (max-width: 991px) {
    .gizi-news-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }
}
@media (max-width: 600px) {
    .gizi-news-home { padding: 40px 0; }
    .gizi-news-grid { grid-template-columns: 1fr; }
}
/* GIZI_NEWS_HOME_V1_END */


/* GIZI_SLIDER_RESIZE_V2B_START */
.gizi-slider-frame {
    width: calc(100% - 32px);
    max-width: 1100px;
    margin: 20px auto 32px;
    overflow: hidden;
    border-radius: 12px;
}

@media (max-width: 600px) {
    .gizi-slider-frame {
        width: calc(100% - 20px);
        margin: 12px auto 20px;
        border-radius: 8px;
    }
}
/* GIZI_SLIDER_RESIZE_V2B_END */
/* GIZI_SLIDER_CONTAIN_V4_START */
.gizi-slider-frame {
    width: calc(100% - 32px);
    max-width: 980px;
    margin: 24px auto 32px;
    overflow: hidden;
    border-radius: 12px;
}

.gizi-slider-frame .n2-section-smartslider,
.gizi-slider-frame .n2-ss-align,
.gizi-slider-frame [id^="n2-ss-"][id$="-align"],
.gizi-slider-frame .n2-ss-slider,
.gizi-slider-frame .n2-ss-slider-outer-container,
.gizi-slider-frame .n2-ss-slider-outer-container > div {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    left: auto !important;
    right: auto !important;
    transform: none !important;
}

.gizi-slider-frame .n2-section-smartslider,
.gizi-slider-frame .n2-ss-slider,
.gizi-slider-frame .n2-ss-slider-outer-container {
    overflow: hidden !important;
}

.gizi-slider-frame [class*="slide-background"] {
    background-size: contain !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.gizi-slider-frame [class*="slide-background"] img,
.gizi-slider-frame picture img,
.gizi-slider-frame .n2-ss-slide-background-image img {
    object-fit: contain !important;
    object-position: center center !important;
}

@media (max-width: 600px) {
    .gizi-slider-frame {
        width: calc(100% - 20px);
        max-width: 100%;
        margin: 12px auto 20px;
        border-radius: 8px;
    }
}
/* GIZI_SLIDER_CONTAIN_V4_END */


/* GIZI_PHOTO_HERO_V2_START */
.gizi-photo-hero {
    position: relative;
    width: calc(100% - 32px);
    max-width: 900px;
    aspect-ratio: 3 / 2;
    margin: 24px auto 32px;
    overflow: hidden;
    border-radius: 12px;
    background: #f2f6f8;
}

.gizi-photo-hero img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 44%;
}

.gizi-photo-hero-first {
    position: relative;
    height: 100%;
    animation: gizi-photo-first 14s infinite;
}

.gizi-photo-hero .gizi-photo-hero-second {
    position: absolute;
    inset: 0;
    height: 100%;
    animation: gizi-photo-second 14s infinite;
}

@keyframes gizi-photo-first {
    0%, 43% { opacity: 1; }
    50%, 93% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes gizi-photo-second {
    0%, 43% { opacity: 0; }
    50%, 93% { opacity: 1; }
    100% { opacity: 0; }
}

@media (max-width: 600px) {
    .gizi-photo-hero {
        width: calc(100% - 20px);
        max-width: none;
        aspect-ratio: 4 / 3;
        margin: 12px auto 20px;
        border-radius: 8px;
    }

    .gizi-photo-hero img {
        object-position: center 42%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gizi-photo-hero-first { animation: none; }
    .gizi-photo-hero .gizi-photo-hero-second {
        display: none;
        animation: none;
    }
}
/* GIZI_PHOTO_HERO_V1_END */

/* GIZI_NEWS_ARCHIVE_V1_START */
.gizi-news-archive-link {
    margin: 30px 0 8px;
    text-align: center;
}
.gizi-news-archive-link a {
    display: inline-block;
    padding: 12px 24px;
    background: #006e63;
    color: #fff;
    border-radius: 8px;
    font-weight: 700;
    text-decoration: none;
}
.gizi-news-archive-link a:hover,
.gizi-news-archive-link a:focus-visible {
    background: #004f48;
    color: #fff;
}
.gizi-news-archive {
    padding: 48px 0 70px;
    background: #f6f9f9;
}
.gizi-news-archive-heading {
    margin-bottom: 28px;
}
.gizi-news-archive-heading h1 {
    margin: 0 0 12px;
    color: #063e46;
}
.gizi-news-archive-heading p {
    margin: 0;
}
.gizi-news-archive-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}
.gizi-archive-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 22px rgba(0,0,0,.055);
}
.gizi-archive-card-image {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.gizi-archive-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.gizi-archive-card-body {
    padding: 22px;
}
.gizi-archive-card-body time {
    display: block;
    color: #617887;
    font-size: .85rem;
}
.gizi-archive-card-body h2 {
    margin: 12px 0;
    font-size: 1.2rem;
    line-height: 1.45;
}
.gizi-archive-card-body h2 a {
    color: #083e48;
    text-decoration: none;
}
.gizi-archive-card-body p {
    line-height: 1.65;
}
.gizi-archive-read-more {
    display: inline-block;
    margin-top: 12px;
    font-weight: 700;
    color: #006e63;
}
.gizi-news-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
}
.gizi-news-pagination a,
.gizi-news-pagination span {
    display: inline-block;
    padding: 9px 15px;
    border-radius: 7px;
    border: 1px solid #c9d7d6;
    text-decoration: none;
}
.gizi-news-pagination .current {
    background: #006e63;
    color: #fff;
}
@media (max-width: 900px) {
    .gizi-news-archive-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 600px) {
    .gizi-news-archive {
        padding: 28px 0 45px;
    }
    .gizi-news-archive-grid {
        grid-template-columns: 1fr;
    }
}
/* GIZI_NEWS_ARCHIVE_V1_END */

/* GIZI_HEADER_LOGO_V1_START */
.labt-custom-logo .custom-logo,
.labt-custom-logo img {
    display: block !important;
    width: 112px !important;
    max-width: 112px !important;
    height: auto !important;
    max-height: 64px !important;
    object-fit: contain !important;
}

@media (max-width: 767px) {
    .labt-custom-logo .custom-logo,
    .labt-custom-logo img {
        width: 90px !important;
        max-width: 90px !important;
        max-height: 54px !important;
    }
}
/* GIZI_HEADER_LOGO_V1_END */

/* GIZI_FOOTER_CONTACT_V1_CSS */
.gizi-institution-contact {
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin: 12px 0;
    font-style: normal;
    line-height: 1.6;
    overflow-wrap: anywhere;
}
.gizi-institution-contact a {
    color: inherit;
    text-decoration: none;
}
.gizi-institution-contact a:hover,
.gizi-institution-contact a:focus-visible {
    text-decoration: underline;
}

/* GIZI_JURUSAN_LOCATION_V1_START */
.gizi-jurusan-location {
    margin: 10px 0 0;
    line-height: 1.7;
    color: inherit;
}
/* GIZI_JURUSAN_LOCATION_V1_END */

/* GIZI_FOOTER_THREE_COL_V3_START */
.gizi-site-footer .labt-footer-grid {
    grid-template-columns: 1.35fr 1fr 1.1fr !important;
    gap: 36px;
}

.gizi-jurusan-address {
    display: block;
    margin: 14px 0;
    font-style: normal;
    font-size: inherit;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.gizi-jurusan-address strong {
    font-weight: 600;
}

@media (max-width: 900px) {
    .gizi-site-footer .labt-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .gizi-site-footer .labt-footer-grid {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 28px;
    }
}
/* GIZI_FOOTER_THREE_COL_V3_END */