/* General Body Styles */
body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6; /* Light gray background for consistency */
    min-height: 100vh;
    display: flex;
    flex-direction: column; /* For sticky footer */
    padding: 0;
    box-sizing: border-box;
}

/* Main Content Container Styles (for centering and general layout) */
.container {
    background-color: #ffffff;
    padding: 2.5rem;
    border-radius: 1rem; /* More rounded corners */
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1); /* Softer shadow */
    max-width: 900px; /* Increased max-width */
    width: 100%;
    margin-top: 2rem; /* Spacing below header/nav */
    margin-bottom: 2rem; /* Spacing above footer */
    margin-left: auto; /* Center horizontally */
    margin-right: auto; /* Center horizontally */
}

/* Header Section */
header {
    width: 100%; /* Ensure header spans full width */
    background-color: #4a5568; /* Gray-800 */
    color: #ffffff;
    padding: 0.5rem 2rem; /* py-2 px-8 */
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
header a {
    height: 100%;
    display: flex;
    align-items: center;
}
header img {
    height: 100%;
    max-height: 100px;
    object-fit: contain;
}
.header-text {
    font-size: 1.125rem; /* text-lg */
    font-weight: 700; /* font-bold */
    text-align: center;
    flex-grow: 1;
}
#breadcrumb {
    font-size: 1rem; /* text-base */
    font-weight: 700; /* font-bold */
    color: #a0aec0; /* gray-400 */
    margin-left: 2rem; /* ml-8 */
}

/* Navigation Section */
nav {
    width: 100%; /* Ensure nav spans full width */
    background-color: #4a5568; /* Gray-700 */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
}
nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
nav ul li {
    position: relative;
    padding: 1rem 1.5rem; /* py-4 px-6 */
}
nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 700; /* font-bold */
    transition: color 0.2s ease-in-out;
}
nav ul li a:hover {
    color: #d1d5db; /* gray-300 */
}
nav ul li a.flex.items-center {
    display: flex;
    align-items: center;
}
nav ul li a svg {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
    margin-left: 0.25rem; /* ml-1 */
    transition: transform 0.2s ease-in-out;
}
nav ul li:hover > a svg {
    transform: rotate(180deg);
}

/* Custom CSS for Dropdown Menus */
nav ul li:hover > ul {
    display: block !important;
}
nav ul li ul {
    display: none;
    position: absolute;
    background-color: white;
    top: 100%;
    left: 0;
    min-width: 160px;
    z-index: 999;
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-lg */
    padding: 0.25rem 0; /* py-1 */
}
nav ul li ul li a {
    display: block;
    padding: 0.75rem 1rem;
    color: #1f2937 !important; /* text-gray-800 */
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}
nav ul li ul li a:hover {
    background-color: #f3f4f6; /* hover:bg-gray-100 */
}

/* Footer Section */
footer {
    width: 100%; /* Ensure footer spans full width */
    background-color: #4a5568; /* Gray-800 */
    color: #ffffff;
    padding: 1rem; /* p-4 */
    text-align: center;
    margin-top: auto; /* Pushes footer to the bottom */
}

/* Search Input Styles */
.search-input {
    border: 1px solid #d1d5db; /* Light gray border */
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    width: 50%; /* Half width */
    margin-left: auto;
    margin-right: auto;
}
@media (max-width: 640px) { /* Tailwind's 'sm' breakpoint */
    .search-input {
        width: 100%; /* Full width on small screens */
        margin-left: 0;
        margin-right: 0;
    }
}
.search-input:focus {
    border-color: #6366f1; /* Indigo on focus */
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2); /* Light indigo shadow on focus */
}

/* Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
}
.btn-primary {
    background-color: #4f46e5; /* Indigo */
    color: #ffffff;
    border: none;
}
.btn-primary:hover {
    background-color: #4338ca; /* Darker indigo on hover */
    transform: translateY(-1px);
}
.btn-secondary {
    background-color: #e5e7eb; /* Light gray */
    color: #374151; /* Dark gray text */
    border: none;
}
.btn-secondary:hover {
    background-color: #d1d5db; /* Darker light gray on hover */
    transform: translateY(-1px);
}

/* Search Results Item Styles */
.result-item {
    background-color: #f9fafb; /* Very light gray for items */
    border: 1px solid #e5e7eb; /* Light border for items */
    border-radius: 0.75rem; /* Rounded corners for items */
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05); /* Subtle shadow for items */
}
.result-item strong {
    color: #1f2937; /* Darker text for word */
}
.result-item p {
    color: #4b5563; /* Medium gray for definition/usage */
}
.no-results {
    color: #6b7280; /* Gray for no results message */
    text-align: center;
    padding: 2rem;
}
.back-button-container {
    margin-bottom: 1.5rem; /* Space below the back button */
    text-align: left; /* Align button to the left */
}
.flex.flex-col.sm\:flex-row.gap-4 {
    justify-content: center; /* Center items horizontally */
    align-items: center; /* Center items vertically */
}

