/**
 * Goals Section — Editorial numbered cards, light on dark
 */

.goals {
    background: #f7f9f8;
    padding: var(--spacing-4xl) 0;
    position: relative;
    color: var(--text-dark);
    overflow: hidden;
}

/* Decorative background accent */
.goals::before {
    content: '';
    position: absolute;
    top: -120px;
    inset-inline-end: -120px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 61, 53, 0.06) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.goals::after {
    content: '';
    position: absolute;
    bottom: -150px;
    inset-inline-start: -150px;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(200, 168, 130, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.goals .container {
    position: relative;
    z-index: 1;
}

/* Section Header */
.goals .section-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    max-width: 760px;
    margin-inline: auto;
}

.goals .section-header::before {
    content: 'أهدافنا';
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-gold);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-xs) var(--spacing-md);
    background: rgba(200, 168, 130, 0.12);
    border-radius: 100px;
    text-transform: uppercase;
}

.goals .section-title {
    font-size: 2.75rem;
    font-weight: 900;
    color: var(--primary-dark);
    margin: 0 0 var(--spacing-md) 0;
    font-family: var(--font-heading);
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.goals .section-subtitle {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    font-weight: 400;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.7;
}

/* Grid */
.goals-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-xl);
}

/* Card */
.goal-item {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--spacing-xl);
    row-gap: var(--spacing-lg);
    padding: var(--spacing-2xl) var(--spacing-2xl) var(--spacing-xl);
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid rgba(0, 61, 53, 0.08);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.35s ease;
    overflow: hidden;
    isolation: isolate;
}

/* Side accent bar (inline-start, vertical — feels anchored) */
.goal-item::before {
    content: '';
    position: absolute;
    top: var(--spacing-2xl);
    bottom: var(--spacing-2xl);
    inset-inline-start: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--accent-gold), rgba(200, 168, 130, 0.3));
    border-radius: 0 4px 4px 0;
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle hover glow */
.goal-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(0, 61, 53, 0.04), transparent 55%);
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: -1;
    pointer-events: none;
}

.goal-item:hover {
    transform: translateY(-6px);
    border-color: rgba(200, 168, 130, 0.4);
    box-shadow: 0 24px 48px -18px rgba(0, 61, 53, 0.18);
}

.goal-item:hover::before {
    top: 0;
    bottom: 0;
    width: 4px;
}

.goal-item:hover::after {
    opacity: 1;
}

/* Icon (top-start of grid) — light tile, primary-dark icon for crisp contrast */
.goal-icon-wrapper {
    grid-column: 1;
    grid-row: 1;
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 168, 130, 0.14);
    border: 1px solid rgba(200, 168, 130, 0.3);
    border-radius: 14px;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.35s ease,
                border-color 0.35s ease;
    position: relative;
    z-index: 1;
}

.goal-item:hover .goal-icon-wrapper {
    transform: rotate(-4deg) scale(1.04);
    background: var(--accent-gold);
    border-color: var(--accent-gold);
}

.goal-icon {
    font-size: 1.5rem;
    color: var(--primary-dark);
    transition: color 0.35s ease, transform 0.35s ease;
}

.goal-item:hover .goal-icon {
    color: #ffffff;
    transform: scale(1.08);
}

/* Number — paired with icon, at top-end */
.goal-number {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    color: rgba(0, 61, 53, 0.12);
    font-family: var(--font-heading);
    letter-spacing: 1px;
    transition: color 0.35s ease;
    pointer-events: none;
}

.goal-item:hover .goal-number {
    color: var(--accent-gold);
}

/* Content (spans full width, below icon row) */
.goal-content {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.goal-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--primary-dark);
    margin: 0;
    font-family: var(--font-heading);
    line-height: 1.35;
    letter-spacing: -0.3px;
}

.goal-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.75;
    margin: 0;
    font-weight: 400;
}

/* Entrance animation */
@keyframes goalFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.goal-item {
    animation: goalFadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.goal-item:nth-child(1) { animation-delay: 0.05s; }
.goal-item:nth-child(2) { animation-delay: 0.15s; }
.goal-item:nth-child(3) { animation-delay: 0.25s; }
.goal-item:nth-child(4) { animation-delay: 0.35s; }

/* Responsive */
@media (max-width: 1024px) {
    .goals {
        padding: var(--spacing-4xl) 0;
    }

    .goals .section-title {
        font-size: 2.25rem;
    }

    .goal-item {
        padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg);
        row-gap: var(--spacing-md);
    }

    .goal-title {
        font-size: 1.1875rem;
    }
}

@media (max-width: 768px) {
    .goals {
        padding: var(--spacing-3xl) 0;
    }

    .goals .section-header {
        margin-bottom: var(--spacing-2xl);
    }

    .goals .section-title {
        font-size: 1.875rem;
    }

    .goals .section-subtitle {
        font-size: 1rem;
    }

    .goals-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .goal-item {
        padding: var(--spacing-xl) var(--spacing-lg) var(--spacing-lg);
        column-gap: var(--spacing-lg);
    }

    .goal-icon-wrapper {
        width: 54px;
        height: 54px;
        border-radius: 13px;
    }

    .goal-icon {
        font-size: 1.375rem;
    }

    .goal-number {
        font-size: 1.5rem;
    }

    .goal-title {
        font-size: 1.125rem;
    }

    .goal-description {
        font-size: 0.9375rem;
        line-height: 1.7;
    }
}

@media (max-width: 480px) {
    .goals .section-header::before {
        font-size: 0.75rem;
        letter-spacing: 1.5px;
    }

    .goals .section-title {
        font-size: 1.5rem;
    }

    .goals .section-subtitle {
        font-size: 0.9375rem;
    }

    .goal-item {
        padding: var(--spacing-lg) var(--spacing-md);
        column-gap: var(--spacing-md);
        row-gap: var(--spacing-md);
    }

    .goal-icon-wrapper {
        width: 48px;
        height: 48px;
        border-radius: 12px;
    }

    .goal-icon {
        font-size: 1.25rem;
    }

    .goal-number {
        font-size: 1.25rem;
    }

    .goal-title {
        font-size: 1.0625rem;
    }

    .goal-description {
        font-size: 0.875rem;
        line-height: 1.65;
    }
}
