/* ============================================
   DASHED GRID SECTION - REUSABLE COMPONENT
   ============================================
   
   A configurable grid section with dashed borders.
   Supports 2 or 3 rows with customizable colors.
   
   Usage: Add CSS custom properties to the section:
   - --dashed-grid-gradient: gradient for icons and titles
   - --dashed-grid-color-start: start color of gradient (for fallbacks)
   - --dashed-grid-color-end: end color of gradient (for fallbacks)
   
   Example:
   <section class="dashed-grid" style="
     --dashed-grid-gradient: linear-gradient(178deg, #D40069 0%, #CD0000 100%);
     --dashed-grid-color-start: #D40069;
     --dashed-grid-color-end: #CD0000;
   ">
   
   ============================================ */

/* Dashed Grid Section */
.dashed-grid {
    position: relative;
    width: 100%;
    background: var(--color-black);
    padding: 80px 0;
    overflow: hidden;

    /* Default colors (pink to red gradient) */
    --dashed-grid-gradient: linear-gradient(178.008deg, rgb(212, 0, 105) 0%, rgb(205, 0, 0) 100%);
    --dashed-grid-color-start: rgb(212, 0, 105);
    --dashed-grid-color-end: rgb(205, 0, 0);
}

.dashed-grid-content {
    position: relative;
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 80px;
}

.dashed-grid-header {
    position: relative;
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 80px;
    z-index: 10;
    margin-bottom: 16px;
}

.dashed-grid-title {
    font-family: var(--font-hero);
    font-size: 40px;
    font-weight: 400;
    line-height: 1;
    color: var(--color-white);
    margin-bottom: 24px;
}

/* Vertical border lines */
.dashed-grid-border-left,
.dashed-grid-border-center,
.dashed-grid-border-right {
    position: absolute;
    width: 0;
    border-left: 2px dashed #303030;
    top: 0;
    bottom: -80px;
    z-index: 5;
    pointer-events: none;
}

.dashed-grid-border-left {
    left: 80px;
}

.dashed-grid-border-center {
    left: 50%;
    transform: translateX(-50%);
}

.dashed-grid-border-right {
    right: 80px;
}

