/* Calculator Specific Styles */

/* Enhanced Navigation Styles */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 80px;
    max-width: 1400px;
    margin: 0 auto;
}

.main-nav {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: block;
}

.main-nav a:hover,
.main-nav a.active {
    color: #2563eb;
    background: #eff6ff;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    min-width: 200px;
    z-index: 1000;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    padding: 0.75rem 1rem;
    color: #374151;
    font-weight: 400;
    border-radius: 0;
    margin: 0 0.5rem;
}

.dropdown-menu a:hover {
    background: #f3f4f6;
    color: #2563eb;
}

/* Language Switcher Enhanced */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f8fafc;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #e5e7eb;
}

.lang-current {
    color: #2563eb;
    font-weight: 600;
    font-size: 0.9rem;
}

.lang-link {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.lang-link:hover {
    color: #2563eb;
}

.lang-separator {
    color: #d1d5db;
    font-size: 0.9rem;
}

/* Calculator Section */
.calculator-section {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

.calculator-header {
    text-align: center;
    margin-bottom: 3rem;
}

.calculator-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 1rem;
}

.calculator-description {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.7;
}

.calculator-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* Calculator Form */
.calculator-form {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    height: fit-content;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 500px;
}

.form-group {
    margin-bottom: 2rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.form-icon {
    font-size: 1.1rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
}

.form-control:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    font-style: italic;
}

/* Calculator Actions */
.calculator-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    flex: 1;
    justify-content: center;
    min-width: 140px;
}

.btn-primary {
    background: linear-gradient(45deg, #2563eb, #3b82f6);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: #f8fafc;
    color: #374151;
    border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f1f5f9;
    border-color: #d1d5db;
}

.btn-tertiary {
    background: #10b981;
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-tertiary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Calculator Results */
.calculator-results {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    height: fit-content;
}

.results-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.results-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.results-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.result-label {
    font-weight: 500;
    color: #374151;
}

.result-value {
    font-weight: 600;
    color: #2563eb;
    font-size: 1.1rem;
}

.result-divider {
    height: 2px;
    background: linear-gradient(90deg, #e5e7eb, #f1f5f9, #e5e7eb);
    margin: 0.5rem 0;
}

.result-item.total {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid #bfdbfe;
}

.result-item.total .result-label {
    font-weight: 700;
    color: #1e40af;
}

.result-item.total .result-value {
    font-weight: 700;
    font-size: 1.3rem;
    color: #1e40af;
}

/* Calculator Tips */
.calculator-tips {
    margin-top: 4rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.calculator-tips h3 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 2rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.tip-item {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

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

.tip-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
}

.tip-item p {
    color: #4b5563;
    line-height: 1.6;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .main-nav {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 1001;
    }
    
    .hamburger span {
        width: 25px;
        height: 3px;
        background: #374151;
        margin: 3px 0;
        transition: 0.3s;
    }
    
    .main-nav {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        backdrop-filter: blur(15px);
        border-top: 1px solid #e5e7eb;
        padding: 2rem 0;
        gap: 0;
    }
    
    .main-nav.active {
        left: 0;
    }
    
    .main-nav li {
        margin: 0.5rem 0;
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: #f8fafc;
        margin-top: 0.5rem;
    }
    
    .calculator-header h1 {
        font-size: 2rem;
    }
    
    .calculator-form,
    .calculator-results {
        padding: 1.5rem;
    }
    
    .calculator-actions {
        flex-direction: column;
    }
    
    .btn {
        flex: none;
        width: 100%;
    }
    
    .tips-grid {
        grid-template-columns: 1fr;
    }
    
    .language-switcher {
        order: -1;
        margin-right: 1rem;
    }
}

@media (max-width: 480px) {
    .calculator-section {
        padding: 100px 0 60px;
    }
    
    .calculator-header h1 {
        font-size: 1.75rem;
    }
    
    .calculator-description {
        font-size: 1rem;
    }
    
    .calculator-form,
    .calculator-results {
        padding: 1.25rem;
    }
    
    .form-control {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Animation for results update */
@keyframes resultUpdate {
    0% {
        opacity: 0.7;
        transform: scale(0.98);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.calculator-results.updating {
    animation: resultUpdate 0.3s ease-out;
}

/* Height optimization for calculator form and results */
.calculator-form {
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calculator-results {
    min-height: 500px;
    display: flex;
    flex-direction: column;
}

.results-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.form-group:last-child {
    margin-bottom: 0;
}

/* Ensure equal spacing between form groups */
.calculator-form > .form-group {
    margin-bottom: 2rem;
}

.calculator-form > .form-group:last-child {
    margin-bottom: 0;
}
