/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    background-color: #afeeee;
    color: #333;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Navbar Styles */
nav {
    background-color: #fffacd;
    padding: 5px 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

 /* Logo Styling */
.navbar-logo {
    margin-left: 10px; 
} 

.navbar-logo img {
    height: 20px; /* Set explicit height */
    width: 15px;   /* Keep aspect ratio */
    display: inline-block;
    vertical-align: middle;
    margin-right: 15px; /* Adjust margin if necessary */
    transition: transform 0.2s ease;
}

.navbar-logo img:hover {
    transform: scale(1.05); /* Subtle hover effect */
}

/* Navbar Links Styling */
nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
}
nav ul li {
    margin: 0 15px;
}
nav ul li a {
    color: #191970;
    text-decoration: none;
    padding: 10px 20px;
    transition: background-color 0.3s ease;
}
nav ul li a:hover {
    background-color: #ffff00;
    border-radius: 5px;
}

/* Header Styles */
header {
    background-color: #007bff;
    color: #fff;
    padding: 40px;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #191970;
}
header p {
    font-size: 1.2rem;
    color: #191970;
    font-weight: 400;
}

/* Container and Card Styles */
.container {
    max-width: 1200px;
    margin: 50px auto;
    padding: 20px;
}
.card {
    background-color: #fffacd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.highlight {
    background-color: #0000ff;
    transition: background-color 1s ease;
}
.card h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}
.card p {
    font-size: 1rem;
    color: #555;
    flex-grow: 1;
}
.card .btn {
    align-self: flex-start;
    margin-top: 15px;
}

/* Footer Styles */
footer {
    background-color: #343a40;
    color: #fff;
    padding: 20px;
    text-align: center;
    margin-top: 50px;
}
footer p {
    font-size: 0.9rem;
    color: black;
}
footer a {
    color: #fff;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

/* Search Bar Styles */
.search-bar {
    margin: 30px 0;
    text-align: center;
}
.search-bar input[type="text"] {
    width: 50%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 5px;
    border: 1px solid #ccc;
}

/* Dark Mode Styles */
.dark-mode {
    background-color: #333;
    color: #fff;
}
.dark-mode header {
    background-color: #222;
}
.dark-mode nav {
    background-color: #444;
}
.dark-mode nav ul li a {
    color: #ddd;
}
.dark-mode header h1 {
    color: #ddd;
}
.dark-mode header p {
    color: #ddd;
}
.dark-mode .card {
    background-color: #444;
}
.dark-mode .card p {
    color: #bbb;
}
.dark-mode footer {
    background-color: #222;
}
.dark-mode .search-bar input[type="text"] {
    background-color: #555;
    border-color: #777;
    color: #fff;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
    position: fixed;
    bottom: 20px; 
    right: 20px;  
    padding: 10px 20px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    z-index: 1000; 
}
.dark-mode-toggle:hover {
    background-color: #0056b3;
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    header h1 {
        font-size: 2rem;
    }
    .card h2 {
        font-size: 1.5rem;
    }
    .btn {
        width: 100%;
        text-align: center;
    }
    .search-bar input[type="text"] {
        width: 80%;
    }
    .navbar-logo img {
        height: 50px; /* Resize logo for smaller screens */
    }
    nav ul {
        flex-direction: column; /* Stack links vertically on smaller screens */
        gap: 10px;
    }
}
