/* ==========================================================================
   Services Landing — Category / Taxonomy Pages
   Grid + List views, view toggle, subcategory filters
   ========================================================================== */

/* ---------- Listing Section (legacy — kept for compat) ---------- */
.zg3-listing-section {
    margin-bottom: var(--zg3-sp-48);
}

/* ---------- View Toggle ---------- */
.zg3-view-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--zg3-sp-16);
    margin-bottom: var(--zg3-sp-32);
}

/* Right side group: sort + view toggle */
.zg3-toolbar-right {
    display: inline-flex;
    align-items: center;
    gap: var(--zg3-sp-8);
}

/* Sort select */
.zg3-sort-select {
    appearance: none;
    -webkit-appearance: none;
    background: var(--zg3-white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' viewBox='0 0 24 24'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23999' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 10px center;
    border: none;
    border-radius: var(--zg3-r-full);
    padding: 0 32px 0 14px;
    height: 48px;
    font-size: var(--zg3-fs-small);
    font-family: inherit;
    color: var(--zg3-black);
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow 0.15s;
}

.zg3-view-toggle {
    display: inline-flex;
    gap: var(--zg3-sp-4);
    background: var(--zg3-white);
    border-radius: var(--zg3-r-full);
    padding: var(--zg3-sp-4);
}

.zg3-view-toggle__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--zg3-gray);
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.zg3-view-toggle__btn:hover {
    color: var(--zg3-black);
}
.zg3-view-toggle__btn.is-active {
    background: var(--zg3-black);
    color: var(--zg3-white);
}

.zg3-view-count {
    font-size: var(--zg3-fs-small);
    color: var(--zg3-gray);
}

/* ---------- Grid View (Service Cards) ---------- */
.zg3-svc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--zg3-sp-24);
}
@media (max-width: 1023px) {
    .zg3-svc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 599px) {
    .zg3-svc-grid { grid-template-columns: repeat(2, 1fr); gap: var(--zg3-sp-12); }
}

/* Service Card — no background, all-4-rounded image */
.zg3-svc-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    background: transparent;
    border-radius: 0;
    overflow: visible;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.zg3-svc-card:hover {
    transform: translateY(-3px);
}

.zg3-svc-card__img {
    position: relative;
    aspect-ratio: 4 / 4.5;
    overflow: hidden;
    background: transparent;
    border-radius: var(--zg3-r-lg);
}
.zg3-svc-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--zg3-r-lg);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.zg3-svc-card:hover .zg3-svc-card__img img { transform: scale(1.05); }

.zg3-svc-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--zg3-gray-light);
}

.zg3-svc-card__badges {
    position: absolute;
    top: var(--zg3-sp-12);
    left: var(--zg3-sp-12);
    display: flex;
    flex-wrap: wrap;
    gap: var(--zg3-sp-4);
    z-index: 2;
}

/* Hover overlay */
.zg3-svc-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s;
    z-index: 3;
}
.zg3-svc-card:hover .zg3-svc-card__overlay { opacity: 1; }

.zg3-svc-card__cta {
    display: inline-flex;
    align-items: center;
    gap: var(--zg3-sp-8);
    background: var(--zg3-white);
    color: var(--zg3-black);
    font-size: var(--zg3-fs-small);
    font-weight: var(--zg3-fw-semibold);
    padding: var(--zg3-sp-12) var(--zg3-sp-24);
    border-radius: var(--zg3-r-full);
    transform: translateY(8px);
    transition: transform 0.35s;
}
.zg3-svc-card:hover .zg3-svc-card__cta { transform: translateY(0); }

