/* Modern Clean CSS */
:root {
    --primary: #2A5C82;
    --secondary: #5C9EAD;
    --background: #F8FBFE;
    --text: #2D3748;
    --border: #E2E8F0;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
}

.main-header {
    background: var(--primary);
    color: white;
    padding: 2rem 1rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-header h1 {
    font-size: 2.5rem;
    margin: 0;
    font-weight: 300;
}

.main-header h1 span {
    font-weight: 600;
}

.subtitle {
    margin: 0.5rem 0 0;
    font-size: 1.1rem;
    opacity: 0.9;
}

.calculator-container {
    max-width: 1280px;
    margin: 2rem auto;
    display: grid;
    grid-template-columns: 160px 1fr 160px;
    gap: 2rem;
    padding: 0 1rem;
}

.calculator-group {
    display: grid;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.calculator-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border: 1px solid var(--border);
}

.calculator-card h2 {
    margin: 0 0 1.5rem;
    font-size: 1.4rem;
    color: var(--primary);
}

.input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
}

.clean-input {
    padding: 0.8rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    width: 120px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.clean-input:focus {
    border-color: var(--secondary);
    outline: none;
}

.primary-btn {
    background: var(--primary);
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.2s ease;
}

.primary-btn:hover {
    background: var(--secondary);
}

.arrow {
    font-weight: 700;
}

.result-container {
    margin-top: 1.5rem;
    padding: 1rem;
    background: #F0F9FF;
    border-radius: 8px;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--primary);
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-container {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .ad-side {
        display: none;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
    
    .input-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }
    
    .input-group label {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem;
        width: 100%;
    }
    
    .clean-input {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix for inline inputs within labels */
    .input-group label .clean-input {
        flex: 1;
        min-width: 0; /* Allows flex item to shrink below content size */
        width: auto;
    }
}

.main-footer {
    text-align: center;
    padding: 2rem 1rem;
    color: #718096;
    margin-top: 3rem;
}

/* Add to existing styles */
.educational-content h3 {
    font-size: 1.2rem;
    color: var(--secondary);
    margin: 1.5rem 0 0.8rem;
}

.formula-box {
    background: #F0F9FF;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    font-family: monospace;
    border: 2px solid var(--border);
}

/* Footer Styles */
.main-footer {
    background: var(--primary);
    color: white;
    padding: 3rem 1rem 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1280px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-bottom p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-column h4 {
        justify-content: center;
    }
}

/* Add to existing footer styles */
.footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.footer-column h4 {
    color: #FFD700; /* Gold color for category titles */
    font-weight: 600;
}

.footer-links a {
    font-size: 0.95rem;
    display: block;
    padding: 0.3rem 0;
}

.footer-bottom {
    margin-top: 2rem;
    padding-top: 1.5rem;
}

@media (max-width: 768px) {
    .footer-column {
        margin-bottom: 1.5rem;
    }
    
    .footer-column:last-child {
        margin-bottom: 0;
    }
}

/* Legal Links Styling */
.legal-links {
    margin-bottom: 1.5rem;
    text-align: center;
}

.legal-links a {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.95rem;
    margin: 0 0.5rem;
    transition: opacity 0.2s ease;
}

.legal-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.divider {
    color: rgba(255,255,255,0.4);
    pointer-events: none;
}

@media (max-width: 480px) {
    .legal-links a {
        display: block;
        margin: 0.5rem 0;
    }
    
    .divider {
        display: none;
    }
}

/* Legal Pages Styling */
.legal-content {
    line-height: 1.8;
    font-size: 1rem;
}

.legal-content h3 {
    color: var(--primary);
    margin: 2rem 0 1rem;
    font-size: 1.3rem;
}

.legal-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.legal-content li {
    margin-bottom: 0.8rem;
}

.sitemap-list {
    columns: 2;
    margin: 2rem 0;
}

.sitemap-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .sitemap-list {
        columns: 1;
    }
    
    .legal-content {
        font-size: 0.95rem;
    }
}

/* Terms Page Styling */
.terms-content {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 2rem 0 !important;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.centered {
    text-align: left;
    display: inline-block;
    width: 100%;
}

.centered-list {
    list-style-position: inside;
    padding-left: 0;
    text-align: left;
    display: inline-block;
    width: 100%;
}

.terms-content h2 {
    font-size: 2.2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.terms-content h3 {
    color: var(--secondary);
    margin: 2rem 0 1rem;
}

@media (max-width: 768px) {
    .terms-content {
        padding: 1rem !important;
    }
}

/* Terms Page Styling */
.terms-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.centered-content {
    text-align: center;
}

.terms-text {
    text-align: left;
    display: inline-block;
    margin: 0 auto;
    padding: 2rem;
}

.terms-text h3 {
    color: var(--primary);
    margin: 1.5rem 0 0.5rem;
    text-align: center;
}

.terms-text p {
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: center;
}

@media (max-width: 768px) {
    .terms-text {
        padding: 1rem;
        width: 100%;
    }
    
    .terms-text p {
        text-align: left;
    }
}

.site-title-link {
    color: #fff !important; /* White color */
    font-weight: 700 !important; /* Bold */
    font-size: 1.8rem; /* Adjust this value based on your current size */
    text-decoration: none; /* Remove underline */
}

/* Optional: Add hover state */
.site-title-link:hover {
    color: #fff !important; /* Maintain white on hover */
}

.main-nav {
    background: transparent;
    padding: 0.5rem 0;
    margin-top: 1rem;
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    display: block;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none !important;
}

.nav-link:hover, .nav-link:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* Dropdown styles */
.dropdown {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.6em;
    vertical-align: middle;
    margin-left: 0.3em;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: 1px solid var(--border);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-link {
    color: var(--text);
    padding: 0.5rem 1rem;
    display: block;
    text-decoration: none;
    transition: background 0.2s ease;
    border: none !important;
}

.dropdown-link:hover {
    background: var(--background);
    color: var(--primary);
}

/* Responsive styles */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    .nav-item {
        width: 80%;
        text-align: center;
    }
    
    .nav-link {
        padding: 0.75rem;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        padding: 0;
        display: none;
        border: none;
        margin-top: 0.5rem;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .dropdown-link {
        color: white;
        padding: 0.5rem;
        border-radius: 0;
        border-left: 3px solid white !important;
        background: transparent !important;
    }
}

/* Enhanced Navigation Styles for Dropdowns */
.main-nav {
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 0;
    margin-top: 1rem;
    border-radius: 4px;
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    outline: none !important;
}

.nav-link:hover, 
.nav-link:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

.dropdown-arrow {
    font-size: 0.7em;
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

/* Dropdown Menu Styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.nav-item.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-item.dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-link {
    color: var(--text);
    padding: 0.75rem 1.25rem;
    display: block;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none !important;
    background: transparent !important;
}

.dropdown-link:hover {
    background: var(--background) !important;
    color: var(--primary);
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
    .nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 1rem;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        background: rgba(255, 255, 255, 0.1);
        padding: 0;
        display: none;
        border: none;
        margin-top: 0.5rem;
        transform: none;
        border-radius: 0 0 4px 4px;
        overflow: hidden;
    }
    
    .nav-item.dropdown:hover .dropdown-menu,
    .nav-item.dropdown:focus-within .dropdown-menu {
        display: block;
    }
    
    .dropdown-link {
        color: white;
        padding: 0.75rem 1.5rem;
        border-left: 3px solid rgba(255, 255, 255, 0.3) !important;
    }
    
    .dropdown-link:hover {
        background: rgba(255, 255, 255, 0.2) !important;
        color: white !important;
    }
}
/* Remove light blue background from navigation */
.main-nav {
    background: transparent !important;
    padding: 0.5rem 0;
    margin-top: 1rem;
}

/* Ensure nav items don't have background colors */
.nav-link {
    background: transparent !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
}

.nav-link:hover, 
.nav-link:focus {
    background: rgba(255, 255, 255, 0.2) !important;
}

.nav-link.active {
    background: rgba(255, 255, 255, 0.3) !important;
}