/* Basic reset styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    background-color: #f0f4f8;
    color: #0f3252;
    line-height: 1.8;
    overflow-x: hidden;
}

/* Header styling */
header {
    background-color: white;
    color: #004080;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

header .logo img {
    max-width: 150px;
    transition: transform 0.3s ease;
}

header .logo img:hover {
    transform: scale(1.05);
}

nav ul {
    display: flex;
    gap: 20px;
    list-style-type: none;
}

nav ul li a {
    color: #004080;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(0, 64, 128, 0.1);
    border-radius: 5px;
}

/* Main content */
main {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Inherited IRA RMD Calculator Section */
#inherited-ira-rmd-calculator {
    background: linear-gradient(145deg, #ffffff, #f7f9fc);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    margin: 40px auto;
    max-width: 800px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#inherited-ira-rmd-calculator:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

#inherited-ira-rmd-calculator h1 {
    font-size: 2.5rem;
    color: #004080;
    margin-bottom: 20px;
}

#inherited-ira-rmd-calculator h2 {
    font-size: 2rem;
    color: #004080;
    margin-bottom: 10px;
}

.ira-calculator {
    text-align: center;
    margin-bottom: 20px;
}

.ira-calculator label {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
}

.ira-calculator input {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.ira-calculator button {
    background: #004080;
    color: white;
    border: none;
    padding: 10px 20px;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.ira-calculator button:hover {
    background: #00264d;
    transform: scale(1.05);
}

.results label, .options h2 {
    font-size: 1.2rem;
    margin-top: 10px;
}

.options {
    text-align: center;
    margin-bottom: 20px;
}

.options button {
    margin: 10px 5px;
}

#message {
    margin-top: 20px;
    background-color: #f7f9fc;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Table styling */
#divisorTable {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

#divisorTable th, #divisorTable td {
    border: 1px solid #004080;
    padding: 10px;
    text-align: center;
}

#divisorTable th {
    background-color: #004080;
    color: white;
}

/* Highlight class for selected age */
.highlight {
    background-color: yellow !important; /* Choose your desired highlight color */
}

/* Footer styling */
footer {
    background: white;
    color: #004080;
    padding: 50px;
    text-align: center;
    font-size: 0.95rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

footer:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

footer p {
    margin: 0;
}

/* Responsive adjustments for mobile */
@media only screen and (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 10px;
    }

    main {
        padding: 30px;
    }

    #inherited-ira-rmd-calculator h1 {
        font-size: 1.8rem;
    }

    .ira-calculator input, .ira-calculator button {
        width: 100%;
        font-size: 1rem;
    }

    footer {
        font-size: 0.85rem;
    }

    /* Make table scrollable on mobile */
    #divisorTable {
        font-size: 0.85rem;
        overflow-x: auto;
        display: block;
    }

    #divisorTable th, #divisorTable td {
        padding: 8px;
    }

    #divisorTable th {
        font-size: 0.9rem;
    }
}

/* Extra small devices (iPhone 5 and smaller) */
@media only screen and (max-width: 480px) {
    #inherited-ira-rmd-calculator h1 {
        font-size: 1.5rem;
    }

    #divisorTable th, #divisorTable td {
        padding: 5px;
        font-size: 0.75rem;
    }
}