/* Card body */
.zg3-svc-card__body {
    padding: var(--zg3-sp-12) var(--zg3-sp-4);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.zg3-svc-card__head {
    display: flex;
    align-items: baseline;
    gap: var(--zg3-sp-16);
    margin-bottom: var(--zg3-sp-6);
}

.zg3-svc-card__title {
    font-size: clamp(14px, 1.4vw, 17px);
    font-weight: var(--zg3-fw-semibold);
    line-height: 1.3;
    flex: 1;
    min-width: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.zg3-svc-card__price {
    font-size: 16px;
    font-weight: var(--zg3-fw-bold);
    color: var(--zg3-primary);
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: -0.06em;
}

.zg3-svc-card__excerpt {
    font-size: 13px;
    color: var(--zg3-gray);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.zg3-svc-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: var(--zg3-sp-4);
    margin-top: auto;
}

/* ---------- List View ---------- */
.zg3-svc-grid--list {
    grid-template-columns: 1fr !important;
    gap: 0;
}

.zg3-svc-grid--list .zg3-svc-card,
.zg3-svc-grid--list .zg3-svc-list {
    display: flex;
}

.zg3-svc-list {
    display: flex;
    align-items: center;
    gap: var(--zg3-sp-16);
    text-decoration: none;
    color: inherit;
    background: transparent;
    padding: var(--zg3-sp-12) 0;
    border-bottom: 1px solid rgba(34, 34, 34, 0.07);
    transition: background 0.15s;
    min-width: 0;
    overflow: hidden;
}
.zg3-svc-list:last-child {
    border-bottom: none;
}
.zg3-svc-list:hover {
    background: rgba(34, 34, 34, 0.025);
}

.zg3-svc-list__img {
    flex-shrink: 0;
    width: 58px;
    height: 64px;
    border-radius: var(--zg3-r-xs);
    overflow: hidden;
    background: rgba(34, 34, 34, 0.04);
}
.zg3-svc-list__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 599px) {
    .zg3-svc-list__img { width: 52px; height: 52px; }
}

.zg3-svc-list__body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
    justify-content: center;
}

.zg3-svc-list__head {
    display: flex;
    align-items: baseline;
    gap: var(--zg3-sp-12);
    justify-content: space-between;
}

.zg3-svc-list__title {
    font-size: clamp(14px, 1.3vw, 17px);
    font-weight: var(--zg3-fw-semibold);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.zg3-svc-list__price {
    font-size: 16px;
    font-weight: var(--zg3-fw-bold);
    color: var(--zg3-primary);
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: var(--zg3-sp-12);   
    letter-spacing: -0.06em;
}

.zg3-svc-list__excerpt {
    font-size: 13px;
    color: var(--zg3-gray);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.zg3-svc-list__meta { display: none; }

/* ---------- Transitions for view switch ---------- */
.zg3-svc-grid.is-switching {
    opacity: 0;
    transform: translateY(8px);
}
.zg3-svc-grid {
    transition: opacity 0.25s, transform 0.25s;
}

/* Hide card-specific elements in list mode */
.zg3-svc-grid--list .zg3-svc-card { display: none; }
.zg3-svc-grid:not(.zg3-svc-grid--list) .zg3-svc-list { display: none; }

/* ---------- Program gallery (single page) ---------- */
.zg3-program-gallery {
    border-radius: 0;
    overflow: visible;
    margin-bottom: var(--zg3-sp-48);
}
.zg3-program-gallery .swiper-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 480px;
}
.zg3-program-gallery .swiper-slide img {
    width: 100%;
    max-height: 480px;
    object-fit: contain;
    border-radius: 12px;
}
@media (max-width: 767px) {
    .zg3-program-gallery .swiper-slide { max-height: 320px; }
    .zg3-program-gallery .swiper-slide img { max-height: 320px; border-radius: 8px; }
}
.zg3-program-gallery .swiper-pagination-bullet {
    background: var(--zg3-gray);
    opacity: 0.4;
}
.zg3-program-gallery .swiper-pagination-bullet-active {
    opacity: 1;
    background: var(--zg3-primary);
}
.zg3-program-gallery .swiper-button-prev,
.zg3-program-gallery .swiper-button-next {
    --swiper-navigation-color: var(--zg3-white);
    width: 44px;
    height: 44px;
    background: var(--zg3-primary);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    transition: background 0.2s, transform 0.2s;
}
.zg3-program-gallery .swiper-button-prev:hover,
.zg3-program-gallery .swiper-button-next:hover {
    background: #d42e13;
    transform: translateY(-50%) scale(1.08);
}
.zg3-program-gallery .swiper-button-prev::after,
.zg3-program-gallery .swiper-button-next::after {
    font-size: 13px;
    font-weight: 900;
}

/* ---------- Schema.org breadcrumbs structured data badge ---------- */
.zg3-seo-only { display: none !important; }

/* ---------- Section quick-nav tabs (Programs / Services) ---------- */
.zg3-section-tab {
    display: inline-flex;
    align-items: center;
    gap: var(--zg3-sp-8);
    font-size: var(--zg3-fs-body);
    font-weight: var(--zg3-fw-semibold);
    padding: var(--zg3-sp-12) var(--zg3-sp-24);
    border-radius: var(--zg3-r-full);
    border: 2px solid rgba(34, 34, 34, 0.1);
    color: var(--zg3-gray);
    text-decoration: none;
    transition: all 0.2s;
}
.zg3-section-tab:hover {
    border-color: var(--zg3-black);
    color: var(--zg3-black);
}
.zg3-section-tab.is-active {
    background: var(--zg3-black);
    border-color: var(--zg3-black);
    color: var(--zg3-white);
}
.zg3-section-tab__count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 6px;
    border-radius: var(--zg3-r-full);
    background: rgba(255,255,255,0.2);
    font-size: var(--zg3-fs-micro);
    font-weight: var(--zg3-fw-bold);
}
.zg3-section-tab.is-active .zg3-section-tab__count {
    background: rgba(255,255,255,0.25);
}

