/* ===============================
   Rad Web Hosting — Pricing Table
   =============================== */

/* --------------------------------
   Theme Variables (easy to tweak)
----------------------------------- */
:root {
  --brand-blue: #0c71b9;
  --brand-gray: #4d4d4d;
  --text: #333333;
  --bg: #ffffff;
  --divider: #e5e5e5;
  --btn-hover: #095b95;
  --focus: #0e88df;
  --shadow: 0 8px 24px rgba(16, 24, 40, 0.08);
  --radius: 14px;
  --radius-sm: 10px;

  /* Typography scale */
  --fs-xxs: 12px;
  --fs-xs: 13px;
  --fs-sm: 14px;
  --fs-md: 16px;
  --fs-lg: 18px;
  --fs-xl: 22px;
  --fs-2xl: 28px;
}

/* --------------------------------
   Optional local font-face hooks
----------------------------------- */
/*
@font-face {
  font-family: "Raleway";
  font-style: normal;
  font-weight: 600;
  src: url("/assets/fonts/Raleway-SemiBold.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  font-style: normal;
  font-weight: 400;
  src: url("/assets/fonts/Roboto-Regular.woff2") format("woff2");
  font-display: swap;
}
*/

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Roboto, system-ui, -apple-system, Segoe UI, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  line-height: 1.55;
  font-size: var(--fs-md);
}

.sr-only {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
  border: 0;
  padding: 0;
  margin: -1px;
}

/* --------------------------------
   Layout
----------------------------------- */
.container {
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 20px;
}

.pricing-section {
  padding-block: 48px;
}

.pricing-grid {
  display: grid;
  gap: 20px;
  overflow: visible;
}

/* Breakpoints:
   <600px: 1 col
   600–991px: 2 cols
   992–1199px: 3 cols
   >=1200px: 5 cols
*/
@media (min-width: 600px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 992px) {
  .pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .pricing-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* --------------------------------
   Plan Card
----------------------------------- */
.plan {
  position: relative;
  background: #fff;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  overflow: visible;
  transition: transform .15s ease, box-shadow .15s ease, z-index .1s ease;
  z-index: 1;
}
.plan:focus-within,
.plan:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(16,24,40,0.12);
  z-index: 5;
}

/* Header */
.plan-header {
  position: relative;
  padding: 20px 18px 12px;
  background: linear-gradient(0deg, #f8fbff 0%, #ffffff 80%);
  border-bottom: 1px solid var(--divider);
}
.plan-title {
  margin: 0 0 8px;
  font-family: Raleway, Roboto, Arial, sans-serif;
  font-size: var(--fs-xl);
  font-weight: 600;
  color: var(--brand-gray);
}
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
}
.plan-price .current {
  color: var(--brand-blue);
  font-weight: 700;
  font-size: var(--fs-2xl);
  line-height: 1;
}
.plan-price .was {
  color: #7a7a7a;
  font-size: var(--fs-sm);
  text-decoration: line-through;
}

/* --------------------------------
   Features
----------------------------------- */
.plan-features {
  list-style: none;
  margin: 0;
  padding: 10px 18px 0;
}
.feature {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 9px 0;
  border-top: 1px solid var(--divider);
  font-size: var(--fs-md);
}
.feature:first-child {
  border-top: 0;
}
.feature i {
  color: var(--brand-blue);
  font-size: 16px;
  line-height: 1.2;
  margin-top: 2px;
}

/* --------------------------------
   Tooltips (responsive + edge-safe)
----------------------------------- */
.has-tip {
  position: relative;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid var(--brand-blue);
  display: inline-block;
  margin-left: 8px;
  flex-shrink: 0;
  z-index: 10;
}
.has-tip::before {
  content: "i";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--brand-blue);
  font-weight: 700;
}

/* Tooltip bubble */
.has-tip::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 180px;
  max-width: 260px;
  padding: 10px 12px;
  background: #f7fafc;
  color: #1e293b;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(2, 8, 20, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  font-size: var(--fs-sm);
  line-height: 1.4;
  z-index: 9999;
  white-space: normal;
}

/* Show tooltip */
.has-tip:hover::after,
.has-tip:focus::after {
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

/* Smart alignment for viewport edges */
@media (max-width: 600px) {
  .has-tip::after {
    left: auto;
    right: 0;
    transform: translateX(0);
  }
}
.has-tip[data-tip-edge="left"]::after {
  left: 0;
  transform: translateX(0);
}
.has-tip[data-tip-edge="right"]::after {
  right: 0;
  left: auto;
  transform: translateX(0);
}

/* Optional arrow */
.has-tip::after::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: #f7fafc transparent transparent transparent;
}

/* --------------------------------
   CTA Button
----------------------------------- */
.plan-cta {
  margin-top: auto;
  padding: 16px 18px 20px;
  border-top: 1px solid var(--divider);
}
.btn-order {
  display: inline-block;
  width: 100%;
  text-align: center;
  padding: 12px 16px;
  font-weight: 700;
  letter-spacing: .3px;
  color: #fff;
  background: var(--brand-blue);
  border: 0;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color .15s ease, transform .05s ease;
}
.btn-order:hover {
  background: var(--btn-hover);
}
.btn-order:active {
  transform: translateY(1px);
}
.btn-order:focus {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* --------------------------------
   Footnote
----------------------------------- */
.footnote {
  text-align: center;
  margin: 18px auto 0;
  max-width: 900px;
  color: #434343;
  font-size: var(--fs-sm);
}

/* --------------------------------
   Accessibility & Motion
----------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .plan,
  .btn-order,
  .has-tip::after {
    transition: none !important;
  }
}