/* =============================================
   Area Cards Widget – XovoTech
   ============================================= */

/* ── Grid ── */
.acw-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    width: 100%;
}

.acw-grid--equal .acw-card {
    height: 100%;
}

/* ── Base Card ── */
.acw-card {
    --acw-accent: #2d6a4f;
    --acw-accent-hover: #1b4332;

    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background-color: #ffffff;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition:
        transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        border-color 0.3s ease;
    cursor: default;
}

a.acw-card {
    cursor: pointer;
}

/* ── Accent Top Bar ── */
.acw-card__accent-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--acw-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

.acw-card:hover .acw-card__accent-bar {
    transform: scaleX(1);
}

/* ── Background Image Overlay ── */
.acw-card__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.08;
    transition: opacity 0.4s ease;
    z-index: 0;
    pointer-events: none;
}

.acw-card:hover .acw-card__bg {
    opacity: 0.14;
}

/* ── Badge ── */
.acw-card__badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--acw-accent);
    background: rgba(45, 106, 79, 0.08);
    border-radius: 6px;
    line-height: 1.5;
    z-index: 1;
}

/* ── Body ── */
.acw-card__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

/* ── Icon ── */
.acw-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.08), rgba(45, 106, 79, 0.15));
    color: var(--acw-accent);
    flex-shrink: 0;
    transition: background 0.3s ease, transform 0.3s ease;
}

.acw-card__icon i {
    font-size: 22px;
    line-height: 1;
}

.acw-card__icon svg {
    width: 22px;
    height: 22px;
    fill: currentColor;
}

.acw-card:hover .acw-card__icon {
    background: linear-gradient(135deg, rgba(45, 106, 79, 0.14), rgba(45, 106, 79, 0.22));
    transform: translateY(-2px);
}

/* ── Content ── */
.acw-card__content {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.acw-card__title {
    margin: 0;
    padding: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #1a202c;
    transition: color 0.3s ease;
}

.acw-card:hover .acw-card__title {
    color: var(--acw-accent-hover);
}

.acw-card__desc {
    margin: 0;
    padding: 0;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.65;
    color: #64748b;
}

/* ── Arrow Indicator ── */
.acw-card__arrow {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: transparent;
    color: var(--acw-accent);
    opacity: 0;
    transform: translateX(-6px);
    transition:
        opacity 0.35s ease,
        transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
        background 0.3s ease;
    z-index: 1;
}

.acw-card:hover .acw-card__arrow {
    opacity: 1;
    transform: translateX(0);
    background: rgba(45, 106, 79, 0.08);
}

/* ==============================================
   CARD STYLE VARIANTS
   ============================================== */

/* ── Elevated (default) ── */
.acw-card--elevated {
    border-color: transparent;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.04);
}

.acw-card--elevated:hover {
    transform: translateY(-4px);
    box-shadow:
        0 8px 24px rgba(0, 0, 0, 0.08),
        0 16px 40px rgba(0, 0, 0, 0.04);
}

/* ── Bordered ── */
.acw-card--bordered {
    box-shadow: none;
    border-width: 1.5px;
}

.acw-card--bordered:hover {
    border-color: var(--acw-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

/* ── Flat ── */
.acw-card--flat {
    border-color: transparent;
    box-shadow: none;
    background-color: #f8fafc;
    border-radius: 8px;
}

.acw-card--flat:hover {
    background-color: #f1f5f9;
    transform: translateY(-2px);
}

.acw-card--flat .acw-card__accent-bar {
    height: 0;
}

/* ── Glassmorphic ── */
.acw-card--glassmorphic {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.acw-card--glassmorphic:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.08);
}

/* ==============================================
   RESPONSIVE BREAKPOINTS
   ============================================== */

/* Tablet landscape */
@media (max-width: 1024px) {
    .acw-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .acw-card {
        padding: 24px;
    }

    .acw-card__title {
        font-size: 17px;
    }
}

/* Tablet portrait */
@media (max-width: 768px) {
    .acw-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .acw-card {
        padding: 22px;
    }

    .acw-card__icon {
        width: 42px;
        height: 42px;
    }

    .acw-card__icon i {
        font-size: 18px;
    }

    .acw-card__icon svg {
        width: 18px;
        height: 18px;
    }

    .acw-card__title {
        font-size: 16px;
    }

    .acw-card__desc {
        font-size: 13px;
    }

    .acw-card__arrow {
        bottom: 16px;
        right: 16px;
        width: 28px;
        height: 28px;
    }
}

/* Mobile */
@media (max-width: 580px) {
    .acw-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .acw-card {
        padding: 20px;
    }

    .acw-card__body {
        flex-direction: row;
        align-items: flex-start;
        gap: 14px;
    }

    .acw-card__icon {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .acw-card__title {
        font-size: 15px;
    }

    .acw-card__desc {
        font-size: 13px;
        line-height: 1.55;
    }

    /* Always show arrow on mobile (no hover) */
    .acw-card__arrow {
        opacity: 0.6;
        transform: translateX(0);
        bottom: 14px;
        right: 14px;
    }
}

/* Small mobile */
@media (max-width: 380px) {
    .acw-card {
        padding: 16px;
    }

    .acw-card__body {
        gap: 12px;
    }

    .acw-card__icon {
        width: 36px;
        height: 36px;
    }

    .acw-card__title {
        font-size: 14px;
    }

    .acw-card__desc {
        font-size: 12px;
    }
}

/* ==============================================
   ACCESSIBILITY
   ============================================== */
a.acw-card:focus-visible {
    outline: 2px solid var(--acw-accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .acw-card,
    .acw-card__accent-bar,
    .acw-card__icon,
    .acw-card__arrow,
    .acw-card__bg,
    .acw-card__title {
        transition: none !important;
        transform: none !important;
    }

    .acw-card__arrow {
        opacity: 0.6;
    }
}