/* Card placeholder (no image) */
.zg3-svc-card__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(34, 34, 34, 0.04);
    border-radius: var(--zg3-r-lg);
    color: var(--zg3-gray-light);
}

/* ---------- Scroll hint indicator ---------- */
.zg3-listing-filters__wrapper {
    position: relative;
}
.zg3-filters-scroll-hint {
    display: none;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--zg3-white);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    color: var(--zg3-gray);
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.3s;
    pointer-events: none;
}
.zg3-listing-filters__wrapper.has-overflow .zg3-filters-scroll-hint {
    display: flex;
}
.zg3-listing-filters__wrapper.is-at-end .zg3-filters-scroll-hint {
    opacity: 0;
    pointer-events: none;
}
/* Fade gradient on right side */
.zg3-listing-filters__wrapper.has-overflow:not(.is-at-end)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 64px;
    background: linear-gradient(to right, transparent, var(--zg3-bg));
    pointer-events: none;
    z-index: 4;
}

/* ---------- Single program: meta strip ---------- */
.zg3-program-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--zg3-sp-8);
    margin-bottom: var(--zg3-sp-32);
    padding: var(--zg3-sp-12) 0;
}
.zg3-program-meta__price {
    display: flex;
    align-items: baseline;
    gap: var(--zg3-sp-4);
    font-size: var(--zg3-fs-h4);
    font-weight: var(--zg3-fw-bold);
    color: var(--zg3-primary);
    margin-right: var(--zg3-sp-8);
}
.zg3-program-meta__label {
    font-size: var(--zg3-fs-small);
    font-weight: var(--zg3-fw-medium);
    color: var(--zg3-gray);
}
.zg3-program-meta__chip {
    display: inline-flex;
    align-items: center;
    gap: var(--zg3-sp-4);
    font-size: var(--zg3-fs-small);
    color: var(--zg3-gray);
    background: rgba(34,34,34,0.05);
    padding: 4px 12px;
    border-radius: var(--zg3-r-full);
    white-space: nowrap;
}
@media (max-width: 599px) {
    .zg3-program-meta { gap: var(--zg3-sp-6); }
    .zg3-program-meta .zg3-btn { width: 100%; justify-content: center; margin-left: 0 !important; }
}

/* ---------- Single program: thumbnail ---------- */
.zg3-program-thumb {
    border-radius: var(--zg3-r-lg);
    overflow: hidden;
}
.zg3-program-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

