/* css/calculadora-irpf.css */
:root {
    --primary-gradient: linear-gradient(135deg, #2563eb, #1e40af);
    --secondary-gradient: linear-gradient(135deg, #64748b, #475569);
    --success-gradient: linear-gradient(135deg, #22c55e, #16a34a);
    --warning-gradient: linear-gradient(135deg, #eab308, #ca8a04);
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --input-height: 50px;
    --input-gap: 1.5rem;
}

/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #f8fafc;
}

/* Bot車n de volver */
.back-button-container {
    max-width: 1200px;
    margin: 0 auto 1rem auto;
    padding: 0 2rem;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-gradient);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--card-shadow);
}

.back-button:hover {
    transform: translateX(-5px);
    box-shadow: var(--hover-shadow);
}

/* Contenedor principal */
.tool-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.tool-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
}

.tool-header h1 {
    color: #1e40af;
    margin-bottom: 0.5rem;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.tool-header i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Calculadora */
.calculator {
    max-width: 600px;
    margin: 0 auto 2rem;
    background: #f8fafc;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--card-shadow);
}

/* Secci車n de inputs */
.input-section {
    display: flex;
    flex-direction: column;
    gap: var(--input-gap);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.input-group label {
    font-weight: 600;
    color: #1e293b;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.input-group select {
    width: 100%;
    height: var(--input-height);
    padding: 0 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-wrapper input:focus,
.input-group select:focus {
    border-color: #2563eb;
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-wrapper .currency {
    position: absolute;
    right: 1rem;
    color: #64748b;
    font-weight: 600;
}

/* Bot車n de calcular */
.calculate-button {
    height: var(--input-height);
    background: var(--primary-gradient);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.calculate-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

/* Secci車n de resultados */
.results-section {
    margin-top: var(--input-gap);
    animation: fadeIn 0.5s ease-out;
}

.result-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-item span {
    color: #64748b;
}

.result-item strong {
    font-size: 1.1rem;
    color: #1e293b;
}

.result-item.highlight {
    background: #f0f9ff;
    margin: 0 -1.5rem;
    padding: 1rem 1.5rem;
    border-bottom: none;
}

.result-item.highlight strong {
    color: #2563eb;
    font-size: 1.2rem;
}

.negative {
    color: #ef4444 !important;
}

/* Continuaci車n de css/calculadora-irpf.css */

/* Info Section */
.info-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
}

.info-section h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
}

.info-card h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #1e40af;
    margin-bottom: 0.75rem;
}

.info-card h4 i {
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Tramos Section */
.tramos-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
}

.tramos-section h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.table-container {
    overflow-x: auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
}

.tramos-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.tramos-table th,
.tramos-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.tramos-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #1e40af;
}

.tramos-table tr:last-child td {
    border-bottom: none;
}

.tramos-table tr:hover td {
    background: #f8fafc;
}

/* Tips Section */
.tips-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #f1f5f9;
}

.tips-section h3 {
    color: #1e40af;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.tip-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    text-align: center;
}

.tip-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

.tip-card i {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: var(--warning-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tip-card h4 {
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.tip-card p {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.calculator {
    animation: fadeIn 0.5s ease-out;
}

.tip-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.tips-grid .tip-card:nth-child(1) { animation-delay: 0.1s; }
.tips-grid .tip-card:nth-child(2) { animation-delay: 0.2s; }
.tips-grid .tip-card:nth-child(3) { animation-delay: 0.3s; }
.tips-grid .tip-card:nth-child(4) { animation-delay: 0.4s; }

.tramos-table {
    animation: slideIn 0.5s ease-out;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-container {
        margin: 1rem;
        padding: 1rem;
    }

    .calculator {
        padding: 1rem;
    }

    .tips-grid {
        grid-template-columns: 1fr;
    }

    .table-container {
        margin: 0 -1rem;
        border-radius: 0;
    }

    .tramos-table {
        font-size: 0.9rem;
    }

    .tramos-table th,
    .tramos-table td {
        padding: 0.75rem;
    }

    .tip-card i {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    :root {
        --input-gap: 1rem;
    }

    .tip-card {
        padding: 1.25rem;
    }

    .info-card,
    .result-card {
        padding: 1.25rem;
    }
}