/* ==========================================================================
   FEATURES SECTION STYLES
   Alternating image/content layout with purple accents
   ========================================================================== */

/* 
 * Section container styling 
 * Light background with subtle dotted grid pattern (matching design)
 */
.features-section {
    font-family: 'ABC Normal', 'IBM Plex Sans';
    background-color: #ffffff;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.025) 1px, transparent 1px);
    background-size: 50px 50px;
    padding: 80px 20px;
    color: #1f2937;
    background-attachment: fixed;
}

/* 
 * Container for max-width constraint
 */
.features-section .container {
    max-width: 1320px;
    width: 100%;
    margin: 0 auto;
    margin-bottom: 24px;
}

/* 
 * Main Section Title
 * Bold typography at the top
 */
.features-main-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #000000;
    margin-bottom: 50px;
    letter-spacing: -0.01em;
}

/* 
 * Features Grid Container
 */
.features-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
}

/* 
 * Individual Feature Row
 * Flexbox layout with gap between image and content
 */
.feature-row {
    display: flex;
    align-items: center;
    gap: 50px;
}

/* 
 * ALTERNATING LAYOUT MAGIC
 * Odd rows (1st, 3rd, 5th): image LEFT, content RIGHT (default)
 * Even rows (2nd, 4th, 6th): content LEFT, image RIGHT (reversed)
 */
.feature-row:nth-child(odd) {
    flex-direction: row;
}

.feature-row:nth-child(even) {
    flex-direction: row-reverse;
}

/* 
 * Media Container (Image or Video)
 * Takes up roughly half the width
 */
.feature-media {
    flex: 1;
    max-width: 50%;
}

/* 
 * Video specific styling
 */
.feature-video-wrapper,
.feature-image-wrapper {
    width: 100%;
    position: relative;
    padding-top: 56.67%;
    /* 16:9 approx, matching user preference */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

.feature-video,
.feature-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* 
 * Content Container
 * Takes up roughly half the width
 */
.feature-content {
    flex: 1;
    max-width: 50%;
}

/* 
 * Feature Title
 * Medium-weight typography
 */
.feature-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #000000;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

/* 
 * Feature Description
 * Lighter text with good line height for readability
 */
.feature-description {
    font-size: 1rem;
    color: #000000;
    line-height: 1.7;
    margin-bottom: 24px;
    text-align: left;
}

/* 
 * Feature Button
 * Purple background matching the design system
 */
.feature-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #242424FF;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
}

.feature-btn:hover {
    background-color: #242424FF;
    color: white;
}

.arrow {
    font-size: 1.25rem;
    line-height: 1;
    transform: translateY(-2px);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet and below */
@media (max-width: 992px) {
    .feature-row {
        gap: 30px;
    }

    .feature-title {
        font-size: 1.35rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .features-section {
        padding: 50px 15px;
        /* Slightly tighter padding */
    }

    .features-main-title {
        font-size: 1.80rem;
        /* Better scaling */
        margin-bottom: 35px;
        text-align: center;
    }

    .features-grid {
        gap: 45px;
        /* Balanced gap between items */
    }

    /* Stack vertically on mobile */
    .feature-row,
    .feature-row:nth-child(odd),
    .feature-row:nth-child(even) {
        flex-direction: column !important;
        text-align: left;
        gap: 25px;
        /* Tighter gap between image and text on mobile */
    }

    .feature-media,
    .feature-content {
        max-width: 100%;
        width: 100%;
    }

    .feature-description {
        text-align: left;
        /* Override justify on mobile for centered layout */
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .feature-title {
        font-size: 1.35rem;
        margin-bottom: 12px;
    }

    .feature-btn {
        padding: 8px 15px;
        font-size: 0.8rem;

    }

    .arrow {
        font-size: 1rem;
        transform: translateY(-3px);
        /* Keep the same vertical alignment as desktop */
        margin-left: 0.5px;
        /* Adds consistent spacing */
    }

    .feature-video-wrapper,
    .feature-image-wrapper {
        border-radius: 10px;
        /* Slightly tighter radius for smaller screens */
    }
}