/**
 * Estilos para el Sistema de Enlaces Cruzados - Cálculo Rápido
 * Diseño responsivo y moderno que combina con el estilo existente
 */

.cross-links-section {
    max-width: 1200px;
    margin: 40px auto 20px auto;
    padding: 0 20px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.cross-links-title {
    text-align: center;
    color: #2c3e50;
    font-size: 2.2em;
    margin-bottom: 30px;
    font-weight: 700;
    position: relative;
}

.cross-links-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    border-radius: 2px;
}

.cross-links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.cross-link-category {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid #e1e8ed;
    position: relative;
    overflow: hidden;
}

.cross-link-category::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cross-link-category:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.cross-link-category:hover::before {
    opacity: 1;
}

.cross-link-category.primary {
    border: 2px solid #3498db;
    background: linear-gradient(145deg, #ffffff, #f8fffe);
}

.cross-link-category.primary::before {
    opacity: 1;
    background: linear-gradient(90deg, #3498db, #2ecc71);
}

.cross-link-category.primary .category-title {
    color: #2c3e50;
    font-weight: 700;
}

.category-title {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 1.3em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 12px;
}

.category-icon {
    font-size: 1.4em;
    display: inline-block;
    min-width: 30px;
}

.calculator-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.calculator-link {
    color: #34495e;
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    background: #f8f9fa;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.calculator-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(52, 152, 219, 0.1), transparent);
    transition: left 0.5s ease;
}

.calculator-link:hover {
    color: #3498db;
    background: #e3f2fd;
    border-left-color: #3498db;
    transform: translateX(8px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.calculator-link:hover::before {
    left: 100%;
}

.primary .calculator-link {
    background: linear-gradient(145deg, #f0f8ff, #e6f3ff);
    border-left: 3px solid #3498db;
    font-weight: 600;
}

.primary .calculator-link:hover {
    background: linear-gradient(145deg, #e3f2fd, #bbdefb);
    transform: translateX(12px);
    box-shadow: 0 6px 18px rgba(52, 152, 219, 0.3);
}

.view-all-container {
    text-align: center;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 2px solid #ecf0f1;
}

.view-all-link {
    display: inline-block;
    color: #ffffff;
    background: linear-gradient(145deg, #3498db, #2980b9);
    text-decoration: none;
    padding: 15px 30px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    position: relative;
    overflow: hidden;
}

.view-all-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.view-all-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    background: linear-gradient(145deg, #2980b9, #3498db);
}

.view-all-link:hover::before {
    left: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cross-links-section {
        padding: 0 15px;
        margin: 30px auto 15px auto;
    }
    
    .cross-links-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .cross-link-category {
        padding: 20px;
    }
    
    .cross-links-title {
        font-size: 1.8em;
        margin-bottom: 25px;
    }
    
    .category-title {
        font-size: 1.2em;
    }
    
    .calculator-link {
        padding: 10px 14px;
        font-size: 0.95em;
    }
    
    .view-all-link {
        padding: 12px 25px;
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .cross-links-section {
        margin: 20px auto 10px auto;
    }
    
    .cross-link-category {
        padding: 18px;
        border-radius: 12px;
    }
    
    .cross-links-title {
        font-size: 1.6em;
        margin-bottom: 20px;
    }
    
    .category-title {
        font-size: 1.1em;
        margin-bottom: 15px;
    }
    
    .calculator-link {
        padding: 10px 12px;
        font-size: 0.9em;
    }
    
    .calculator-links {
        gap: 8px;
    }
    
    .view-all-link {
        padding: 10px 20px;
        font-size: 0.95em;
    }
}

/* Animaciones adicionales */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cross-links-section {
    animation: fadeIn 0.6s ease-out;
}

.cross-link-category {
    animation: fadeIn 0.6s ease-out;
}

.cross-link-category:nth-child(1) { animation-delay: 0.1s; }
.cross-link-category:nth-child(2) { animation-delay: 0.2s; }
.cross-link-category:nth-child(3) { animation-delay: 0.3s; }
.cross-link-category:nth-child(4) { animation-delay: 0.4s; }

/* Estilos para modo oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    .cross-link-category {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .category-title {
        color: #ecf0f1;
        border-bottom-color: #34495e;
    }
    
    .calculator-link {
        color: #bdc3c7;
        background: #34495e;
    }
    
    .calculator-link:hover {
        color: #3498db;
        background: #4a6741;
    }
    
    .primary .calculator-link {
        background: #34495e;
        border-left-color: #3498db;
    }
}