/* ManilaStay Guide Article template — v1-8-7
   Source reference: accepted Guide 01 final prototype + Guide 30 second shell proof.
   Scope: shared Guide Article shell with Guide 01 and one shorter practical guide branch. */

.ms-guide-article-template .ms-hero--guide-article {
  background-color: var(--ms-color-primary-dark);
}

.ms-guide-article-template .ms-hero--guide-article::before {
  background-image:
    linear-gradient(
      to bottom,
      rgba(26, 39, 48, 0.16) 10%,
      rgba(26, 39, 48, 0.48) 55%,
      rgba(26, 39, 48, 0.64) 88%
    ),
    var(--ms-guide-hero-image);
  background-position: 50% 50%;
  background-size: cover;
}

@media (max-width: 768px) {
  .ms-guide-article-template .ms-hero--guide-article::before {
    background-image:
      linear-gradient(
        to bottom,
        rgba(26, 39, 48, var(--ms-hero-overlay-opacity)) 15%,
        rgba(26, 39, 48, 0.75) 55%,
        rgba(26, 39, 48, 0.95) 90%
      ),
      var(--ms-guide-hero-image);
    background-position: 50% 50%;
  }
}


/* v1-8-10 staging feedback: Guide 03 hero image needs more skyline,
   while the editorial image keeps its default crop. */
.ms-guide-article-template--guide-03 .ms-hero--guide-article::before {
  background-position: 50% 90%;
}

@media (max-width: 768px) {
  .ms-guide-article-template--guide-03 .ms-hero--guide-article::before {
    background-position: 50% 90%;
  }
}

