/* Invest in Sadat — DS8 kinetic cards */

:root {
    --inv-dark: #0f172a;
    --inv-blue: #2563eb;
    --inv-gold: #f59e0b;
    --inv-bg: #f1f5f9;
    --inv-white: #ffffff;
    --inv-text-dim: #64748b;
    --inv-card-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
    --inv-transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.inv-page {
    background:
        linear-gradient(rgba(6, 17, 38, 0.72), rgba(6, 17, 38, 0.68)),
        url("../images/invest-background.jpg") center / cover;
    padding: 2.5rem 0 4rem;
    /* Stay within the viewport — avoid 100vw + negative margin (causes horizontal scroll) */
    width: 100%;
    max-width: 100%;
    margin-inline: 0;
    box-sizing: border-box;
}

.inv-page .container {
    max-width: 1400px;
}

.inv-header {
    text-align: center;
    margin-bottom: 3rem;
}

.inv-header h1,
.inv-header h2 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.inv-header p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.78);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.inv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    gap: 1.25rem;
}

.inv-card {
    position: relative;
    isolation: isolate;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 20px 46px rgba(6, 17, 38, 0.2);
    opacity: 0;
    transform: translateY(34px);
    animation: inv-reveal 0.8s ease forwards;
    transition: transform 0.32s ease, box-shadow 0.32s ease, border-color 0.32s ease;
    border: 1px solid rgba(255, 255, 255, 0.36);
    cursor: pointer;
    display: grid;
    grid-template-columns: minmax(120px, 34%) 1fr;
    min-height: 255px;
    text-decoration: none;
    color: inherit;
    backdrop-filter: blur(12px);
}

@keyframes inv-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.inv-card:hover {
    box-shadow: 0 30px 70px rgba(6, 17, 38, 0.3);
    transform: translateY(-8px);
    border-color: rgba(245, 158, 11, 0.44);
}

.inv-card::before {
    content: "";
    position: absolute;
    inset-block: 1rem;
    inset-inline-start: 0;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #f8c45c, #b97817);
    z-index: 3;
}

.inv-card-index {
    position: absolute;
    z-index: 4;
    inset-inline-end: 1rem;
    top: 1rem;
    color: rgba(15, 23, 42, 0.11);
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
}

.inv-card:nth-child(1) { animation-delay: 0.1s; }
.inv-card:nth-child(2) { animation-delay: 0.2s; }
.inv-card:nth-child(3) { animation-delay: 0.3s; }
.inv-card:nth-child(4) { animation-delay: 0.4s; }
.inv-card:nth-child(5) { animation-delay: 0.5s; }
.inv-card:nth-child(6) { animation-delay: 0.6s; }

.inv-img-area {
    position: relative;
    overflow: hidden;
    z-index: 1;
    min-height: 100%;
    background: linear-gradient(135deg, #061126, #172554);
}

.inv-img-area img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.65s ease, filter 0.65s ease;
    filter: grayscale(12%) saturate(0.9);
}

.inv-card:hover .inv-img-area img {
    transform: scale(1.08);
    filter: grayscale(0%) saturate(1.05);
}

.inv-img-area::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(6, 17, 38, 0.1), rgba(6, 17, 38, 0.72)),
        radial-gradient(circle at 28% 22%, rgba(245, 158, 11, 0.2), transparent 34%);
    pointer-events: none;
}

.inv-badge {
    position: absolute;
    top: 1rem;
    inset-inline-start: 1rem;
    background: rgba(6, 17, 38, 0.58);
    color: #fff;
    padding: 0.42rem 0.78rem;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.78rem;
    box-shadow: 0 10px 20px rgba(6, 17, 38, 0.18);
    backdrop-filter: blur(10px);
    z-index: 10;
}

.inv-card-body {
    padding: 1.55rem 1.55rem 1.35rem;
    z-index: 2;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

.inv-card-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, #f4bd4a, #a97312);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 14px 28px rgba(169, 115, 18, 0.24);
}

.inv-card-body h3 {
    font-size: 1.28rem;
    margin-bottom: 0.55rem;
    color: var(--inv-dark);
    font-weight: 900;
    line-height: 1.35;
    padding-inline-end: 2.2rem;
    transition: color 0.24s ease;
}

.inv-card:hover .inv-card-body h3 {
    color: var(--portal-primary, #2c2e85);
}

.inv-card-body p {
    color: var(--inv-text-dim);
    line-height: 1.7;
    font-size: 0.93rem;
    margin-bottom: 0;
}

.inv-cta {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(15, 23, 42, 0.08);
    color: var(--portal-primary, #2c2e85);
    font-weight: 900;
    font-size: 0.98rem;
    margin-top: auto;
}

.inv-cta i {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(44, 46, 133, 0.08);
    color: var(--portal-primary, #2c2e85);
    font-size: 1.2rem;
    transition: transform 0.24s ease, background 0.24s ease, color 0.24s ease;
}

.inv-card:hover .inv-cta i {
    background: var(--portal-primary, #2c2e85);
    color: #fff;
    transform: translateX(-3px);
}

[dir="ltr"] .inv-card:hover .inv-cta i {
    transform: translateX(3px);
}

.inv-empty {
    text-align: center;
    color: var(--inv-text-dim);
    padding: 3rem 1rem;
}

@media (prefers-reduced-motion: reduce) {
    .inv-card {
        opacity: 1;
        transform: none;
        animation: none;
    }
}

@media (max-width: 768px) {
    .inv-page {
        padding: 1.5rem 0 2.5rem;
    }

    .inv-page .container {
        padding-left: max(0.75rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.75rem, env(safe-area-inset-right, 0px));
    }

    .inv-header {
        margin-bottom: 2rem;
    }

    .inv-header h1,
    .inv-header h2 {
        font-size: clamp(1.5rem, 6vw, 2.25rem);
    }

    .inv-header p {
        font-size: 1rem;
        padding-inline: 0.25rem;
    }

    .inv-grid {
        grid-template-columns: 1fr;
    }

    .inv-card {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .inv-card-body {
        padding: 1.35rem;
    }

    .inv-img-area {
        min-height: 190px;
    }
}
