
/* Listening Dashboard Section */
.listening-dashboard {
    /* background: #ffffff; */
    padding: 2rem 1rem;
}

.listening-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.listening-container h1 {
    font-size: 2rem;
    color: #d81c38;
    margin-bottom: 1rem;
    font-weight: 700;
}

.listening-container p {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 2rem;
}

.modules-grid {
    display: grid;
    gap: 1rem;
    isolation: isolate;
}

.module-card {
    background: #fff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    opacity: 0.6;
    position: relative;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.module-card.active {
    opacity: 1;
    transform: scale(1.05);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
}

.module-card:hover {
    transform: translateY(-5px);
}

.module-card i {
    font-size: 1.8rem;
    color: #f58220;
    margin-bottom: 0.5rem;
}

.module-card h3 {
    font-size: 1rem;
    color: #d81c38;
    margin-bottom: 0.5rem;
}

.module-card p {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.module-card .cta-btn {
    background: #f58220;
    color: white;
    padding: 0.4rem 0.8rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background 0.3s;
}

.module-card .cta-btn.inactive {
    background: #ccc;
    cursor: not-allowed;
}

.module-card .cta-btn:hover:not(.inactive) {
    background: #d81c38;
}

/* Module Popup Modal */
.module-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    width: 100vw;
    height: 100vh;
}

.module-modal.active {
    display: flex;
    animation: fadeIn 0.5s ease-in-out;
}

.module-modal-content {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    transition: max-width 0.3s ease;
    box-sizing: border-box;
    width: 100vw;
    height: 100vh;
}

.module-modal-content h2 {
    font-size: 1.8rem;
    color: #d81c38;
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-media {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.pdf-section {
    width: 100%;
    position: relative;
    transition: all 0.3s ease;
}

.pdf-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.pdf-controls button {
    background: #f58220;
    color: white;
    border: none;
    border-radius: 5px;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.pdf-controls button:hover {
    background: #d81c38;
}

.pdf-container {
    width: 100%;
    height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
    
}

.pdf-section.minimized .pdf-container {
    height: 0;
    border: none;
}

.pdf-section.maximized .pdf-container {
    height: 80vh;
}

.modal-iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.audio-section {
    width: 100%;
}

.audio-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.modal-audio {
    width: 100%;
    max-width: 100%;
}

.close-modal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    color: #555;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: #d81c38;
}



/* Updated Responsive Design */
@media (max-width: 480px) {
    /* Header adjustments */
    .listening-dashboard{
        width: 100vw;
    }

    .header-container {
        flex-wrap: wrap;
        padding: 0.5rem;
    }

    .hamburger {
        display: block;
        font-size: 1.5rem;
    }

    nav {
        display: none;
        width: 100%;
        flex-direction: column;
        text-align: center;
        padding: 0.5rem 0;
    }

    nav.active {
        display: flex;
    }

    .cta-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.8rem;
    }

    /* Listening Dashboard */
    .listening-dashboard {
        padding: 1rem 0.5rem;
    }

    .listening-container {
        padding: 0 0.5rem;
    }

    .listening-container h1 {
        font-size: 1.3rem;
        margin-bottom: 0.75rem;
    }

    .listening-container p {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
        padding: 0 0.5rem;
    }

    .module-card {
        padding: 0.75rem;
        max-width: 100%;
        margin: 0;
        opacity: 1; /* Ensure visibility on mobile */
    }

    .module-card.active {
        transform: none; /* Remove scale effect on mobile */
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .module-card i {
        font-size: 1.3rem;
    }

    .module-card h3 {
        font-size: 0.95rem;
    }

    .module-card p {
        font-size: 0.75rem;
    }

    .module-card .cta-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.75rem;
        width: 100%; /* Full width buttons on mobile */
    }

    /* Modal Adjustments */
    .module-modal {
        padding: 0;
    }

    .module-modal-content {
        padding: 1rem;
        width: 100%;
        height: 100%;
        border-radius: 0; /* Remove radius on mobile for full screen */
        margin: 0;
        box-sizing: border-box;
    }

    .module-modal-content h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .modal-media {
        gap: 0.75rem;
    }

    .pdf-section {
        width: 100%;
    }

    .pdf-controls {
        justify-content: flex-end;
        gap: 0.3rem;
        margin-bottom: 0.3rem;
    }

    .pdf-controls button {
        width: 28px;
        height: 28px;
        font-size: 0.9rem;
    }

    .pdf-container {
        height: 40vh; /* Reduced height for mobile */
        width: 100%;
    }

    .pdf-section.maximized .pdf-container {
        height: 70vh; /* Adjusted for mobile */
    }

    .modal-iframe {
        width: 100%;
        height: 100%;
    }

    .audio-section {
        width: 100%;
    }

    .audio-description {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    .modal-audio {
        width: 100%;
    }

    .close-modal {
        font-size: 1.5rem;
        top: 5px;
        right: 10px;
    }
}

/* Keep existing media queries for larger screens */
@media (min-width: 768px) {
    .listening-container h1 {
        font-size: 3rem;
    }

    .listening-container p {
        font-size: 1.4rem;
    }

    .modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .module-card {
        padding: 1rem;
        max-width: 250px;
    }
}

@media (min-width: 1024px) {
    .listening-dashboard {
        padding: 3rem 1rem;
    }

    .modules-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .module-card {
        padding: 0.75rem;
        max-width: 200px;
    }

    .module-card i {
        font-size: 1.5rem;
    }

    .module-card h3 {
        font-size: 0.9rem;
    }

    .module-card p {
        font-size: 0.7rem;
    }

    .module-card .cta-btn {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
    }
}

/* Keep the fadeIn animation */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}