/* Pip Calculator Specific Styles */

/* Calculator Section */
.calculator-section {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
}

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

.calculator-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.calculator-header .subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 0;
}

/* Calculator Tool */
.calculator-tool {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.calculator-form {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #00b894 100%);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #00b894 0%, var(--accent-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 212, 170, 0.3);
}

/* Calculator Result */
.calculator-result {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.result-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.result-value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.result-details {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.result-details p {
    margin: 0.5rem 0;
}

/* Content Sections */
.content-sections {
    margin-top: 3rem;
}

.article-section {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
}

.article-section h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-color);
}

.article-section h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
}

.article-section p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.article-section ul, .article-section ol {
    color: var(--text-secondary);
    margin: 1.5rem 0;
    padding-left: 2rem;
}

.article-section li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
}

/* Highlight Box */
.highlight-box {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(59, 130, 246, 0.1));
    border: 1px solid var(--primary-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin: 2rem 0;
    position: relative;
}

.highlight-box::before {
    content: '💡';
    position: absolute;
    top: -10px;
    left: 20px;
    background: var(--bg-primary);
    padding: 0 0.5rem;
    font-size: 1.25rem;
}

.highlight-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.highlight-box p {
    margin: 0;
    font-weight: 500;
    color: var(--primary-color);
}

/* Formula Box */
.formula-box {
    background: var(--bg-primary);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    text-align: center;
    font-family: 'Courier New', monospace;
}

.formula-box p {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 1rem 0;
    text-align: center;
}

.formula-box .formula {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: bold;
    margin: 0.5rem 0;
}

/* Example Box */
.example-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid var(--primary-color);
}

.example-box h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.example-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.example-box li {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.example-box li::before {
    content: "•";
    color: var(--primary-color);
    position: absolute;
    left: 0;
    font-weight: bold;
}

.example-box p {
    color: var(--text-primary);
    margin: 0.5rem 0;
}

/* FAQ Section */
.faq-item {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    background: var(--bg-secondary);
    padding: 1rem;
    cursor: pointer;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background: var(--border-color);
}

.faq-answer {
    padding: 1rem;
    color: var(--text-secondary);
    line-height: 1.5;
    display: none;
}

.faq-answer.active {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-tool {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .calculator-header h1 {
        font-size: 2rem;
    }
    
    .result-value {
        font-size: 2.5rem;
    }
    
    .calculator-section {
        padding: 1.5rem;
        margin: 1rem 0;
    }
}

@media (max-width: 480px) {
    .calculator-header h1 {
        font-size: 1.8rem;
    }
    
    .result-value {
        font-size: 2rem;
    }
    
    .form-control {
        padding: 0.6rem;
    }
    
    .btn {
        padding: 0.6rem 1.2rem;
    }
}

/* Animation for result */
@keyframes resultAppear {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-card {
    animation: resultAppear 0.5s ease-out;
}

/* Loading animation for calculator */
.calculator-form.loading {
    opacity: 0.6;
    pointer-events: none;
}

.calculator-form.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--accent-color);
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Price Input Group */
.price-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
}

.price-input-group .form-control {
    flex: 1;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.price-input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    padding: 0.75rem 1rem;
    min-width: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.price-input-group .btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-1px);
}

.price-input-group .btn:active {
    transform: translateY(0);
}

.price-input-group .btn i {
    font-size: 1rem;
}

/* FAQ Styles */
.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    margin-bottom: 1rem;
    overflow: hidden;
}

.faq-question {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.faq-question:hover {
    background: #000000 !important;
    color: white !important;
}

.faq-question h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.faq-question i {
    color: var(--primary-color);
    transition: var(--transition);
}

.faq-answer {
    padding: 1.5rem;
    background: var(--bg-primary);
    color: var(--text-secondary);
    line-height: 1.6;
    display: none;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

/* Sidebar Navigation */
.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    display: block;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.875rem;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: #000000;
    color: white;
}

/* FAQ Section */
.faq-section {
    background: var(--bg-primary);
    padding: 4rem 0;
    margin-top: 2rem;
}

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

.faq-header h2 {
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.faq-header p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 1.5rem;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-color);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

.faq-answer ul {
    padding: 0 1.5rem 1.5rem;
    margin: 0;
    color: var(--text-secondary);
}

.faq-answer li {
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

/* Responsive Design for Price Input */
@media (max-width: 768px) {
    .price-input-group {
        flex-direction: column;
    }
    
    .price-input-group .form-control {
        border-radius: 8px;
        margin-bottom: 0.5rem;
    }
    
    .price-input-group .btn {
        border-radius: 8px;
        width: 100%;
    }
    
    .faq-header h2 {
        font-size: 2rem;
    }
    
    .faq-question {
        font-size: 1rem;
        padding: 1rem;
    }
    
    .faq-answer p,
    .faq-answer ul {
        padding: 0 1rem 1rem;
    }
}
