/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar styles */
.navbar {
    background-color: #002244;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
    width: 100%;
    padding: 0.3rem 0;
    position: fixed;
    top: 0;
    z-index: 1000;
}

.navbar-brand {
    font-size: 1.2rem;
    padding: 0;
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

.navbar-nav .nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 0.9rem;
    position: relative;
    padding: 0.4rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    width: 0;
    height: 2px;
    background: whitesmoke;
    position: absolute;
    left: 0;
    bottom: 0;
    transition: width 0.5s;
}

.navbar-nav .nav-link:hover::after {
    width: 100%;
}

.navbar-sticky {
    background-color: #002244;
}

.dropdown-menu {
    background-color: #003673;
    border: none;
    border-radius: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    margin-top: 0.2rem;
}

.dropdown-item {
    color: #fff;
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: #004d99;
    color: #fff;
}

/* Header styles */
header {
    background-color: #002244;
    color: #ecf0f1;
    padding: 1rem 0;
    margin-top: 50px; 
    text-align: center;
    width: 100%;
}

header h1 {
    margin-bottom: 0.5rem;
    font-size: 2.5rem;
    animation: fadeInDown 0.5s ease-out;
}

.tagline {
    font-style: italic;
    opacity: 0.8;
    animation: fadeInUp 0.5s ease-out 0.3s both;
}

/* Navigation within header */
header nav ul {
    list-style-type: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1rem;
}

header nav ul li {
    margin: 0.5rem;
}

header nav ul li a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

header nav ul li a:hover {
    background-color: #34495e;
    color: #fff;
}

/* Main content */
main {
    padding: 2rem 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

section {
    background-color: #fff;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 800px;
    text-align: center;
}

section:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
    border-bottom: 2px solid #002244;
    padding-bottom: 0.5rem;
}

/* Lists */
ul, ol {
    padding-left: 2rem;
    margin-bottom: 1rem;
    list-style-type: none;
}

/* Table styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    text-align: center;
}

th, td {
    padding: 0.75rem;
    text-align: center;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background-color: #f2f2f2;
    font-weight: bold;
}

/* Form styles */
#calculator {
    max-width: 400px;
    margin: auto;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

#calculator h2 {
    text-align: center;
    color:  #002244;
}

#savings-calculator label {
    display: block;
    margin-bottom: 8px;
    color:  #002244;
}

#savings-calculator input {
    width: 100%;
    padding: 8px;
    margin-bottom: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.button-group {
    display: flex;
    justify-content: space-between;
}

.button-group button {
    width: 48%;
    padding: 10px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.button-group button[type="reset"] {
    background-color: green;
}

.button-group button:hover {
    background-color:  #002244;
}

.button-group button[type="reset"]:hover {
    background-color: red;
}


/* FAQ styles */
details {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 4px;
    width: 100%;
    max-width: 600px;
    text-align: left;
}

summary {
    font-weight: bold;
    cursor: pointer;
}

summary:hover {
    color: #3498db;
}

/* Footer styles */
.footer {
    background-color: #002244;
    color: white;
    padding: 3rem 0;
    text-align: center;
    width: 100%;
}

.footer a {
    color: #ffffff;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer .copyright {
    background-color: rgba(0, 0, 0, 0.2);
    padding: 1rem 0;
    margin-top: 2rem;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive design */
@media (max-width: 991px) {
    .navbar-toggler {
        padding: 0.25rem 0.5rem;
        font-size: 1rem;
    }
    
    .navbar-collapse {
        background-color: #003673;
    }
    
    .dropdown-menu {
        background-color: #003673;
        border: none;
        padding-left: 1rem;
    }
    
    .dropdown-item {
        color: rgba(255, 255, 255, 0.8);
        padding: 0.3rem 1rem;
    }
    
    .dropdown-item:hover, .dropdown-item:focus {
        background-color: transparent;
        color: #fff;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }
    
    header nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    header nav ul li {
        margin: 0.25rem 0;
    }
    
    table, th, td {
        font-size: 0.9rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}
