.cards-grid {
    display: grid;
    gap: 30px;
}

.cards-grid .rich-text-editor {
    grid-column: 1 / -1;
    margin-bottom: 3.5rem;
}

.cards-grid .card .cta-container {
    padding-top: 5rem;
}

.cards-grid .container {
    gap: 30px;
}

.cards-grid.three-column .container .cards-desktop {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
}

.cards-grid.two-column .cards-desktop {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.cards-grid.style-3 .container {
    row-gap: 60px;
}

.cards-grid .card {
    display: flex;
    flex-direction: column;
    padding: 30px; /* uniform padding inside cards */
    background-position-x: right;
    background-repeat: no-repeat;
    background-position-y: bottom;
    background: transparent;
    border: 2px solid #1976D2; /* Blue border */
    box-shadow: none;
    border-radius: 20px;
    position: relative;
    transition: all 0.3s ease;
    overflow: hidden; /* ensures link and hover work inside rounded corners */
    color: #000; /* default text color black */
}

.cards-grid .card:hover {
    background-color: #1976D2;
    color: #fff;
    box-shadow: none;
}

.cards-grid .card a.card-link {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 1; /* below content so hover works */
    display: block;
    text-indent: -9999px;
}

.cards-grid .card .card-content {
    position: relative;
    z-index: 2; /* above the link so hover triggers on card */
}

.cards-grid.style-3 .card {
    gap: 23px;
    padding: 0;
    display: grid;
    box-shadow: none;
    border: none;
    background-color: transparent;
    grid-template-columns: 80px 1fr;
}

.cards-grid.style-3 .card .card-body {
    margin-bottom: 0;
}

.cards-grid.style-3 .card:hover {
    background-image: none;
}

.cards-grid.style-3 .card:hover .card-body > * {
    color: inherit;
}

.cards-grid.style-4 .card {
    background-size: 26.0rem;
    background-image: url('https://20155276.fs1.hubspotusercontent-na1.net/hubfs/20155276/CTA%20-%20Blue%20Pattern%20-%20Right.svg');
}

.cards-grid .card .icon {
    margin-bottom: 10px;
}

.cards-grid .card .icon img.hover-icon {
    display: none;
}

.cards-grid .card:hover .icon img {
    display: none;
}

.cards-grid .card:hover .icon img.hover-icon {
    display: inline-block;
}

.cards-grid.style-2 .card .icon {
    margin-bottom: 15px;
}

.cards-grid .card .card-body {
    flex: 1;
    text-align: center;
}

.cards-grid .card:hover .card-body > * {
    color: #fff;
}

.cards-grid .card-body h3, 
.cards-grid .card-body h3 span,
.cards-grid .card-body p {
    color: #000; /* default black */
    font-family: var(--secondaryFont) !important;
    letter-spacing: .5px;
    transition: color 0.3s ease;
}

.cards-grid .card:hover .card-body h3,
.cards-grid .card:hover .card-body h3 span,
.cards-grid .card:hover .card-body p {
    color: #fff;
}

.cards-grid .card:hover .btn.link {
    color: var(--white);
}

.cards-grid .card:hover .btn.link:before {
    background-color: var(--white);
}

.cards-grid .card:hover .btn.link:after {
    content: "";
    width: 10px;
    height: 10px;
    display: block;
    background-repeat: no-repeat;
    background-image: url('https://20155276.fs1.hubspotusercontent-na1.net/hubfs/20155276/Learn%20More%20Arrow%20-%20White.svg');
}

.cards-mobile {
    display: none;
}

.cards-grid .swiper-pagination {
    align-items: stretch;
    display: flex;
    gap: 5px;
    height: 50px;
    margin: 40px auto 0;
    position: relative;
    width: 150px;
    justify-content: center;
}

.cards-grid button.swiper-button-next,
.cards-grid button.swiper-button-prev {
    -webkit-appearance: auto;
    background: none!important;
    border: 0!important;
    bottom: 0;
    font-size: 0!important;
    height: 47px!important;
    left: auto;
    position: relative;
    right: auto;
    top: 20px;
    width: 57px!important;
}

.cards-grid .swiper-button-next:after,
.cards-grid .swiper-button-prev:after,
.cards-grid .swiper-rtl .swiper-button-next:after,
.cards-grid .swiper-rtl .swiper-button-prev:after {
    display: none!important;
}

.cards-grid .swiper-button-prev,
.cards-grid .swiper-rtl .swiper-button-next {
    left: auto;
    right: auto;
}

.cards-grid .swiper-button-next:hover svg path,
.cards-grid .swiper-button-prev:hover svg path,
.cards-grid .swiper-button-next:focus svg path,
.cards-grid .swiper-button-prev:focus svg path {
    fill: #105eac;
}

.cards-grid .swiper-button-next:hover svg g path,
.cards-grid .swiper-button-prev:hover svg g path,
.cards-grid .swiper-button-next:focus svg g path,
.cards-grid .swiper-button-prev:focus svg g path {
    fill: #fff;
}

.cards-grid button.swiper-button-next {
    transform: rotate(180deg);
}

@media (max-width: 992px) {
    .cards-desktop {
        display:none!important;
    }

    .cards-mobile {
        display: block;
    }

    .cards-mobile .swiper-slide .card {
        display: flex;
        flex-direction: column;
        height: 100%;
        justify-content: space-between;
        position: relative;
    }

    .cards-mobile .cta-container {
        bottom: 20px;
        left: 0;
        position: absolute;
        text-align: center;
        width: 100%;
    }

    .cards-grid .swiper-pagination {
        align-items: stretch;
        justify-content: center;
    }

    .cards-grid button.swiper-button-next,
    .cards-grid button.swiper-button-prev {
        height: 57px !important;
        width: 57px !important;
    }
}

.cards-grid.style-2 .card-body h3,
.cards-grid.style-2 .card-body h4, 
.cards-grid.style-2 .card-body h3 span,
.cards-grid.style-2 .card-body h4 span {
    color: #000; /* default black for style 2 */
    font-family: var(--primaryFont) !important;
    letter-spacing: .5px;
    text-align: center;
}

.cards-grid.style-2 .card {
    align-items: center;
    padding: 30px;
    margin: 20px 15px;
}

.cards-grid.style-3 .card {
    display: flex;
    flex-direction: column;
    padding: 30px;
    border: 2px solid #1976D2; /* Blue border */
    border-radius: 25px;
    position: relative;
    background: white;
    overflow: hidden;
    transition: all 0.3s ease;
    color: #000;
}

/* Icon in top-right corner */
.cards-grid.style-3 .card .icon {
    position: absolute;
    top: 15px;
    right: 15px;
    margin: 0;
}

/* Card body left aligned */
.cards-grid.style-3 .card .card-body {
    flex: 1;
    text-align: left;
    margin-top: 40px; /* Make room for icon */
}

/* Hover effect */
.cards-grid.style-3 .card:hover {
    background-color: #1976D2;
    color: #fff;
}

.cards-grid.style-3 .card:hover .card-body > * {
    color: #fff;
}

.cards-grid.style-3 .card:hover .icon img {
    display: none;
}

.cards-grid.style-3 .card:hover .icon img.hover-icon {
    display: inline-block;
}

/* CTA button */
.cards-grid.style-3 .card:hover .btn.link {
    color: var(--white);
}

.cards-grid.style-3 .card:hover .btn.link:before {
    background-color: var(--white);
}

.cards-grid.style-3 .card:hover .btn.link:after {
    content: "";
    width: 10px;
    height: 10px;
    display: block;
    background-repeat: no-repeat;
    background-image: url('https://20155276.fs1.hubspotusercontent-na1.net/hubfs/20155276/Learn%20More%20Arrow%20-%20White.svg');
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .cards-grid.style-3 .card {
        padding: 20px;
    }

    .cards-grid.style-3 .card .icon {
        top: 10px;
        right: 10px;
    }

    .cards-grid.style-3 .card .card-body {
        margin-top: 35px;
    }
}

.cards-grid.style-3 .card{
  margin: 15px 15px;
}

@media (max-width: 992px) {
    .cards-grid.style-2 {
        margin-top: 20px; /* Adjust value as needed */
    }
}

.angle-shape-bottom {
  background: url(https://146481062.fs1.hubspotusercontent-eu1.net/hubfs/146481062/angle.svg) no-repeat;
  background-position: 100% 100%;
  background-size: contain;
  bottom: 5px;
  height: 70px;
  pointer-events: none;
  position: absolute;
  right: 5px;
  width: 120px;
  z-index: 2;
}

.angle-shape-top {
  background: url(https://146481062.fs1.hubspotusercontent-eu1.net/hubfs/146481062/angle.svg) no-repeat;
  background-position: 0 0;
  background-size: contain;
  top: 5px;
  left: -45px;
  height: 70px;
  width: 120px;
  pointer-events: none;
  position: absolute;
  z-index: 2;
  transform: scaleX(-1) scaleY(-1); /* flipped */
}






@media (max-width: 992px) {
  .angle-shape-bottom {
    right: 5px;
    top: auto;
    bottom: 5px;
    width: 100px;
    height: 120px;
  }
  .angle-shape-top {
    left: 5px;
    top: -15px;
    transform: rotate(0deg) scaleX(-1) scaleY(-1);
    width: 100px;
    height: 120px;
  }
}

/* Style 3: tablet 2 columns */
@media (min-width: 768px) and (max-width: 992px) {
    .cards-grid.style-3 .cards-desktop {
        display: grid !important; /* override display:none */
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 30px;
    }

    /* Optional: reduce card margin/padding for tablet */
    .cards-grid.style-3 .card {
        margin: 10px;
        padding: 20px;
    }
}
@media (min-width: 768px) and (max-width: 992px) {
    .cards-grid.style-3 .cards-mobile {
        display: none !important; /* hide mobile cards on tablet */
    }

  @media (min-width: 768px) and (max-width: 992px) {
    .angle-shape-bottom {
        transform: none !important; /* remove any rotation/scaling on tablets */
        right: 5px;
        bottom: 5px;
        width: 100px;
        height: 120px;
    }
        .angle-shape-top {
        left: 5px;
        top: -15px;
        width: 100px;
        height: 120px;
    }
}