/* ============================================================
   Julyem Gemstones - Page Template "Giới thiệu"
   (template-gioi-thieu.php)
   ============================================================ */

.jl-intro-hero {
    --jl-navy:      #003462;
    --jl-navy-deep: #021c38;
    --jl-gold:      #CFA56A;
    --jl-gold-soft: #e7cfa3;
    --jl-text:      #d9e3ee;
    --jl-muted:     #aebecd;

    position: relative;
    /* Full-bleed: phá khỏi container của Flatsome */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    overflow: hidden;
    background:
        radial-gradient(120% 140% at 85% 20%, #0a4574 0%, var(--jl-navy) 38%, var(--jl-navy-deep) 100%);
    color: var(--jl-text);
}

.jl-intro-hero * { box-sizing: border-box; }

.jl-intro-hero-inner {
    position: relative;
    max-width: 100%;
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    align-items: stretch;
}

/* ---------- Ảnh bên trái ---------- */
.jl-intro-hero-media {
    position: relative;
    min-height: 360px;
    /* Ảnh tự tan dần ở mép phải để lộ nền section -> không lộ viền giáp body */
    -webkit-mask-image: linear-gradient(90deg, #000 45%, transparent 100%);
    mask-image: linear-gradient(90deg, #000 45%, transparent 100%);
}
.jl-intro-hero-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ---------- Nội dung bên phải ---------- */
.jl-intro-hero-body {
    position: relative;
    z-index: 2;
    padding: clamp(40px, 6vw, 84px) clamp(24px, 5vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.jl-intro-hero--noimg .jl-intro-hero-inner {
    grid-template-columns: 1fr;
}
.jl-intro-hero--noimg .jl-intro-hero-body {
    text-align: center;
    align-items: center;
    max-width: 820px;
    margin: 0 auto;
}

.jl-intro-eyebrow {
    margin: 0 0 14px;
    color: var(--jl-text);
    font-size: clamp(13px, 1.4vw, 16px);
    font-weight: 600;
    letter-spacing: 5px;
    text-transform: uppercase;
}

.jl-intro-title {
    margin: 0;
    color: var(--jl-gold);
    background: linear-gradient(180deg, var(--jl-gold-soft), var(--jl-gold) 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: clamp(34px, 5.2vw, 62px);
    font-weight: 700;
    letter-spacing: 4px;
    line-height: 1.1;
    text-transform: uppercase;
}

.jl-intro-tagline {
    margin: 16px 0 26px;
    color: var(--jl-gold-soft);
    font-size: clamp(19px, 2.6vw, 30px);
    font-style: italic;
    font-weight: 500;
    letter-spacing: .5px;
    line-height: 1.3;
}

.jl-intro-desc {
    color: var(--jl-text);
    font-size: clamp(15px, 1.6vw, 18px);
    line-height: 1.9;
    max-width: 560px;
}
.jl-intro-hero--noimg .jl-intro-desc { max-width: 640px; }

/* ---------- Hoạ tiết tinh thể ---------- */
.jl-intro-crystal {
    position: absolute;
    right: clamp(8px, 3vw, 48px);
    bottom: -10px;
    width: clamp(90px, 12vw, 160px);
    color: rgba(207, 165, 106, .28);
    z-index: 1;
    pointer-events: none;
}
.jl-intro-crystal svg { width: 100%; height: auto; display: block; }

/* ---------- Nội dung dưới hero ---------- */
.jl-intro-content {
    padding: clamp(40px, 6vw, 72px) 0;
}
.jl-intro-content-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 24px;
    color: #333;
    line-height: 1.85;
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
    .jl-intro-hero-inner {
        grid-template-columns: 1fr;
    }
    .jl-intro-hero-media {
        min-height: clamp(240px, 56vw, 420px);
    }
    .jl-intro-hero-media {
        -webkit-mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
        mask-image: linear-gradient(180deg, #000 50%, transparent 100%);
    }
    .jl-intro-hero-body {
        text-align: center;
        align-items: center;
    }
    .jl-intro-desc { margin-inline: auto; }
    .jl-intro-crystal { opacity: .5; }
}

/* ============================================================
   Biến dùng chung cho các section (nền navy)
   ============================================================ */
.jl-story, .jl-process, .jl-commit, .jl-fashion, .jl-closing {
    --jl-navy:      #003462;
    --jl-navy-deep: #021c38;
    --jl-gold:      #CFA56A;
    --jl-gold-soft: #e7cfa3;
    --jl-text:      #d4dfeb;
    --jl-muted:     #9fb2c2;
}

.jl-story *, .jl-listen *, .jl-process *, .jl-commit *, .jl-fashion *, .jl-closing * {
    box-sizing: border-box;
}

/* Full-bleed cho mọi section của trang Giới thiệu */
.jl-story, .jl-listen, .jl-process, .jl-commit, .jl-fashion, .jl-closing {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    position: relative;
    overflow: hidden;
}

/* Viền dưới màu gold cho tất cả section */
.jl-intro-hero, .jl-story, .jl-listen, .jl-process, .jl-commit, .jl-fashion, .jl-closing {
    border-bottom: 2px solid var(--fs-color-secondary, #CFA56A);
}

/* Tinh thể (style cơ bản .jl-crystal nằm ở style.css global).
   Trên nền kem dùng tông vàng đậm + nhạt hơn */
.jl-listen .jl-crystal { color: #b8893f; opacity: .13; }
/* Đảm bảo nội dung nằm trên lớp tinh thể */
.jl-sec-inner, .jl-story-inner, .jl-intro-hero-inner, .jl-closing-grid {
    position: relative;
    z-index: 1;
}

/* ---------- Khung & tiêu đề dùng chung ---------- */
.jl-sec-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(50px, 6vw, 86px) clamp(20px, 4vw, 40px);
    position: relative;
}
.jl-sec-heading,
.jl-story-heading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 2vw, 26px);
    margin: 0 0 clamp(34px, 4vw, 54px);
    text-align: center;
}
.jl-sec-heading-text,
.jl-story-heading-text {
    color: var(--jl-gold);
    font-size: clamp(19px, 2.7vw, 31px);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    line-height: 1.3;
}
.jl-sec-heading--dark .jl-sec-heading-text { color: #0B3F66; }

.jl-sec-orn, .jl-story-orn {
    flex: 0 0 auto;
    width: clamp(32px, 7vw, 92px);
    height: 1px;
    position: relative;
    background: linear-gradient(90deg, transparent, var(--jl-gold, #CFA56A));
}
.jl-sec-heading > .jl-sec-orn:last-child,
.jl-story-heading > .jl-story-orn:last-child {
    background: linear-gradient(90deg, var(--jl-gold, #CFA56A), transparent);
}
.jl-sec-orn::after, .jl-story-orn::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 7px;
    height: 7px;
    background: var(--jl-gold, #CFA56A);
    transform: translateY(-50%) rotate(45deg);
    right: -3px;
}
.jl-sec-heading > .jl-sec-orn:last-child::after,
.jl-story-heading > .jl-story-orn:last-child::after {
    right: auto;
    left: -3px;
}

/* Nhãn ảnh placeholder */
.jl-story-photo-ph, .jl-ph-label {
    color: rgba(207, 165, 106, .55);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* ============================================================
   SECTION 2 - "Câu chuyện bắt đầu" (timeline)
   ============================================================ */
.jl-story {
    background: linear-gradient(180deg, #022a4f 0%, var(--jl-navy-deep) 100%);
    color: var(--jl-text);
}
.jl-story-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(50px, 6vw, 86px) clamp(20px, 4vw, 40px);
    position: relative;
}
.jl-story-grid {
    display: grid;
    grid-template-columns: 0.82fr 1.18fr;
    gap: clamp(28px, 4vw, 60px);
    align-items: stretch;
}
.jl-story-media {
    display: flex;
    flex-direction: column;
    gap: clamp(16px, 2vw, 24px);
}
.jl-story-photo {
    position: relative;
    border: 1px solid rgba(207, 165, 106, .5);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #06203c;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .35);
    display: grid;
    place-items: center;
}
.jl-story-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jl-story-photo--empty { border-style: dashed; }

/* Desktop: kéo giãn cột ảnh khớp chiều cao cột timeline (3 ảnh chia đều) */
@media (min-width: 981px) {
    .jl-story-media { justify-content: space-between; height: 100%; }
    .jl-story-photo { flex: 1 1 0; min-height: 0; aspect-ratio: auto; }
}

.jl-story-time { --seal: clamp(48px, 6vw, 58px); list-style: none; margin: 0; padding: 0; }
.jl-story-item {
    position: relative;
    display: grid;
    grid-template-columns: var(--seal) 1fr;
    gap: clamp(16px, 2.4vw, 28px);
    padding-bottom: clamp(28px, 4vw, 46px);
}
.jl-story-item:last-child { padding-bottom: 0; }
.jl-story-item:not(:last-child)::before {
    content: "";
    position: absolute;
    left: calc(var(--seal) / 2 - 1px);
    top: var(--seal);
    bottom: 0;
    border-left: 2px dotted rgba(207, 165, 106, .45);
}
.jl-story-num {
    position: relative;
    width: var(--seal);
    height: var(--seal);
    display: grid;
    place-items: center;
    color: var(--jl-gold);
    font-weight: 700;
    font-size: clamp(15px, 2vw, 18px);
    background: var(--jl-navy-deep);
    border-radius: 50%;
    z-index: 1;
}
.jl-story-num::before, .jl-story-num::after {
    content: "";
    position: absolute;
    inset: 5px;
    border: 1.4px solid rgba(207, 165, 106, .7);
    border-radius: 6px;
}
.jl-story-num::after { transform: rotate(45deg); }

.jl-story-step-title {
    color: var(--jl-gold);
    font-size: clamp(15px, 2vw, 19px);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 6px 0 10px;
}
.jl-story-step-title::before { content: "+"; color: var(--jl-gold); font-weight: 400; margin-right: 10px; }
.jl-story-text { color: var(--jl-text); font-size: clamp(14px, 1.5vw, 16px); line-height: 1.85; margin: 0; }
.jl-story-quote {
    color: var(--jl-gold-soft);
    font-style: italic;
    font-size: clamp(16px, 2vw, 21px);
    line-height: 1.45;
    margin: 14px 0 0;
}
.jl-story-crystal {
    position: absolute;
    right: clamp(4px, 2vw, 28px);
    top: 46%;
    transform: translateY(-30%);
    width: clamp(80px, 10vw, 140px);
    color: rgba(207, 165, 106, .22);
    pointer-events: none;
}
.jl-story-crystal svg { width: 100%; height: auto; display: block; }

/* ============================================================
   SECTION 3 - "...một sự lắng nghe" (nền kem)
   ============================================================ */
.jl-listen { background: #f4ede2; }
.jl-listen-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(20px, 3vw, 40px);
}
.jl-listen-card { position: relative; text-align: center; padding: 0 6px; }
.jl-listen-card:not(:last-child)::after {
    content: "";
    position: absolute;
    right: calc(-1 * clamp(10px, 1.5vw, 20px));
    top: 12%;
    bottom: 8%;
    width: 1px;
    background: rgba(11, 63, 102, .12);
}
.jl-listen-ic { display: inline-flex; color: #b8893f; margin-bottom: 16px; }
.jl-listen-ic svg { width: clamp(40px, 4vw, 52px); height: auto; }
.jl-listen-title {
    color: #0B3F66;
    font-size: clamp(15px, 1.8vw, 18px);
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.jl-listen-text { color: #566b7d; font-size: clamp(13.5px, 1.4vw, 15px); line-height: 1.8; margin: 0; }

/* ============================================================
   SECTION 4 - "Đá phong thủy không chỉ là một món đồ" (quy trình)
   ============================================================ */
.jl-process { background: linear-gradient(180deg, var(--jl-navy-deep), #022a4f); color: var(--jl-text); }
.jl-process-row {
    list-style: none; margin: 0; padding: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(10px, 2vw, 20px);
    align-items: start;
}
.jl-process-step { position: relative; text-align: center; padding: 0 8px; }
.jl-process-step:not(:last-child)::after {
    content: "";
    position: absolute;
    top: clamp(28px, 4vw, 46px);
    right: calc(-1 * clamp(4px, 1vw, 12px));
    width: 16px; height: 16px;
    border-top: 2px solid var(--jl-gold);
    border-right: 2px solid var(--jl-gold);
    transform: rotate(45deg);
    opacity: .75;
}
.jl-process-disc {
    position: relative;
    width: clamp(80px, 9vw, 108px);
    height: clamp(80px, 9vw, 108px);
    border: 1px dotted rgba(207, 165, 106, .6);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: var(--jl-gold);
    margin-bottom: clamp(16px, 2vw, 22px);
}
.jl-process-disc::before {
    content: "";
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(207, 165, 106, .22);
    border-radius: 50%;
}
.jl-process-disc svg { width: 46%; height: auto; }
.jl-process-title {
    color: var(--jl-gold);
    font-size: clamp(14px, 1.7vw, 18px);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.jl-process-text {
    color: var(--jl-text);
    font-size: clamp(13px, 1.4vw, 15px);
    line-height: 1.8;
    margin: 0 auto;
    max-width: 240px;
}

/* ============================================================
   SECTION 5 - "Cam kết của Julyem"
   ============================================================ */
.jl-commit { background: linear-gradient(180deg, #022a4f, var(--jl-navy-deep)); color: var(--jl-text); }
.jl-commit-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(20px, 3vw, 48px);
    flex-wrap: wrap;
}
.jl-commit-list { flex: 0 1 880px; }
.jl-commit-photo {
    width: clamp(180px, 22vw, 280px);
    border: 1px solid rgba(207, 165, 106, .4);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 14px 36px rgba(0, 0, 0, .4);
}
.jl-commit-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jl-commit-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(20px, 3vw, 40px);
}
.jl-commit-item { text-align: center; }
.jl-commit-disc {
    width: clamp(70px, 8vw, 96px);
    height: clamp(70px, 8vw, 96px);
    border: 1px dotted rgba(207, 165, 106, .55);
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    color: var(--jl-gold);
    margin-bottom: 16px;
}
.jl-commit-disc svg { width: 46%; height: auto; }
.jl-commit-title {
    color: var(--jl-gold);
    font-size: clamp(14px, 1.6vw, 18px);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin: 0 0 10px;
}
.jl-commit-text {
    color: var(--jl-text);
    font-size: clamp(13px, 1.4vw, 15px);
    line-height: 1.8;
    margin: 0 auto;
    max-width: 240px;
}

/* ============================================================
   SECTION 6 - "Từ phong thủy đến thời trang"
   ============================================================ */
.jl-fashion { background: linear-gradient(180deg, var(--jl-navy-deep), #022a4f); color: var(--jl-text); }
.jl-fashion-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1fr;
    gap: clamp(16px, 2.5vw, 36px);
    align-items: center;
}
.jl-fashion-col { display: grid; gap: clamp(14px, 2vw, 22px); }
.jl-fashion-photo {
    border: 1px solid rgba(207, 165, 106, .4);
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background: #06203c;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .4);
    display: grid;
    place-items: center;
}
.jl-fashion-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.jl-fashion-photo--empty { border-style: dashed; }
.jl-fashion-text { color: var(--jl-text); font-size: clamp(14px, 1.5vw, 16px); line-height: 1.9; }
.jl-fashion-text p { margin: 0 0 16px; }
.jl-fashion-text p:last-child { margin-bottom: 0; }

/* ============================================================
   SECTION 7 - "Trân trọng mọi kết nối"
   ============================================================ */
.jl-closing { background: linear-gradient(180deg, #022a4f, var(--jl-navy-deep)); color: var(--jl-text); }
.jl-closing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    max-width: 100%;
    margin: 0 auto;
}
.jl-closing--noimg .jl-closing-grid { grid-template-columns: 1fr; }
.jl-closing-body { align-self: center; padding: clamp(40px, 6vw, 84px) clamp(24px, 5vw, 64px); }
.jl-closing-title {
    color: var(--jl-gold);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0 0 22px;
}
.jl-closing-body p { color: var(--jl-text); font-size: clamp(14px, 1.5vw, 16px); line-height: 1.95; margin: 0 0 14px; max-width: 560px; }
.jl-closing-send { margin-top: 26px !important; }
.jl-closing-sign {
    color: var(--jl-gold-soft);
    font-style: italic;
    font-size: clamp(28px, 4vw, 46px);
    line-height: 1;
    margin: 6px 0 0 !important;
}
.jl-closing-media {
    position: relative;
    min-height: 340px;
    background-size: cover;
    background-position: center;
    /* Ảnh tan dần ở mép trái -> hoà liền với body, không lộ viền */
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
    mask-image: linear-gradient(90deg, transparent 0%, #000 38%);
}

/* ============================================================
   Responsive cho các section 2-7
   ============================================================ */
@media (max-width: 980px) {
    .jl-story-grid { grid-template-columns: 1fr; }
    .jl-story-crystal { display: none; }

    .jl-listen-grid { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
    .jl-listen-card::after { display: none !important; }

    .jl-process-row { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
    .jl-process-step::after { display: none !important; }

    .jl-commit-grid { grid-template-columns: 1fr; }
    .jl-commit-photo { display: none; }

    .jl-fashion-grid { grid-template-columns: 1fr; }
    .jl-fashion-col { grid-template-columns: repeat(2, 1fr); }

    .jl-closing-grid { grid-template-columns: 1fr; }
    .jl-closing-media {
        min-height: 260px;
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 30%);
    }
}

@media (max-width: 560px) {
    .jl-listen-grid { grid-template-columns: 1fr; }
    .jl-process-row { grid-template-columns: 1fr; }
    .jl-commit-list { grid-template-columns: 1fr; }
    .jl-fashion-col { grid-template-columns: 1fr; }
}
