/* ============================================================
   roof-truss.css — /services/roof-truss
   Depends on: pearl.css + service-page.css
   Design: Engineering authority — structural diagram hero bg,
   animated SVG truss lines, per-type colour accents, IS code
   trust signals, 5-year warranty dark section.
============================================================ */

/* Hero blobs */
.rt-blob--1 {
  background: radial-gradient(circle, rgba(30, 57, 143, 0.3), transparent 70%);
  width: 520px;
  height: 520px;
}
.rt-blob--2 {
  background: radial-gradient(circle, rgba(161, 98, 7, 0.2), transparent 70%);
  bottom: -80px;
  right: -60px;
}

/* Animated truss SVG background */
.rt-truss-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
}
.rt-plus {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}
.rt-truss-svg {
  width: 100%;
  height: 200px;
  position: absolute;
  bottom: 80px;
}
.rt-line {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawLine 2s ease forwards;
}

.rt-whatsapp {
  background: var(--gradient-main);
  position: relative;
  overflow: hidden;
}

.rt-whatsapp::before {
  content: "";
  position: absolute;
  top: -100px;
  left: -100px;
  width: 400px;
  height: 400px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

.rt-whatsapp::after {
  content: "";
  position: absolute;
  bottom: -80px;
  right: -80px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}


.rt-line--1 {
  animation-delay: 0.1s;
}
.rt-line--2 {
  animation-delay: 0.3s;
}
.rt-line--3 {
  animation-delay: 0.5s;
}
.rt-line--4 {
  animation-delay: 0.7s;
}
.rt-line--5 {
  animation-delay: 0.9s;
}
.rt-line--6 {
  animation-delay: 1.1s;
}
.rt-line--7 {
  animation-delay: 1.3s;
}
.rt-line--8 {
  animation-delay: 1.5s;
}
.rt-line--9 {
  animation-delay: 1.7s;
}
.rt-line--10 {
  animation-delay: 1.9s;
}
@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* Hero spec card */
.rt-spec-card {
  background: rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 24px;
  overflow: hidden;
}
.rt-sc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.rt-sc-header i {
  font-size: 1.4rem;
  color: #f0b429;
}
.rt-sc-header strong {
  display: block;
  color: #fff;
  font-size: 0.9rem;
}
.rt-sc-header span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
}
.rt-sc-specs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
}
.rt-scs-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 9px;
  transition: background 0.2s;
  opacity: 0;
  animation: scsIn 0.4s var(--si-delay, 0s) ease both;
}
@keyframes scsIn {
  from {
    opacity: 0;
    transform: translateX(12px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
.rt-scs-item:hover {
  background: rgba(255, 255, 255, 0.07);
}
.rt-scs-icon {
  width: 32px;
  height: 32px;
  background: var(--gradient-main);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  color: #fff;
  flex-shrink: 0;
}
.rt-scs-item strong {
  display: block;
  color: #fff;
  font-size: 0.8rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  margin-bottom: 1px;
}
.rt-scs-item span {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
}
.rt-sc-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #25d366;
  color: #fff;
  padding: 11px 18px;
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}
.rt-sc-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.5);
}

/* SECTION 1 — Truss types */
.rt-types-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 48px;
}
.rt-type-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(30, 57, 143, 0.08);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: all 0.4s;
}
.rt-type-card:hover {
  transform: translateY(-9px);
  box-shadow: var(--shadow-pink);
}
.rt-tc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 20px 0;
  border-bottom: 2px solid var(--type-color, #1e398f);
}
.rt-tc-icon {
  width: 46px;
  height: 46px;
  background: var(--type-color, #1e398f);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #fff;
  flex-shrink: 0;
  transition: transform 0.3s;
}
.rt-type-card:hover .rt-tc-icon {
  transform: scale(1.1) rotate(-6deg);
}
.rt-tc-emoji {
  font-size: 1rem;
  margin-bottom: 2px;
}
.rt-tc-top h3 {
  font-size: 1rem;
  font-weight: 700;
  font-family: "DM Sans", sans-serif;
}
.rt-tc-badges {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-left: auto;
  padding-bottom: 8px;
}
.rt-tc-tier {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 8px;
  background: var(--type-color, #1e398f);
  color: #fff;
  opacity: 0.85;
  white-space: nowrap;
  text-align: center;
}
.rt-tc-price {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--gray);
  text-align: right;
}
/* Mini SVG truss diagram */
.rt-tc-diagram {
  padding: 12px 20px 0;
  background: rgba(30, 57, 143, 0.02);
}
.rt-tc-diagram svg {
  width: 100%;
  height: 50px;
  display: block;
}
.rt-tl {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
}
.rt-type-card:hover .rt-tl {
  animation: drawLine 1s ease forwards;
}
.rt-type-card > p {
  padding: 12px 20px;
  font-size: 0.8rem;
  color: var(--gray);
  line-height: 1.6;
}
.rt-tc-specs {
  padding: 0 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-grow: 1;
}
.rt-tc-specs li {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.76rem;
  color: #374151;
}
.rt-tc-specs li i {
  color: #22c55e;
  font-size: 0.68rem;
  flex-shrink: 0;
}
.rt-tc-bestfor {
  margin: 10px 20px;
  padding: 8px 12px;
  background: var(--offwhite);
  border-radius: 8px;
  font-size: 0.72rem;
  color: var(--gray);
  display: flex;
  align-items: flex-start;
  gap: 6px;
}
.rt-tc-bestfor i {
  color: var(--blue);
  flex-shrink: 0;
  margin-top: 1px;
}
.rt-tc-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 20px 20px;
  padding: 10px 14px;
  background: var(--gradient-main);
  color: #fff;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.3s;
}
.rt-tc-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(199, 0, 126, 0.35);
}
.rt-tc-cta i {
  font-size: 0.7rem;
  transition: transform 0.3s;
}
.rt-type-card:hover .rt-tc-cta i {
  transform: translateX(5px);
}

