/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f8ff; /* Light blue background */
    color: #333; /* Dark gray font color */
    line-height: 1.7;
    scroll-behavior: smooth;
}

/* Navbar */
.navbar {
    background: #0073e6;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.6rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    color: #000;
    text-decoration: none;
    font-size: 1rem;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #ffcc00;
}

/* Dropdown Styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-btn {
    background: #ffcc00;
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.dropdown-btn:hover {
    background: #ffb700;
}

.dropdown-content {
    position: absolute;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 1000;
    top: 100%;
    left: 0;
    margin-top: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    transition-delay: 0.3s;
}

.dropdown-content a {
    color: #333;
    padding: 0.8rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: 0.3s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-content a:hover {
    background: #f4f8ff;
    color: #0073e6;
}

/* Show the dropdown content when the button is hovered or focused */
.dropdown:hover .dropdown-content,
.dropdown:focus-within .dropdown-content {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* Keep dropdown visible when hovering over the content */
.dropdown-content:hover {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

/* Navbar Right Alignment */
.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Mock Test Button */
.mock-test-btn {
    background: #ffcc00;
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.mock-test-btn:hover {
    background: #ffb700;
}

/* Centering the "Or take the mock test" text */
.hero-center {
    text-align: center;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center everything horizontally */
    gap: 0.5rem; /* Add spacing between elements */
}

.hero-center .btn {
    display: inline-block;
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1.2rem;
    text-decoration: none;
    background: #ffcc00;
    color: #000;
    transition: 0.3s;
}

.hero-center .btn:hover {
    background: #ffb700;
}

/* Styling the "Or take the mock test" text */
.mock-test-text {
    margin-top: 0.5rem; /* Adjust spacing */
    font-size: 1.1rem;
    color: #333;
}

.mock-test-link {
    color: #0073e6;
    text-decoration: underline;
    font-weight: bold;
}

.mock-test-link:hover {
    color: #005bb5;
}

/* Style the "Learn" link in the navbar to look like the "Mock Test" button */
.nav-links a.learn-btn {
    background: #ffcc00;
    color: #000;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}

.nav-links a.learn-btn:hover {
    background: #ffb700;
}

/* Hero Section */
.hero {
    text-align: left;
    padding: 4rem 2rem;
    background: url('resources/hero-bg.jpg') no-repeat center center/cover;
    color: #000; /* Change text color to black */
    position: relative;
}

.hero .container {
    max-width: 1000px;
    margin: auto;
}

.hero h1 {
    font-size: 2.8rem;
    font-weight: bold;
    margin-bottom: 1rem;
    color: #000; /* Ensure heading is black */
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 1.5rem;
    color: #000; /* Ensure paragraph is black */
}

.hero .buttons {
    display: flex;
    gap: 1rem;
}

.hero .btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1.1rem;
    text-decoration: none;
    transition: 0.3s;
}

.hero .btn.primary {
    background: #ffcc00;
    color: #000;
}

.hero .btn.primary:hover {
    background: #ffb700;
}

.hero .btn.secondary {
    background: #fff;
    color: #0073e6;
    border: 2px solid #0073e6;
}

.hero .btn.secondary:hover {
    background: #0073e6;
    color: #fff;
}

/* Section Styles */
.section {
    padding: 4rem 2rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin: 2rem auto;
    max-width: 1200px;
    text-align: center;
}

.section h2 {
    font-size: 2.2rem;
    color: #0073e6;
    margin-bottom: 1rem;
}

/* Learning Resources */
.button-row {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

/* Resource Buttons with Images */
.resource-btn {
    min-width: 220px;
    padding: 1.2rem;
    text-align: center;
    font-size: 1.2rem;
    text-decoration: none;
    border-radius: 10px;
    color: #fff;
    background: #0073e6;
    transition: 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 250px;
}

.resource-btn img {
    width: 100%;
    height: 150px;
    border-radius: 10px;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.resource-btn:hover {
    background: #005bb5;
}

/* Sample Test Section */
.test-box {
    background: #f4f8ff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 2rem auto;
    text-align: center;
    color: #333;
}

.test-image {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.test-container {
    margin-bottom: 2rem;
}

.answer-buttons li {
    padding: 1rem;
    background: #0073e6;
    color: #fff;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    list-style: none;
    margin-bottom: 0.5rem;
}

.answer-buttons li:hover {
    background: #005bb5;
}

/* New selected state - using a distinct color */
.answer-buttons li.selected {
    background: #32cd32; /* bright green color */
}

/* Test Controls */
.test-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

#start-btn,
#next-btn {
    padding: 1rem 2rem;
    border-radius: 5px;
    font-size: 1.1rem;
    text-decoration: none;
    transition: 0.3s;
    background: #ffcc00;
    color: #000;
    border: none;
    cursor: pointer;
}

#start-btn:hover,
#next-btn:hover {
    background: #ffb700;
}

#start-btn.hidden,
#next-btn.hidden {
    display: none;
}

/* Confidence Panel */
.confidence-panel {
    background: #f4f8ff;
    text-align: center;
    padding: 3rem 2rem;
}

.confidence-panel h2 {
    font-size: 2rem;
    color: #0073e6;
    margin-bottom: 1rem;
}

.confidence-panel p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 2rem;
}

.image-grid {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.image-grid img {
    width: 30%;
    max-width: 250px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.image-grid img:hover {
    transform: scale(1.05);
}

/* Hyperlinked Section Titles */
.section-link {
    text-decoration: none;
    color: #0073e6;
    transition: color 0.3s ease;
}

.section-link:hover {
    color: #005bb5;
    text-decoration: underline;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem 1rem;
    background: #0073e6;
    color: #fff;
}

/* Image Carousel */
.image-carousel {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem 0;
    overflow: hidden;
    position: relative;
}

.image-carousel-container {
    width: 400px;     /* Increased width for rectangle shape */
    height: 250px;    /* Adjusted height for 16:10 aspect ratio */
    overflow: hidden;
    border-radius: 12px; /* Slightly increased rounded edges */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.carousel-images {
    display: flex;
    width: 800%;      /* 8 images (7 + 1 duplicate for smooth loop) */
    animation: slide 21s infinite linear;
}

.carousel-images img {
    width: 400px;     /* Match container width */
    height: 250px;    /* Match container height */
    object-fit: cover; /* Changed to cover to fill the space better */
    flex-shrink: 0;
    transition: transform 0.5s ease-in-out;
}

/* Improved Animation */
@keyframes slide {
    0% { transform: translateX(0); }
    100% { transform: translateX(-87.5%); } /* Adjusted for 8 images */
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        text-align: center;
    }

    .hero .buttons {
        flex-direction: column;
    }

    .section {
        padding: 2rem 1rem;
    }

    .button-row {
        flex-direction: column;
        align-items: center;
    }

    .resource-btn {
        width: 100%;
    }
}