/* Base styling for the main container */
.cns-grammar-wrapper {
    font-family: 'Noto Sans Bengali', sans-serif;
    max-width: 720px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

.cns-grammar-wrapper h2 {
    font-size: 24px; /* Slightly larger heading */
    color: #333;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #eee; /* Subtle separator */
    padding-bottom: 10px;
}

.cns-grammar-grades {
    margin-bottom: 20px; /* Increased margin */
    text-align: center;
}

.cns-grammar-grades strong {
    display: block;
    margin-bottom: 10px; /* More space below label */
    font-size: 1.1em; /* Slightly larger font */
    color: #555;
}

.cns-grammar-grade-btn {
    background-color: #007cba;
    color: white;
    border: none;
    padding: 12px 20px; /* Enhanced padding */
    margin: 5px;
    border-radius: 6px; /* Slightly more rounded */
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    font-size: 15px; /* Consistent font size */
    box-shadow: 0 3px 6px rgba(0,0,0,0.15); /* More prominent subtle shadow */
}

.cns-grammar-grade-btn:hover {
    background-color: #005fa3;
    transform: translateY(-3px); /* More pronounced lift effect */
    box-shadow: 0 6px 12px rgba(0,0,0,0.25); /* Stronger shadow on hover */
}

/* Style for the active grade button */
.cns-grammar-grade-btn.active-grade-btn {
    background-color: #004d7a; /* Darker blue for active state */
    color: white;
    border: 1px solid #004d7a;
    font-weight: bold;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.bold-green {
    font-weight: bold;
    color: #008000;
}

/* --- NEW / UPDATED Styles for Question, Solution, Explanation Blocks --- */
/* Base styling for question, solution, explanation blocks */
.cns-grammar-question-block {
    margin-top: 20px; /* More space from previous sections */
    padding: 20px; /* Increased padding */
    border-left: 6px solid; /* Thicker colored line */
    background-color: #fcfcfc; /* Lighter background */
    border-radius: 8px; /* More rounded corners */
    margin-bottom: 25px; /* More space between blocks */
    box-shadow: 0 3px 8px rgba(0,0,0,0.08); /* Stronger but subtle shadow */
}

.cns-grammar-question-block strong {
    display: block;
    margin-bottom: 12px; /* More space below label */
    font-size: 1.2em; /* Larger font */
    color: #333; /* Darker text */
}

.cns-grammar-question-block p {
    margin: 0;
    line-height: 1.6; /* Increased line height for better readability */
    font-size: 1.1em; /* Slightly larger text */
    color: #555; /* Softer text color */
}

/* Specific styling for Question */
.cns-question-block {
    border-left-color: #3498db; /* Blue color for Question */
}

/* Specific styling for Solution */
.cns-solution-block {
    border-left-color: #27ae60; /* Green color for Solution */
}

/* Specific styling for Explanation */
.cns-explanation-block {
    border-left-color: #e67e22; /* Orange color for Explanation */
}

/* Image styling within the blocks */
.cns-grammar-question-block img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 20px auto; /* Center image and add more bottom margin */
    border-radius: 6px; /* Slightly more rounded */
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
/* --- END NEW / UPDATED Styles for Question, Solution, Explanation Blocks --- */


/* Style for the selected grade display text */
#selected-grade-display {
    color: #0073aa;
    margin-top: 15px; /* Increased margin for separation */
    margin-bottom: 15px;
    font-size: 1.1em;
    font-weight: 600;
    text-align: center;
}

/* --- Styles for Topic Selection Section (Text Links with Icons) --- */
.cns-question-sl-buttons {
    margin-top: 20px; /* More space from grade selection */
    margin-bottom: 25px; /* Space before question container */
    padding: 20px; /* Increased padding */
    background-color: #f8f8f8; /* Lighter background for the section */
    border-radius: 8px;
    box-shadow: inset 0 0 8px rgba(0,0,0,0.07); /* More prominent inner shadow */
    text-align: center;
}

.cns-question-sl-buttons strong {
    display: block;
    margin-bottom: 15px; /* More space below label */
    font-size: 1.15em; /* Slightly larger font */
    color: #444;
}

#cns-question-sl-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px; /* Increased space between links */
}

.cns-grammar-question-sl-link { /* New class for text links */
    display: inline-flex; /* Align icon and text */
    align-items: center; /* Vertically align icon and text */
    padding: 10px 15px; /* Comfortable padding */
    border: 1px solid #e0e0e0; /* Softer border */
    border-radius: 6px;
    background-color: #ffffff; /* White background for individual links */
    color: #333; /* Dark text color */
    text-decoration: none; /* Remove underline */
    font-weight: 500;
    font-size: 15px; /* Consistent font size */
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 5px rgba(0,0,0,0.08); /* Subtle shadow */
}

.cns-grammar-question-sl-link:hover {
    background-color: #eaf7fd; /* Light blue on hover */
    border-color: #87ceeb; /* Sky blue border on hover */
    color: #0073aa; /* Matching main theme blue */
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 4px 10px rgba(0,0,0,0.15); /* More prominent shadow */
}

.cns-grammar-question-sl-link.active { /* Style for the actively selected topic link */
    background-color: #0073aa; /* Strong blue for active */
    color: white;
    border-color: #0073aa;
    font-weight: bold;
    box-shadow: 0 3px 7px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}

.cns-grammar-question-sl-link.active .topic-icon {
    color: white !important; /* Ensure icon is white when link is active */
}

/* Styling for the topic icons */
.topic-icon {
    margin-right: 8px; /* Space between icon and text */
    font-size: 1.2em; /* Slightly larger icon */
    line-height: 1; /* Ensure proper vertical alignment */
}
/* --- END Styles for Topic Selection Section --- */


.cns-grammar-navigation {
    margin-top: 25px; /* More space from question container */
    text-align: center;
}

.cns-grammar-navigation button {
    padding: 14px 28px; /* Larger hit area */
    margin: 0 10px; /* Adjusted margin */
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 6px; /* Slightly more rounded */
    cursor: pointer;
    font-size: 16px; /* Slightly larger font */
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.cns-grammar-navigation button:hover:not(:disabled) {
    background-color: #005a80;
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.cns-grammar-navigation button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.6; /* More faded when disabled */
    box-shadow: none;
    transform: none;
}

/* Current question item heading */
.cns-grammar-question-item h3 {
    text-align: center;
    font-size: 1.6em; /* More prominent heading */
    color: #0056b3;
    border-bottom: 2px solid #eee;
    padding-bottom: 12px;
    margin-bottom: 25px; /* More space below heading */
}

.cns-grammar-question-item h3 .current-question-index,
.cns-grammar-question-item h3 .total-questions-in-sl {
    font-weight: bold;
    color: #d9534f; /* Red color for numbers */
}