/* ==========================================================
   CLOUDMATE — HOSTING PRICING SECTION
   ==========================================================
   Design: Clean, modern, responsive
   Font: DM Sans

   Features:
   - Four-column desktop pricing layout
   - Highlighted Advanced Plan
   - Monthly / yearly billing switch
   - Feature checkmarks and accessible tooltips
   - Responsive tablet and mobile layouts
   - Minimal animations for better performance
   ========================================================== */

/* ----------------------------------------------------------
   1. DESIGN TOKENS
   ---------------------------------------------------------- */

.pricing-section {
  --pricing-primary: #0788f8;
  --pricing-primary-hover: #006bdc;

  --pricing-text: #0b1228;
  --pricing-muted: #536582;

  --pricing-background: #f4f8fc;
  --pricing-card-background: #ffffff;

  --pricing-border: #d8e3ef;
  --pricing-divider: #e1e9f2;

  --pricing-green: #12c878;
  --pricing-green-background: #c9f9dd;

  --pricing-radius: 9px;

  background: var(--pricing-background);

  padding: 65px 0 85px;

  font-family: "DM Sans", sans-serif;

  color: var(--pricing-text);
}

/* Scoped box sizing prevents layout inconsistencies */

.pricing-section *,
.pricing-section *::before,
.pricing-section *::after {
  box-sizing: border-box;
}

/* ----------------------------------------------------------
   2. CONTAINER
   ---------------------------------------------------------- */

.pricing-container {
  width: min(100% - 48px, 1480px);

  margin-inline: auto;
}

/* ----------------------------------------------------------
   3. SECTION HEADER
   ---------------------------------------------------------- */

.pricing-header {
  max-width: 650px;

  margin: 0 auto;

  text-align: center;
}

/* Small heading badge */

.pricing-tag {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 9px 20px;

  border-radius: 999px;

  background: #e5f2ff;

  color: #087df0;

  font-size: 13px;
  font-weight: 700;

  line-height: 1.3;
}

/* Main heading */

.pricing-header h2 {
  margin: 19px 0 14px;

  font-size: clamp(32px, 3.4vw, 46px);

  font-weight: 800;

  line-height: 1.12;

  letter-spacing: -1.8px;

  color: #080f27;
}

/* Supporting description */

.pricing-header p {
  max-width: 550px;

  margin: 0 auto;

  font-size: 16px;

  font-weight: 400;

  line-height: 1.65;

  color: var(--pricing-muted);
}

/* ----------------------------------------------------------
   4. MONTHLY / YEARLY BILLING SWITCH
   ---------------------------------------------------------- */

.pricing-billing-switch {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 5px;

  width: fit-content;
  max-width: 100%;

  margin: 25px auto 42px;

  padding: 5px;

  border: 1px solid #cbd9ed;
  border-radius: 999px;

  background: #f8fbff;
}

/* Individual billing options */

.billing-option {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  min-width: 135px;

  min-height: 38px;

  padding: 10px 22px;

  border: 0;
  border-radius: 999px;

  background: transparent;

  color: #17213a;

  font-family: inherit;
  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background-color 180ms ease,
    color 180ms ease;
}

/* Selected billing option */

.billing-option.is-active {
  background: var(--pricing-primary);

  color: #ffffff;

  box-shadow: 0 3px 10px rgba(0, 112, 240, 0.15);
}

/* Hover on inactive options */

.billing-option:not(.is-active):hover {
  background: #e6f1ff;
}

/* Yearly savings indicator */

.billing-saving {
  display: inline-flex;

  align-items: center;
  justify-content: center;

  padding: 7px 12px;

  margin-inline: 3px;

  border-radius: 999px;

  background: var(--pricing-green-background);

  color: #087a35;

  font-size: 12px;
  font-weight: 800;

  white-space: nowrap;
}

/* ----------------------------------------------------------
   5. PRICING GRID
   ---------------------------------------------------------- */

.pricing-grid {
  display: grid;

  grid-template-columns: repeat(4, minmax(0, 1fr));

  align-items: stretch;

  gap: 16px;

  width: 100%;
}

/* ----------------------------------------------------------
   6. PRICING CARDS
   ---------------------------------------------------------- */

.pricing-card {
  position: relative;

  display: flex;
  flex-direction: column;

  min-width: 0;

  padding: 30px 24px 34px;

  background: var(--pricing-card-background);

  border: 1px solid var(--pricing-border);

  border-radius: var(--pricing-radius);

  transition:
    border-color 180ms ease,
    box-shadow 180ms ease;
}

/* Subtle card hover */

.pricing-card:hover {
  border-color: #a4c9f3;

  box-shadow: 0 10px 28px rgba(20, 70, 120, 0.06);
}

/* ----------------------------------------------------------
   7. MOST POPULAR CARD
   ---------------------------------------------------------- */

.pricing-card-popular {
  padding-top: 70px;

  border: 2px solid var(--pricing-primary);

  box-shadow: 0 8px 24px rgba(0, 112, 240, 0.07);
}

/* Popular label */