/* SECTION 2 — Design */
.rt-design-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: start;
}
.rt-design-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 24px;
}
.rt-di-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px;
  background: var(--offwhite);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--blue);
  transition: all 0.3s;
}
.rt-di-item:hover {
  background: #fff;
  box-shadow: var(--shadow);
  transform: translateX(5px);
}
.rt-di-icon {
  width: 38px;
  height: 38px;
  background: var(--gradient-main);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: #fff;
  flex-shrink: 0;
}
.rt-di-item strong {
  display: block;
  font-size: 0.86rem;
  font-weight: 700;
  font-family: "DM Sans", sans-serif;
  margin-bottom: 2px;
}
.rt-di-item p {
  font-size: 0.76rem;
  color: var(--gray);
  line-height: 1.5;
  margin: 0;
}
/* Design card */
.rt-design-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px 28px;
  border: 1px solid rgba(30, 57, 143, 0.1);
  box-shadow: var(--shadow);
}
.rt-design-card h4 {
  font-size: 0.97rem;
  font-weight: 700;
  font-family: "DM Sans", sans-serif;
  margin-bottom: 20px;
}
.rt-load-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}
.rt-load-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: var(--offwhite);
  border-radius: 10px;
  transition: all 0.3s;
}
.rt-load-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transform: translateX(3px);
}
.rt-load-item span {
  font-size: 1.3rem;
  flex-shrink: 0;
}
.rt-load-item strong {
  display: block;
  font-size: 0.83rem;
  font-weight: 700;
  font-family: "DM Sans", sans-serif;
  margin-bottom: 2px;
}
.rt-load-item p {
  font-size: 0.74rem;
  color: var(--gray);
  line-height: 1.5;
  margin: 0;
}
.rt-design-stat {
  text-align: center;
  padding: 16px;
  background: var(--gradient-main);
  border-radius: 12px;
}
.rt-design-stat span {
  font-family: "Playfair Display", serif;
  font-size: 2.4rem;
  font-weight: 900;
  color: #fff;
}
.rt-design-stat sup {
  font-size: 1rem;
  vertical-align: super;
}
.rt-design-stat p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.76rem;
  margin-top: 4px;
}

/* Section 3 — timelines */
.rt-timelines {
  margin-top: 36px;
  padding: 28px;
  background: var(--offwhite);
  border-radius: var(--radius);
}
.rt-timelines h4 {
  font-size: 1rem;
  font-weight: 700;
  font-family: "DM Sans", sans-serif;
  margin-bottom: 16px;
}
.rt-tl-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.rt-tl-pill {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 14px;
  border-left: 3px solid;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.3s;
}
.rt-tl-pill:hover {
  transform: translateX(4px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}
.rt-tl-pill strong {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  font-family: "DM Sans", sans-serif;
  margin-bottom: 3px;
}
.rt-tl-pill span {
  font-size: 0.78rem;
  font-weight: 700;
}

/* Section 4 — Warranty (dark) */
.rt-warranty-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}
.rt-warranty-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 24px 20px;
  transition: all 0.3s;
}
.rt-warranty-card:hover {
  background: rgba(255, 255, 255, 0.13);
  transform: translateY(-5px);
}
.rt-wc-icon {
  width: 48px;
  height: 48px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 14px;
  transition: transform 0.3s;
}
.rt-warranty-card:hover .rt-wc-icon {
  transform: scale(1.1) rotate(-5deg);
}
.rt-warranty-card h4 {
  color: #fff;
  font-size: 0.9rem;
  font-family: "DM Sans", sans-serif;
  font-weight: 700;
  margin-bottom: 6px;
}
.rt-warranty-card p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.77rem;
  line-height: 1.6;
}

@media (max-width: 1200px) {
  .rt-warranty-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .rt-tl-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 1024px) {
  .rt-types-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
  }
  .rt-design-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 768px) {
  .rt-warranty-grid,
  .rt-tl-grid {
    grid-template-columns: 1fr;
  }
}