/* Top and bottom fades */
.dashed-grid-fade-top,
.dashed-grid-fade-bottom {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 1800px;
    height: 80px;
    background: linear-gradient(180deg, var(--color-black) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 5;
}

.dashed-grid-fade-top {
    top: 0;
}

.dashed-grid-fade-bottom {
    bottom: 0;
    transform: translateX(-50%) rotate(180deg);
}

/* Horizontal lines */
.dashed-grid-horizontal-line {
    position: relative;
    width: 100vw;
    height: 0;
    border-top: 2px dashed #303030;
    margin-left: calc(-50vw + 50%);
    z-index: 2;
    transform: scaleX(0);
}

.dashed-grid-horizontal-line.animate-in-left {
    transform-origin: left;
    animation: line-draw-left 1s ease-out forwards;
}

.dashed-grid-horizontal-line.animate-in-right {
    transform-origin: right;
    animation: line-draw-right 1s ease-out forwards;
}

.dashed-grid-horizontal-line::before,
.dashed-grid-horizontal-line::after {
    content: '';
    position: absolute;
    top: -2px;
    width: calc((100vw - 1280px) / 2);
    height: 2px;
    z-index: 3;
    pointer-events: none;
}

.dashed-grid-horizontal-line::before {
    left: 0;
    background: linear-gradient(90deg, var(--color-black) 0%, transparent 100%);
}

.dashed-grid-horizontal-line::after {
    right: 0;
    background: linear-gradient(270deg, var(--color-black) 0%, transparent 100%);
}

/* Keyframe animations for horizontal lines */
@keyframes line-draw-left {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes line-draw-right {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

/* Grid Row */
.dashed-grid-row {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0;
    z-index: 10;
    margin: 0;
}

/* Grid Cards */
.dashed-grid-card {
    position: relative;
    padding: 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 160px;
}

/* Grid Card Icon */
.dashed-grid-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dashed-grid-gradient);
    -webkit-mask-image: var(--icon-url);
    mask-image: var(--icon-url);
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.dashed-grid-icon img {
    display: none;
}

/* Grid Card Title */
.dashed-grid-card-title {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
    text-transform: uppercase;
    background: var(--dashed-grid-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
}

/* Grid Card Description */
.dashed-grid-description {
    font-family: var(--font-body);
    font-size: 18px;
    color: var(--color-light-grey);
    line-height: 1.6;
    margin: 0;
}

/* ============================================
   RESPONSIVE BREAKPOINTS - DASHED GRID
   ============================================ */

/* 1440px Breakpoint */
@media (max-width: 1440px) {
    .dashed-grid-content {
        padding: 0 80px;
    }

    .dashed-grid-header {
        padding: 0 80px;
    }

    .dashed-grid-border-left {
        left: 80px;
    }

    .dashed-grid-border-right {
        right: 80px;
    }
}

/* 1024px Breakpoint */
@media (max-width: 1024px) {
    .dashed-grid-content {
        padding: 0 40px;
    }

    .dashed-grid-header {
        padding: 0 40px;
    }

    .dashed-grid-border-left {
        left: 40px;
    }

    .dashed-grid-border-right {
        right: 40px;
    }

    .dashed-grid-title {
        font-size: 32px;
    }

    .dashed-grid-card {
        padding: 24px;
    }

    .dashed-grid-card-title {
        font-size: 16px;
    }

    .dashed-grid-description {
        font-size: 14px;
    }
}

/* 768px Breakpoint */
@media (max-width: 768px) {
    .dashed-grid {
        padding: 60px 0;
    }

    .dashed-grid-content {
        padding: 0 20px;
    }

    .dashed-grid-header {
        padding: 0 20px;
    }

    .dashed-grid-title {
        font-size: 32px;
    }

    .dashed-grid-border-left {
        left: 20px;
    }

    .dashed-grid-border-right {
        right: 20px;
    }

    /* Hide center border on mobile */
    .dashed-grid-border-center {
        display: none;
    }

    .dashed-grid-row {
        grid-template-columns: 1fr;
    }

    .dashed-grid-card {
        padding: 20px;
        min-height: 140px;
    }

    /* Add horizontal line between cards in single column */
    .dashed-grid-row .dashed-grid-card:nth-of-type(2) {
        position: relative;
        padding-top: 24px;
    }

    .dashed-grid-row .dashed-grid-card:nth-of-type(2)::before {
        content: '';
        position: absolute;
        top: 0;
        left: calc(-50vw + 50%);
        width: 100vw;
        height: 0;
        border-top: 2px dashed #303030;
    }

    .dashed-grid-icon {
        width: 28px;
        height: 28px;
    }

    .dashed-grid-card-title {
        font-size: 16px;
    }

    .dashed-grid-description {
        font-size: 13px;
    }
}

/* 480px Breakpoint */
@media (max-width: 480px) {
    .dashed-grid {
        padding: 40px 0;
    }

    .dashed-grid-content {
        padding: 0 20px;
    }

    .dashed-grid-header {
        padding: 0 20px;
    }

    .dashed-grid-title {
        font-size: 28px;
    }

    .dashed-grid-border-left {
        left: 20px;
    }

    .dashed-grid-border-right {
        right: 20px;
    }

    .dashed-grid-fade-top,
    .dashed-grid-fade-bottom {
        width: 100%;
    }

    .dashed-grid-card {
        padding: 16px;
        min-height: 120px;
    }

    /* Add horizontal line between cards in single column */
    .dashed-grid-row .dashed-grid-card:nth-of-type(2) {
        position: relative;
        padding-top: 20px;
    }

    .dashed-grid-row .dashed-grid-card:nth-of-type(2)::before {
        content: '';
        position: absolute;
        top: 0;
        left: calc(-50vw + 50%);
        width: 100vw;
        height: 0;
        border-top: 2px dashed #303030;
    }

    .dashed-grid-icon {
        width: 24px;
        height: 24px;
    }

    .dashed-grid-card-title {
        font-size: 14px;
    }

    .dashed-grid-description {
        font-size: 12px;
    }
}