.ms-guide-title-nowrap {
  white-space: nowrap;
}

      /* ==================================
         GUIDE ARTICLE REDESIGN IMPLEMENTATION
         Body modules below locked hero
         ================================== */

      .ms-guide-article {
        background:
          linear-gradient(180deg, #ffffff 0%, #ffffff 44%, var(--ms-color-bg-soft) 100%);
        padding: clamp(2.25rem, 5vw, 4.5rem) 0 clamp(3rem, 6vw, 5rem);
      }

      .ms-guide-article-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
        align-items: start;
      }

      @media (min-width: 1024px) {
        .ms-guide-article-grid {
          grid-template-columns: minmax(0, 1fr) 320px;
          gap: 2rem;
        }
      }

      .ms-guide-main {
        min-width: 0;
      }

      .ms-guide-section {
        margin: 0 0 clamp(1.75rem, 3vw, 2.5rem);
      }

      .ms-guide-section:last-child {
        margin-bottom: 0;
      }

      .ms-guide-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        margin: 0 0 0.65rem;
        color: var(--ms-color-accent);
        font-size: 0.76rem;
        font-weight: 750;
        text-transform: uppercase;
        letter-spacing: 0.1em;
      }

      .ms-guide-section h2,
      .ms-guide-section h3 {
        color: var(--ms-color-text);
      }

      /* v1-8-2: Guide Article section H2s now follow the global ManilaStay
         .ms-heading-lg / .ms-section-heading scale. Keep guide-specific CSS
         for article modules, not a near-hero H2 scale. */
      .ms-guide-section > h2.ms-heading-lg.ms-section-heading {
        text-align: left;
        margin: 0 0 0.65rem;
        line-height: 1.2;
        letter-spacing: 0;
      }

      .ms-guide-cta h2.ms-heading-lg {
        margin: 0 0 0.35rem;
        line-height: 1.2;
        letter-spacing: 0;
      }

      .ms-guide-section h3 {
        margin: 0 0 0.45rem;
        font-size: 1.05rem;
        line-height: 1.28;
      }

      .ms-guide-section p {
        margin: 0;
      }

      .ms-guide-lede {
        color: var(--ms-color-muted);
        font-size: 1rem;
        max-width: 42rem;
      }

      .ms-guide-editorial-card {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        padding: 0;
        border: 1px solid rgba(71, 91, 102, 0.14);
        border-radius: 16px;
        background: var(--ms-color-bg-soft);
        box-shadow: 0 14px 34px rgba(15, 23, 42, 0.10);
        overflow: hidden;
      }

      @media (min-width: 760px) {
        .ms-guide-editorial-card {
          grid-template-columns: minmax(0, 1.04fr) minmax(240px, 0.96fr);
          align-items: stretch;
        }
      }

      .ms-guide-editorial-copy {
        align-self: center;
        padding: clamp(1.35rem, 3vw, 1.75rem);
      }

      /* v1-8-3: the opening editorial card uses the global H2 size,
         but it should remain a left-aligned card/editorial heading,
         not inherit the centered global section-heading behavior. */
      .ms-guide-editorial-copy h2.ms-heading-lg.ms-section-heading {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 0.65rem;
      }

      .ms-guide-editorial-copy .ms-guide-lede {
        font-size: 1.03rem;
        color: rgba(31, 31, 31, 0.78);
      }

      .ms-guide-editorial-copy p + p {
        margin-top: 0.9rem;
      }

      .ms-guide-local-rule {
        margin-top: 1.15rem;
        padding: 0.95rem 1.05rem;
        border-left: 4px solid var(--ms-color-accent);
        border-radius: 0 16px 16px 0;
        background: rgba(255, 255, 255, 0.88);
        color: rgba(31, 31, 31, 0.82);
        font-size: 1rem;
        line-height: 1.65;
      }

      .ms-guide-local-rule strong {
        color: var(--ms-color-primary-dark);
        font-weight: 800;
      }

      .ms-guide-editorial-image {
        min-height: 270px;
        background-image:
          linear-gradient(to bottom, rgba(26, 39, 48, 0.08), rgba(26, 39, 48, 0.34)),
          var(--ms-guide-editorial-image),
          linear-gradient(135deg, #475b66, #d7d2c7);
        background-size: cover;
        background-position: center;
        position: relative;
        overflow: hidden;
      }

      @media (max-width: 759px) {
        .ms-guide-editorial-image {
          min-height: 240px;
        }
      }

      .ms-guide-image-caption {
        display: none;
      }

      .ms-guide-rules {
        padding: clamp(1.2rem, 3vw, 1.65rem);
        border-radius: 22px;
        background: #ffffff;
        border: 1px solid var(--ms-color-border-soft);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.06);
      }

      .ms-guide-rule-list {
        list-style: none;
        padding: 0;
        margin: 1.15rem 0 0;
        counter-reset: ms-rule-counter;
      }

      .ms-guide-rule-list li {
        counter-increment: ms-rule-counter;
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.85rem;
        padding: 1rem 0;
        border-top: 1px solid rgba(15, 23, 42, 0.08);
        color: rgba(31, 31, 31, 0.8);
      }

      .ms-guide-rule-list li::before {
        content: counter(ms-rule-counter);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.75rem;
        height: 2.75rem;
        border-radius: 999px;
        background: var(--ms-color-bg-soft);
        color: var(--ms-color-text);
        font-size: 1.1rem;
        font-weight: 400;
        line-height: 1;
        flex-shrink: 0;
      }

      .ms-guide-rule-list strong {
        color: var(--ms-color-primary-dark);
      }

      .ms-guide-stay-cards {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1.15rem;
      }

      @media (min-width: 760px) {
        .ms-guide-stay-cards {
          grid-template-columns: repeat(3, 1fr);
        }
      }

      .ms-guide-stay-card {
        min-height: 285px;
        display: flex;
        align-items: flex-end;
        position: relative;
        overflow: hidden;
        border-radius: 22px;
        border: 1px solid rgba(15, 23, 42, 0.08);
        background: #111;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.13);
      }

      .ms-guide-stay-card::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: var(--stay-image);
        background-size: cover;
        background-position: center;
        transform: scale(1.02);
        transition: transform 0.22s ease;
      }

      .ms-guide-stay-card::after {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(180deg, rgba(12, 20, 28, 0.06), rgba(12, 20, 28, 0.82));
      }

      .ms-guide-stay-card:hover::before,
      .ms-guide-stay-card:focus-within::before {
        transform: scale(1.055);
      }

      .ms-guide-stay-card-content {
        position: relative;
        z-index: 1;
        padding: 1rem;
        color: #ffffff;
      }

      .ms-guide-stay-card-content h3 {
        color: #ffffff;
        margin-bottom: 0.35rem;
      }

      .ms-guide-stay-card-content p {
        color: rgba(255, 255, 255, 0.86);
        font-size: 0.9rem;
      }

      .ms-guide-card-link {
        display: inline-flex;
        margin-top: 0.75rem;
        color: #ffffff;
        font-weight: 700;
        font-size: 0.83rem;
        text-decoration: none;
      }

      .ms-guide-stay-card,
      .ms-guide-stay-card:hover,
      .ms-guide-stay-card:focus,
      .ms-guide-stay-card:focus-visible,
      .ms-guide-stay-card * {
        text-decoration: none;
      }

      .ms-guide-checklist {
        display: grid;
        gap: 0.75rem;
        margin-top: 1rem;
        padding: 0;
        list-style: none;
      }

      .ms-guide-checklist li {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 0.75rem;
        align-items: start;
        padding: 0.9rem 1rem;
        border: 1px solid rgba(15, 23, 42, 0.08);
        border-radius: 16px;
        background: #ffffff;
        color: rgba(31, 31, 31, 0.82);
        box-shadow: 0 10px 25px rgba(15, 23, 42, 0.045);
      }

      .ms-guide-checkmark {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 1.45rem;
        height: 1.45rem;
        border-radius: 999px;
        background: rgba(213, 75, 15, 0.12);
        color: var(--ms-color-accent);
        font-weight: 900;
        line-height: 1;
      }

      .ms-guide-mistakes {
        display: grid;
        gap: 0.9rem;
        margin-top: 1.1rem;
      }

      .ms-guide-mistake-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 1rem;
        border-radius: 18px;
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.08);
      }

      @media (min-width: 720px) {
        .ms-guide-mistake-row {
          grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
          align-items: start;
        }
      }

      .ms-guide-mistake-label {
        display: inline-flex;
        width: fit-content;
        margin-bottom: 0.45rem;
        padding: 0.17rem 0.55rem;
        border-radius: 999px;
        background: rgba(50, 66, 75, 0.1);
        color: var(--ms-color-primary-dark);
        font-size: 0.69rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }

      .ms-guide-fix .ms-guide-mistake-label {
        background: rgba(213, 75, 15, 0.12);
        color: var(--ms-color-accent);
      }

      .ms-guide-mistake-row p {
        color: rgba(31, 31, 31, 0.78);
        font-size: 0.93rem;
      }

      .ms-guide-recap {
        padding: clamp(1.15rem, 3vw, 1.5rem);
        border-radius: 22px;
        background: var(--ms-color-bg-soft);
        border: 1px solid rgba(71, 91, 102, 0.14);
      }

      /* v1-8-15: add breathing space between recap-module intro text
         and the text-card grid that follows, matching the visual rhythm
         already used by the recap-grid variant. */
      .ms-guide-recap > .ms-guide-lede + .ms-grid {
        margin-top: 1rem;
      }

      .ms-guide-recap-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 1rem;
      }

      @media (min-width: 720px) {
        .ms-guide-recap-grid {
          grid-template-columns: repeat(2, 1fr);
        }
      }

      .ms-guide-recap-box {
        background: rgba(255, 255, 255, 0.76);
        border-radius: 16px;
        padding: 1rem;
        border: 1px solid rgba(15, 23, 42, 0.07);
      }

      .ms-guide-recap-box ul {
        margin: 0.75rem 0 0;
        padding-left: 1.1rem;
        color: rgba(31, 31, 31, 0.78);
        font-size: 0.93rem;
      }

      .ms-guide-recap-box li + li {
        margin-top: 0.35rem;
      }

      .ms-guide-cta {
        position: relative;
        overflow: hidden;
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
        align-items: center;
        padding: clamp(1.35rem, 3vw, 1.85rem);
        border-radius: 24px;
        background: var(--ms-color-primary-dark);
        color: #ffffff;
        box-shadow: none;
      }

      @media (min-width: 760px) {
        .ms-guide-cta {
          grid-template-columns: minmax(0, 1fr) auto;
        }
      }

      .ms-guide-cta h2,
      .ms-guide-cta p {
        color: #ffffff;
      }

      .ms-guide-cta .ms-guide-eyebrow {
        color: rgba(255, 255, 255, 0.72);
        margin: 0 0 0.35rem;
      }

      .ms-guide-cta p {
        color: rgba(255, 255, 255, 0.84);
        margin-top: 0.35rem;
      }

      .ms-guide-cta .ms-btn {
        box-shadow: none;
      }

      .ms-guide-cta-action {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
      }

      .ms-guide-cta-note {
        margin: 0;
        color: rgba(255, 255, 255, 0.76);
        font-size: 0.86rem;
        line-height: 1.45;
      }

      .ms-guide-cta-note a {
        color: #ffffff;
        font-weight: 400;
        text-decoration: underline;
        text-underline-offset: 3px;
      }

      @media (min-width: 760px) {
        .ms-guide-cta-action {
          align-items: center;
          text-align: center;
          min-width: 220px;
        }
      }

      .ms-guide-continue {
        padding: clamp(1.1rem, 3vw, 1.45rem);
        border-radius: 22px;
        background: #ffffff;
        border: 1px solid var(--ms-color-border-soft);
      }

      .ms-guide-continue-links {
        display: grid;
        gap: 0.7rem;
        margin-top: 1rem;
      }

      @media (min-width: 720px) {
        .ms-guide-continue-links {
          grid-template-columns: 1fr 1fr;
        }
      }

      .ms-guide-next-link {
        display: block;
        padding: 0.9rem 1rem;
        border-radius: 16px;
        background: var(--ms-color-bg-soft);
        border: 1px solid rgba(15, 23, 42, 0.06);
        color: var(--ms-color-text);
      }

      .ms-guide-next-link:hover {
        text-decoration: none;
        border-color: rgba(213, 75, 15, 0.22);
        background: #fcf1ec;
      }

      .ms-guide-next-label {
        display: block;
        margin-bottom: 0.18rem;
        color: var(--ms-color-accent);
        font-size: 0.72rem;
        font-weight: 800;
        text-transform: uppercase;
        letter-spacing: 0.08em;
      }

      .ms-guide-next-title {
        display: block;
        color: var(--ms-color-text);
        font-weight: 720;
        line-height: 1.35;
      }

      .ms-guide-sidebar {
        min-width: 0;
      }

      @media (min-width: 1024px) {
        .ms-guide-sidebar {
          position: sticky;
          top: 5.75rem;
        }
      }

      .ms-guide-sidebar-card {
        padding: 1rem;
        border-radius: 20px;
        background: #ffffff;
        border: 1px solid rgba(15, 23, 42, 0.08);
        box-shadow: 0 16px 38px rgba(15, 23, 42, 0.075);
      }

      .ms-guide-sidebar-card + .ms-guide-sidebar-card {
        margin-top: 1rem;
      }

      .ms-guide-sidebar-title {
        margin: 0 0 0.75rem;
        color: var(--ms-color-primary-dark);
        font-size: 0.86rem;
        font-weight: 850;
        letter-spacing: 0.08em;
        text-transform: uppercase;
      }

      .ms-guide-anchor-list,
      .ms-guide-link-list {
        list-style: none;
        padding: 0;
        margin: 0;
      }

      .ms-guide-anchor-list li + li {
        border-top: 1px solid rgba(15, 23, 42, 0.07);
      }

      .ms-guide-anchor-list a {
        display: block;
        padding: 0.55rem 0;
        color: rgba(31, 31, 31, 0.75);
        font-size: 0.88rem;
      }

      .ms-guide-anchor-list a:hover {
        color: var(--ms-color-accent);
        text-decoration: none;
      }

      .ms-guide-accordion details {
        border-top: 1px solid rgba(15, 23, 42, 0.08);
      }

      .ms-guide-accordion details:first-child {
        border-top: 0;
      }

      .ms-guide-accordion summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.75rem 0;
        color: var(--ms-color-primary-dark);
        cursor: pointer;
        font-size: 0.88rem;
        font-weight: 760;
      }

      .ms-guide-accordion summary::after {
        content: "+";
        color: var(--ms-color-accent);
        font-weight: 900;
      }

      .ms-guide-accordion details[open] summary::after {
        content: "–";
      }

      .ms-guide-link-list {
        padding: 0 0 0.8rem 0;
      }

      .ms-guide-link-list li + li {
        margin-top: 0.45rem;
      }

      .ms-guide-link-list a {
        color: rgba(31, 31, 31, 0.74);
        font-size: 0.84rem;
        line-height: 1.35;
      }

      .ms-guide-link-list a[aria-current="page"] {
        color: var(--ms-color-accent);
        font-weight: 800;
      }

      .ms-guide-sidebar-utility {
        margin-top: 0.85rem;
        padding-inline: 1rem;
      }

      .ms-guide-sidebar-back {
        display: inline;
        color: var(--ms-color-primary-dark);
        font-weight: 400;
        font-size: 0.86rem;
        text-decoration: none;
      }

      .ms-guide-sidebar-back:hover {
        color: var(--ms-color-primary-dark);
        text-decoration: underline;
        text-underline-offset: 0.18em;
      }

      @media (max-width: 760px) {
        .ms-guide-editorial-image,
        .ms-guide-stay-card {
          min-height: 260px;
        }

        .ms-guide-rule-list li {
          gap: 0.7rem;
        }
      }

/* v1-8-7: Guide 30 uses the governed Guide Article rhythm with a
   power/plugs picture-card module. Current cards are deliberate visual
   placeholders so future generated adapter/charger/power-bank images can be
   swapped into the same slots without changing the article structure. */
.ms-guide-power-cards .ms-guide-power-card {
  min-height: 245px;
}

.ms-guide-power-cards .ms-guide-power-card::before {
  background-image: var(--stay-image);
}

.ms-guide-power-cards .ms-guide-power-card::after {
  background: linear-gradient(180deg, rgba(12, 20, 28, 0.14), rgba(12, 20, 28, 0.86));
}

/* v1-8-12: Guide 07 uses four area photo cards inside the narrower
   guide article main column, so keep the comparison readable as a 2x2 grid. */
@media (min-width: 760px) {
  .ms-guide-stay-cards--four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
