.calculator-page {
    min-height: 100vh;
    background: #f8f9fa;
}

/* Hero Section */
.calculator-hero {
    position: relative;
    height: 30vh;
    width: 100%;
    margin-bottom: 2rem;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(85, 130, 139, 0.85) 0%, rgba(58, 90, 99, 0.85) 100%);
}

.hero-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    z-index: 2;
}

.hero-text {
    max-width: 800px;
    padding: 0 2rem;
    position: relative;
    z-index: 3;
    text-align: center;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: white;
}

.hero-subtitle {
    font-size: 1.1rem;
    font-weight: 300;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: white;
}

/* Calculator Container */
.calculator-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

/* Calculator Card */
.calculator-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.calculator-header {
    background: #55828B;
    color: white;
    padding: 1.5rem;
}

.calculator-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.calculator-body {
    padding: 2rem;
}

/* Input Fields */
.input-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.input-field {
    display: flex;
    flex-direction: column;
}

.input-field label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.percentage, .years, .currency {
    position: absolute;
    right: 1rem;
    color: #666;
    font-size: 0.9rem;
    pointer-events: none;
}

.input-wrapper input:focus {
    border-color: #55828B;
    outline: none;
    box-shadow: 0 0 0 3px rgba(85, 130, 139, 0.1);
}

.input-wrapper input[type="number"]::-webkit-inner-spin-button,
.input-wrapper input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Calculate Button */
.calculate-btn {
    background: #55828B;
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.calculate-btn:hover {
    background: #3a5a63;
    transform: translateY(-2px);
}

/* Results Card */
.results-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.results-header {
    background: #55828B;
    color: white;
    padding: 1.5rem;
}

.results-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.results-body {
    padding: 2rem;
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
}

.results-table th,
.results-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.results-table th {
    font-weight: 600;
    color: #666;
    background: #f8f9fa;
}

.results-table tr:last-child td {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-hero {
        height: 25vh;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .calculator-container {
        padding: 0 1rem;
    }
    .input-group {
        grid-template-columns: 1fr;
    }
    .results-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .calculator-hero {
        height: 20vh;
    }
    .hero-title {
        font-size: 1.75rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }
    .hero-text {
        padding: 0 1rem;
    }
    .calculator-body,
    .results-body {
        padding: 1.5rem;
    }
    .results-table th,
    .results-table td {
        padding: 0.75rem;
    }
}

/* Arabic mode adjustments for calculator */
body.arabic .calculator-page {
    direction: rtl;
}

body.arabic .input-wrapper input {
    text-align: right;
}

body.arabic .input-wrapper .currency,
body.arabic .input-wrapper .percentage,
body.arabic .input-wrapper .years {
    left: 1rem;
    right: auto;
}

body.arabic .results-table th,
body.arabic .results-table td {
    text-align: right;
}

/* Keep numbers in LTR direction */
body.arabic .input-wrapper input[type="number"],
body.arabic .results-table td {
    direction: ltr;
    text-align: right;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.input-wrapper input.invalid {
    border-color: #dc3545;
}

.input-wrapper input.valid {
    border-color: #28a745;
}


