/* ==========================================================================
   Cloud India Hub — offers row (the three cards under the hero)
   File: public/frontend/css/cih-offers.css
   Load AFTER cih-color.css.

   Replaces the in-body <style> block that used to live inside
   resources/views/frontend/index.blade.php. It is a linked stylesheet rather
   than an inline block for the same reason cih-color.css is: body <style>
   blocks land after every <head> sheet in document order and win ties, which
   is what made the old section so hard to restyle from outside.

   The `.cih-page.cih-page > .main-container.main-container` ground, glyph field
   and full-bleed rules stay in cih-color.css. This file only styles what is
   inside the band.
   ========================================================================== */

.cih-page.cih-page > .main-container.main-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr) minmax(0, 1.12fr);
    align-items: stretch;
    gap: 24px;
    max-width: 1340px;
    margin-inline: auto !important;
    padding-inline: clamp(1rem, 3vw, 1.5rem) !important;
}

@media (max-width: 1080px) {
    .cih-page.cih-page > .main-container.main-container {
        grid-template-columns: minmax(0, 1fr);
        max-width: 620px;
    }
}

/* Script and style children of the grid would otherwise take a column. */
.cih-page .main-container > :is(script, style, link) {
    display: none;
}

/* --------------------------------------------------------------------------
   Shared card shell
   -------------------------------------------------------------------------- */

.cih-offer {
    display: flex;
    flex-direction: column;
    border-radius: 20px;
    padding: 26px;
    position: relative;
    overflow: hidden;
    font-family: var(--cih-font, inherit);
}

.cih-offer--light {
    background: #fff;
    border: 1px solid #ece8f8;
    box-shadow: 0 18px 40px -20px rgba(8, 5, 30, 0.45);
}

/* The third card carries a faint lavender wash so the paired offer reads as
   the upgrade without needing a second accent colour. */
.cih-offer--tint {
    background: linear-gradient(170deg, #fbfaff 0%, #f6f3ff 100%);
}

/* --------------------------------------------------------------------------
   Badge — outlined, not filled. A solid green block next to a green tick read
   as a status chip; outlined reads as a label.
   -------------------------------------------------------------------------- */

.cih-offer__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 7px 14px;
    border: 1.5px solid #34d399;
    border-radius: 999px;
    background: #f0fdf7;
    color: #047857;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    line-height: 1;
}

.cih-offer__badge svg {
    width: 15px;
    height: 15px;
    flex: none;
}

/* --------------------------------------------------------------------------
   Headings
   -------------------------------------------------------------------------- */

/* cih-sections.css line 184 sets
   `.cih-page.cih-page :is(h1, h2, .main-title)` with !important on font-size,
   line-height, letter-spacing, weight AND colour, to normalise headings across
   the page. These card titles are <h2> inside .cih-page, so without !important
   here they render at the page display size and in --cih-ink — which is what
   made "Big Savings, Bigger Start" near-invisible on the dark card. */
.cih-page.cih-page .cih-offer .cih-offer__title {
    margin: 18px 0 0 !important;
    font-size: clamp(1.35rem, 1.75vw, 1.6rem) !important;
    font-weight: 800 !important;
    line-height: 1.18 !important;
    letter-spacing: -0.02em !important;
    color: #150e2e !important;
    text-wrap: balance;
}

.cih-page.cih-page .cih-offer .cih-offer__title em {
    font-style: normal;
    color: #6d28d9 !important;
}

.cih-offer__sub {
    margin: 8px 0 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #5f5680;
}

.cih-offer__hr {
    height: 1px;
    margin: 18px 0 0;
    border: 0;
    background: #e9e4f7;
}

/* --------------------------------------------------------------------------
   Card 2 — domain lookup
   -------------------------------------------------------------------------- */

.cih-offer__search {
    display: flex;
    align-items: stretch;
    margin-top: 18px;
    border: 1.5px solid #c4b5fd;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cih-offer__search:focus-within {
    border-color: #6d28d9;
    box-shadow: 0 0 0 4px rgba(109, 40, 217, 0.14);
}

.cih-offer__search input {
    flex: 1 1 auto;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    padding: 14px 16px;
    font: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    color: #150e2e;
}

.cih-offer__search input::placeholder {
    color: #9d95bb;
    font-weight: 500;
}

