/* ===== HERO SECTION ===== */
.pi-hero {
    position: relative;
    width: 100%;
    min-height: 583px;
    background-image: url("/images/Projectideapagebg.png");
    display: flex;
    align-items: center;
    overflow: hidden;
}

.pi-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
}

.pi-hero-inner {
    position: relative;
    z-index: 2;
    width: 100%;
    margin: 0 auto;
    padding-left: 32px;
    color: #FFFFFF;
}

.pi-hero-left {
    max-width: 732px;
}

.pi-hero-left h1 {
    font-family: 'Teachers';
    font-weight: 700;
    font-size: 72px;
    line-height: 80px;
    letter-spacing: 0%;
}


.pi-hero-right {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-end;
}

/* Floating topic cards */
.pi-topic-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    transform: rotate(-4deg);
}

.pi-topic-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 12px;
    padding: 12px 18px;
    min-width: 220px;
    color: #fff;
}

.pi-topic-card-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #FFAA3E;
    text-transform: uppercase;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pi-topic-card-label .pi-dot {
    display: inline-block;
    width: 5px;
    height: 5px;
    background: #FFAA3E;
    border-radius: 50%;
}

.pi-topic-card-title {
    font-family: 'Teachers', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #FFFFFF;
    line-height: 1.3;
}

/* ===== IDEA FINDER SECTION ===== */
.pi-finder-section {
    padding: 40px;
}

.pi-finder-inner {
    max-width: 1360px;
    margin: 0 auto;
}

.pi-finder-header {
    text-align: center;
    margin-bottom: 48px;
}

.pi-finder-badge {
    display: inline-block;
    background: rgba(65, 56, 148, 0.1);
    color: #413894;
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 20px;
    margin-bottom: 16px;
}

.pi-finder-title {
    font-family: 'Teachers', sans-serif;
    font-size: 36px;
    font-weight: 800;
    color: #1E1E1E;
    margin-bottom: 12px;
}

.pi-finder-subtitle {
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    color: #606060;
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Questions grid */
.pi-questions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 20px;
}

.pi-question-card {
    background: #F1F0F9;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #EAEAF6;
}

.pi-question-label {
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #3D348B;
    text-transform: uppercase;
    margin-bottom: 28px;

}

.pi-question-text {
    font-family: 'Quicksand', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #303030;
    line-height: 26px;
    margin-bottom: 20px;
}

.pi-custom-dropdown {
    position: relative;
    width: 100%;
}

.pi-dropdown-selected {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid #F1F1F9;
    border-radius: 16px;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #8C8C8C; /* Placeholder color, changes to #303030 on select */
    background: #FFFFFF url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23413894' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") no-repeat right 16px center;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.pi-dropdown-selected img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.pi-dropdown-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #FFFFFF;
    border-radius: 20px;
    margin-top: 8px;
    border: 2px solid #FFFFFF;
box-shadow: 0px 25px 50px -12px #00000040;
    z-index: 100;
    list-style: none;
    max-height: 600px;
    overflow-y: auto;
    display: none;
    padding: 0px 8px 8px 8px;
}

.pi-custom-dropdown.open .pi-dropdown-options {
    display: block;
}

