/* Calculator Specific Common Styles */

.calculator-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
}

.form-group,
.input-group {
    margin-bottom: 20px;
}

.form-group label,
.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.form-group input,
.form-group select,
.input-group input,
.input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.calculate-btn,
.btn-calculate {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 10px;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
}

.calculate-btn:hover,
.btn-calculate:hover {
    background: #007aa3;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 158, 203, 0.3);
}

.result-box,
.results {
    margin-top: 25px;
    padding: 25px;
    background: #f0f9ff;
    border-left: 4px solid #009ecb;
    border-radius: 8px;
    display: block;
}

.calculator-card > .result-box[id],
.calculator > .result-box[id],
.result-box[id="results"],
.results {
    display: none;
}

.result-box.show,
.results.show {
    display: block;
}

/* Nested result cards inside a visible results container must stay visible */
.result-box .result-box,
.results .result-box {
    display: block !important;
    margin-top: 12px;
}

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

/* Layout Restoration V2 */
.calc-page {
    padding: 30px 0;
    max-width: 1000px;
    margin: 0 auto;
}

.calc-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px 20px;
    text-align: left;
    margin-bottom: 40px;
}

.breadcrumb {
    display: none;
}

.title-area {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    margin-bottom: 0;
    grid-column: 1;
    grid-row: 1;
}

.title-area h1 {
    font-size: 2.5rem;
    margin: 0;
    color: var(--primary-dark);
}

.calc-desc {
    color: #4a5568;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0;
    grid-column: 1 / -1;
    grid-row: 2;
}

.calc-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.calc-content {
    color: #333;
    line-height: 1.8;
}

.calc-content h2 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 15px;
    margin-top: 30px;
}

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

/* Icon System Placeholder */
.calc-icon {
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
    display: inline-block;
}

/* Specific for Crypto, Market and Hero sections found in some calculators */
.hero {
    text-align: center;
    padding: 40px 20px;
}

.hero h1 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin: 0 0 15px;
    font-weight: bold;
}

.hero p {
    font-size: 1.2rem;
    color: #4a5568;
    margin: 0 0 10px;
}

.update-badge {
    display: inline-block;
    background: #4CAF50;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.95rem;
    margin-top: 15px;
}

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

.crypto-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    border-top: 4px solid var(--primary-color);
}

.crypto-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.crypto-icon {
    font-size: 3rem;
}

.crypto-price {
    font-size: 2rem;
    font-weight: bold;
}

.crypto-change {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.9rem;
}

.crypto-change.up {
    background: #e8f5e9;
    color: #4CAF50;
}

.crypto-change.down {
    background: #ffebee;
    color: #f44336;
}

.converter-section {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
}

.converter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end;
}

/* Monetization CTA */
.cta-box {
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cta-box[data-cta="default"]::before {
    content: "Recomendado";
    display: block;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
}

.cta-box[data-cta="default"]::after {
    content: "Optimizá este cálculo con nuestras herramientas recomendadas";
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 20px;
}

.cta-button {
    background: var(--primary-color);
    color: white !important;
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

/* Navigation: Back Home */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    margin-left: auto;
    transition: all 0.3s ease;
    padding: 8px 15px;
    border-radius: 20px;
    background: #f0f9ff;
    grid-column: 2;
    grid-row: 1;
    white-space: nowrap;
}

.back-home:hover {
    background: #e0f2fe;
    transform: translateX(-3px);
}

/* Standardized Ad Slots */
.ad-slot {
    margin: 40px auto;
    max-width: 1000px;
    text-align: center;
}

.ad-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
    margin-bottom: 8px;
    font-weight: 500;
    user-select: none;
}

.ad-container {
    background: #f8fafc;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid #f1f5f9;
    position: relative;
}

/* Premium Info/SEO Sections */
.info-section,
.calc-info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 40px;
    margin: 50px auto;
    max-width: 1000px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.info-section h2,
.calc-info h2 {
    color: var(--primary-dark);
    font-size: 1.8rem;
    margin-bottom: 25px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.info-section h3,
.calc-info h3 {
    margin-top: 30px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.info-section p,
.calc-info p {
    color: #475569;
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.info-section ul,
.calc-info ul {
    list-style: none;
    padding: 0;
}

.info-section li,
.calc-info li {
    padding: 10px 0 10px 25px;
    position: relative;
    border-bottom: 1px solid #f8fafc;
    color: #475569;
}

.info-section li::before,
.calc-info li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}
