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

body {
    font-family: 'Inter', sans-serif;
    background-color: #f4f8ff;
    color: #333;
    margin: 0;
    padding: 0;
}

/* Navbar Styles */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #0073e6;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    flex-grow: 1; /* Center title using flex-grow */
}

.nav-right {
    display: flex;
    gap: 1rem;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
}

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

.dropdown-btn:hover {
    background-color: #e6b800;
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 5px;
    z-index: 1000;
    padding: 0.5rem 0;
    width: 300px;
}

.dropdown-content a {
    display: block;
    padding: 0.8rem 1rem;
    color: #333;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    transition: background-color 0.3s ease;
}

.dropdown-content a:hover {
    background-color: #f4f4f4;
}

.dropdown:hover .dropdown-content {
    display: block;
}

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

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

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    text-align: center;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

/* Button Row */
.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    justify-content: center;
}

/* Resource Buttons */
.resource-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 320px;
    height: 220px;
    padding: 1rem;
    font-size: 1.2rem;
    text-align: center;
    background: #0073e6;
    color: #fff; /* Keep white text */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7); /* Add shadow for contrast */
    border-radius: 15px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, background-color 0.3s ease;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.resource-btn span {
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.resource-btn img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

.resource-btn:hover {
    transform: scale(1.05);
    background: #005bb5;
}

/* Button Hover Effect */
.resource-btn span {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(0, 0, 0, 0.8);
    color: #ffffff;
    font-size: 1rem;
    line-height: 1.4;
    padding: 1rem;
    box-sizing: border-box;
    transition: height 0.3s ease, opacity 0.3s ease;
    border-radius: 15px;
    opacity: 0;
}

.resource-btn:hover span {
    height: 100%;
    opacity: 1;
}

/* Custom Backgrounds for Each Button */
.resource-btn:nth-child(1) { background-image: url('resources/rules.jpg'); }
.resource-btn:nth-child(2) { background-image: url('resources/safe.webp'); }
.resource-btn:nth-child(3) { background-image: url('resources/signs.jpg'); }
.resource-btn:nth-child(4) { background-image: url('resources/special.jpg'); }
.resource-btn:nth-child(5) { background-image: url('resources/operation.jpg'); }
.resource-btn:nth-child(6) { background-image: url('resources/impaired.webp'); }
.resource-btn:nth-child(7) { background-image: url('resources/legal.jpg'); }
.resource-btn:nth-child(8) { background-image: url('resources/laws.jpg'); }

/* Hero Section */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: url('resources/hero-bg.jpg') no-repeat center center/cover;
    color: #ffffff;
}

.hero .hero-center {
    text-align: center;
    margin-top: 2rem;
}

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

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

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

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

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

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

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

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

    .section {
        padding: 2rem 1rem;
    }

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

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