/* How-to Steps Styling */

.howto-step-card {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;

    /* subtle raised effect */
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);

    /* smooth hover animation */
    transition: box-shadow 0.2s ease, transform 0.2s ease;

    max-width: 900px; /* Control overall width */
    margin: 0 auto; /* Center the card */
    height: 400px; /* Fixed height - adjust as needed */
    display: flex;
    flex-direction: column;
    background-color: rgb(245, 245, 245);
}

.howto-step-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem;
}

.howto-step-card:hover {
    /* very slight lift + slightly stronger shadow */
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.10);
}

/* Step number and title on same line */
.howto-step-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.howto-step-badge {
    font-size: 0.95rem;
    padding: 0.4rem 0.85rem;
    flex-shrink: 0;
}

.howto-step-title {
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    font-size: 1.4rem;
}

/* Content wrapper - controls layout of text and image */
.howto-content-wrapper {
    display: flex;
    gap: 1.25rem; /* Tighter gap between text and image */
    align-items: stretch; /* Changed from flex-start to stretch */
    flex: 1;
    overflow: hidden;
}

/* Text takes up available space */
.howto-text-content {
    flex: 1;
    color: #334155;
    font-size: 1rem;
    line-height: 1.6;
    overflow-y: auto; /* Allow scrolling if content is too long */
}

/* Image wrapper on desktop */
.howto-image-wrapper {
    flex-shrink: 0;
    width: 280px; /* Slightly smaller image */
    display: flex;
    align-items: center;
    justify-content: center; /* Center the image */
}

.howto-step-image {
    width: 100%;
    height: 100%; /* Changed from auto to 100% */
    object-fit: contain; /* Shows full image without cropping */
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
}

/* Mobile styles - stack vertically with smaller image */
@media (max-width: 768px) {
    .howto-step-card {
        height: auto; /* Remove fixed height on mobile */
        max-width: 100%;
    }

    .howto-content-wrapper {
        flex-direction: column;
        gap: 1rem;
    }

    .howto-image-wrapper {
        width: 100%;
        max-width: 240px;
        height: auto;
        align-self: center;
    }

    .howto-step-image {
        height: auto; /* Reset to auto on mobile */
    }

    .howto-step-title {
        font-size: 1.2rem;
    }

    .howto-text-content {
        font-size: 0.95rem;
    }
}

/* Extra small mobile - even smaller image */
@media (max-width: 576px) {
    .howto-step-header {
        gap: 0.75rem;
    }

    .howto-step-badge {
        font-size: 0.85rem;
        padding: 0.35rem 0.7rem;
    }

    .howto-image-wrapper {
        max-width: 180px;
    }

    .howto-step-title {
        font-size: 1.1rem;
    }

    .howto-step-card .card-body {
        padding: 1.25rem;
    }
}

/* Targets any element with class="card-text" */
.card-text {
  font-weight: 500;     /* 100–900 */
  font-size: 1.25rem;      /* e.g. 14px, 16px, 1.1rem */
  line-height: 1.5;
  text-align: justify;     /* left | right | center | justify */
}