/* Variables for color themes */
:root {
    --background-color: #ffffff;
    --text-color: #333333;
    --card-background: #f5f5f5;
    --heading-color: #222222;
    --border-color: #dddddd;
    --navbar-color: #0E5135; /* Orange color for navbar */
    --link-hover-color: #ff6600; /* Hover color for links */
    --card-hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); /* Shadow for card hover effect */
    --footer-color: #777777;
}

/* Dark mode colors when checkbox is checked */
.dark-mode-toggle:checked ~ .page  {

    --background-color: #454545;
    --text-color: #e0e0e0;
    --card-background: #1e1e1e;
    --heading-color: #ffffff;
    --border-color: #444444;
    --footer-color: #1e1e1e;

}
.dark-mode-toggle:checked ~ .navbar {
    --navbar-color: #E4000F;
    /* other styles */
}

/* Basic styling */
html {
    scroll-behavior: smooth; /* Enable smooth scrolling */
}

body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

.page {
    background-color: var(--background-color);
    color: var(--text-color);
    min-height: 100vh;
    transition: all 0.5s ease;
    padding: 20px;
    padding-top: 30px; /* Add extra padding at the top to ensure content doesn't start right below the navbar */
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0.8; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide the checkbox but keep it functional */
.dark-mode-toggle {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Style the toggle button */
.toggle-label {
    position: fixed;
    top: 15px;
    right: 20px;
    display: inline-block;
    width: 60px;
    height: 30px;
    background-color: #ccc;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
    z-index: 1000;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.toggle-label::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 6px;
    font-size: 16px;
    z-index: 1;
}

.toggle-label::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    text-align: right;
    padding-right: 5px;
}

/* Move the toggle button when checkbox is checked */
.dark-mode-toggle:checked + .toggle-label {
    background-color: #6b6b6b;
}

.dark-mode-toggle:checked + .toggle-label::after {
    left: 32px;
    content: '';
}

/* No sun icon to hide in dark mode - keeping selector for future reference */
.dark-mode-toggle:checked + .toggle-label::before {
    /* opacity: 0; - removed as no longer needed */
}

/* Focus state for accessibility */
.dark-mode-toggle:focus + .toggle-label {
    outline: 2px solid #4d90fe;
    outline-offset: 2px;
}

/* Content styling */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2 {
    color: var(--heading-color);
}

.card {
    background-color: var(--card-background);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;

}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background-color: var(--navbar-color);
    transition: height 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-color: var(--navbar-color);
    cursor: default;
}

.card:hover::before {
    height: 100%;
}

.card:focus-within {
    outline: 2px solid var(--navbar-color);
    outline-offset: 2px;
}


/* Navbar styling - will not change in dark mode */
.navbar {
    background-color: var(--navbar-color) !important; /* !important ensures this color is always applied */
    color: white !important;
    padding: 15px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative; /* Added for absolute positioning of navbar-links */
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
    margin-left: -230px; /* Added negative margin to move the brand further left */
    /* order property removed as it's not needed with the new layout */
    /* The brand will naturally stay on the left side */
}

.navbar-brand img {
    height: auto; /* Set appropriate height for the logo */
    width: 100px;
    vertical-align: middle;
}

.navbar-links {
    display: flex;
    gap: 20px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    /* order property removed as it's not needed with absolute positioning */
}

/* Navbar link styling */
.navbar-links a {
    color: white !important; /* !important ensures this color is always applied */
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 0;
    transition: all 0.3s ease;
}

.navbar-links a:hover {
    color: #ffe0b2 !important; /* Light orange color on hover */
}

/* Dropdown menu styling */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    color: white !important;
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 5px 15px; /* Increased horizontal padding to make buttons wider */
    min-width: 100px; /* Added min-width for consistent button width */
    justify-content: center; /* Center the text within the button */
    transition: all 0.3s ease;
}

.dropdown-toggle::after {
    content: '▼';
    font-size: 0.7em;
    margin-left: 5px;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    background-color: var(--navbar-color);
    min-width: 100%; /* Match width of parent dropdown-toggle */
    width: 100%; /* Ensure the dropdown is exactly the same width as the button */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 8px 0;
    margin-top: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    list-style: none;
}

.dropdown-menu a {
    display: block;
    padding: 8px 15px; /* Match horizontal padding with dropdown-toggle */
    white-space: nowrap;
    color: white !important;
    text-align: center; /* Center text to match dropdown-toggle */
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Underline effect for main navbar links */
.navbar-links > a::after,
.dropdown-toggle::before {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #ffe0b2;
    transition: width 0.3s ease;
}

.navbar-links > a:hover::after,
.dropdown:hover .dropdown-toggle::before {
    width: 100%;
}

/* Ensure dropdown toggle has the same hover color as regular links */
.dropdown-toggle:hover {
    color: #ffe0b2 !important;
}

.navbar-links a:focus {
    outline: 2px solid #ffe0b2;
    outline-offset: 2px;
}
/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: var(--navbar-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 99;
}

.back-to-top:hover, .back-to-top:focus {
    opacity: 1;
    transform: translateY(-3px);
}

.back-to-top::after {
    content: "↑";
    font-size: 20px;
    font-weight: bold;
}

/* Footer styling */
.footer {
    background-color: var(--footer-color);
    border-top: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    margin-left: -20px;
    margin-right: -20px;
    margin-bottom: -20px;
    width: calc(100% + 40px);
    box-sizing: border-box;
}

.footer p {
    margin: 5px 0;
    font-size: 0.9rem;
}

table,th,td{
    border: 1px solid black;
    border-collapse: collapse;
}
th,td{
    padding: 5px;
}