/* ---------- Single program: price block ---------- */
.zg3-program-price-block {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--zg3-sp-20);
    padding: var(--zg3-sp-20) var(--zg3-sp-24);
    background: var(--zg3-bg);
    border-radius: var(--zg3-r-lg);
    margin-bottom: var(--zg3-sp-48);
    background: var(--zg3-white)
}
.zg3-program-price-block__amount {
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.zg3-program-price-block__heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--zg3-primary);
}
.zg3-program-price-block__price {
    display: flex;
    align-items: baseline;
    gap: 5px;
}
.zg3-program-price-block__from {
    font-size: 13px;
    font-weight: 500;
    color: var(--zg3-gray);
}
.zg3-program-price-block__price strong {
    font-size: clamp(20px, 2vw, 28px);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
    color: var(--zg3-black);
}
@media (max-width: 599px) {
    .zg3-program-price-block { padding: var(--zg3-sp-16) var(--zg3-sp-20); }
    .zg3-program-price-block .zg3-btn { width: 100%; justify-content: center; }
}

/* ---------- Single program: CTA block ---------- */
.zg3-program-cta {
    padding: var(--zg3-sp-32);
    background: var(--zg3-secondary);
    border-radius: var(--zg3-r-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--zg3-sp-24);
    align-items: center;
    justify-content: space-between;
}
.zg3-program-cta--rental {
    background: var(--zg3-black);
}
.zg3-program-cta__text h3 {
    color: var(--zg3-white);
    margin-bottom: var(--zg3-sp-4);
}
.zg3-program-cta__text p {
    color: rgba(255,255,255,0.7);
    font-size: var(--zg3-fs-small);
    line-height: 1.5;
    max-width: 300px;
}

/* ---------- Prose h2/h3 margins on program pages ---------- */
.zg3-listing-body .zg3-prose h2 {
    font-size: clamp(20px, 2.5vw, 28px);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin-top: var(--zg3-sp-48);
    margin-bottom: var(--zg3-sp-20);
    color: var(--zg3-black);
}
.zg3-listing-body .zg3-prose h3 {
    font-size: clamp(16px, 1.8vw, 22px);
    font-weight: 600;
    line-height: 1.3;
    margin-top: var(--zg3-sp-32);
    margin-bottom: var(--zg3-sp-16);
}
.zg3-listing-body .zg3-prose > :first-child { margin-top: 0; }
.zg3-listing-body .zg3-prose p { margin-bottom: var(--zg3-sp-16); }
.zg3-listing-body .zg3-prose ul {
    list-style: none;
    padding-left: 0;
    margin: var(--zg3-sp-16) 0;
}
.zg3-listing-body .zg3-prose ul li {
    padding-left: var(--zg3-sp-24);
    position: relative;
    margin-bottom: var(--zg3-sp-8);
    color: var(--zg3-black);
}
.zg3-listing-body .zg3-prose ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--zg3-primary);
    font-weight: 700;
}


/* ---------- SEO Text Section (bottom of category pages) ---------- */
.zg3-seo-text {
    padding: var(--zg3-sp-64) 0 var(--zg3-sp-48);
    background: var(--zg3-bg);
    border-top: 1px solid var(--zg3-border);
}

.zg3-seo-text__body {
    max-width: 860px;
    color: var(--zg3-gray-dark);
    font-size: var(--zg3-fs-small);
    line-height: 1.8;
}

.zg3-seo-text__body h2 {
    font-size: var(--zg3-fs-h3);
    color: var(--zg3-black);
    margin: var(--zg3-sp-32) 0 var(--zg3-sp-16);
}
.zg3-seo-text__body h2:first-child { margin-top: 0; }

.zg3-seo-text__body h3 {
    font-size: var(--zg3-fs-body);
    font-weight: 600;
    color: var(--zg3-black);
    margin: var(--zg3-sp-24) 0 var(--zg3-sp-12);
}

.zg3-seo-text__body p {
    margin-bottom: var(--zg3-sp-16);
}

.zg3-seo-text__body ul {
    padding-left: var(--zg3-sp-20);
    margin-bottom: var(--zg3-sp-16);
}
.zg3-seo-text__body ul li {
    list-style: disc;
    margin-bottom: var(--zg3-sp-8);
}

.zg3-seo-text__body a {
    color: var(--zg3-primary);
    text-decoration: underline;
}
.zg3-seo-text__body a:hover { text-decoration: none; }