/* Index page specific card styles */
a.card { text-decoration: none; color: black; }
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem; /* gap-6 */
}
.card > div {
    background-color: #ffffff;
    border-radius: 0.5rem; /* rounded-lg */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* shadow-md */
    padding: 1.5rem; /* p-6 */
    text-align: center;
    transition: transform 0.2s ease-in-out;
}
.card > div:hover {
    transform: scale(1.05); /* hover:scale-105 */
}
.card h3 {
    color: #4f46e5; /* text-indigo-600 */
    font-size: 1.5rem; /* text-2xl */
    font-weight: 600; /* font-semibold */
    margin-bottom: 0.5rem; /* mb-2 */
}
.card p {
    color: #4b5563; /* text-gray-700 */
}

/* English page specific styles */
.search-link {
    background-color: #4f46e5; /* Indigo */
    color: #ffffff;
    font-weight: 600;
    text-decoration: none;
    padding: 0.75rem 1.5rem; /* Increased padding to match buttons */
    border-radius: 0.5rem;
    transition: background-color 0.2s ease-in-out, transform 0.1s ease-in-out;
    margin-left: 1rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none; /* Remove explicit border if using solid background */
    cursor: pointer; /* Indicate it's clickable */
}
.search-link:hover {
    background-color: #4338ca; /* Darker indigo on hover */
    transform: translateY(-1px);
}
.dropdown-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem; /* Added gap for spacing between selects and link */
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem; /* Added spacing below the row */
}
.dropdown-row select {
    flex-grow: 1;
    max-width: 250px;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #ffffff;
    font-size: 1rem;
}
.word-sidebar {
    display: flex;
    justify-content: center; /* Center the word list */
    margin-top: 1.5rem; /* Space below dropdowns */
    width: 100%; /* Allow it to take full width of container */
}
.inline-word-list {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    /* Removed max-width to allow it to expand */
    width: 100%; /* Take full width of its flex parent */
    margin-bottom: 1.5rem;
}
#wordList ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid; /* Use grid for 2-row layout */
    grid-template-rows: repeat(2, 1fr); /* Two rows, equal height */
    grid-auto-flow: column; /* Items flow into columns first, then new rows */
    gap: 0.5rem 1rem; /* Vertical and horizontal gap between words */
    justify-content: center; /* Center words horizontally within the grid */
    align-items: start; /* Align items to the start of the grid cells */
}
#wordList li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, font-weight 0.2s ease-in-out; /* Added transitions for highlight */
    text-align: center; /* Center individual word text */
    flex: 1 1 auto; /* Allow items to grow and shrink */
    min-width: 80px; /* Ensure a minimum width for words */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}
#wordList li:last-child {
    border-bottom: none;
}
#wordList li:hover {
    background-color: #f9fafb;
}
#wordList li.selected { /* New style for selected word */
    background-color: #e0e7ff; /* light indigo */
    color: #4f46e5; /* indigo */
    font-weight: bold;
    border-bottom: 2px solid #4f46e5; /* Stronger border for selected */
}

.word-display-row {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    width: 100%; /* Allow it to take full width of container */
}
.word-container, .quiz-container {
    background-color: #ffffff;
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1.25rem;
    /* Removed max-width to allow it to expand */
    width: 100%; /* Take full width of its flex parent */
    text-align: center;
}
.word-container h2 {
    font-size: 2rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1rem;
}
.word-container p {
    font-size: 1.125rem;
    color: #4b5563;
    margin-bottom: 0.5rem;
}
.quiz-container {
    padding: 2rem;
}
.quiz-container h2 {
    font-size: 1.875rem;
    font-weight: bold;
    color: #1f2937;
    margin-bottom: 1.5rem;
}
.quiz-options button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    background-color: #f9fafb;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}
.quiz-options button:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}
.quiz-options button.correct {
    background-color: #d1fae5; /* green-100 */
    border-color: #34d399; /* green-400 */
}
.quiz-options button.incorrect {
    background-color: #fee2e2; /* red-100 */
    border-color: #ef4444; /* red-500 */
}
.quiz-feedback {
    margin-top: 1.5rem;
    font-weight: bold;
}
.quiz-feedback.correct {
    color: #059669; /* green-600 */
}
.quiz-feedback.incorrect {
    color: #dc2626; /* red-600 */
}
.quiz-navigation {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
}
.quiz-navigation button {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    background-color: #4f46e5; /* Indigo */
    color: #ffffff;
    border: none;
}
.quiz-navigation button:hover {
    background-color: #4338ca; /* Darker indigo */
}