.pi-dropdown-option {
    padding: 8px;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    background-color: #F8F8FC;
    color: #353535;
    align-items: center;
    gap: 12px;
    font-family: 'Quicksand', sans-serif;
    border: 2px solid #F1F1F9;
    font-weight: 700;
    font-size: 16px;
    height: 54px;
    line-height: 22px;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.pi-dropdown-option:hover {
    background-color: #3D348B;
    border: 2px solid #2C2564;
    color:#FFFFFF ;
}

.pi-dropdown-option:hover .pi-dropdown-option-img{
    background-color: #443A9C;
    border: 2px solid #322A69;
}
.pi-dropdown-option:hover .pi-dropdown-option-img img{
    filter: invert(1) brightness(2);
}

.pi-dropdown-option-img{
    width: 38px;
    height: 38px;
    border: 2px solid #F1F1F9;
    border-radius: 12px;
    object-fit: contain;
    background-color: #ffff ;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pi-dropdown-option img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Custom Scrollbar for dropdown */
.pi-dropdown-options::-webkit-scrollbar {
    width: 6px;
}
.pi-dropdown-options::-webkit-scrollbar-track {
    background: transparent;
}
.pi-dropdown-options::-webkit-scrollbar-thumb {
    background-color: #D2CFED;
    border-radius: 10px;
}

/* Generate Button */
.pi-get-idea-btn {
    display: block;
    width: 100%;
    padding: 17px;
    background: #443A96;
    border: 1.5px solid #473EA3;
    color: #FFFFFF;
    font-family: 'Teachers', sans-serif;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    border-radius: 16px;
    cursor: pointer;
    transition: background 0.2s, transform 0.15s;
    text-decoration: none;
}

.pi-get-idea-btn:hover {
    background: #2D2B6E;
    transform: translateY(-2px);
}

/* Results area */
.pi-results-area {
    display: none;
    margin-top: 40px;
}

.pi-results-area.visible {
    display: block;
}

.pi-results-header {
    display: none;
}

.pi-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.pi-result-card {
    background: #FFFFFF;
    border-radius: 32px;
    padding: 40px;
    border: 2px solid #EAEAF6;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}

.pi-result-card:first-child {
    background: #FFFBF5;
    border-color: #FF930A;
}

.pi-result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(65, 56, 148, 0.08);
}

.pi-result-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.pi-result-card-badge {
    border: 1.3px solid #3D348B;
    color: #3D348B;
    background-color: #F8F8FC;
    padding: 16px 12px;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 12px;
    font-weight: 700;
}

.pi-result-card:first-child .pi-result-card-badge {
    background: #FFAA3E;
    color: #FFFFFF;
    border-color: #FFAA3E;
}

.pi-result-card-level {
    font-family: 'Quicksand', sans-serif;
    font-size: 13px;
    font-weight: 700;
    color: #353535;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pi-result-card-level .level-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.pi-result-card-level.advanced .level-dot { background: #E63946; }
.pi-result-card-level.intermediate .level-dot { background: #FFAA3E; }
.pi-result-card-level.beginner .level-dot { background: #2A9D8F; }

.pi-result-card-title {
    font-family: 'Teachers', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: #1E1E1E;
    margin-bottom: 16px;
    line-height: 32px;
}

.pi-result-card-desc {
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #1E1E1E;
    line-height: 24px;
    flex-grow: 1;
    margin-bottom: 16px;
}

.pi-result-card-btn {
    display: inline-block;
    background: #413894;
    color: #FFFFFF;
    padding: 16px 21px;
    border-radius: 20px;
    font-family: 'Quicksand', sans-serif;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    align-self: flex-start;
    transition: background 0.2s;
}

.pi-result-card-btn:hover {
    background: #2D2B6E;
}

/* ===== POPUP MODAL ===== */
.pi-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 39, 87, 0.85); /* Dark overlay */
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pi-modal-overlay.active {
    display: flex;
}

.pi-modal-content {
    background: #FFFFFF;
    border-radius: 32px;
    padding: 48px;
    width: 100%;
    max-width: 900px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.pi-modal-close {
    position: absolute;
    top: 32px;
    right: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F8F8FC;
    border: 1px solid #EAEAF6;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #1E1E1E;
    transition: background 0.2s;
}

.pi-modal-close:hover {
    background: #EAEAF6;
}

.pi-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-right: 60px; /* space for close button */
}

.pi-modal-badge {
    border: 1.3px solid #FF930A;
    color: #FFFFFF;
    background-color: #FF930A;
    padding: 12px 20px;
    border-radius: 50px;
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 700;
}

.pi-modal-level {
    font-family: 'Quicksand', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: #353535;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 50px;
    border: 1px solid #EAEAF6;
}

.pi-modal-title {
    font-family: 'Teachers', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: #1E1E1E;
    margin-bottom: 24px;
    line-height: 1.2;
}

.pi-modal-body {
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1E1E1E;
    line-height: 1.6;
    margin-bottom: 40px;
}

.pi-modal-back-btn {
    display: inline-block;
    background: #413894;
    color: #FFFFFF;
    padding: 16px 32px;
    border-radius: 20px;
    font-family: 'Quicksand', sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.pi-modal-back-btn:hover {
    background: #2D2B6E;
}
.pi-hero-text-span{
        display: block;
    }

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
    .pi-hero{
        min-height: 558px;
        padding: 40px;
    width: 100%;
    background-image: url("/images/projectideapagemobilebg.png");
    background-position: bottom; /* aligns the image from the bottom */
    background-repeat: no-repeat; /* prevents repeating if image is smaller */
    background-size: cover; /* scales image to cover entire hero */    
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow: hidden;

    }
    .pi-hero-text-span{
        display: none;
    }

    .pi-result-card{
        padding: 24px;
    }

    .pi-hero-inner {
        padding: 30px 0;
        flex-direction: column;
        align-items: flex-start;
        margin-top: 59px;
    }

    .pi-hero-left h1 {
font-family: 'Teachers';
font-weight: 700;
font-size: 40px;
line-height: 46px;
text-align: center;

    }

    .pi-hero-right {
        align-items: flex-start;
    }

    .pi-finder-section {
        padding: 50px 24px;
    }

    .pi-questions-grid {
        grid-template-columns: 1fr;
    }

    .pi-results-grid {
        grid-template-columns: 1fr;
    }

    .pi-finder-title {
        font-size: 26px;
    }

    .pi-modal-overlay {
        padding: 0;
        background: #F8F8FC;
        align-items: flex-start;
        z-index: 999; /* Lower than navbar's z-index */
    }

    .pi-modal-content {
        padding: 24px;
        padding-top: 100px; /* Space for the navbar */
        border-radius: 0;
        height: 100vh;
        max-height: 100vh;
        width: 100%;
        max-width: 100%;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        background: transparent;
    }
    
    .pi-modal-close {
        position: relative;
        top: 0;
        right: 0;
        align-self: flex-start;
        margin-bottom: 24px;
    }

    .pi-modal-close .close-icon-desktop { display: none; }
    .pi-modal-close .close-icon-mobile { display: block !important; }

    .pi-modal-header {
        flex-wrap: wrap;
        padding-right: 0;
    }

    .pi-modal-title {
        font-size: 28px;
    }

    .pi-modal-body {
        flex-grow: 1;
        overflow-y: auto;
    }

    .pi-modal-back-btn {
        width: 100%;
        text-align: center;
        margin-top: auto;
    }
}
