﻿﻿/* =========================================
   ENGINEERING CALCULATOR MODULE (PREMIUM)
   ========================================= */

/* Calculator Section Area */
.calc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.calc-card {
    background: white;
    border-radius: 20px;
    padding: 35px 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    height: 100%;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.calc-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 50, 100, 0.1);
}

.calc-card:hover::before {
    transform: scaleX(1);
}

.calc-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(41, 98, 255, 0.05), rgba(0, 176, 255, 0.05));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-size: 1.8rem;
    transition: all 0.4s ease;
}

.calc-card:hover .calc-icon {
    background: var(--primary-color);
    color: white;
    transform: rotateY(180deg);
}

.calc-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.calc-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 20px;
}

.calc-action {
    margin-top: auto;
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0.8;
    transition: 0.3s;
}

.calc-card:hover .calc-action {
    opacity: 1;
    gap: 15px;
}

/* =========================================
   PREMIUM MODAL SYSTEM
   ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-box {
    background: white;
    width: 100%;
    max-width: 800px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: scale(0.9);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.active .modal-box {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 25px 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: white;
    border-bottom: 4px solid var(--accent-color);
}

.modal-title {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.3rem;
    font-weight: 700;
}

.modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--accent-color);
    transform: rotate(90deg);
}

/* Wizard Steps in Modal */
.modal-body {
    padding: 40px;
    overflow-y: auto;
    flex-grow: 1;
}

.wizard-step-container {
    display: none;
    animation: slideInRight 0.5s ease;
}

.wizard-step-container.active {
    display: block;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    gap: 10px;
}

.step-badge {
    background: rgba(41, 98, 255, 0.1);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.step-question {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 25px;
    font-weight: 600;
}

/* Form Elements */
.calc-input-group {
    margin-bottom: 25px;
}

.calc-label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    color: var(--text-secondary);
}

.calc-input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.1rem;
    font-family: var(--font-body);
    transition: 0.3s;
    background: #f8fafc;
}

.calc-input:focus {
    border-color: var(--primary-color);
    background: white;
    outline: none;
    box-shadow: 0 0 0 4px rgba(41, 98, 255, 0.1);
}

.calc-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
}

.calc-option-btn {
    border: 2px solid #e2e8f0;
    background: white;
    padding: 20px;
    border-radius: 15px;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
}

.calc-option-btn:hover {
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.calc-option-btn.selected {
    border-color: var(--primary-color);
    background: rgba(41, 98, 255, 0.05);
    color: var(--primary-color);
}

/* Modal Footer */
.modal-footer {
    padding: 20px 40px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-prev {
    color: var(--text-secondary);
    background: none;
    border: none;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    transition: 0.3s;
}

.btn-prev:hover {
    background: #e2e8f0;
    color: var(--text-primary);
}

.btn-next {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(41, 98, 255, 0.3);
    transition: 0.3s;
}

.btn-next:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(41, 98, 255, 0.4);
}

.btn-next:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Result Screen Styles */
.result-container {
    animation: fadeIn 0.6s ease;
}

.result-header {
    text-align: center;
    margin-bottom: 30px;
}

.result-score {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
    margin: 10px 0;
}

.result-unit {
    font-size: 1.2rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.result-notes {
    background: #fff3e0;
    border-left: 4px solid #ff9800;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.result-notes h4 {
    color: #e65100;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-list {
    list-style: none;
    padding: 0;
}

.result-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
    color: #5d4037;
    font-size: 0.95rem;
}

.result-list li::before {
    content: '.';
    color: #ff9800;
    font-weight: bold;
    font-size: 1.5rem;
    position: absolute;
    left: 5px;
    top: -5px;
}

.result-final {
    background: linear-gradient(135deg, #0f172a, #003366);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    margin-top: 20px;
}

.result-final h4 {
    color: var(--accent-color);
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.result-final p {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 0;
}