/* music.css specific styles for cards and images */

/* Adjust grid for smaller cards (e.g., 4 columns on large screens) */
#playlistsContainer {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Smaller min-width for more columns */
    gap: 1rem; /* Reduced gap between cards */
}

/* Adjust individual card size */
#playlistsContainer > div { /* Target the direct children which are the cards */
    max-width: 250px; /* Max width for cards to be smaller */
    width: 100%; /* Ensure responsiveness */
    padding: 0.75rem; /* Reduced padding inside cards */
}

/* Adjust thumbnail size within cards */
#playlistsContainer img {
    height: 120px; /* Smaller fixed height for thumbnails */
    object-fit: cover;
    width: 100%; /* Ensure image fills its container */
}

/* Adjust font sizes within cards if needed for smaller size */
#playlistsContainer h3 {
    font-size: 1.125rem; /* text-lg */
    margin-bottom: 0.5rem;
}
#playlistsContainer p {
    font-size: 0.875rem; /* text-sm */
    line-height: 1.25;
}

/* Modal adjustments (if needed, based on smaller content) */
.modal-content {
    max-width: 600px; /* Adjust max-width for modals if content becomes smaller */
}
.song-description-modal {
    max-width: 350px; /* Adjust max-width for song description modal */
}

/* Ensure responsiveness for smaller screens */
@media (max-width: 768px) {
    #playlistsContainer {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Even smaller on tablets */
        gap: 0.75rem;
    }
    #playlistsContainer img {
        height: 100px; /* Adjust thumbnail height for smaller screens */
    }
    #playlistsContainer h3 {
        font-size: 1rem;
    }
    #playlistsContainer p {
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    #playlistsContainer {
        grid-template-columns: 1fr; /* Single column on very small mobile screens */
        gap: 0.5rem;
    }
    #playlistsContainer img {
        height: 150px; /* Maybe slightly larger on single column for better view */
    }
}
/* Hindustani.html specific styles for instrument cards */
.instrument-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Align content to the top */
    height: 100%; /* Ensure cards have consistent height */
    background-color: #ffffff; /* Explicitly set card background to white */
    border-radius: 0.75rem; /* Rounded corners */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06); /* Shadow */
    border: 1px solid #e5e7eb; /* Light border */
    padding: 1rem; /* Standard padding for the card content */
    box-sizing: border-box; /* Include padding and border in the element's total width and height */
}
.instrument-card img {
    max-width: 100%;
    height: 180px; /* Adjust height as needed for better image display */
    object-fit: contain; /* Ensure the full image is visible */
    margin-bottom: 0.75rem; /* Space between image and text */
    padding: 0.5rem; /* Small padding around image for better presentation */
}
.instrument-card h4 {
    color: #1f2937; /* Darker text for card titles */
    margin-bottom: 0.5rem; /* Space below title */
}
.instrument-card p {
    color: #4b5563; /* Medium gray for description text */
    padding: 0 0.5rem; /* Add some horizontal padding to text within cards */
    text-align: justify; /* Justify text for better readability */
    font-size: 0.95rem; /* Slightly smaller font for description */
    line-height: 1.4;
}

/* Specific grid layout for instrument sections */
.instrument-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Adjusted for better layout with 3 columns */
    gap: 1.5rem; /* Standard gap */
    margin-bottom: 1.5rem; /* Space below each instrument section grid */
}

/* Adjust grid for smaller screens if needed (will override instrument-grid for specific breakpoints) */
@media (max-width: 768px) {
    .instrument-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); /* Adjust for medium screens */
    }
}
@media (max-width: 480px) {
    .instrument-grid {
        grid-template-columns: 1fr; /* Single column on small phones */
    }
}
.playlist-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Adjust the gap as needed */
    justify-content: center; /* Changed to center for consistency */
}

.playlist-card {
    flex: 0 0 calc(25% - 15px); /* This will display 4 cards per row (25%) with gaps */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s;
    text-decoration: none; /* Remove underline from links */
    color: inherit; /* Inherit text color from parent */
}

/* Adjustments for smaller screens */
@media (max-width: 1200px) {
    .playlist-card {
        flex: 0 0 calc(33.333% - 13.333px); /* 3 cards per row */
    }
}

@media (max-width: 768px) {
    .playlist-card {
        flex: 0 0 calc(50% - 10px); /* 2 cards per row */
    }
}

@media (max-width: 480px) {
    .playlist-card {
        flex: 0 0 100%; /* 1 card per row */
    }
}

/* Hover effect */
.playlist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.playlist-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.playlist-card h3 {
    font-size: 1em;
    margin: 10px 0 5px;
    padding: 0 10px;
}

.playlist-card p {
    font-size: 0.8em;
    margin: 0 10px 10px;
    color: #555;
    flex-grow: 1;
}