/* Main Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    color: #333;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
}

/* Navbar Styling */
.navbar {
    background-color: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand, 
.navbar-nav .nav-link {
    color: #333 !important;
}

.navbar-brand {
    font-weight: 600;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: #5a8eff !important;
}

.navbar-toggler {
    border-color: #ddd;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%280, 0, 0, 0.55%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.dropdown-menu {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border: none;
}

.dropdown-item.active, 
.dropdown-item:active {
    background-color: #5a8eff;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    background: linear-gradient(135deg, #5a8eff 0%, #7e57c2 100%);
    color: white;
    border-bottom: 1px solid #e9ecef;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hero h1, 
.hero .display-4, 
.hero p, 
.hero .lead {
    color: white;
}

/* Calculator Boxes */
.calculator-box {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.calculator-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.calculator-title {
    color: #0d6efd;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.calculator-content {
    padding: 0.5rem;
}

.result-box {
    background-color: #e8f4ff;
    border-radius: 8px;
    border: 1px solid #b8daff;
}

.result-value {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0d6efd;
}

/* Calculator Preview Boxes */
.calculator-preview {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    padding: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calculator-preview:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.12);
}

.calculator-preview h3 {
    color: #0d6efd;
    font-size: 1.35rem;
    margin-bottom: 1rem;
}

/* Content Sections */
.formula-box {
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.formula {
    font-family: "Courier New", monospace;
    background-color: #f1f1f1;
    padding: 0.5rem;
    border-radius: 4px;
    font-weight: bold;
}

.example {
    font-style: italic;
    color: #666;
}

.exercise-box {
    background-color: #fff;
    border-left: 4px solid #0d6efd;
    padding: 1rem;
    border-radius: 0 5px 5px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.solution-box {
    background-color: #f8f9fa;
    border-radius: 5px;
    border: 1px dashed #ced4da;
}

/* Footer */
footer {
    background-color: #212529;
    color: #fff;
}

footer a {
    text-decoration: none;
    transition: color 0.2s;
}

footer a:hover {
    color: #b8daff !important;
    text-decoration: underline;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
    }
    
    .calculator-preview {
        margin-bottom: 1.5rem;
    }
}