/*
 * KanumHost — Order Forms / Blesta Blevo
 * Modern card-grid redesign for /order/forms/
 * Keeps original URLs and checkout behaviour; no Blesta template changes.
 */

.container-md > .row:has(> .order-listing) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    margin: 0;
    align-items: stretch;
    width: 100%;
}

.container-md > .row:has(> .order-listing) > .order-listing {
    width: auto;
    max-width: none;
    min-width: 0;
    padding: 0;
    margin: 0;
}

.order-listing > .card {
    position: relative;
    height: 100%;
    min-height: 250px;
    margin: 0;
    padding: 26px 24px 22px !important;
    overflow: hidden;
    background: #fff !important;
    border: 1px solid #e3ebe7 !important;
    border-radius: 16px !important;
    box-shadow: 0 5px 20px rgba(10, 40, 30, .045);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.order-listing > .card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, #0e4938, #20b56b);
    opacity: .9;
}

.order-listing > .card:hover {
    transform: translateY(-4px);
    border-color: #b8d9c8 !important;
    box-shadow: 0 14px 34px rgba(10, 55, 38, .10);
}

.order-listing .card > .row {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    margin: 0;
    width: 100%;
}

/* Explicitly restore the intended visual order of the original HTML:
   title, description, then CTA. */
.order-listing .card > .row > .head-item:first-child {
    order: 1;
}

.order-listing .card > .row > .col-sm-12 {
    order: 2;
}

.order-listing .card > .row > .head-item:nth-child(2) {
    order: 3;
}

/* Bootstrap column widths must not constrain the title or description. */
.order-listing .card > .row > .head-item,
.order-listing .card > .row > .col-sm-12 {
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    padding-left: 0;
    padding-right: 0;
}

.order-listing .head-item {
    display: block;
    width: 100%;
    max-width: 100%;
    flex: 0 0 auto;
    min-height: 0;
    padding: 0;
}

.order-listing .head-item:first-child {
    padding-right: 0;
}

.order-listing h3 {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 48px;
    margin: 0 0 18px;
    color: #14251f;
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: -.025em;
}

/* Real vector icons via inline SVG masks: crisp, consistent, no icon-font dependency. */
.order-listing h3::before {
    content: "";
    display: inline-block;
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background-color: #e8f6ee;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 23px 23px;
}

/* Domain: globe */
.container-md > .row:has(> .order-listing) > .order-listing:nth-child(1) h3::before {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23147448' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cellipse cx='12' cy='12' rx='4' ry='9'/%3E%3Cpath d='M3 12h18M5.5 6.5h13M5.5 17.5h13'/%3E%3C/svg%3E");
}

/* Titan Email: envelope */
.container-md > .row:has(> .order-listing) > .order-listing:nth-child(2) h3::before {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23147448' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3C/svg%3E");
}

/* Website Backup: circular restore arrow */
.container-md > .row:has(> .order-listing) > .order-listing:nth-child(3) h3::before {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23147448' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11a9 9 0 1 0 2.6-6.3L3 7'/%3E%3Cpath d='M3 3v4h4M12 7v5l3 2'/%3E%3C/svg%3E");
}

/* Email Hosting: envelope with @ */
.container-md > .row:has(> .order-listing) > .order-listing:nth-child(4) h3::before {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23147448' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m4 7 8 6 8-6'/%3E%3Ccircle cx='12' cy='12' r='2.5'/%3E%3C/svg%3E");
}

/* SSL Certificates: proper shield */
.container-md > .row:has(> .order-listing) > .order-listing:nth-child(5) h3::before {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23147448' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 6v5c0 5-3.4 8.5-8 10-4.6-1.5-8-5-8-10V6l8-3Z'/%3E%3Cpath d='m8.5 12 2.3 2.3 4.7-4.8'/%3E%3C/svg%3E");
}

/* cWatch Security: shield with a central check */
.container-md > .row:has(> .order-listing) > .order-listing:nth-child(6) h3::before {
    background-image:
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23147448' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 20 6v5c0 5-3.4 8.5-8 10-4.6-1.5-8-5-8-10V6l8-3Z'/%3E%3Cpath d='m8.5 12 2.3 2.3 4.7-4.8'/%3E%3C/svg%3E");
}

.order-listing p {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0 0 22px;
    color: #62746c;
    font-size: .96rem;
    line-height: 1.65;
    white-space: normal;
    overflow-wrap: anywhere;
}

.order-listing .head-item:nth-child(2) {
    display: block;
    width: 100%;
    max-width: 100%;
    margin-top: auto;
    padding: 0;
}

.order-listing a.btn.btn-success {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 18px;
    border: 1px solid #16834a;
    border-radius: 9px;
    background: #16834a;
    box-shadow: 0 3px 8px rgba(22, 131, 74, .13);
    color: #fff;
    font-size: 0;
    font-weight: 650;
    line-height: 1.3;
    text-decoration: none;
    white-space: nowrap;
    transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.order-listing a.btn.btn-success::after {
    content: "Encomendar";
    font-size: .94rem;
}

.order-listing a.btn.btn-success:hover,
.order-listing a.btn.btn-success:focus {
    background: #106b3c;
    border-color: #106b3c;
    box-shadow: 0 6px 14px rgba(22, 131, 74, .22);
    color: #fff;
    text-decoration: none;
}

.order-listing a.btn.btn-success:focus-visible {
    outline: 3px solid rgba(22, 131, 74, .28);
    outline-offset: 3px;
}

/* Keep the desktop CTA and the existing mobile CTA from appearing together. */
.order-listing a.btn.btn-success.d-none.d-sm-block {
    display: inline-flex !important;
    width: 100%;
}

.order-listing a.btn.btn-success.d-sm-none {
    display: none !important;
}

@media (max-width: 991.98px) {
    .container-md > .row:has(> .order-listing) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .order-listing > .card {
        min-height: 245px;
        padding: 22px 20px 20px !important;
    }

    .order-listing h3 {
        font-size: 1.15rem;
    }
}

@media (max-width: 575.98px) {
    .container-md > .row:has(> .order-listing) {
        grid-template-columns: minmax(0, 1fr);
        gap: 14px;
    }

    .order-listing > .card {
        min-height: 0;
        padding: 22px 20px 20px !important;
        border-radius: 13px !important;
    }

    .order-listing h3 {
        margin-bottom: 14px;
        font-size: 1.12rem;
    }

    .order-listing p {
        margin-bottom: 18px;
        font-size: .94rem;
    }

    .order-listing a.btn.btn-success.d-none.d-sm-block {
        display: inline-flex !important;
    }

    .order-listing a.btn.btn-success.d-sm-none {
        display: none !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .order-listing > .card,
    .order-listing a.btn.btn-success {
        transition: none;
    }
}
