/*
 * Global Life Today - Mobile-first responsive layer, category blocks, video player
 * by WP Solution (wpsolutionbd.com)
 */

/* ---------- Base safety ---------- */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: clip; }
img, video, svg { max-width: 100%; }
img { height: auto; }
iframe { max-width: 100%; }
main { min-width: 0; }
a, button { -webkit-tap-highlight-color: transparent; }

/* Article body: nothing may overflow a phone screen */
.entry-content { overflow-wrap: anywhere; }
.entry-content img, .entry-content figure, .entry-content video { max-width: 100%; height: auto; }
.entry-content iframe, .entry-content embed, .entry-content object { max-width: 100%; }
.entry-content .wp-block-embed__wrapper, .entry-content .fb-post, .entry-content .twitter-tweet { max-width: 100%; overflow-x: auto; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry-content pre { max-width: 100%; overflow-x: auto; }
.entry-content blockquote { margin-inline: 0; padding-inline: 1rem; }
@media (max-width: 639px) {
    .entry-content { font-size: 16px !important; line-height: 1.75 !important; }
    main.site-main { padding-left: 14px; padding-right: 14px; }
    h1.font-serif-headline { font-size: 1.65rem; line-height: 1.25; }
}

/* Bigger tap targets on touch screens */
@media (pointer: coarse) {
    .glt-menu > li > a { padding-block: 16px; }
    .glt-drawer-menu a { padding-block: 15px; }
    .glt-icon-btn { width: 44px; height: 44px; }
}

/* ---------- Horizontal swipe rails on phones (video / audio desks) ---------- */
@media (max-width: 639px) {
    .glt-rail {
        display: flex !important;
        gap: 14px !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin-right: -14px;
        padding-right: 14px;
        padding-bottom: 6px;
    }
    .glt-rail::-webkit-scrollbar { display: none; }
    .glt-rail > * { flex: 0 0 78%; scroll-snap-align: start; min-width: 0; }
}

/* ---------- Category blocks (one per menu item) ---------- */
.glt-cb { position: relative; padding: 28px 0 8px; border-top: 1px solid var(--glt-border, #e6e8ea); }
.glt-cb:first-of-type { border-top: 0; }
.glt-cb--empty { padding: 18px; background: #fff7e6; border: 1px dashed #d9a400; font-size: 13px; color: #6b5200; margin: 16px 0; }
.glt-cb__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--glt-dark, #141618); position: relative; }
.glt-cb__head::before { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 2px; background: var(--glt-primary); }
.glt-cb__title { margin: 0; font: 800 22px/1.2 var(--font-serif); color: var(--glt-dark, #141618); letter-spacing: -.01em; }
.glt-cb__title a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.glt-cb__title a::before { content: ""; width: 8px; height: 22px; background: var(--glt-primary); border-radius: 1px; }
.glt-cb__title a:hover { color: var(--glt-primary); }
.glt-cb__more { flex: none; font: 700 12px/1 var(--font-sans); color: var(--glt-primary); text-decoration: none; text-transform: uppercase; letter-spacing: .05em; }
.glt-cb__more:hover { text-decoration: underline; }

/* shared card bits */
.glt-card__media, .glt-lead__media, .glt-row__media { position: relative; display: block; overflow: hidden; background: #e8eaec; }
.glt-card__media, .glt-lead__media { aspect-ratio: 16 / 9; }
.glt-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.glt-card:hover .glt-card__img, .glt-lead:hover .glt-card__img { transform: scale(1.04); }
.glt-card__title, .glt-lead__title, .glt-row__title { margin: 0; font-family: var(--font-serif); color: #141618; }
.glt-card__title a, .glt-lead__title a, .glt-row__title a { color: inherit; text-decoration: none; }
.glt-card__title a:hover, .glt-lead__title a:hover, .glt-row__title a:hover { color: var(--glt-primary); }
.glt-card__title { margin-top: 10px; font-size: 17px; line-height: 1.3; font-weight: 700; }
.glt-card__excerpt { margin: 8px 0 0; font: 400 13.5px/1.55 var(--font-serif); color: #545658; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.glt-card__meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font: 500 11.5px/1.3 var(--font-sans); color: #7a7d80; }
.glt-card__meta span + span::before { content: "\00b7"; margin-right: 12px; }
.glt-card__play { position: absolute; left: 10px; bottom: 10px; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border-radius: 50%; background: var(--glt-primary); color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.glt-card__play--lg { width: 46px; height: 46px; left: 14px; bottom: 14px; }

/* layout: cards */
.glt-cb__grid { display: grid; gap: 22px 20px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .glt-cb__grid--2, .glt-cb__grid--3, .glt-cb__grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .glt-cb__grid--3 { grid-template-columns: repeat(3, 1fr); } .glt-cb__grid--4 { grid-template-columns: repeat(4, 1fr); } }

/* layout: big lead + list */
.glt-cb__lead { display: grid; gap: 22px; grid-template-columns: 1fr; }
.glt-lead__title { margin-top: 12px; font-size: 24px; line-height: 1.22; font-weight: 800; }
.glt-cb__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.glt-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--glt-border, #e6e8ea); }
.glt-row:first-child { padding-top: 0; }
.glt-row:last-child { border-bottom: 0; padding-bottom: 0; }
.glt-row__media { flex: none; width: 104px; aspect-ratio: 4 / 3; }
.glt-row__body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.glt-row__title { font-size: 15.5px; line-height: 1.3; font-weight: 700; }
@media (min-width: 900px) {
    .glt-cb__lead { grid-template-columns: 7fr 5fr; gap: 32px; }
    .glt-lead__title { font-size: 30px; }
    .glt-cb__list { padding-left: 32px; border-left: 1px solid var(--glt-border, #e6e8ea); }
    .glt-row__media { width: 120px; }
}
@media (max-width: 639px) {
    .glt-cb { padding-top: 22px; }
    .glt-cb__title { font-size: 19px; }
    .glt-lead__title { font-size: 21px; }
}

/* ---------- YouTube player (single post) ---------- */
.glt-video { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #000; overflow: hidden; border-radius: 4px; }
.glt-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.glt-video__btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: #000; cursor: pointer; display: block; }
.glt-video__thumb { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .92; transition: opacity .2s, transform .4s; }
.glt-video__btn:hover .glt-video__thumb { opacity: 1; transform: scale(1.02); }
.glt-video__play {
    position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
    width: 68px; height: 68px; border-radius: 50%; background: var(--glt-primary); color: #fff;
    display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 24px rgba(0,0,0,.45); transition: transform .2s;
}
.glt-video__play svg { margin-left: 3px; width: 30px; height: 30px; }
.glt-video__btn:hover .glt-video__play { transform: translate(-50%, -50%) scale(1.1); }
.glt-video__dur { position: absolute; right: 10px; bottom: 10px; background: rgba(0,0,0,.8); color: #fff; font: 700 12px/1 var(--font-sans); padding: 5px 7px; border-radius: 3px; }
.glt-video--blocked { display: flex; align-items: center; justify-content: center; background: #141618; }
.glt-video__btn:focus-visible { outline: 3px solid #fff; outline-offset: -6px; }
@media (max-width: 639px) { .glt-video { border-radius: 0; margin-inline: -14px; width: calc(100% + 28px); } .glt-video__play { width: 56px; height: 56px; } }

/* ---------- Homepage sections: spacing on phones ---------- */
@media (max-width: 639px) {
    .glt-section-wrapper.px-4 { padding-left: 14px; padding-right: 14px; }
    .glt-section-wrapper.py-12 { padding-top: 32px; padding-bottom: 32px; }
    .glt-section-wrapper.py-10 { padding-top: 28px; padding-bottom: 28px; }
}

/* ---------- Footer ---------- */
@media (max-width: 639px) {
    footer .glt-footer-menu { gap: 8px 16px; }
}
