/* General Body and Typography Styles */
body {
    font-family: 'Urbanist', sans-serif;
    margin: 0;
    background-color: #f8f9fa;
    color: #343a40;
    overflow-x: hidden; /* Prevents horizontal scrollbar during animation */
}

.coding-container {
    max-width: 1350px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Align section content with hero content */
.coding-section .coding-container {
    padding-left: 93.56px; /* 20px base + 73.56px hero box padding */
    padding-right: 93.56px; /* 20px base + 73.56px for symmetry */
}

.coding-heading-primary {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    background: var(--Text-gradient-1, linear-gradient(87deg, #8253C2 18.3%, #F45346 80.97%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coding-heading-secondary {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
}

.coding-paragraph {
    font-size: 20px;
    line-height: 1.7;
    color: var(--Subheading, #514F6E);
    margin-bottom: 20px;
}

.coding-btn {
    display: inline-flex; /* Changed to inline-flex to wrap content */
    align-items: center;
    justify-content: center;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.coding-btn-primary {
    padding: 16.591px 30.565px;
    gap: 9.605px;
    border-radius: 84.651px;
    background: #611F69;
    color: #fff;
    border: none;
}

.coding-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(88, 28, 135, 0.3);
    color: var(--white);
}

.coding-btn-secondary {
    padding: 9.591px 18.565px;
    gap: 9.605px;
    border-radius: 84.651px;
    border: 1px solid #611F69;
    background: #FFF;
    color: #611F69;
}

.coding-btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(88, 28, 135, 0.3);
    color: #611F69;
}

/* Generic Section Styles */
.coding-section {
    padding: 80px 0;
}

/* Hero Section */
.coding-hero {
    padding: 58px 0;
    background-color: #fff;
}

.coding-hero-box {
    display: flex;
    align-items: center;
    padding: 0 0 0 73.56px;
    border-radius: 35.24px;
    background: #F5F0FD;
    overflow: hidden;
}

.coding-hero-content {
    flex: 1 1 50%;
    margin-right: 59.658px;
    padding: 35.2px 0;
}

.coding-hero-image-wrapper {
    flex: 1 1 45%;
    align-self: stretch;
}

.coding-hero-stats {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.coding-hero-stats p{
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #3F0E40;
}

.coding-hero-faces {
    display: flex;
}

.coding-hero-faces img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid #f5f0fd;
    margin-left: -15px;
}

.coding-hero-faces img:first-child {
    margin-left: 0;
}

.coding-hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Generic 2-Column Layout */
.coding-grid-2col {
    display: flex;
    align-items: center;
    gap: 48px;
    margin-bottom: 60px;
}

.coding-grid-2col > * {
    flex: 1;
}

/* Identify Coders Section */
.coding-identify-coders {
    background: #F8F6FE;
}

.coding-heading-secondary {
    background: var(--Text-gradient-2, linear-gradient(87deg, #611F69 18.3%, #F45346 80.97%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coding-identify-image img {
    width: 100%;
    border-radius: 20px;
}

.coding-identify-footer {
    background-color: #FFF;
    padding: 30px;
    border: 2px solid #ECE5FF;
    border-radius: 15px;
}

.coding-identify-footer p {
    margin: 0;
    font-size: 18px;
    line-height: 1.7;
    color: #333;
}


/* What Are Section */
.coding-what-are {
    background-color: #fff;
}

.coding-list {
    list-style: none;
    padding: 0;
}

.coding-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    margin-bottom: 15px;
}

.coding-list i {
    color: #6A1B9A;
}

.coding-bottom-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f5f0fd;
    padding: 25px 35px;
    border-radius: 15px;
}

.coding-bottom-bar p {
    margin: 0;
    font-weight: 600;
    font-size: 20px;
    color: var(--Single-body, #5B0D5C);
}

.coding-bottom-bar div {
    display: flex;
    gap: 15px;
}

/* ✨ Styles for Animated Image Section */
.coding-what-are-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px; /* Ensure space for the animation */
}

.animation-wrapper {
    position: relative;
    width: 400px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dev-image {
    width: 60%; /* 60% of 400px = 240px */
    height: 60%;
    border-radius: 50%;
    object-fit: cover;
    z-index: 2;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.rotating-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    animation: rotate 50s linear infinite;
    z-index: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.floating-icon-wrapper {
    position: absolute;
    z-index: 3;
    background-color: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-icon {
    width: 40px;
    height: 40px;
}

.python-wrapper {
    top: 40%;
    left: -5%;
    animation: float 4s ease-in-out infinite;
}

.react-wrapper {
    top: 0;
    right: 20%;
    animation: float 4.5s ease-in-out infinite 0.5s; /* Staggered animation */
}

.angular-wrapper {
    bottom: -4%;
    right: 30%;
    animation: float 5s ease-in-out infinite 1s; /* Staggered animation */
}

@keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}


/* Types Section */
.coding-types {
    background-color: #f5f0fd;
}

.coding-section-header {
    text-align: center;
    margin-bottom: 60px;
}

.coding-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.coding-type-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    text-align: left;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.30), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
}


.coding-type-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}


.coding-type-icon {
    font-size: 28px;
    color: #6A1B9A;
    margin-bottom: 15px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.background-card{
    z-index: -1;
    position: absolute;
}

.coding-type-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-left: 10px;
    color: var(--Primary-Color, #611F69);
}

.coding-type-card p {
    padding-left: 10px;
    color: #152E3A;
}

/* Languages Section */
.coding-languages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 18px;
    justify-items: center;
}

.coding-language-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Vertically center content */
    gap: 10px;
    padding: 20px;
    background: #F6F6F6;
    border-radius: 10px;
    width: 100%;
    aspect-ratio: 1 / 1; /* Make the cards square */
}

.coding-language-card img {
    height: 40px;
    width: 40px;
}

/* Why Use Section */
.coding-why-use {
    background: #833AAF;
    color: #fff;
}

.coding-why-use-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 40px;
}