.cih-offer__search button {
    flex: none;
    width: 58px;
    border: 0;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(160deg, #7c3aed, #6d28d9);
}

.cih-offer__search button:hover { background: #5b21b6; }
.cih-offer__search button:focus-visible { outline: 3px solid #4c1d95; outline-offset: -3px; }
.cih-offer__search button svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   Price row
   -------------------------------------------------------------------------- */

.cih-offer__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.cih-offer__was {
    font-size: 1.05rem;
    font-weight: 600;
    color: #9d95bb;
    text-decoration: line-through;
}

.cih-offer__now {
    font-size: 2.1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #6d28d9;
    line-height: 1;
}

.cih-offer__save {
    margin-left: auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: #fef3c7;
    color: #b45309;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Feature lists
   -------------------------------------------------------------------------- */

.cih-offer__list {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
    display: grid;
    gap: 13px;
}

.cih-offer__list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 0.94rem;
    line-height: 1.45;
    color: #3f3a52;
}

.cih-offer__list svg {
    width: 18px;
    height: 18px;
    flex: none;
    margin-top: 2px;
    color: #6d28d9;
}

/* --------------------------------------------------------------------------
   Card 3 — split price block
   -------------------------------------------------------------------------- */

.cih-offer__split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 1px minmax(0, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.cih-offer__split hr {
    width: 1px;
    height: 100%;
    margin: 0;
    border: 0;
    background: #e9e4f7;
}

.cih-offer__splitlabel {
    font-size: 0.92rem;
    font-weight: 600;
    color: #3f3a52;
}

.cih-offer__splitvalue {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: #150e2e;
    line-height: 1;
}

.cih-offer__splitvalue small {
    font-size: 0.95rem;
    font-weight: 600;
    color: #5f5680;
}

.cih-offer__free {
    padding: 5px 11px;
    border-radius: 999px;
    background: #ede9fe;
    color: #5b21b6;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.cih-offer__note {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f4f0ff;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #4a4266;
}

.cih-offer__note svg {
    width: 19px;
    height: 19px;
    flex: none;
    margin-top: 1px;
    color: #7c3aed;
}

/* --------------------------------------------------------------------------
   CTA — the button pins to the bottom so the three cards line up whatever
   their content height.

   The slack is taken by .cih-offer__body rather than by an auto margin on the
   button. An auto margin absorbs the free space AND the intended gap, so on a
   short card the button ends up flush against the copy; letting the body grow
   keeps a real 22px gap in every case. Pooling the slack in one auto margin is
   exactly what produced the dead area in the old markup.
   -------------------------------------------------------------------------- */

.cih-offer__body {
    flex: 1 1 auto;
}

.cih-offer__cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin-top: 22px;
    padding: 16px 20px;
    border: 0;
    border-radius: 13px;
    cursor: pointer;
    font: inherit;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    box-shadow: 0 12px 26px -12px rgba(76, 29, 149, 0.75);
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.cih-offer__cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 16px 30px -12px rgba(76, 29, 149, 0.85);
}

.cih-offer__cta:focus-visible { outline: 3px solid #ede9fe; outline-offset: 3px; }
.cih-offer__cta svg { width: 18px; height: 18px; flex: none; }

/* --------------------------------------------------------------------------
   Card 1 — countdown
   -------------------------------------------------------------------------- */

.cih-offer--dark {
    background:
        radial-gradient(30rem 18rem at 15% 0%, #4c1d95 0%, rgba(76, 29, 149, 0) 62%),
        linear-gradient(165deg, #2a1055 0%, #1c0b3d 55%, #150a30 100%);
    color: #fff;
}

/* Centred rather than top-aligned: the card is stretched to the height of the
   taller pricing cards beside it, and pinning the clock to the top left an
   empty band above the date row. */
.cih-offer--dark .cih-offer__body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cih-page.cih-page .cih-offer--dark .cih-offer__title { color: #fff !important; }
.cih-offer--dark .cih-offer__sub { color: #cfc6f2; }

.cih-offer__tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: center;
    padding: 9px 18px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    background: rgba(139, 92, 246, 0.28);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    line-height: 1;
}

.cih-offer--dark .cih-offer__title,
.cih-offer--dark .cih-offer__sub {
    text-align: center;
}

.cih-offer__clock {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 10px;
    margin-top: 26px;
}

.cih-offer__unit {
    flex: 1 1 0;
    max-width: 118px;
    text-align: center;
}

.cih-offer__box {
    display: grid;
    place-items: center;
    padding: 16px 6px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.07);
    font-size: clamp(1.6rem, 3vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.cih-offer__unitlabel {
    margin-top: 9px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #b6a9e0;
}

.cih-offer__colon {
    padding-top: 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.34);
}

.cih-offer__ends {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 26px;
}

.cih-offer__ends svg { width: 30px; height: 30px; flex: none; color: #fbbf24; }
.cih-offer__endslabel { font-size: 0.85rem; color: #cfc6f2; }
.cih-offer__endsdate {
    display: block;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #fbbf24;
}

/* Decoration. Absolutely positioned and pointer-events:none, so it cannot
   intercept clicks on the card. */
.cih-offer__deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}

.cih-offer__deco--burst-a { top: -30px; left: -34px; width: 108px; opacity: .8; }
.cih-offer__deco--burst-b { top: -36px; right: -30px; width: 122px; opacity: .8; }
.cih-offer__deco--wave { left: 0; right: 0; bottom: 0; width: 100%; }

.cih-offer--dark > *:not(.cih-offer__deco) { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   Small screens
   -------------------------------------------------------------------------- */

@media (max-width: 560px) {
    .cih-offer { padding: 22px 18px; }
    .cih-offer__split { grid-template-columns: minmax(0, 1fr); }
    .cih-offer__split hr { width: 100%; height: 1px; }
    .cih-offer__save { margin-left: 0; }
}