.popular-label {
  position: absolute;

  top: -1px;
  left: -1px;
  right: -1px;

  display: flex;

  align-items: center;
  justify-content: center;

  height: 39px;

  border-radius: 7px 7px 0 0;

  background: var(--pricing-primary);

  color: #ffffff;

  font-size: 13px;
  font-weight: 800;

  letter-spacing: 0.3px;
}

/*
   Infinite shine animations removed.

   Benefits:
   - Less continuous painting
   - Reduced GPU activity
   - Better performance on mobile
   - Cleaner visual appearance
*/

/* ----------------------------------------------------------
   8. CARD HEADER
   ---------------------------------------------------------- */

.pricing-card-header {
  min-height: 80px;
}

.pricing-card-header h3 {
  margin: 0 0 7px;

  font-size: 21px;
  font-weight: 800;

  line-height: 1.3;

  letter-spacing: -0.5px;

  color: var(--pricing-text);
}

.pricing-card-header p {
  margin: 0;

  font-size: 12px;

  font-weight: 400;

  line-height: 1.55;

  color: var(--pricing-muted);
}

/* ----------------------------------------------------------
   9. PRICING AMOUNT
   ---------------------------------------------------------- */

.pricing-price {
  display: flex;

  align-items: baseline;

  flex-wrap: wrap;

  gap: 2px;

  min-height: 48px;

  margin-top: 4px;

  color: var(--pricing-text);

  font-variant-numeric: tabular-nums;
}

/* Currency symbol */

.pricing-price .currency {
  font-size: 26px;

  font-weight: 800;

  line-height: 1.2;
}

/* Main price */

.pricing-price .amount {
  font-size: clamp(29px, 2.5vw, 36px);

  font-weight: 800;

  line-height: 1.2;

  letter-spacing: -1.4px;
}

/* /month or /year */

.pricing-price .price-period {
  margin-left: 3px;

  font-size: 14px;

  font-weight: 500;

  letter-spacing: 0;

  white-space: nowrap;
}

/* Custom pricing */

.pricing-price.custom-price .amount {
  font-size: 33px;
}

/* ----------------------------------------------------------
   10. BILLING INFORMATION
   ---------------------------------------------------------- */

.billing-details {
  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 6px;

  min-height: 28px;

  margin: 6px 0 14px;
}

/* Monthly / yearly badge */

.billing {
  display: inline-flex;

  align-items: center;

  padding: 6px 11px;

  border-radius: 999px;

  background: #edf1f5;

  color: #1b2438;

  font-size: 12px;

  font-weight: 700;

  line-height: 1.2;
}

/* Savings badge */

.saving-badge {
  display: inline-flex;

  align-items: center;

  padding: 6px 11px;

  border-radius: 999px;

  background: var(--pricing-green-background);

  color: #087a35;

  font-size: 12px;

  font-weight: 800;

  line-height: 1.2;
}

/* Preserve HTML hidden behavior */

.saving-badge[hidden],
.renewal[hidden] {
  display: none;
}

/* Optional renewal information */

.renewal {
  margin: -7px 0 12px;

  color: #64748b;

  font-size: 11px;

  line-height: 1.5;
}

/* ----------------------------------------------------------
   11. PLAN BUTTONS
   ---------------------------------------------------------- */

.pricing-button {
  display: flex;
  box-sizing: border-box;
  text-decoration: none;

  align-items: center;
  justify-content: center;

  width: 100%;

  min-height: 43px;

  padding: 11px 14px;

  border: none;
  border-radius: 6px;

  background: #118feb;

  color: #ffffff;

  font-family: inherit;

  font-size: 13px;
  font-weight: 800;

  line-height: 1.4;

  text-align: center;

  cursor: pointer;

  transition:
    background-color 180ms ease,
    box-shadow 180ms ease;
}

/* Hover state */

.pricing-button:hover {
  background: var(--pricing-primary-hover);

  box-shadow: 0 5px 14px rgba(0, 112, 240, 0.16);
}

/* Keyboard accessibility */

.pricing-button:focus-visible,
.billing-option:focus-visible,
.feature-info:focus-visible {
  outline: 3px solid #80baff;

  outline-offset: 3px;
}

/* ----------------------------------------------------------
   12. DIVIDER
   ---------------------------------------------------------- */

.pricing-divider {
  width: 100%;

  height: 1px;

  margin: 22px 0 20px;

  background: var(--pricing-divider);
}

/* ----------------------------------------------------------
   13. FEATURE GROUPS
   ---------------------------------------------------------- */

.feature-group {
  margin-bottom: 25px;
}

.feature-group:last-child {
  margin-bottom: 0;
}

/* Group heading */

.feature-group h4 {
  margin: 0 0 12px;

  font-size: 13px;

  font-weight: 800;

  line-height: 1.4;

  color: #10182d;
}

/* Feature list */

.feature-group ul {
  display: flex;

  flex-direction: column;

  gap: 11px;

  margin: 0;

  padding: 0;

  list-style: none;
}

/* Individual feature */

.feature-group li {
  position: relative;

  display: flex;

  align-items: flex-start;

  gap: 9px;

  min-height: 16px;

  padding-right: 19px;

  color: #24324c;

  font-size: 12px;

  line-height: 1.45;
}