.coding-why-use-heading h2 {
    color: #fff;
}

.coding-why-use-text p {
    color: #eee;
}

.coding-stats-bar {
    display: flex;
    justify-content: space-around;
    background-color: #fff;
    color: #333;
    padding: 10px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.coding-stat-item {
    text-align: center;
    font-size: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.coding-stat-item:not(:first-child) {
    border-left: 1px solid #e0e0e0;
}

.coding-stat-item strong {
    display: block;
    font-size: 42px;
    font-weight: 700;
    color: #4CAF50;
}

/* CTA Section */
.coding-cta {
    background: #FFF;
}

.coding-cta-box {
    text-align: center;
    background: var(--12, linear-gradient(35deg, rgba(225, 244, 255, 0.60) 12%, rgba(249, 225, 255, 0.80) 27%, rgba(255, 230, 233, 0.60) 100%));
    padding: 60px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.coding-cta-box h2 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    background: var(--Text-gradient-1, linear-gradient(87deg, #8253C2 18.3%, #F45346 80.97%));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 992px) {
    .coding-hero-box, .coding-why-use-grid, .coding-grid-2col {
        flex-direction: column;
    }
    
    .coding-hero-box {
        padding: 40px 20px;
        text-align: center;
    }

    .coding-identify-content, .coding-what-are-content {
        order: 2;
        text-align: left;
    }
    
    .coding-identify-image, .coding-what-are-image {
        order: 1;
        margin-bottom: 40px;
    }

    .coding-hero-stats {
        justify-content: center;
    }

    
    .coding-bottom-bar {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    .coding-identify-content .coding-heading-secondary {
        display: block;
    }

    .coding-why-use-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .coding-section .coding-container {
        padding-left: 40px; /* 20px base + 20px from responsive hero-box */
        padding-right: 40px;
    }

    .animation-wrapper {
        width: 350px;
        height: 350px;
    }
}

@media (max-width: 768px) {
    .coding-heading-primary {
        font-size: 36px;
    }

    .coding-heading-secondary {
        font-size: 28px;
    }

    .coding-paragraph {
        font-size: 16px;
    }

    .coding-section {
        padding: 60px 0;
    }

    .coding-container,
    .coding-section .coding-container {
        padding-left: 20px;
        padding-right: 20px;
    }

    /* --- Hero Section --- */
    .coding-hero-box {
        flex-direction: column;
        padding: 0; /* Remove padding to make image flush */
        text-align: center;
    }

    .coding-hero-content {
        margin-right: 0;
        padding: 40px 20px 30px; /* Add padding to content instead of box */
    }
    
    .coding-hero-image-wrapper {
        width: 100%;
    }
    
    .coding-hero-image {
        border-bottom-left-radius: 35.24px; /* Match parent border-radius */
        border-bottom-right-radius: 35.24px; /* Match parent border-radius */
    }
    
    .coding-hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    /* --- Stack 2-Column Layouts --- */
    .coding-grid-2col {
        flex-direction: column;
        gap: 30px;
    }
    
    /* --- ✨ Identify Real-World Coders Section Reordering --- */
    .coding-identify-coders .coding-grid-2col {
        gap: 1.5rem;
    }

    .coding-identify-coders .coding-identify-content {
        display: contents;
    }
    
    .coding-identify-coders .coding-heading-secondary {
        order: 1;
        text-align: center;
        display: block; /* Make heading visible */
    }

    .coding-identify-coders .coding-identify-image {
        order: 2;
        margin-bottom: 0;
    }
    
    .coding-identify-coders .coding-paragraph,
    .coding-identify-coders .coding-list {
        text-align: left;
    }
    
    .coding-identify-coders .coding-paragraph {
        order: 3;
    }
    
    .coding-identify-coders .coding-list {
        order: 4;
        width: 100%; /* FIX: Ensure list takes full width to align left */
    }
    
    /* --- ✨ What Are Coding Skill Tests Section Reordering --- */
    .coding-what-are .coding-grid-2col {
        margin-bottom: 30px; /* Space before bottom bar */
    }
    
    .coding-what-are .coding-what-are-content {
        order: 1; /* Content block first */
        text-align: left; /* Explicitly set text-align */
    }
    .coding-what-are .coding-what-are-image {
        order: 2; /* Image second */
    }


    /* --- "Cut Guesswork" Bar & Buttons --- */
    .coding-bottom-bar {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .coding-bottom-bar div {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    /* --- Types of Tests Section --- */
    .coding-types-grid {
        grid-template-columns: 1fr; /* Force a single column */
    }
    
    /* --- Language Support Section --- */
    .coding-languages-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    /* --- Animated Image Section --- */
    .coding-what-are-image {
        min-height: 400px; /* Reduce height on mobile */
    }
    .animation-wrapper {
        width: 300px;
        height: 300px;
    }
    .floating-icon {
        width: 30px;
        height: 30px;
    }
    .floating-icon-wrapper {
        padding: 8px;
    }


    /* --- Why Use MyAnatomy's Section --- */
    .coding-why-use-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .coding-stats-bar {
        flex-direction: column;
        gap: 20px;
    }

    .coding-stat-item:not(:first-child) {
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding-top: 20px;
    }

    /* --- Final CTA Section --- */
    .coding-cta-box {
        padding: 40px 20px;
    }

    .coding-cta-box h2 {
        font-size: 24px;
    }
}
