/* Percentage Calculator Specific Styles */

.tool-page {
    padding-top: 0;
}

.breadcrumb {
    padding: 20px 0;
    font-size: 14px;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--text-gray);
    transition: var(--transition);
}

.breadcrumb a:hover {
    color: var(--primary-purple);
}

.breadcrumb .separator {
    margin: 0 10px;
    color: var(--border-color);
}

.breadcrumb .current {
    color: var(--text-dark);
    font-weight: 600;
}

.tool-header {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

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

.tool-icon-large {
    font-size: 72px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.tool-header h1 {
    font-size: 48px;
    font-weight: 900;
    margin-bottom: 15px;
}

.tool-subtitle {
    font-size: 20px;
    opacity: 0.95;
    margin-bottom: 25px;
    line-height: 1.6;
}

.tool-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 16px;
}

.meta-separator {
    opacity: 0.5;
}

.tool-content {
    padding: 60px 20px;
    background: #f8f9fa;
}

.calculator-container {
    max-width: 1000px;
    margin: 0 auto;
}

/* Quick Guide */
.quick-guide {
    background: linear-gradient(135deg, #e0fff4 0%, #ffffff 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.quick-guide h3 {
    font-size: 24px;
    font-weight: 800;
    color: #38f9d7;
    margin-bottom: 20px;
}

.guide-steps {
    display: grid;
    gap: 15px;
}

.guide-step {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.step-number {
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-radius: 50%;
    font-weight: 800;
    font-size: 18px;
}

.step-text {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

/* Calculator Section */
.calculator-section {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

/* Mode Tabs */
.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.mode-tab {
    flex: 1;
    min-width: 130px;
    padding: 15px 20px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.mode-tab:hover {
    border-color: #43e97b;
    color: #43e97b;
}

.mode-tab.active {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border-color: transparent;
}

/* Calc Modes */
.calc-mode {
    display: none;
}

.calc-mode.active {
    display: block;
}

.calc-mode h2 {
    font-size: 24px;
    font-weight: 800;
    color: #333;
    margin-bottom: 10px;
}

.mode-description {
    font-size: 15px;
    color: #666;
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    border-left: 4px solid #43e97b;
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
}

.input-group label {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.input-group input {
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 18px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #43e97b;
    box-shadow: 0 0 0 4px rgba(67, 233, 123, 0.1);
}

.input-group .unit {
    position: absolute;
    right: 20px;
    bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #999;
}

/* Percentage Grid */
.percentage-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 25px;
}

.of-text {
    font-size: 20px;
    font-weight: 700;
    color: #43e97b;
    padding-bottom: 15px;
}

/* Change Grid */
.change-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 20px;
    align-items: end;
    margin-bottom: 25px;
}

.arrow {
    font-size: 28px;
    font-weight: bold;
    color: #43e97b;
    padding-bottom: 15px;
}

/* Discount Grid */
.discount-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Marks Grid */
.marks-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

/* Reverse Grid */
.reverse-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto;
    gap: 15px;
    align-items: end;
    margin-bottom: 25px;
}

.reverse-text {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    padding-bottom: 15px;
}

/* Calculate Button */
.calc-btn {
    padding: 18px 35px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: white;
    border: none;
    border-radius: 15px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.calc-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(67, 233, 123, 0.4);
}

.calc-btn:active {
    transform: translateY(-1px);
}

.calc-btn span {
    font-size: 20px;
}

/* Examples Section */
.examples-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.examples-section h3 {
    font-size: 20px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
}

.examples-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.example-btn {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.example-btn:hover {
    border-color: #43e97b;
    color: #43e97b;
    background: #e0fff4;
    transform: translateY(-2px);
}

/* Result Section */
.result-section {
    margin-top: 30px;
    padding: 30px;
    background: linear-gradient(135deg, #e0fff4 0%, #ffffff 100%);
    border-radius: 20px;
    border: 3px solid #43e97b;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.result-header h2 {
    font-size: 24px;
    font-weight: 800;
    color: #43e97b;
}

.clear-btn {
    padding: 10px 25px;
    background: #ff6b6b;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.clear-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
}

.result-display {
    padding: 25px;
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
}

.result-number {
    font-size: 48px;
    font-weight: 900;
    color: #43e97b;
    margin-bottom: 10px;
    text-align: center;
}

.result-info {
    font-size: 18px;
    color: #666;
    text-align: center;
    margin-bottom: 15px;
}

.result-details {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
}

.result-label {
    font-weight: 600;
    color: #666;
}

.result-value {
    font-weight: 700;
    color: #333;
}

.explanation-box {
    padding: 20px;
    background: white;
    border-radius: 15px;
    border-left: 4px solid #43e97b;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.explanation-box h4 {
    font-size: 16px;
    font-weight: 800;
    color: #43e97b;
    margin-bottom: 12px;
}

.explanation-box p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 10px;
}

.explanation-box .formula {
    font-family: 'Courier New', monospace;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 150px;
    padding: 15px 25px;
    background: white;
    color: #333;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.action-btn:hover {
    border-color: #43e97b;
    color: #43e97b;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(67, 233, 123, 0.2);
}

.action-btn span {
    font-size: 20px;
}

/* Formulas Box */
.formulas-box {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.formulas-box h3 {
    font-size: 24px;
    font-weight: 800;
    color: #43e97b;
    margin-bottom: 25px;
    text-align: center;
}

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

.formula-card {
    padding: 25px;
    background: #f8f9fa;
    border-radius: 15px;
    border-top: 4px solid #43e97b;
}

.formula-card h4 {
    font-size: 18px;
    font-weight: 800;
    color: #333;
    margin-bottom: 15px;
}

.formula {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: #43e97b;
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 10px;
    text-align: center;
}

.formula-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
}

/* SEO Content */
.seo-content {
    padding: 80px 20px;
    background: white;
}

.content-article {
    max-width: 900px;
    margin: 0 auto;
    line-height: 1.8;
}

.content-article h2 {
    font-size: 32px;
    font-weight: 800;
    margin-top: 50px;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.content-article h2:first-child {
    margin-top: 0;
}

.content-article h3 {
    font-size: 24px;
    font-weight: 700;
    margin-top: 35px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.content-article p {
    margin-bottom: 20px;
    color: var(--text-gray);
    font-size: 16px;
}

.content-article ul {
    margin-bottom: 25px;
    padding-left: 30px;
    color: var(--text-gray);
}

.content-article li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.content-article strong {
    color: var(--text-dark);
    font-weight: 700;
}

.related-tools {
    max-width: 900px;
    margin: 60px auto 0;
    padding: 40px;
    background: var(--bg-light);
    border-radius: var(--border-radius);
}

.related-tools h3 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 30px;
    text-align: center;
}

.related-tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
}

.related-tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 25px;
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
    text-align: center;
}

.related-tool-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: #43e97b;
}

.related-tool-card .tool-icon {
    font-size: 42px;
}

.related-tool-card .tool-name {
    font-weight: 700;
    color: var(--text-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
    .tool-header h1 {
        font-size: 32px;
    }
    
    .tool-subtitle {
        font-size: 16px;
    }
    
    .calculator-section {
        padding: 25px;
    }
    
    .mode-tabs {
        flex-direction: column;
    }
    
    .mode-tab {
        width: 100%;
    }
    
    .percentage-grid,
    .change-grid,
    .reverse-grid {
        grid-template-columns: 1fr;
    }
    
    .of-text,
    .arrow,
    .reverse-text {
        padding: 0;
        text-align: center;
    }
    
    .discount-grid,
    .marks-grid {
        grid-template-columns: 1fr;
    }
    
    .formula-grid {
        grid-template-columns: 1fr;
    }
    
    .examples-grid {
        grid-template-columns: 1fr;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .action-btn {
        width: 100%;
    }
    
    .content-article h2 {
        font-size: 26px;
    }
    
    .content-article h3 {
        font-size: 20px;
    }
    
    .related-tools-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .tool-header {
        padding: 40px 20px;
    }
    
    .tool-header h1 {
        font-size: 26px;
    }
    
    .tool-icon-large {
        font-size: 56px;
    }
    
    .quick-guide {
        padding: 20px;
    }
    
    .guide-step {
        flex-direction: column;
        text-align: center;
    }
    
    .calculator-section {
        padding: 20px;
    }
    
    .calc-btn {
        max-width: 100%;
    }
    
    .result-number {
        font-size: 36px;
    }
}

/* Print Styles */
@media print {
    .tool-header,
    .breadcrumb,
    .quick-guide,
    .mode-tabs,
    .examples-section,
    .action-buttons,
    .formulas-box,
    .seo-content {
        display: none !important;
    }
    
    .result-section {
        border: 1px solid #333;
        box-shadow: none;
    }
}