/* ----------------------------------------------------------
   14. GREEN CHECKMARKS
   ---------------------------------------------------------- */



.feature-group li::before {
  content: "✓";

  display: inline-flex;

  align-items: center;
  justify-content: center;

  flex: 0 0 13px;

  width: 13px;
  height: 13px;

  margin-top: 2px;

  border-radius: 50%;

  background: var(--pricing-green);

  color: #ffffff;

  font-family: Arial, sans-serif;

  font-size: 9px;

  font-weight: 800;

  line-height: 1;
}

/*
   Hide legacy icon elements if present.

   Remove this rule if other feature icons
   are intentionally used.
*/

.feature-group li > i {
  display: none;
}

/* ----------------------------------------------------------
   15. FEATURE INFORMATION TOOLTIP
   ---------------------------------------------------------- */



.feature-info {
  position: absolute;

  top: 0;
  right: 0;

  display: inline-grid;

  place-items: center;

  width: 16px;
  height: 16px;

  padding: 0;

  border: none;
  border-radius: 50%;

  background: #edf1f5;

  color: #53647d;

  font-family: inherit;

  font-size: 10px;

  font-weight: 800;

  cursor: help;
}

/* Tooltip bubble */

.feature-info::after {
  content: attr(data-tooltip);

  position: absolute;

  right: 0;

  bottom: calc(100% + 9px);

  z-index: 30;

  width: max-content;

  max-width: min(240px, 75vw);

  padding: 10px 12px;

  border-radius: 7px;

  background: #14223b;

  color: #ffffff;

  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);

  font-size: 11px;

  font-weight: 400;

  line-height: 1.5;

  text-align: left;

  white-space: normal;

  opacity: 0;

  visibility: hidden;

  pointer-events: none;

  transition:
    opacity 150ms ease,
    visibility 150ms ease;
}

/* Show tooltip */

.feature-info:hover::after,
.feature-info:focus-visible::after,
.feature-info[aria-expanded="true"]::after {
  opacity: 1;

  visibility: visible;
}




/* CONTINUOUS BUTTON SHINE
   overflow: hidden keeps the moving shine inside the button. Without it the shine
   widens the page on every frame and phones keep zooming out. */

.cm-shine-btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.popular-label.cm-shine-btn {
    position: absolute;
}

.cm-shine-btn::after {
    content: "";
    position: absolute;

    top: -50%;
    left: -85%;

    width: 48%;
    height: 200%;

    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255,255,255,0.08) 20%,
        rgba(255,255,255,0.48) 50%,
        rgba(255,255,255,0.08) 80%,
        transparent 100%
    );

    transform: skewX(-25deg);
    animation: cmButtonShine 3.5s linear infinite;

    pointer-events: none;
    z-index: 1;
}

.cm-shine-btn:hover {
    transform: translateY(-2px);
}

@keyframes cmButtonShine {
    0% {
        left: -85%;
    }

    100% {
        left: 150%;
    }}

/* ----------------------------------------------------------
   16. TABLET
   ---------------------------------------------------------- */

@media (max-width: 1100px) {
  .pricing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 20px;
  }

  .pricing-card {
    padding: 28px 24px;
  }

  .pricing-card-popular {
    padding-top: 70px;
  }

  .pricing-price .amount {
    font-size: 36px;
  }
}

/* ----------------------------------------------------------
   17. MOBILE
   ---------------------------------------------------------- */

@media (max-width: 700px) {
  .pricing-section {
    padding: 60px 0 70px;
  }

  .pricing-container {
    width: calc(100% - 32px);
  }

  .pricing-header h2 {
    font-size: clamp(30px, 7vw, 36px);

    letter-spacing: -1.2px;
  }

  .pricing-header p {
    font-size: 14px;
  }

  .pricing-billing-switch {
    margin: 25px auto 32px;
  }

  .billing-option {
    min-width: 96px;

    padding: 10px 15px;

    font-size: 13px;
  }

  .billing-saving {
    padding: 6px 8px;

    font-size: 10px;
  }

  .pricing-grid {
    grid-template-columns: 1fr;

    gap: 22px;
  }

  .pricing-card {
    padding: 26px 22px;

    min-height: auto;
  }

  .pricing-card-popular {
    padding-top: 66px;
  }

  .pricing-card-header {
    min-height: auto;

    margin-bottom: 22px;
  }

  .pricing-price .amount {
    font-size: 34px;
  }

  .feature-group li {
    font-size: 13px;
  }
}

/* ----------------------------------------------------------
   18. SMALL MOBILE
   ---------------------------------------------------------- */

@media (max-width: 380px) {
  .pricing-billing-switch {
    gap: 2px;
  }

  .billing-option {
    min-width: 78px;

    padding-inline: 10px;
  }

  .billing-saving {
    padding-inline: 6px;

    font-size: 9px;
  }
}

/* ----------------------------------------------------------
   19. REDUCED MOTION
   ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .pricing-section *,
  .pricing-section *::before,
  .pricing-section *::after {
    animation: none !important;

    transition: none !important;
  }
}

.pricing-header h2 .pricing-highlight {
    color: #0788f8;
}
